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 d5e=Object.create;var uk=Object.defineProperty;var f5e=Object.getOwnPropertyDescriptor;var p5e=Object.getOwnPropertyNames;var m5e=Object.getPrototypeOf,h5e=Object.prototype.hasOwnProperty;var $s=(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 Xe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wr=(e,t)=>{for(var r in t)uk(e,r,{get:t[r],enumerable:!0})},OK=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of p5e(t))!h5e.call(e,n)&&n!==r&&uk(e,n,{get:()=>t[n],enumerable:!(o=f5e(t,n))||o.enumerable});return e};var a=(e,t,r)=>(r=e!=null?d5e(m5e(e)):{},OK(t||!e||!e.__esModule?uk(r,"default",{value:e,enumerable:!0}):r,e)),g5e=e=>OK(uk({},"__esModule",{value:!0}),e);var Y=Xe((Gct,NK)=>{NK.exports=window.wp.data});var ne=Xe((Yct,MK)=>{MK.exports=window.wp.coreData});var U=Xe((qct,FK)=>{FK.exports=window.wp.element});var ke=Xe((Kct,DK)=>{DK.exports=window.wp.compose});var Bn=Xe((Zct,LK)=>{LK.exports=window.wp.hooks});var be=Xe((Xct,BK)=>{BK.exports=window.wp.blockEditor});var At=Xe((rut,GK)=>{GK.exports=window.wp.blocks});var an=Xe((out,YK)=>{YK.exports=window.wp.date});var ho=Xe((nut,qK)=>{qK.exports=window.wp.url});var Ga=Xe((iut,KK)=>{KK.exports=window.wp.deprecated});var Dt=Xe((sut,ZK)=>{ZK.exports=window.wp.preferences});var xe=Xe((cut,eZ)=>{eZ.exports=window.wp.primitives});var E=Xe((uut,tZ)=>{tZ.exports=window.ReactJSXRuntime});var vf=Xe((zpt,rZ)=>{rZ.exports=window.wp.privateApis});var ZV=Xe((Qpt,sZ)=>{sZ.exports=window.wp.styleEngine});var z=Xe((cmt,fZ)=>{fZ.exports=window.wp.i18n});var n2=Xe((umt,pZ)=>{"use strict";pZ.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 i2=Xe((fmt,gZ)=>{"use strict";var rNe=function(t){return oNe(t)&&!nNe(t)};function oNe(e){return!!e&&typeof e=="object"}function nNe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||aNe(e)}var iNe=typeof Symbol=="function"&&Symbol.for,sNe=iNe?Symbol.for("react.element"):60103;function aNe(e){return e.$$typeof===sNe}function lNe(e){return Array.isArray(e)?[]:{}}function h1(e,t){return t.clone!==!1&&t.isMergeableObject(e)?i0(lNe(e),e,t):e}function cNe(e,t,r){return e.concat(t).map(function(o){return h1(o,r)})}function uNe(e,t){if(!t.customMerge)return i0;var r=t.customMerge(e);return typeof r=="function"?r:i0}function dNe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function mZ(e){return Object.keys(e).concat(dNe(e))}function hZ(e,t){try{return t in e}catch{return!1}}function fNe(e,t){return hZ(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function pNe(e,t,r){var o={};return r.isMergeableObject(e)&&mZ(e).forEach(function(n){o[n]=h1(e[n],r)}),mZ(t).forEach(function(n){fNe(e,n)||(hZ(e,n)&&r.isMergeableObject(t[n])?o[n]=uNe(n,r)(e[n],t[n],r):o[n]=h1(t[n],r))}),o}function i0(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||cNe,r.isMergeableObject=r.isMergeableObject||rNe,r.cloneUnlessOtherwiseSpecified=h1;var o=Array.isArray(t),n=Array.isArray(e),i=o===n;return i?o?r.arrayMerge(e,t,r):pNe(e,t,r):h1(t,r)}i0.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,n){return i0(o,n,r)},{})};var mNe=i0;gZ.exports=mNe});var Pl=Xe((vht,tX)=>{tX.exports=window.wp.a11y});var Fu=Xe((bht,rX)=>{rX.exports=window.wp.apiFetch});var It=Xe((yht,oX)=>{oX.exports=window.wp.notices});var Lt=Xe((xht,cX)=>{cX.exports=window.wp.htmlEntities});var dX=Xe((Eht,uX)=>{"use strict";uX.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 yf=Xe((Fht,vX)=>{vX.exports=window.wp.mediaUtils});var E1=Xe((Dht,bX)=>{bX.exports=window.wp.uploadMedia});var G=Xe((Jht,FX)=>{FX.exports=window.wp.components});var kl=Xe((kgt,tQ)=>{tQ.exports=window.wp.patterns});var _e=Xe((Rgt,rQ)=>{rQ.exports=window.React});var Du=Xe((fbt,OQ)=>{OQ.exports=window.ReactDOM});var UJ=Xe(HJ=>{"use strict";var S0=_e();function UDe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var WDe=typeof Object.is=="function"?Object.is:UDe,GDe=S0.useState,YDe=S0.useEffect,qDe=S0.useLayoutEffect,KDe=S0.useDebugValue;function ZDe(e,t){var r=t(),o=GDe({inst:{value:r,getSnapshot:t}}),n=o[0].inst,i=o[1];return qDe(function(){n.value=r,n.getSnapshot=t,y7(n)&&i({inst:n})},[e,r,t]),YDe(function(){return y7(n)&&i({inst:n}),e(function(){y7(n)&&i({inst:n})})},[e]),KDe(r),r}function y7(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!WDe(e,r)}catch{return!0}}function XDe(e,t){return t()}var QDe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?XDe:ZDe;HJ.useSyncExternalStore=S0.useSyncExternalStore!==void 0?S0.useSyncExternalStore:QDe});var Q1=Xe((h0t,WJ)=>{"use strict";WJ.exports=UJ()});var YJ=Xe(GJ=>{"use strict";var nA=_e(),JDe=Q1();function $De(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var eLe=typeof Object.is=="function"?Object.is:$De,tLe=JDe.useSyncExternalStore,rLe=nA.useRef,oLe=nA.useEffect,nLe=nA.useMemo,iLe=nA.useDebugValue;GJ.useSyncExternalStoreWithSelector=function(e,t,r,o,n){var i=rLe(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=nLe(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,eLe(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=tLe(e,i[0],i[1]);return oLe(function(){s.hasValue=!0,s.value=l},[l]),iLe(l),l}});var KJ=Xe((v0t,qJ)=>{"use strict";qJ.exports=YJ()});var Dte=Xe((cPt,Fte)=>{Fte.exports=window.wp.theme});var GA=Xe((Qkt,Ure)=>{Ure.exports=window.wp.blob});var $0=Xe((YRt,bI)=>{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"},sne=Object.keys(ine).join("|"),e8e=new RegExp(sne,"g"),t8e=new RegExp(sne,"");function r8e(e){return ine[e]}var ane=function(e){return e.replace(e8e,r8e)},o8e=function(e){return!!e.match(t8e)};bI.exports=ane;bI.exports.has=o8e;bI.exports.remove=ane});var aw=Xe((B2t,Jne)=>{Jne.exports=window.wp.wordcount});var Oo=Xe((LOt,nae)=>{nae.exports=window.wp.keycodes});var TU=Xe((TBt,cde)=>{cde.exports=window.wp.warning});var Vc=Xe(($Vt,Zde)=>{Zde.exports=window.wp.richText});var ya=Xe((eUt,zpe)=>{zpe.exports=window.wp.keyboardShortcuts});var Upe=Xe((tUt,Hpe)=>{Hpe.exports=window.wp.viewport});var Rh=Xe((rUt,Wpe)=>{Wpe.exports=window.wp.plugins});var C0e=Xe((pnr,x0e)=>{x0e.exports=window.wp.blockSerializationDefaultParser});var fG=Xe((Cnr,N0e)=>{N0e.exports=window.wp.commands});var sg=Xe((Fsr,l_e)=>{l_e.exports=window.wp.dom});var zTe=Xe((Ipr,jTe)=>{"use strict";var mit="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";jTe.exports=mit});var GTe=Xe((Opr,WTe)=>{"use strict";var hit=zTe();function HTe(){}function UTe(){}UTe.resetWarningCache=HTe;WTe.exports=function(){function e(o,n,i,s,l,c){if(c!==hit){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:UTe,resetWarningCache:HTe};return r.PropTypes=r,r}});var qTe=Xe((Fpr,YTe)=>{YTe.exports=GTe()();var Npr,Mpr});var ZTe=Xe((OF,KTe)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof OF<"u")t(KTe,OF);else{var r={exports:{}};t(r,r.exports),e.autosize=r.exports}})(OF,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 QTe=Xe((Dpr,XTe)=>{var git=function(e,t,r){return r=window.getComputedStyle,(r?r(e):e.currentStyle)[t.replace(/-(\w)/gi,function(o,n){return n.toUpperCase()})]};XTe.exports=git});var $Te=Xe((Lpr,JTe)=>{var JY=QTe();function vit(e){var t=JY(e,"line-height"),r=parseFloat(t,10);if(t===r+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=JY(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=JY(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}JTe.exports=vit});var tEe=Xe(zp=>{"use strict";var bit=zp&&zp.__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)}})(),$Y=zp&&zp.__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},yit=zp&&zp.__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};zp.__esModule=!0;var MF=_e(),cP=qTe(),NF=ZTe(),wit=$Te(),_it=wit,eEe="autosize:resized",Sit=(function(e){bit(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:_it(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&&NF(r.textarea)}):this.textarea&&NF(this.textarea),this.textarea&&this.textarea.addEventListener(eEe,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(eEe,this.onResize),NF.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=yit(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=o.state.lineHeight,h=s&&m?m*s:null;return MF.createElement("textarea",$Y({},f,{onChange:this.onChange,style:h?$Y({},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&&NF.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:cP.number,maxRows:cP.number,onResize:cP.func,innerRef:cP.any,async:cP.bool},t})(MF.Component);zp.TextareaAutosize=MF.forwardRef(function(e,t){return MF.createElement(Sit,$Y({},e,{innerRef:t}))})});var oEe=Xe((Vpr,rEe)=>{"use strict";var xit=tEe();rEe.exports=xit.TextareaAutosize});var oPe=Xe((Gmr,rPe)=>{rPe.exports=window.wp.serverSideRender});var Uct={};Wr(Uct,{AlignmentToolbar:()=>Fit,Autocomplete:()=>Mit,AutosaveMonitor:()=>c3,BlockAlignmentToolbar:()=>Dit,BlockControls:()=>Lit,BlockEdit:()=>Bit,BlockEditorKeyboardShortcuts:()=>Vit,BlockFormatControls:()=>jit,BlockIcon:()=>zit,BlockInspector:()=>Hit,BlockList:()=>Uit,BlockMover:()=>Wit,BlockNavigationDropdown:()=>Git,BlockSelectionClearer:()=>Yit,BlockSettingsMenu:()=>qit,BlockTitle:()=>Kit,BlockToolbar:()=>Zit,CharacterCount:()=>qS,ColorPalette:()=>Xit,ContrastChecker:()=>Qit,CopyHandler:()=>Jit,DefaultBlockAppender:()=>$it,DocumentBar:()=>T3,DocumentOutline:()=>$_,DocumentOutlineCheck:()=>J_e,EditorHistoryRedo:()=>I3,EditorHistoryUndo:()=>M3,EditorKeyboardShortcuts:()=>H_,EditorKeyboardShortcutsRegister:()=>iSe,EditorNotices:()=>bSe,EditorProvider:()=>Bwe,EditorSnackbars:()=>SSe,EntitiesSavedStates:()=>H3,ErrorBoundary:()=>FSe,FontSizePicker:()=>est,InnerBlocks:()=>rst,Inserter:()=>tst,InspectorAdvancedControls:()=>ost,InspectorControls:()=>nst,LocalAutosaveMonitor:()=>VSe,MediaPlaceholder:()=>ust,MediaUpload:()=>dst,MediaUploadCheck:()=>fst,MultiSelectScrollIntoView:()=>pst,NavigableToolbar:()=>mst,ObserveTyping:()=>hst,PageAttributesCheck:()=>rS,PageAttributesOrder:()=>GSe,PageAttributesPanel:()=>K3,PageAttributesParent:()=>rxe,PageTemplate:()=>Q3,PanelColorSettings:()=>ist,PlainText:()=>sst,PluginBlockSettingsMenuItem:()=>yxe,PluginDocumentSettingPanel:()=>r6,PluginMoreMenuItem:()=>xxe,PluginPostPublishPanel:()=>n6,PluginPostStatusInfo:()=>uS,PluginPrePublishPanel:()=>a6,PluginPreviewMenuItem:()=>Oxe,PluginSidebar:()=>Sy,PluginSidebarMoreMenuItem:()=>Fxe,PostAuthor:()=>f6,PostAuthorCheck:()=>p6,PostAuthorPanel:()=>g6,PostComments:()=>w6,PostDiscussionPanel:()=>E6,PostExcerpt:()=>GE,PostExcerptCheck:()=>Ey,PostExcerptPanel:()=>V1e,PostFeaturedImage:()=>KE,PostFeaturedImageCheck:()=>Bp,PostFeaturedImagePanel:()=>D6,PostFormat:()=>XE,PostFormatCheck:()=>yS,PostLastRevision:()=>V6,PostLastRevisionCheck:()=>Ry,PostLastRevisionPanel:()=>iCe,PostLockedModal:()=>fCe,PostPendingStatus:()=>gCe,PostPendingStatusCheck:()=>z6,PostPingbacks:()=>C6,PostPreviewButton:()=>SS,PostPublishButton:()=>xS,PostPublishButtonLabel:()=>W6,PostPublishPanel:()=>uF,PostSavedState:()=>_F,PostSchedule:()=>ES,PostScheduleCheck:()=>SF,PostScheduleLabel:()=>PS,PostSchedulePanel:()=>TF,PostSticky:()=>pF,PostStickyCheck:()=>dF,PostSwitchToDraftButton:()=>OTe,PostSyncStatus:()=>kF,PostTaxonomies:()=>FS,PostTaxonomiesCheck:()=>RF,PostTaxonomiesFlatTermSelector:()=>jY,PostTaxonomiesHierarchicalTermSelector:()=>UY,PostTaxonomiesPanel:()=>IF,PostTemplatePanel:()=>c6,PostTextEditor:()=>uP,PostTitle:()=>UF,PostTitleRaw:()=>GF,PostTrash:()=>HS,PostTrashCheck:()=>YF,PostTypeSupportCheck:()=>co,PostURL:()=>mP,PostURLCheck:()=>XF,PostURLLabel:()=>AEe,PostURLPanel:()=>eD,PostVisibility:()=>eP,PostVisibilityCheck:()=>MEe,PostVisibilityLabel:()=>K6,RichText:()=>aPe,RichTextShortcut:()=>ast,RichTextToolbarButton:()=>lst,ServerSideRender:()=>iPe.default,SkipToSelectedBlock:()=>gst,TableOfContents:()=>XEe,TextEditorGlobalKeyboardShortcuts:()=>Ost,ThemeSupportCheck:()=>N6,TimeToRead:()=>YS,URLInput:()=>vst,URLInputButton:()=>bst,URLPopover:()=>yst,UnsavedChangesWarning:()=>tPe,VisualEditorGlobalKeyboardShortcuts:()=>Ist,Warning:()=>wst,WordCount:()=>GS,WritingFlow:()=>_st,__unstableRichTextInputEvent:()=>cst,cleanForSlug:()=>RX,createCustomColorsHOC:()=>Sst,getColorClassName:()=>xst,getColorObjectByAttributeValues:()=>Cst,getColorObjectByColorValue:()=>Tst,getFontSize:()=>Est,getFontSizeClass:()=>Pst,getTemplatePartIcon:()=>cm,linkAutocompleter:()=>a3,mediaUpload:()=>_2,privateApis:()=>a5e,registerEntityAction:()=>Vct,registerEntityField:()=>zct,store:()=>I,storeConfig:()=>HC,transformStyles:()=>l5e.transformStyles,unregisterEntityAction:()=>jct,unregisterEntityField:()=>Hct,useEntitiesSavedStatesIsDirty:()=>z3,usePostScheduleLabel:()=>kS,usePostURLLabel:()=>nq,usePostVisibilityLabel:()=>FY,userAutocompleter:()=>l3,withColorContext:()=>kst,withColors:()=>Rst,withFontSizes:()=>Ast});var Zwe=a(Y(),1),Xwe=a(ne(),1),Qwe=a(U(),1),Jwe=a(ke(),1),$we=a(Bn(),1);var s3=a(Y(),1);var UK=a(Y(),1);var VK=a(be(),1),jK={...VK.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};var zK=a(Y(),1);function v5e(e={},t){return t.type==="SET_IS_READY"?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}function b5e(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 y5e(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 HK=(0,zK.combineReducers)({actions:b5e,fields:y5e,isReady:v5e});function dk(e){return e&&typeof e=="object"&&"raw"in e?e.raw:e}function w5e(e=null,t){return t.type==="SET_EDITED_POST"?t.postId:e}function _5e(e=null,t){return t.type==="SET_CURRENT_TEMPLATE_ID"?t.id:e}function S5e(e=null,t){return t.type==="SET_EDITED_POST"?t.postType:e}function x5e(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function C5e(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 T5e(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 E5e(e={isLocked:!1},t){return t.type==="UPDATE_POST_LOCK"?t.lock:e}function P5e(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 k5e(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 R5e(e=jK,t){return t.type==="UPDATE_EDITOR_SETTINGS"?{...e,...t.settings}:e}function A5e(e="post-only",t){return t.type==="SET_RENDERING_MODE"?t.mode:e}function I5e(e=void 0,t){return t.type==="SET_CANVAS_WIDTH"?t.width:e}function O5e(e=[],t){switch(t.type){case"REMOVE_PANEL":if(!e.includes(t.panelName))return[...e,t.panelName]}return e}function N5e(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 M5e(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 F5e(e={current:null}){return e}function D5e(e={current:null}){return e}function L5e(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 B5e(e="/",t){switch(t.type){case"SET_STYLES_PATH":return t.path;case"RESET_STYLES_NAVIGATION":return"/"}return e}function V5e(e=!1,t){switch(t.type){case"SET_SHOW_STYLEBOOK":return t.show;case"RESET_STYLES_NAVIGATION":return!1}return e}function j5e(e=null,t){return t.type==="SET_CURRENT_REVISION_ID"?t.revisionId:e}function z5e(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 H5e(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 U5e(e={},t){return t.type==="SELECT_NOTE"?{noteId:t.noteId,options:t.options}:e}var WK=(0,UK.combineReducers)({postId:w5e,postType:S5e,templateId:_5e,saving:C5e,deleting:T5e,postLock:E5e,template:x5e,postSavingLock:P5e,editorSettings:R5e,postAutosavingLock:k5e,renderingMode:A5e,canvasWidth:I5e,removedPanels:O5e,blockInserterPanel:N5e,inserterSidebarToggleRef:D5e,listViewPanel:M5e,listViewToggleRef:F5e,publishSidebarActive:L5e,stylesPath:B5e,showStylebook:V5e,revisionId:j5e,revisionPage:z5e,showRevisionDiff:H5e,selectedNote:U5e,dataviews:HK});var h8={};Wr(h8,{__experimentalGetDefaultTemplatePartAreas:()=>K3e,__experimentalGetDefaultTemplateType:()=>Z3e,__experimentalGetDefaultTemplateTypes:()=>q3e,__experimentalGetTemplateInfo:()=>X3e,__unstableIsEditorReady:()=>UMe,canInsertBlockType:()=>U3e,canUserUseUnfilteredHTML:()=>FMe,didPostSaveRequestFail:()=>SMe,didPostSaveRequestSucceed:()=>_Me,getActivePostLock:()=>MMe,getAdjacentBlockClientId:()=>m3e,getAutosaveAttribute:()=>KZ,getBlock:()=>$Me,getBlockAttributes:()=>JMe,getBlockCount:()=>i3e,getBlockHierarchyRootClientId:()=>p3e,getBlockIndex:()=>k3e,getBlockInsertionPoint:()=>B3e,getBlockListSettings:()=>Y3e,getBlockMode:()=>F3e,getBlockName:()=>XMe,getBlockOrder:()=>P3e,getBlockRootClientId:()=>f3e,getBlockSelectionEnd:()=>a3e,getBlockSelectionStart:()=>s3e,getBlocks:()=>e3e,getBlocksByClientId:()=>n3e,getClientIdsOfDescendants:()=>t3e,getClientIdsWithDescendants:()=>r3e,getCurrentPost:()=>Cn,getCurrentPostAttribute:()=>w1,getCurrentPostId:()=>ta,getCurrentPostLastRevisionId:()=>uMe,getCurrentPostRevisionsCount:()=>f8,getCurrentPostType:()=>ea,getCurrentTemplateId:()=>cMe,getDeviceType:()=>WMe,getEditedPostAttribute:()=>to,getEditedPostContent:()=>C1,getEditedPostPreviewLink:()=>TMe,getEditedPostSlug:()=>RMe,getEditedPostVisibility:()=>fMe,getEditorBlocks:()=>LMe,getEditorMode:()=>qMe,getEditorSelection:()=>HMe,getEditorSelectionEnd:()=>zMe,getEditorSelectionStart:()=>jMe,getEditorSettings:()=>m8,getFirstMultiSelectedBlockClientId:()=>w3e,getGlobalBlockCount:()=>o3e,getInserterItems:()=>W3e,getLastMultiSelectedBlockClientId:()=>_3e,getMultiSelectedBlockClientIds:()=>b3e,getMultiSelectedBlocks:()=>y3e,getMultiSelectedBlocksEndClientId:()=>E3e,getMultiSelectedBlocksStartClientId:()=>T3e,getNextBlockClientId:()=>g3e,getPermalink:()=>kMe,getPermalinkParts:()=>JZ,getPostEdits:()=>x1,getPostLockUser:()=>NMe,getPostTypeLabel:()=>Q3e,getPreviousBlockClientId:()=>h3e,getRenderingMode:()=>b2,getSelectedBlock:()=>d3e,getSelectedBlockClientId:()=>u3e,getSelectedBlockCount:()=>l3e,getSelectedBlocksInitialCaretPosition:()=>v3e,getStateBeforeOptimisticTransaction:()=>KMe,getSuggestedPostFormat:()=>EMe,getTemplate:()=>z3e,getTemplateLock:()=>H3e,hasChangedContent:()=>qZ,hasEditorRedo:()=>sMe,hasEditorUndo:()=>iMe,hasInserterItems:()=>G3e,hasMultiSelection:()=>O3e,hasNonPostEntityChanges:()=>aMe,hasSelectedBlock:()=>c3e,hasSelectedInnerBlock:()=>A3e,inSomeHistory:()=>ZMe,isAncestorMultiSelected:()=>C3e,isAutosavingPost:()=>xMe,isBlockInsertionPointVisible:()=>V3e,isBlockMultiSelected:()=>x3e,isBlockSelected:()=>R3e,isBlockValid:()=>QMe,isBlockWithinSelection:()=>I3e,isCaretWithinFormattedText:()=>L3e,isCleanNewPost:()=>lMe,isCurrentPostPending:()=>pMe,isCurrentPostPublished:()=>p8,isCurrentPostScheduled:()=>mMe,isDeletingPost:()=>yMe,isEditedPostAutosaveable:()=>gMe,isEditedPostBeingScheduled:()=>vMe,isEditedPostDateFloating:()=>bMe,isEditedPostDirty:()=>g2,isEditedPostEmpty:()=>XZ,isEditedPostNew:()=>YZ,isEditedPostPublishable:()=>hMe,isEditedPostSaveable:()=>ZZ,isEditorPanelEnabled:()=>BMe,isEditorPanelOpened:()=>VMe,isEditorPanelRemoved:()=>eX,isFirstMultiSelectedBlock:()=>S3e,isInserterOpened:()=>YMe,isListViewOpened:()=>GMe,isMultiSelecting:()=>N3e,isPermalinkEditable:()=>QZ,isPostAutosavingLocked:()=>$Z,isPostLockTakeover:()=>OMe,isPostLocked:()=>AMe,isPostSavingLocked:()=>IMe,isPreviewingPost:()=>CMe,isPublishSidebarEnabled:()=>DMe,isPublishSidebarOpened:()=>J3e,isPublishingPost:()=>PMe,isSavingNonPostEntityChanges:()=>wMe,isSavingPost:()=>l0,isSelectionEnabled:()=>M3e,isTyping:()=>D3e,isValidTemplate:()=>j3e});var fm=a(At(),1),a0=a(an(),1),_1=a(ho(),1),Zt=a(Y(),1),Mu=a(Ga(),1),v2=a(be(),1),vo=a(ne(),1),T1=a(Dt(),1);var XK=new Set(["meta"]),QK="core/editor",w4=/%(?:postname|pagename)%/,_4=60*1e3,JK=["title","excerpt","content"];var xr="wp_template",Ai="wp_template_part",Au="wp_block",fk="wp_navigation",Sl="attachment",pk={custom:"custom",theme:"theme",plugin:"plugin"},S4=["wp_template","wp_template_part"],$K=[...S4,"wp_block","wp_navigation"],sm=[xr,Ai,Au,fk];var mk=a(U(),1),xn=(0,mk.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,mk.cloneElement)(e,{width:t,height:t,...r,ref:o}));var hk=a(xe(),1),x4=a(E(),1),C4=(0,x4.jsx)(hk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,x4.jsx)(hk.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 gk=a(xe(),1),T4=a(E(),1),E4=(0,T4.jsx)(gk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,T4.jsx)(gk.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 vk=a(xe(),1),P4=a(E(),1),k4=(0,P4.jsx)(vk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,P4.jsx)(vk.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 bk=a(xe(),1),R4=a(E(),1),A4=(0,R4.jsx)(bk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,R4.jsx)(bk.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var yk=a(xe(),1),I4=a(E(),1),O4=(0,I4.jsx)(yk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,I4.jsx)(yk.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 wk=a(xe(),1),N4=a(E(),1),M4=(0,N4.jsx)(wk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,N4.jsx)(wk.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})});var _k=a(xe(),1),F4=a(E(),1),D4=(0,F4.jsx)(_k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,F4.jsx)(_k.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 Sk=a(xe(),1),L4=a(E(),1),B4=(0,L4.jsx)(Sk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,L4.jsx)(Sk.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 xk=a(xe(),1),V4=a(E(),1),j4=(0,V4.jsx)(xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,V4.jsx)(xk.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 Ck=a(xe(),1),z4=a(E(),1),pf=(0,z4.jsx)(Ck.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,z4.jsx)(Ck.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 Tk=a(xe(),1),H4=a(E(),1),U4=(0,H4.jsx)(Tk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,H4.jsx)(Tk.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 Ek=a(xe(),1),W4=a(E(),1),Pk=(0,W4.jsx)(Ek.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,W4.jsx)(Ek.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 kk=a(xe(),1),G4=a(E(),1),Rk=(0,G4.jsx)(kk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,G4.jsx)(kk.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 Ak=a(xe(),1),Y4=a(E(),1),Ro=(0,Y4.jsx)(Ak.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Y4.jsx)(Ak.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var Ik=a(xe(),1),q4=a(E(),1),Vx=(0,q4.jsx)(Ik.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,q4.jsx)(Ik.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var Ok=a(xe(),1),K4=a(E(),1),Z4=(0,K4.jsx)(Ok.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,K4.jsx)(Ok.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var Nk=a(xe(),1),X4=a(E(),1),kr=(0,X4.jsx)(Nk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,X4.jsx)(Nk.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var Mk=a(xe(),1),Q4=a(E(),1),J4=(0,Q4.jsx)(Mk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Q4.jsx)(Mk.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 Fk=a(xe(),1),$4=a(E(),1),hr=(0,$4.jsx)(Fk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$4.jsx)(Fk.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Dk=a(xe(),1),eB=a(E(),1),tB=(0,eB.jsx)(Dk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,eB.jsx)(Dk.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var Lk=a(xe(),1),rB=a(E(),1),Ii=(0,rB.jsx)(Lk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,rB.jsx)(Lk.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 Bk=a(xe(),1),oB=a(E(),1),jx=(0,oB.jsx)(Bk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,oB.jsx)(Bk.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 Vk=a(xe(),1),nB=a(E(),1),iB=(0,nB.jsx)(Vk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,nB.jsx)(Vk.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 jk=a(xe(),1),sB=a(E(),1),aB=(0,sB.jsx)(jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,sB.jsx)(jk.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 zk=a(xe(),1),lB=a(E(),1),cB=(0,lB.jsx)(zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,lB.jsx)(zk.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 Hk=a(xe(),1),uB=a(E(),1),dB=(0,uB.jsx)(Hk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,uB.jsx)(Hk.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 Uk=a(xe(),1),fB=a(E(),1),pB=(0,fB.jsx)(Uk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,fB.jsx)(Uk.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 Wk=a(xe(),1),mB=a(E(),1),$g=(0,mB.jsx)(Wk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,mB.jsx)(Wk.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 Gk=a(xe(),1),hB=a(E(),1),zx=(0,hB.jsx)(Gk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,hB.jsx)(Gk.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 Yk=a(xe(),1),gB=a(E(),1),Hx=(0,gB.jsx)(Yk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,gB.jsx)(Yk.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 qk=a(xe(),1),vB=a(E(),1),Kk=(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:"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 Zk=a(xe(),1),bB=a(E(),1),yB=(0,bB.jsx)(Zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,bB.jsx)(Zk.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 Xk=a(xe(),1),wB=a(E(),1),e0=(0,wB.jsx)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,wB.jsx)(Xk.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 Qk=a(xe(),1),_B=a(E(),1),ev=(0,_B.jsx)(Qk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_B.jsx)(Qk.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 Jk=a(xe(),1),SB=a(E(),1),mf=(0,SB.jsx)(Jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,SB.jsx)(Jk.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 $k=a(xe(),1),xB=a(E(),1),CB=(0,xB.jsx)($k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,xB.jsx)($k.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 eR=a(xe(),1),TB=a(E(),1),hf=(0,TB.jsx)(eR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,TB.jsx)(eR.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 tR=a(xe(),1),EB=a(E(),1),fs=(0,EB.jsx)(tR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,EB.jsx)(tR.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 rR=a(xe(),1),PB=a(E(),1),kB=(0,PB.jsx)(rR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,PB.jsx)(rR.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 oR=a(xe(),1),RB=a(E(),1),AB=(0,RB.jsx)(oR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,RB.jsx)(oR.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 nR=a(xe(),1),IB=a(E(),1),OB=(0,IB.jsx)(nR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,IB.jsx)(nR.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 iR=a(xe(),1),NB=a(E(),1),Ux=(0,NB.jsx)(iR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,NB.jsx)(iR.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 sR=a(xe(),1),MB=a(E(),1),FB=(0,MB.jsx)(sR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,MB.jsx)(sR.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 aR=a(xe(),1),DB=a(E(),1),Wx=(0,DB.jsx)(aR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,DB.jsx)(aR.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 lR=a(xe(),1),LB=a(E(),1),Gx=(0,LB.jsx)(lR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,LB.jsx)(lR.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})});var cR=a(xe(),1),BB=a(E(),1),VB=(0,BB.jsx)(cR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,BB.jsx)(cR.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 uR=a(xe(),1),jB=a(E(),1),Yx=(0,jB.jsx)(uR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,jB.jsx)(uR.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 dR=a(xe(),1),zB=a(E(),1),HB=(0,zB.jsx)(dR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,zB.jsx)(dR.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 qx=a(xe(),1),Kx=a(E(),1),Zx=(0,Kx.jsxs)(qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,Kx.jsx)(qx.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,Kx.jsx)(qx.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 fR=a(xe(),1),UB=a(E(),1),Ya=(0,UB.jsx)(fR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,UB.jsx)(fR.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(xe(),1),WB=a(E(),1),GB=(0,WB.jsx)(pR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,WB.jsx)(pR.Path,{d:"M5 11.25h14v1.5H5z"})});var mR=a(xe(),1),YB=a(E(),1),qB=(0,YB.jsx)(mR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,YB.jsx)(mR.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 hR=a(xe(),1),KB=a(E(),1),Xx=(0,KB.jsx)(hR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,KB.jsx)(hR.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var gR=a(xe(),1),ZB=a(E(),1),XB=(0,ZB.jsx)(gR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ZB.jsx)(gR.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 vR=a(xe(),1),QB=a(E(),1),t0=(0,QB.jsx)(vR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,QB.jsx)(vR.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 bR=a(xe(),1),JB=a(E(),1),go=(0,JB.jsx)(bR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,JB.jsx)(bR.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var yR=a(xe(),1),$B=a(E(),1),Qx=(0,$B.jsx)(yR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$B.jsx)(yR.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 wR=a(xe(),1),eV=a(E(),1),tV=(0,eV.jsx)(wR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,eV.jsx)(wR.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 _R=a(xe(),1),rV=a(E(),1),xl=(0,rV.jsx)(_R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,rV.jsx)(_R.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 SR=a(xe(),1),oV=a(E(),1),Jx=(0,oV.jsx)(SR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,oV.jsx)(SR.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 $x=a(xe(),1),e1=a(E(),1),am=(0,e1.jsxs)($x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,e1.jsx)($x.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,e1.jsx)($x.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 xR=a(xe(),1),nV=a(E(),1),t1=(0,nV.jsx)(xR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,nV.jsx)(xR.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var CR=a(xe(),1),iV=a(E(),1),r1=(0,iV.jsx)(CR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,iV.jsx)(CR.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 TR=a(xe(),1),sV=a(E(),1),aV=(0,sV.jsx)(TR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,sV.jsx)(TR.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 ER=a(xe(),1),lV=a(E(),1),yc=(0,lV.jsx)(ER.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,lV.jsx)(ER.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var PR=a(xe(),1),cV=a(E(),1),uV=(0,cV.jsx)(PR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,cV.jsx)(PR.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 kR=a(xe(),1),dV=a(E(),1),Cl=(0,dV.jsx)(kR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,dV.jsx)(kR.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 RR=a(xe(),1),fV=a(E(),1),tv=(0,fV.jsx)(RR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,fV.jsx)(RR.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 AR=a(xe(),1),pV=a(E(),1),rv=(0,pV.jsx)(AR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,pV.jsx)(AR.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 IR=a(xe(),1),mV=a(E(),1),hV=(0,mV.jsx)(IR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,mV.jsx)(IR.Path,{d:"M7 11.5h10V13H7z"})});var OR=a(xe(),1),gV=a(E(),1),o1=(0,gV.jsx)(OR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,gV.jsx)(OR.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 NR=a(xe(),1),vV=a(E(),1),n1=(0,vV.jsx)(NR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,vV.jsx)(NR.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 MR=a(xe(),1),bV=a(E(),1),lm=(0,bV.jsx)(MR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,bV.jsx)(MR.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 FR=a(xe(),1),yV=a(E(),1),wV=(0,yV.jsx)(FR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,yV.jsx)(FR.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 DR=a(xe(),1),_V=a(E(),1),ov=(0,_V.jsx)(DR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_V.jsx)(DR.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 i1=a(xe(),1),s1=a(E(),1),SV=(0,s1.jsxs)(i1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,s1.jsx)(i1.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,s1.jsx)(i1.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 LR=a(xe(),1),xV=a(E(),1),a1=(0,xV.jsx)(LR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,xV.jsx)(LR.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 BR=a(xe(),1),CV=a(E(),1),TV=(0,CV.jsx)(BR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,CV.jsx)(BR.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 VR=a(xe(),1),EV=a(E(),1),l1=(0,EV.jsx)(VR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,EV.jsx)(VR.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 jR=a(xe(),1),PV=a(E(),1),kV=(0,PV.jsx)(jR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,PV.jsx)(jR.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})});var zR=a(xe(),1),RV=a(E(),1),AV=(0,RV.jsx)(zR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,RV.jsx)(zR.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 HR=a(xe(),1),IV=a(E(),1),OV=(0,IV.jsx)(HR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,IV.jsx)(HR.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 UR=a(xe(),1),NV=a(E(),1),MV=(0,NV.jsx)(UR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,NV.jsx)(UR.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 WR=a(xe(),1),FV=a(E(),1),nv=(0,FV.jsx)(WR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,FV.jsx)(WR.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 GR=a(xe(),1),DV=a(E(),1),r0=(0,DV.jsx)(GR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,DV.jsx)(GR.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 YR=a(xe(),1),LV=a(E(),1),qR=(0,LV.jsx)(YR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,LV.jsx)(YR.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 KR=a(xe(),1),BV=a(E(),1),gf=(0,BV.jsx)(KR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,BV.jsx)(KR.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 ZR=a(xe(),1),VV=a(E(),1),jV=(0,VV.jsx)(ZR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,VV.jsx)(ZR.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 XR=a(xe(),1),zV=a(E(),1),iv=(0,zV.jsx)(XR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,zV.jsx)(XR.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 QR=a(xe(),1),HV=a(E(),1),c1=(0,HV.jsx)(QR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,HV.jsx)(QR.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 JR=a(xe(),1),UV=a(E(),1),WV=(0,UV.jsx)(JR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,UV.jsx)(JR.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 $R=a(xe(),1),GV=a(E(),1),YV=(0,GV.jsx)($R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,GV.jsx)($R.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 e2=a(xe(),1),qV=a(E(),1),KV=(0,qV.jsx)(e2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",fill:"currentColor",children:(0,qV.jsx)(e2.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 cm(e){return e==="header"?Yx:e==="footer"?Ux:e==="sidebar"?l1:e==="navigation-overlay"?Qx:nv}var oZ=a(vf(),1),{lock:nZ,unlock:K}=(0,oZ.__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 iZ={},Tl=e=>{if(!e)return iZ;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)??iZ,d=typeof s=="string"?s:s?.rendered,f=typeof n=="string"?n:n?.raw,h=r?.map(g=>({...g,icon:cm(g.icon)}))?.find(g=>l===g.area)?.icon||Ya;return{title:d&&d!==i?d:c||i,description:f||u,icon:h}};function um(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[o]=r,e}var ar=(e,t,r)=>{let o=Array.isArray(t)?t:t.split("."),n=e;return o.forEach(i=>{n=n?.[i]}),n??r};var W5e=["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 sv(e,t,r){let o=r?".blocks."+r:"",n=t?"."+t:"",i=`settings${o}${n}`,s=`settings${n}`;if(t)return ar(e,i)??ar(e,s);let l={};return W5e.forEach(c=>{let u=ar(e,`settings${o}.${c}`)??ar(e,`settings.${c}`);u!==void 0&&(l=um(l,c.split("."),u))}),l}function u1(e,t,r,o){let n=o?".blocks."+o:"",i=t?"."+t:"",s=`settings${n}${i}`;return um(e,s.split("."),r)}var lZ=a(ZV(),1);var G5e="1600px",Y5e="320px",q5e=1,K5e=.25,Z5e=.75,X5e="14px";function aZ({minimumFontSize:e,maximumFontSize:t,fontSize:r,minimumViewportWidth:o=Y5e,maximumViewportWidth:n=G5e,scaleFactor:i=q5e,minimumFontSizeLimit:s}){if(s=Iu(s)?s:X5e,r){let w=Iu(r);if(!w?.unit||!w?.value)return null;let S=Iu(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),K5e),Z5e),A=d1(w.value*C,3);S?.value&&A<S?.value?e=`${S.value}${S.unit}`:e=`${A}${w.unit}`}}let l=Iu(e),c=l?.unit||"rem",u=Iu(t,{coerceTo:c});if(!l||!u)return null;let d=Iu(e,{coerceTo:"rem"}),f=Iu(n,{coerceTo:c}),m=Iu(o,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let g=d1(m.value/100,3),v=d1(g,3)+c,b=100*((u.value-l.value)/h),_=d1((b||1)*i,3),y=`${d.value}${d.unit} + ((1vw - ${v}) * ${_})`;return`clamp(${e}, ${y}, ${t})`}function Iu(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:d1(d,3),unit:u}:null}function d1(e,t=3){let r=Math.pow(10,t);return Math.round(e*r)/r}function XV(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function Q5e(e){let t=e?.typography??{},r=e?.layout,o=Iu(r?.wideSize)?r?.wideSize:null;return XV(t)&&o?{fluid:{maxViewportWidth:o,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function t2(e,t){let{size:r}=e;if(!r||r==="0"||e?.fluid===!1||!XV(t?.typography)&&!XV(e))return r;let o=Q5e(t)?.fluid??{},n=aZ({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 Ou="body",p1=":root";function f1(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 o0=[{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)=>t2(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 wc(e,t){if(!e||!t)return t;let r=f1(e),o=f1(t),n=[];return r.forEach(i=>{o.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function cZ(e,t){if(!e||!t)return;let r={};return Object.entries(t).forEach(([o,n])=>{typeof n=="string"&&(r[o]=wc(e,n)),typeof n=="object"&&(r[o]={},Object.entries(n).forEach(([i,s])=>{r[o][i]=wc(e,s)}))}),r}function r2(e,t){return e.includes(",")?f1(e).map(n=>n+t).join(","):e+t}function QV(e,t){let r=`.is-style-${e}`;if(!t)return r;let o=/[^\s:]+/,n=s=>s+r;return f1(t).map(s=>s.replace(o,n)).join(",")}function uZ(e,t){let r=`.is-style-${e}`,o=f1(t).map(n=>{let i=n.trim(),s=`${r} `;return i.startsWith(s)?i.slice(s.length):i});return QV(e,o.join(","))}function J5e(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let r=(0,lZ.getCSSValueFromRawStyle)(ar(t,e.ref));return typeof r=="object"&&r!==null&&"ref"in r&&r?.ref?void 0:r===void 0?e:r}return e}function $5e(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 JV(e,t){if(!e||!t)return e;let r=J5e(e,t);return typeof r=="object"&&r!==null&&"url"in r&&r?.url&&(r.url=$5e(r.url,t?._links?.["wp:theme-file"])),r}function dZ(e,t,r=[],o="slug",n){let i=[t?ar(e,["blocks",t,...r]):void 0,ar(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"||dZ(e,t,r,"slug",d.slug)[o]===d[o]?d:void 0}}}}function eNe(e,t,r,[o,n]=[]){let i=o0.find(l=>l.cssVarInfix===o);if(!i||!e.settings)return r;let s=dZ(e.settings,t,i.path,"slug",n);if(s){let{valueKey:l}=i,c=s[l];return o2(e,t,c)}return r}function tNe(e,t,r,o=[]){let n=(t?ar(e?.settings??{},["blocks",t,"custom",...o]):void 0)??ar(e?.settings??{},["custom",...o]);return n?o2(e,t,n):r}function o2(e,t,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let u=ar(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"?eNe(e,t,r,c):l==="custom"?tNe(e,t,r,c):r}function n0(e,t,r,o=!0){let n=t?"."+t:"",i=r?`styles.blocks.${r}${n}`:`styles${n}`;if(!e)return;let s=ar(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=ar(e,l))}return o?o2(e,r,s):s}function m1(e,t,r,o){let n=t?"."+t:"",i=o?`styles.blocks.${o}${n}`:`styles${n}`;return um(e,i.split("."),r)}var $V=a(n2(),1);function av(e,t){return typeof e!="object"||typeof t!="object"?e===t:(0,$V.default)(e?.styles,t?.styles)&&(0,$V.default)(e?.settings,t?.settings)}var yZ=a(i2(),1);function vZ(e){return Object.prototype.toString.call(e)==="[object Object]"}function bZ(e){var t,r;return vZ(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(vZ(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Oi(e,t){return(0,yZ.default)(e,t,{isMergeableObject:bZ,customMerge:r=>{if(r==="backgroundImage")return(o,n)=>n??o}})}function wZ(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 Kt=a(z(),1),_Z=a(At(),1),s2=new Map,hNe=[],e8={caption:(0,Kt.__)("Caption"),link:(0,Kt.__)("Link"),button:(0,Kt.__)("Button"),heading:(0,Kt.__)("Heading"),h1:(0,Kt.__)("H1"),h2:(0,Kt.__)("H2"),h3:(0,Kt.__)("H3"),h4:(0,Kt.__)("H4"),h5:(0,Kt.__)("H5"),h6:(0,Kt.__)("H6"),"settings.color":(0,Kt.__)("Color"),"settings.typography":(0,Kt.__)("Typography"),"settings.shadow":(0,Kt.__)("Shadow"),"settings.layout":(0,Kt.__)("Layout"),"styles.color":(0,Kt.__)("Colors"),"styles.spacing":(0,Kt.__)("Spacing"),"styles.background":(0,Kt.__)("Background"),"styles.typography":(0,Kt.__)("Typography")},gNe=wZ(()=>(0,_Z.getBlockTypes)().reduce((e,{name:t,title:r})=>(e[t]=r,e),{})),a2=e=>e!==null&&typeof e=="object";function vNe(e){if(e8[e])return e8[e];let t=e.split(".");if(t?.[0]==="blocks")return gNe()?.[t[1]]||t[1];if(t?.[0]==="elements")return e8[t[1]]||t[1]}function SZ(e,t,r=""){if(!a2(e)&&!a2(t))return e!==t?r.split(".").slice(0,2).join("."):void 0;e=a2(e)?e:{},t=a2(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=SZ(e[i],t[i],s);l&&(n=n.concat(l))}return n}function bNe(e,t){let r=JSON.stringify({next:e,previous:t});if(s2.has(r))return s2.get(r);let o=SZ({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 s2.set(r,[]),[];let n=Array.isArray(o)?o:[o],i=[...new Set(n)].reduce((s,l)=>{let c=vNe(l);return c&&s.push([l.split(".")[0],c]),s},[]);return s2.set(r,i),i}function g1(e,t,r={}){let o=bNe(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,Kt.__)(", "));switch(s){case"blocks":return(0,Kt.sprintf)((0,Kt._n)("%s block.","%s blocks.",c),u);case"elements":return(0,Kt.sprintf)((0,Kt._n)("%s element.","%s elements.",c),u);case"settings":return(0,Kt.sprintf)((0,Kt.__)("%s settings."),u);case"styles":return(0,Kt.sprintf)((0,Kt.__)("%s styles."),u);default:return(0,Kt.sprintf)((0,Kt.__)("%s."),u)}})):hNe}var Ni=a(At(),1),y1=a(ZV(),1),jZ=a(Y(),1);function s0(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 ar(i,`${c}.root`,null)||ar(i,c,null)||m;let h=s?ar(s,`${c}.__experimentalSelector`,null):void 0;return h?wc(u,h):m}let f;return l&&(f=ar(i,c,null)),f||(o?s0(e,d[0],r):null)}var yNe={grad:.9,turn:360,rad:360/(2*Math.PI)},bf=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Vn=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},El=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},AZ=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},xZ=function(e){return{r:El(e.r,0,255),g:El(e.g,0,255),b:El(e.b,0,255),a:El(e.a)}},t8=function(e){return{r:Vn(e.r),g:Vn(e.g),b:Vn(e.b),a:Vn(e.a,3)}},wNe=/^#([0-9a-f]{3,8})$/i,l2=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},IZ=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}},OZ=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}},CZ=function(e){return{h:AZ(e.h),s:El(e.s,0,100),l:El(e.l,0,100),a:El(e.a)}},TZ=function(e){return{h:Vn(e.h),s:Vn(e.s),l:Vn(e.l),a:Vn(e.a,3)}},EZ=function(e){return OZ((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},v1=function(e){return{h:(t=IZ(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},_Ne=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,SNe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xNe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,CNe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,n8={string:[[function(e){var t=wNe.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?Vn(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?Vn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=xNe.exec(e)||CNe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:xZ({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=_Ne.exec(e)||SNe.exec(e);if(!t)return null;var r,o,n=CZ({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(yNe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return EZ(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 bf(t)&&bf(r)&&bf(o)?xZ({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(!bf(t)||!bf(r)||!bf(o))return null;var s=CZ({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return EZ(s)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,n=e.a,i=n===void 0?1:n;if(!bf(t)||!bf(r)||!bf(o))return null;var s=(function(l){return{h:AZ(l.h),s:El(l.s,0,100),v:El(l.v,0,100),a:El(l.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return OZ(s)},"hsv"]]},PZ=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]},TNe=function(e){return typeof e=="string"?PZ(e.trim(),n8.string):typeof e=="object"&&e!==null?PZ(e,n8.object):[null,void 0]};var r8=function(e,t){var r=v1(e);return{h:r.h,s:El(r.s+100*t,0,100),l:r.l,a:r.a}},o8=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},kZ=function(e,t){var r=v1(e);return{h:r.h,s:r.s,l:El(r.l+100*t,0,100),a:r.a}},i8=(function(){function e(t){this.parsed=TNe(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 Vn(o8(this.rgba),2)},e.prototype.isDark=function(){return o8(this.rgba)<.5},e.prototype.isLight=function(){return o8(this.rgba)>=.5},e.prototype.toHex=function(){return t=t8(this.rgba),r=t.r,o=t.g,n=t.b,s=(i=t.a)<1?l2(Vn(255*i)):"","#"+l2(r)+l2(o)+l2(n)+s;var t,r,o,n,i,s},e.prototype.toRgb=function(){return t8(this.rgba)},e.prototype.toRgbString=function(){return t=t8(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 TZ(v1(this.rgba))},e.prototype.toHslString=function(){return t=TZ(v1(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=IZ(this.rgba),{h:Vn(t.h),s:Vn(t.s),v:Vn(t.v),a:Vn(t.a,3)};var t},e.prototype.invert=function(){return Ao({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),Ao(r8(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ao(r8(this.rgba,-t))},e.prototype.grayscale=function(){return Ao(r8(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ao(kZ(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ao(kZ(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"?Ao({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Vn(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=v1(this.rgba);return typeof t=="number"?Ao({h:t,s:r.s,l:r.l,a:r.a}):Vn(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ao(t).toHex()},e})(),Ao=function(e){return e instanceof i8?e:new i8(e)},RZ=[],c2=function(e){e.forEach(function(t){RZ.indexOf(t)<0&&(t(i8,n8),RZ.push(t))})};function ENe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(r=>{let o=Ao(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 NZ(e,t){let r=ENe(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 dm(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 s8(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function PNe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function a8(e,t="0"){let r=PNe(e);if(!r)return null;let o=s8(r?.top)||t,n=s8(r?.left)||t;return o===n?o:`${o} ${n}`}var MZ={backgroundSize:"cover",backgroundPosition:"50% 50%"};function FZ(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:MZ.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:MZ.backgroundPosition}),t}var DZ={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 LZ={mobile:"480px",tablet:"782px"},BZ=/^(\d+|\d*\.\d+)(px|em|rem)$/,kNe=16;function RNe(e){return"mobile"in e||"tablet"in e}function ANe(e){return!e||typeof e!="object"?{}:RNe(e)?e:e.settings?.viewport??{}}function INe(e){return typeof e=="string"&&BZ.test(e.trim())}function l8(e){if(typeof e=="number")return e;if(typeof e!="string")return;let t=e.trim().match(BZ);if(!t)return;let r=Number.parseFloat(t[1]);return t[2]==="px"?r:r*kNe}function c8(e){let t=ANe(e),r={},o={};Object.keys(LZ).forEach(l=>{let c=l,u=t[c],d=l8(u);d!==void 0&&INe(u)&&(r[c]=u.trim(),o[c]=d)});let n=Object.keys(r);if(!n.length)return{...LZ};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 b1(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 ONe={button:"wp-element-button",caption:"wp-element-caption"},NNe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},zZ={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},MNe={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]};function FNe(e="*",t={}){return o0.reduce((r,{path:o,cssVarInfix:n,classes:i})=>{if(!i)return r;let s=ar(t,o,[]);return["default","theme","custom"].forEach(l=>{s[l]&&s[l].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${dm(c)}-${u}`,m=e.split(",").map(g=>`${g}${f}`).join(","),h=`var(--wp--preset--${n}--${dm(c)})`;r+=`${m}{${d}: ${h} !important;}`})})}),r},"")}function DNe(e={}){return o0.filter(t=>t.path.at(-1)==="duotone").flatMap(t=>{let r=ar(e,t.path,{});return["default","theme"].filter(o=>r[o]).flatMap(o=>r[o].map(n=>NZ(`wp-duotone-${n.slug}`,n.colors))).join("")})}function HZ(e={},t,r){let o=[];return Object.keys(e).forEach(n=>{let i=t+dm(n.replace("/","-")),s=e[n];if(s instanceof Object){let l=i+r;o=[...o,...HZ(s,l,r)]}else o.push(`${i}: ${s}`)}),o}var LNe=(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},BNe=(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},VNe=(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=d2(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=d2(l);r[s]=[...r[s]||[],...c],delete t[o]}}),r};function d2(e={},t="",r,o={},n=!1){let i=Ou===t,s=Object.entries(Ni.__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=ar(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(!ar(v,[y],!1))return;let w=_.startsWith("--")?_:dm(_);c.push(`${w}: ${(0,y1.getCSSValueFromRawStyle)(ar(v,[y]))}`)});else if(ar(e,g,!1)){let b=u.startsWith("--")?u:dm(u);c.push(`${b}: ${(0,y1.getCSSValueFromRawStyle)(ar(e,g))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=JV(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...FZ(e.background)}})),(0,y1.getCSSRules)(e).forEach(c=>{if(i&&(r||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:dm(c.key),d=JV(c.value,o);u==="font-size"&&(d=t2({name:"",slug:"",size:d},o?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function jNe({layoutDefinitions:e=DZ,style:t,selector:r,hasBlockGapSupport:o,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",l=o?a8(t?.spacing?.blockGap):"";if(n&&(r===Ou?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===Ou?`:root :where(.${c})${f?.selector||""}`:`:root :where(${r}-${c})${f?.selector||""}`:h=r===Ou?`:where(.${c}${f?.selector||""})`:`:where(${r}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),r===Ou&&o&&(s+=`${p1} { --wp--style--block-gap: ${l}; }`)),r===Ou&&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 zNe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function HNe(e,t){return u2(e,void 0,t)}function u2(e,t,r){if(!e)return{};let o=Object.entries(e),n=t?zZ[t]??[]:[],s=o.filter(([l])=>zNe.includes(l)||n.includes(l)||r[l]).map(([l,c])=>[l,JSON.parse(JSON.stringify(c))]);return Object.fromEntries(s)}function VZ(e){let{styles:t,selector:r,featureSelectors:o,name:n,elementName:i,mediaQuery:s,variationName:l}=e,c=n?zZ[n]??[]:MNe[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 UNe(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 WNe=(e,t)=>{let r=[];if(!e?.styles)return r;let o=b1(e),n=HNe(e.styles,o);return n&&r.push({styles:n,selector:Ou,skipSelectorWrapper:!0}),Object.entries(Ni.__EXPERIMENTAL_ELEMENTS).forEach(([i,s])=>{e.styles?.elements?.[i]&&r.push({styles:e.styles?.elements?.[i]??{},selector:s,elementName:i,skipSelectorWrapper:!ONe[i]})}),Object.entries(e.styles?.blocks??{}).forEach(([i,s])=>{let l=u2(s,i,o),c=s,u=[],d=[];c?.variations&&Object.entries(c.variations).forEach(([f,m])=>{let h=m,g=u2(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,_])=>{_&&Ni.__EXPERIMENTAL_ELEMENTS[b]&&u.push({styles:_,selector:wc(v,Ni.__EXPERIMENTAL_ELEMENTS[b]),elementName:b,isStyleVariation:!0})}),Object.entries(h?.blocks??{}).forEach(([b,_])=>{let y=typeof t!="string"?wc(v,t[b]?.selector):void 0,w=typeof t!="string"?wc(v,t[b]?.duotoneSelector):void 0,S=typeof t!="string"?cZ(v,t[b]?.featureSelectors??{}):void 0,x=u2(_,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&&Ni.__EXPERIMENTAL_ELEMENTS[C]&&u.push({styles:A,selector:wc(y,Ni.__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]&&Ni.__EXPERIMENTAL_ELEMENTS[f]&&r.push({styles:m,selector:t[i]?.selector.split(",").map(h=>Ni.__EXPERIMENTAL_ELEMENTS[f].split(",").map(v=>h+" "+v)).join(","),elementName:f})}),r.push(...u)}),r},u8=(e,t)=>{let r=[];if(!e?.settings)return r;let o=s=>{let l={};return o0.forEach(({path:c})=>{let u=ar(s,c,!1);u!==!1&&(l=um(l,c,u))}),l},n=o(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&r.push({presets:n,custom:i,selector:p1}),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 GNe(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 YNe(e,t,{path:r,valueKey:o,valueFunc:n,cssVarInfix:i}){let s=ar(e,r,[]),l=[];for(let c of["default","theme","custom"])if(s[c])for(let u of s[c]){let d=dm(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 qNe=(e,t)=>{let r=u8(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 o0){let m=YNe(n,e.settings,f);if(m.length===0)continue;let h=GNe(l,f.path[0],c);u[h]||(u[h]=[]),u[h].push(...m)}let d=HZ(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 KNe(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?r2(l,c):l;if(g&&typeof g!="string"){let R=VNe(g,f);R=LNe(R,t.settings,y),R=BNe(R,t.settings),Object.entries(R).forEach(([N,P])=>{if(P.length){let T=w?uZ(w,N):N;T=c?r2(T,c):T;let M=P.join(";");S+=`:root :where(${T}){${M};}`}})}if(d){let R={};f?.filter&&(R.filter=f.filter,delete f.filter);let N=d2(R);N.length&&(S+=`${d}{${N.join(";")};}`)}let C=v??x;!o&&(Ou===C||h)&&(S+=jNe({style:f,selector:C,hasBlockGapSupport:b??n,hasFallbackGapSupport:i,fallbackGapValue:m}));let k=d2(f,x,r,t,s);if(k?.length){let R=_?x:`:root :where(${x})`;S+=`${R}{${k.join(";")};}`}return f?.css&&(S+=UZ(f.css,`:root :where(${x})`)),u&&S?`${u}{${S}}`:S}var ZNe=(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=WNe(c,t),d=u8(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+=`${p1} {`,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=b1(e);u.forEach(_=>{if(_.isStyleVariation&&!l.variationStyles)return;let y=UNe(_,b);[_,...y,...VZ(_),...y.flatMap(VZ)].forEach(w=>{v+=KNe(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=a8(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:_})=>{(Ou===b||p1===b)&&(b="");let y=FNe(b,_);y.length>0&&(v+=y)}),v};function XNe(e,t){return u8(e,t).flatMap(({presets:o})=>DNe(o))}var QNe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let r={root:t};return Object.entries(NNe).forEach(([o,n])=>{let i=s0(e,o);i&&(r[n]=i)}),r},JNe=(e,t)=>{let{getBlockStyles:r}=(0,jZ.select)(Ni.store),o={};return e.forEach(n=>{let i=n.name,s=s0(n);if(!s)return;let l=s0(n,"filter.duotone");if(!l){let h=s0(n),g=(0,Ni.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof g=="string"&&h&&(l=wc(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=QV(v,s);f[v]=b});let m=QNe(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 $Ne(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 UZ(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(" ")?wc(t,f):r2(t,f),r+=`:root :where(${m})${d}{${c.trim()}}`}}),r}function lv(e={},t=[],r={}){let{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i=!1,disableRootPadding:s=!1,styleOptions:l={}}=r,c=t.length>0?t:(0,Ni.getBlockTypes)(),u=sv(e,"spacing.blockGap"),d=o??u!==null,f=n??!d;if(!e?.styles||!e?.settings)return[[],{}];let m=$Ne(e),h=JNe(c),g=qNe(m,h),v=ZNe(m,h,d,f,i,s,l),b=XNe(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:UZ(w.css,A),isGlobalStyles:!0})}}),[_,m.settings]}var WZ=a(vf(),1),{lock:GZ,unlock:Wmt}=(0,WZ.__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 Nu={};GZ(Nu,{getResponsiveMediaQueries:b1,getViewportBreakpoints:c8,getViewportBreakpointValueInPixels:l8});function d8(e,t){if(!e||!t)return"";let r={settings:{},styles:{blocks:{[t]:e}}};try{let[o]=lv(r,[]);return o.map(n=>n.css).join(`
`)}catch{return""}}var{getViewportBreakpoints:eMe,getViewportBreakpointValueInPixels:f2}=K(Nu),tMe={Tablet:"tablet",Mobile:"mobile"},rMe="Desktop",oMe="Tablet",nMe="Mobile",m2={Desktop:"default",Tablet:"@tablet",Mobile:"@mobile"};function h2(e,t){let r=f2(e);return r&&r<=f2(p2("Mobile",t))?nMe:r&&r<=f2(p2("Tablet",t))?oMe:rMe}function p2(e,t){let r=tMe[e];if(r)return f2(eMe(t)[r])}var S1={},iMe=(0,Zt.createRegistrySelector)(e=>()=>e(vo.store).hasUndo()),sMe=(0,Zt.createRegistrySelector)(e=>()=>e(vo.store).hasRedo());function YZ(e){return Cn(e).status==="auto-draft"}function qZ(e){return"content"in x1(e)}var g2=(0,Zt.createRegistrySelector)(e=>t=>{let r=ea(t),o=ta(t);return e(vo.store).hasEditsForEntityRecord("postType",r,o)}),aMe=(0,Zt.createRegistrySelector)(e=>t=>{let r=e(vo.store).__experimentalGetDirtyEntityRecords(),{type:o,id:n}=Cn(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)});function lMe(e){return!g2(e)&&YZ(e)}var Cn=(0,Zt.createRegistrySelector)(e=>t=>{let r=ta(t),o=ea(t),n=e(vo.store).getRawEntityRecord("postType",o,r);return n||S1});function ea(e){return e.postType}function ta(e){return e.postId}function cMe(e){return e.templateId}function f8(e){return Cn(e)._links?.["version-history"]?.[0]?.count??0}function uMe(e){return Cn(e)._links?.["predecessor-version"]?.[0]?.id??null}var x1=(0,Zt.createRegistrySelector)(e=>t=>{let r=ea(t),o=ta(t);return e(vo.store).getEntityRecordEdits("postType",r,o)||S1});function w1(e,t){switch(t){case"type":return ea(e);case"id":return ta(e);default:let r=Cn(e);if(!r.hasOwnProperty(t))break;return dk(r[t])}}var dMe=(0,Zt.createSelector)((e,t)=>{let r=x1(e);return r.hasOwnProperty(t)?{...w1(e,t),...r[t]}:w1(e,t)},(e,t)=>[w1(e,t),x1(e)[t]]);function to(e,t){if(t==="content")return C1(e);let r=x1(e);return r.hasOwnProperty(t)?XK.has(t)?dMe(e,t):r[t]:w1(e,t)}var KZ=(0,Zt.createRegistrySelector)(e=>(t,r)=>{if(!JK.includes(r)&&r!=="preview_link")return;let o=ea(t),n=ta(t),i=e(vo.store).getCurrentUser()?.id,s=e(vo.store).getAutosave(o,n,i);if(s)return dk(s[r])});function fMe(e){return to(e,"status")==="private"?"private":to(e,"password")?"password":"public"}function pMe(e){return Cn(e).status==="pending"}function p8(e,t){let r=t||Cn(e);return["publish","private"].indexOf(r.status)!==-1||r.status==="future"&&!(0,a0.isInTheFuture)(new Date(Number((0,a0.getDate)(r.date))-_4))}function mMe(e){return Cn(e).status==="future"&&!p8(e)}function hMe(e){let t=Cn(e);return t.type===Sl?g2(e):g2(e)||["publish","private","future"].indexOf(t.status)===-1}function ZZ(e){return l0(e)?!1:!!to(e,"title")||!!to(e,"excerpt")||!XZ(e)}var XZ=(0,Zt.createRegistrySelector)(e=>t=>{let r=ta(t),o=ea(t),n=e(vo.store).getEditedEntityRecord("postType",o,r);if(typeof n.content!="function")return!n.content;let i=to(t,"blocks");if(i.length===0)return!0;if(i.length>1)return!1;let s=i[0].name;return s!==(0,fm.getDefaultBlockName)()&&s!==(0,fm.getFreeformContentHandlerName)()?!1:!C1(t)}),gMe=(0,Zt.createRegistrySelector)(e=>t=>{if(!ZZ(t)||$Z(t))return!1;let r=ea(t);if(!e(vo.store).getPostType(r)?.supports?.autosave)return!1;let n=ta(t),i=e(vo.store).hasFetchedAutosaves(r,n),s=e(vo.store).getCurrentUser()?.id,l=e(vo.store).getAutosave(r,n,s);return i?!l||qZ(t)?!0:["title","excerpt","meta"].some(c=>dk(l[c])!==to(t,c)):!1});function vMe(e){let t=to(e,"date"),r=new Date(Number((0,a0.getDate)(t))-_4);return(0,a0.isInTheFuture)(r)}function bMe(e){let t=to(e,"date"),r=to(e,"modified"),o=Cn(e).status;return o==="draft"||o==="auto-draft"||o==="pending"?t===r||t===null:!1}function yMe(e){return!!e.deleting.pending}function l0(e){return!!e.saving.pending}var wMe=(0,Zt.createRegistrySelector)(e=>t=>{let r=e(vo.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:n}=Cn(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)}),_Me=(0,Zt.createRegistrySelector)(e=>t=>{let r=ea(t),o=ta(t);return!e(vo.store).getLastEntitySaveError("postType",r,o)}),SMe=(0,Zt.createRegistrySelector)(e=>t=>{let r=ea(t),o=ta(t);return!!e(vo.store).getLastEntitySaveError("postType",r,o)});function xMe(e){return l0(e)&&!!e.saving.options?.isAutosave}function CMe(e){return l0(e)&&!!e.saving.options?.isPreview}function TMe(e){if(e.saving.pending||l0(e))return;let t=KZ(e,"preview_link");(!t||Cn(e).status==="draft")&&(t=to(e,"link"),t&&(t=(0,_1.addQueryArgs)(t,{preview:!0})));let r=to(e,"featured_media");return t&&r?(0,_1.addQueryArgs)(t,{_thumbnail_id:r}):t}var EMe=(0,Zt.createRegistrySelector)(e=>()=>{let t=e(v2.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}}),C1=(0,Zt.createRegistrySelector)(e=>t=>{let r=ta(t),o=ea(t),n=e(vo.store).getEditedEntityRecord("postType",o,r);if(n){if(typeof n.content=="function")return n.content(n);if(n.blocks)return(0,fm.__unstableSerializeAndClean)(n.blocks);if(n.content)return n.content}return""});function PMe(e){return l0(e)&&!p8(e)&&to(e,"status")==="publish"}function QZ(e){let t=to(e,"permalink_template");return w4.test(t)}function kMe(e){let t=JZ(e);if(!t)return null;let{prefix:r,postName:o,suffix:n}=t;return QZ(e)?r+o+n:r}function RMe(e){return to(e,"slug")||(0,_1.cleanForSlug)(to(e,"title"))||ta(e)}function JZ(e){let t=to(e,"permalink_template");if(!t)return null;let r=to(e,"slug")||to(e,"generated_slug"),[o,n]=t.split(w4);return{prefix:o,postName:r,suffix:n}}function AMe(e){return e.postLock.isLocked}function IMe(e){return Object.keys(e.postSavingLock).length>0}function $Z(e){return Object.keys(e.postAutosavingLock).length>0}function OMe(e){return e.postLock.isTakeover}function NMe(e){return e.postLock.user}function MMe(e){return e.postLock.activePostLock}function FMe(e){return!!Cn(e)._links?.hasOwnProperty("wp:action-unfiltered-html")}var DMe=(0,Zt.createRegistrySelector)(e=>()=>!!e(T1.store).get("core","isPublishSidebarEnabled")),LMe=(0,Zt.createSelector)(e=>to(e,"blocks")||(0,fm.parse)(C1(e)),e=>[to(e,"blocks"),C1(e)]);function eX(e,t){return e.removedPanels.includes(t)}var BMe=(0,Zt.createRegistrySelector)(e=>(t,r)=>{let o=e(T1.store).get("core","inactivePanels");return!eX(t,r)&&!o?.includes(r)}),VMe=(0,Zt.createRegistrySelector)(e=>(t,r)=>!!e(T1.store).get("core","openPanels")?.includes(r));function jMe(e){return(0,Mu.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),to(e,"selection")?.selectionStart}function zMe(e){return(0,Mu.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),to(e,"selection")?.selectionEnd}function HMe(e){return to(e,"selection")}function UMe(e){return!!e.postId}function m8(e){return e.editorSettings}function b2(e){return e.renderingMode}var WMe=(0,Zt.createRegistrySelector)(e=>t=>{let r=K(e(v2.store));if(r.isZoomOut())return"Desktop";let n=t.canvasWidth,i=r.getSettings().__experimentalFeatures?.viewport;return h2(n,i)});function GMe(e){return e.listViewPanel}function YMe(e){return!!e.blockInserterPanel}var qMe=(0,Zt.createRegistrySelector)(e=>()=>e(T1.store).get("core","editorMode")??"visual");function KMe(){return(0,Mu.default)("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function ZMe(){return(0,Mu.default)("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function at(e){return(0,Zt.createRegistrySelector)(t=>(r,...o)=>((0,Mu.default)("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(v2.store)[e](...o)))}var XMe=at("getBlockName"),QMe=at("isBlockValid"),JMe=at("getBlockAttributes"),$Me=at("getBlock"),e3e=at("getBlocks"),t3e=at("getClientIdsOfDescendants"),r3e=at("getClientIdsWithDescendants"),o3e=at("getGlobalBlockCount"),n3e=at("getBlocksByClientId"),i3e=at("getBlockCount"),s3e=at("getBlockSelectionStart"),a3e=at("getBlockSelectionEnd"),l3e=at("getSelectedBlockCount"),c3e=at("hasSelectedBlock"),u3e=at("getSelectedBlockClientId"),d3e=at("getSelectedBlock"),f3e=at("getBlockRootClientId"),p3e=at("getBlockHierarchyRootClientId"),m3e=at("getAdjacentBlockClientId"),h3e=at("getPreviousBlockClientId"),g3e=at("getNextBlockClientId"),v3e=at("getSelectedBlocksInitialCaretPosition"),b3e=at("getMultiSelectedBlockClientIds"),y3e=at("getMultiSelectedBlocks"),w3e=at("getFirstMultiSelectedBlockClientId"),_3e=at("getLastMultiSelectedBlockClientId"),S3e=at("isFirstMultiSelectedBlock"),x3e=at("isBlockMultiSelected"),C3e=at("isAncestorMultiSelected"),T3e=at("getMultiSelectedBlocksStartClientId"),E3e=at("getMultiSelectedBlocksEndClientId"),P3e=at("getBlockOrder"),k3e=at("getBlockIndex"),R3e=at("isBlockSelected"),A3e=at("hasSelectedInnerBlock"),I3e=at("isBlockWithinSelection"),O3e=at("hasMultiSelection"),N3e=at("isMultiSelecting"),M3e=at("isSelectionEnabled"),F3e=at("getBlockMode"),D3e=at("isTyping"),L3e=at("isCaretWithinFormattedText"),B3e=at("getBlockInsertionPoint"),V3e=at("isBlockInsertionPointVisible"),j3e=at("isValidTemplate"),z3e=at("getTemplate"),H3e=at("getTemplateLock"),U3e=at("canInsertBlockType"),W3e=at("getInserterItems"),G3e=at("hasInserterItems"),Y3e=at("getBlockListSettings"),q3e=(0,Zt.createRegistrySelector)(e=>()=>((0,Mu.default)("select('core/editor').__experimentalGetDefaultTemplateTypes",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_types"}),e(vo.store).getCurrentTheme()?.default_template_types)),K3e=(0,Zt.createRegistrySelector)(e=>(0,Zt.createSelector)(()=>((0,Mu.default)("select('core/editor').__experimentalGetDefaultTemplatePartAreas",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_part_areas"}),(e(vo.store).getCurrentTheme()?.default_template_part_areas||[]).map(r=>({...r,icon:cm(r.icon)}))))),Z3e=(0,Zt.createRegistrySelector)(e=>(0,Zt.createSelector)((t,r)=>{(0,Mu.default)("select('core/editor').__experimentalGetDefaultTemplateType",{since:"6.8"});let o=e(vo.store).getCurrentTheme()?.default_template_types;return o?Object.values(o).find(n=>n.slug===r)??S1:S1})),X3e=(0,Zt.createRegistrySelector)(e=>(0,Zt.createSelector)((t,r)=>{if((0,Mu.default)("select('core/editor').__experimentalGetTemplateInfo",{since:"6.8"}),!r)return S1;let o=e(vo.store).getCurrentTheme(),n=o?.default_template_types||[],i=o?.default_template_part_areas||[];return Tl({template:r,templateAreas:i,templateTypes:n})})),Q3e=(0,Zt.createRegistrySelector)(e=>t=>{let r=ea(t);return e(vo.store).getPostType(r)?.labels?.singular_name});function J3e(e){return e.publishSidebarActive}var NG={};Wr(NG,{__experimentalTearDownEditor:()=>Ptt,__unstableSaveForPreview:()=>Ltt,autosave:()=>Dtt,clearSelectedBlock:()=>brt,closePublishSidebar:()=>lrt,createUndoLevel:()=>jtt,disablePublishSidebar:()=>Utt,editPost:()=>Itt,enablePublishSidebar:()=>Htt,enterFormattedText:()=>Lrt,exitFormattedText:()=>Brt,hideInsertionPoint:()=>krt,insertBlock:()=>Trt,insertBlocks:()=>Ert,insertDefaultBlock:()=>Vrt,lockPostAutosaving:()=>Ytt,lockPostSaving:()=>Wtt,mergeBlocks:()=>Irt,moveBlockToPosition:()=>Crt,moveBlocksDown:()=>Srt,moveBlocksUp:()=>xrt,multiSelect:()=>vrt,openPublishSidebar:()=>art,receiveBlocks:()=>drt,redo:()=>Btt,refreshPost:()=>Mtt,removeBlock:()=>Nrt,removeBlocks:()=>Ort,removeEditorPanel:()=>ert,replaceBlock:()=>_rt,replaceBlocks:()=>wrt,resetBlocks:()=>urt,resetEditorBlocks:()=>Ktt,resetPost:()=>ktt,savePost:()=>Ott,selectBlock:()=>mrt,setDeviceType:()=>Qtt,setEditedPost:()=>Kwe,setIsInserterOpened:()=>trt,setIsListViewOpened:()=>rrt,setRenderingMode:()=>Xtt,setTemplateValidity:()=>Rrt,setupEditor:()=>Ett,setupEditorState:()=>Att,showInsertionPoint:()=>Prt,startMultiSelect:()=>hrt,startTyping:()=>Frt,stopMultiSelect:()=>grt,stopTyping:()=>Drt,switchEditorMode:()=>srt,synchronizeTemplate:()=>Art,toggleBlockMode:()=>Mrt,toggleDistractionFree:()=>ort,toggleEditorPanelEnabled:()=>Jtt,toggleEditorPanelOpened:()=>$tt,togglePublishSidebar:()=>crt,toggleSelection:()=>yrt,toggleSpotlightMode:()=>nrt,toggleTopToolbar:()=>irt,trashPost:()=>Ftt,undo:()=>Vtt,unlockPostAutosaving:()=>qtt,unlockPostSaving:()=>Gtt,updateBlock:()=>frt,updateBlockAttributes:()=>prt,updateBlockListSettings:()=>jrt,updateEditorSettings:()=>Ztt,updatePost:()=>Rtt,updatePostLock:()=>ztt});var OG=a(Pl(),1),qwe=a(Fu(),1),ig=a(Ga(),1),G_=a(At(),1),eu=a(It(),1),Ws=a(ne(),1),Ep=a(be(),1),Y_=a(Bn(),1),nn=a(Dt(),1),yn=a(z(),1);function g8(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function nX(e,t){return window.sessionStorage.getItem(g8(e,t))}function iX(e,t,r,o,n){window.sessionStorage.setItem(g8(e,t),JSON.stringify({post_title:r,content:o,excerpt:n}))}function y2(e,t){window.sessionStorage.removeItem(g8(e,t))}var qa=a(z(),1);function sX(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===Sl?(c=(0,qa.__)("Media updated."),u=!1):!i&&!s?(c=(0,qa.__)("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,qa.__)("View Preview"):o.labels.view_item,url:r.link,openInNewTab:!0}),[c,{id:"editor-save",type:"snackbar",actions:f}]}function aX(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,qa.__)("Publishing failed because you were offline. Please verify your connection and try again."),private:(0,qa.__)("Publishing failed because you were offline. Please verify your connection and try again."),future:(0,qa.__)("Scheduling failed because you were offline. Please verify your connection and try again."),default:(0,qa.__)("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,qa.__)("Publishing failed."),private:(0,qa.__)("Publishing failed."),future:(0,qa.__)("Scheduling failed."),default:(0,qa.__)("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,qa.__)("Trashing failed"),{id:"editor-trash-fail"}]}var IG={};Wr(IG,{createTemplate:()=>dtt,hideBlockTypes:()=>ptt,registerEntityAction:()=>ott,registerEntityField:()=>itt,registerPostTypeSchema:()=>ctt,removeTemplates:()=>gtt,resetStylesNavigation:()=>wtt,restoreRevision:()=>Ctt,revertTemplate:()=>htt,saveDirtyEntities:()=>mtt,selectNote:()=>Ttt,setCanvasWidth:()=>AG,setCurrentRevisionId:()=>_tt,setCurrentTemplateId:()=>utt,setDefaultRenderingMode:()=>vtt,setIsReady:()=>att,setRevisionPage:()=>Stt,setShowRevisionDiff:()=>xtt,setShowStylebook:()=>ytt,setStylesPath:()=>btt,showBlockTypes:()=>ftt,unregisterEntityAction:()=>ntt,unregisterEntityField:()=>stt});var ri=a(ne(),1),Gt=a(z(),1),ns=a(It(),1),o3=a(be(),1),ay=a(Dt(),1),Gwe=a(ho(),1),Ywe=a(Fu(),1),n3=a(At(),1),RG=a(Lt(),1),i3=a(an(),1);function w2(e){return e?e.source===pk.custom&&(!!e?.plugin||e?.has_theme_file):!1}var C8={};Wr(C8,{buildRevisionsPageQuery:()=>cv,getCanvasWidth:()=>g6e,getCurrentRevision:()=>_6e,getCurrentRevisionId:()=>x8,getDefaultRenderingMode:()=>p6e,getEntityActions:()=>c6e,getEntityFields:()=>d6e,getInserter:()=>n6e,getInserterSidebarToggleRef:()=>s6e,getListViewToggleRef:()=>i6e,getPageRevisions:()=>b6e,getPostBlocksByName:()=>f6e,getPostIcon:()=>a6e,getPreviousRevision:()=>C6e,getRevisionPage:()=>S8,getRevisionsPerPage:()=>v6e,getSelectedNote:()=>S6e,getShowStylebook:()=>h6e,getStylesPath:()=>m6e,hasPostMetaChanges:()=>l6e,isCollaborationEnabledForCurrentPost:()=>T6e,isEntityReady:()=>u6e,isNoteFocused:()=>x6e,isRevisionsMode:()=>y6e,isShowingRevisionDiff:()=>w6e});var OX=a(dX(),1),k1=a(be(),1),Ka=a(Y(),1);var ms=a(ne(),1),NX=a(Dt(),1);var fX=[];function pX(e,t,r){return e.actions[t]?.[r]??fX}function mX(e,t,r){return e.fields[t]?.[r]??fX}function hX(e,t,r){return e.isReady[t]?.[r]}var ui=[];for(let e=0;e<256;++e)ui.push((e+256).toString(16).slice(1));function gX(e,t=0){return(ui[e[t+0]]+ui[e[t+1]]+ui[e[t+2]]+ui[e[t+3]]+"-"+ui[e[t+4]]+ui[e[t+5]]+"-"+ui[e[t+6]]+ui[e[t+7]]+"-"+ui[e[t+8]]+ui[e[t+9]]+"-"+ui[e[t+10]]+ui[e[t+11]]+ui[e[t+12]]+ui[e[t+13]]+ui[e[t+14]]+ui[e[t+15]]).toLowerCase()}var $3e=new Uint8Array(16);function v8(){return crypto.getRandomValues($3e)}function e6e(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():t6e(e,t,r)}function t6e(e,t,r){e=e||{};let o=e.random??e.rng?.()??v8();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 b8=e6e;var P1=a(Y(),1),CX=a(ne(),1),TX=a(yf(),1),EX=a(E1(),1);var wX=a(U(),1),ps=null,y8=new Set;function _X(){y8.forEach(e=>e())}function SX(e){e.length&&(ps||(ps={total:0,completed:0,pending:[]}),ps={total:ps.total+e.length,completed:ps.completed,pending:[...ps.pending,...e]},_X())}function w8(e){if(!ps||e<=0)return;let t=Math.min(ps.total,ps.completed+e),r=ps.pending.slice(e);t>=ps.total?ps=null:ps={total:ps.total,completed:t,pending:r},_X()}function yX(){return ps}function r6e(e){return y8.add(e),()=>{y8.delete(e)}}function xX(){return(0,wX.useSyncExternalStore)(r6e,yX,yX)}var o6e=()=>{};function _2({additionalData:e={},allowedTypes:t,filesList:r,maxUploadFileSize:o,onError:n=o6e,onFileChange:i,onSuccess:s,multiple:l=!0}){let{receiveEntityRecords:c}=(0,P1.dispatch)(CX.store),{getCurrentPost:u,getEditorSettings:d}=(0,P1.select)(I),{lockPostAutosaving:f,unlockPostAutosaving:m,lockPostSaving:h,unlockPostSaving:g}=(0,P1.dispatch)(I),v=d().allowedMimeTypes,b=window.__clientSideMediaProcessing&&(0,EX.isClientSideMediaSupported)(),_=`image-upload-${b8()}`;o=o||d().maxUploadFileSize;let y=u(),w=typeof y?.id=="number"?y.id:y?.wp_id,S=()=>{g(_),m(_)};b||(h(_),f(_));let x=w?{post:w}:{};if(!b){let A=Array.from(r).map(k=>k?.name||"");SX(A)}let C=0;(0,TX.uploadMedia)({allowedTypes:t,filesList:r,onFileChange:A=>{i?.(A);let k=A.filter(R=>R?.id);if(k?.length&&c("postType","attachment",k,void 0,!0),!b&&k.length===A.length&&S(),!b){let R=k.length;R>C&&(w8(R-C),C=R)}},onSuccess:s,additionalData:{...x,...e},maxUploadFileSize:o,onError:({message:A})=>{b||(S(),w8(1)),n(A)},wpAllowedMimeTypes:v,multiple:l})}var PX=a(ho(),1),kX=a(Ga(),1);function RX(e){return(0,kX.default)("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,PX.cleanForSlug)(e)}var AX={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},_8=["post-only","template-locked"],n6e=(0,Ka.createRegistrySelector)(e=>(0,Ka.createSelector)(t=>{if(typeof t.blockInserterPanel=="object")return t.blockInserterPanel;if(b2(t)==="template-locked"){let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(k1.store),[s]=r("core/post-content");if(s){let l=o();return l&&l!==s&&n(l).includes(s)?AX:{rootClientId:s,insertionIndex:i(s).length,filterValue:void 0}}}return AX},t=>{let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(k1.store),[s]=r("core/post-content"),l=o();return[t.blockInserterPanel,b2(t),s,l,l?n(l):void 0,s?i(s).length:void 0]}));function i6e(e){return e.listViewToggleRef}function s6e(e){return e.inserterSidebarToggleRef}var IX={wp_block:r0,wp_navigation:tV,page:am,post:WV},a6e=(0,Ka.createRegistrySelector)(e=>(t,r,o)=>{{if(r==="wp_template_part"||r==="wp_template"){let s=(e(ms.store).getCurrentTheme()?.default_template_part_areas||[]).find(l=>o.area===l.area);return s?.icon?cm(s.icon):Ya}if(IX[r])return IX[r];let n=e(ms.store).getPostType(r);return typeof n?.icon=="string"&&n.icon.startsWith("dashicons-")?n.icon.slice(10):am}}),l6e=(0,Ka.createRegistrySelector)(e=>(t,r,o)=>{let{type:n,id:i}=Cn(t),s=e(ms.store).getEntityRecordNonTransientEdits("postType",r||n,o||i);if(!s?.meta)return!1;let l=e(ms.store).getEntityRecord("postType",r||n,o||i)?.meta;return!(0,OX.default)({...l,footnotes:void 0},{...s.meta,footnotes:void 0})});function c6e(e,...t){return pX(e.dataviews,...t)}function u6e(e,...t){return hX(e.dataviews,...t)}function d6e(e,...t){return mX(e.dataviews,...t)}var f6e=(0,Ka.createRegistrySelector)(e=>(0,Ka.createSelector)((t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n,getBlockName:i}=e(k1.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(k1.store),i=o(r),s=i.map(l=>n(l));return[i,...s]})),p6e=(0,Ka.createRegistrySelector)(e=>(t,r)=>{let{getPostType:o,getCurrentTheme:n,hasFinishedResolution:i}=e(ms.store),s=n(),l=o(r);if(!i("getPostType",[r])||!i("getCurrentTheme"))return;let c=s?.stylesheet,u=e(NX.store).get("core","renderingModes")?.[c]?.[r];if(_8.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(_8.includes(d))return d;let f=m8(t).defaultRenderingMode;return _8.includes(f)?f:"post-only"});function m6e(e){return e.stylesPath??"/"}function h6e(e){return e.showStylebook??!1}function g6e(e){return e.canvasWidth}function S8(e){return e.revisionPage}function cv(e,t){return{per_page:MX,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 MX=100;function v6e(){return MX}var b6e=(0,Ka.createRegistrySelector)(e=>(t,r)=>{if(!r)return null;let{type:o,id:n}=Cn(t);if(!o||!n)return null;let s=e(ms.store).getEntityConfig("postType",o)?.revisionKey||"id";return e(ms.store).getRevisions("postType",o,n,cv(s,r))});function y6e(e){return e.revisionId!==null}function w6e(e){return e.showRevisionDiff}function x8(e){return e.revisionId}var _6e=(0,Ka.createRegistrySelector)(e=>t=>{let r=x8(t);if(!r)return;let o=S8(t);if(!o)return null;let{type:n,id:i}=Cn(t),l=e(ms.store).getEntityConfig("postType",n)?.revisionKey||"id",c=e(ms.store).getRevisions("postType",n,i,cv(l,o));return c?c.find(u=>u[l]===r)??null:null});function S6e(e){return e.selectedNote?.noteId}function x6e(e){return!!e.selectedNote?.options?.focus}var C6e=(0,Ka.createRegistrySelector)(e=>t=>{let r=x8(t);if(!r)return;let o=S8(t);if(!o)return null;let{type:n,id:i}=Cn(t),l=e(ms.store).getEntityConfig("postType",n)?.revisionKey||"id",c=cv(l,o),u=e(ms.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=f8(t),m=Math.ceil(f/c.per_page)||1;return d===u.length-1&&o<m?e(ms.store).getRevisions("postType",n,i,cv(l,o+1))?.[0]??null:null}),T6e=(0,Ka.createRegistrySelector)(e=>t=>{if(!K(e(ms.store)).isCollaborationSupported())return!1;let r=ea(t),o=ta(t),i=e(ms.store).getEntityConfig("postType",r)?.syncConfig;return!!(i&&i.supportsPersistence&&window._wpCollaborationEnabled&&i.shouldSync?.(`postType/${r}`,o)!==!1)});var r3=a(ne(),1),Wwe=a(Bn(),1);var YX=a(z(),1);var hs=a(G(),1);var T2=a(ke(),1),jX=a(Y(),1),c0=a(U(),1),zX=a(It(),1),HX=a(ho(),1),uv=a(z(),1);var VX=a(ho(),1);var S2=a(Lt(),1),DX=a(z(),1);function LX(e){return e.type==="wp_template"}function BX(e){return e.type==="wp_template_part"}function wf(e){return e.type==="wp_template"||e.type==="wp_template_part"}function ft(e,t=(0,DX.__)("(no title)")){let r="";return typeof e.title=="string"?r=(0,S2.decodeEntities)(e.title):e.title&&"rendered"in e.title?r=(0,S2.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title&&(r=(0,S2.decodeEntities)(e.title.raw)),r||t}function x2(e){return e?[e.source,e.source].includes("custom")&&!(e.type==="wp_template"&&e?.plugin)&&!e.has_theme_file:!1}var C2=e=>typeof e!="object"?"":e.slug||(0,VX.cleanForSlug)(ft(e))||e.id.toString();var jn=a(E(),1),UX=({field:e,onChange:t,data:r})=>{let{id:o}=e,n=e.getValue({item:r})||C2(r),i=r.permalink_template||"",s=/%(?:postname|pagename)%/,[l,c]=i.split(s),u=l,d=c,f=s.test(i),m=(0,c0.useRef)(n),h=n||m.current,g=f?`${u}${h}${d}`:(0,HX.safeDecodeURIComponent)(r.link||"");(0,c0.useEffect)(()=>{n&&m.current===void 0&&(m.current=n)},[n]);let v=(0,c0.useCallback)(w=>t({[o]:w}),[o,t]),{createNotice:b}=(0,jX.useDispatch)(zX.store),_=(0,T2.useCopyToClipboard)(g,()=>{b("info",(0,uv.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),y="editor-post-url__slug-description-"+(0,T2.useInstanceId)(UX);return(0,jn.jsxs)("fieldset",{className:"fields-controls__slug",children:[f&&(0,jn.jsxs)(hs.__experimentalVStack,{children:[(0,jn.jsxs)(hs.__experimentalVStack,{spacing:"0px",children:[(0,jn.jsx)("span",{children:(0,uv.__)("Customize the last part of the Permalink.")}),(0,jn.jsx)(hs.ExternalLink,{href:"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink",children:(0,uv.__)("Learn more")})]}),(0,jn.jsx)(hs.__experimentalInputControl,{prefix:(0,jn.jsx)(hs.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,jn.jsx)(hs.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,jn.jsx)(hs.Button,{size:"small",icon:Hx,ref:_,label:(0,uv.__)("Copy")})}),label:(0,uv.__)("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,jn.jsxs)("div",{className:"fields-controls__slug-help",children:[(0,jn.jsx)("span",{className:"fields-controls__slug-help-visual-label",children:(0,uv.__)("Permalink:")}),(0,jn.jsxs)(hs.ExternalLink,{className:"fields-controls__slug-help-link",href:g,children:[(0,jn.jsx)("span",{className:"fields-controls__slug-help-prefix",children:u}),(0,jn.jsx)("span",{className:"fields-controls__slug-help-slug",children:h}),(0,jn.jsx)("span",{className:"fields-controls__slug-help-suffix",children:d})]})]})]}),!f&&(0,jn.jsx)(hs.ExternalLink,{className:"fields-controls__slug-help",href:g,children:g})]})},WX=UX;var E2=a(U(),1);var E6e=({item:e})=>{let t=C2(e),r=(0,E2.useRef)(t);return(0,E2.useEffect)(()=>{t&&r.current===void 0&&(r.current=t)},[t]),`${t||r.current}`},GX=E6e;var P6e={id:"slug",type:"text",label:(0,YX.__)("Slug"),Edit:WX,render:GX,filterBy:!1},T8=P6e;var E8=a(z(),1);function qX(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=qX(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function k6e(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=qX(e))&&(o&&(o+=" "),o+=t);return o}var J=k6e;var KX=a(G(),1),ZX=a(z(),1);var R1=a(E(),1);function A1({item:e,className:t,children:r}){let o=ft(e);return(0,R1.jsxs)(KX.__experimentalHStack,{className:J("fields-field__title",t),alignment:"center",justify:"flex-start",children:[(0,R1.jsx)("span",{children:o||(0,ZX.__)("(no title)")}),r]})}function P2({item:e}){return(0,R1.jsx)(A1,{item:e})}var R6e={type:"text",id:"title",label:(0,E8.__)("Title"),placeholder:(0,E8.__)("No title"),getValue:({item:e})=>ft(e),render:P2,enableHiding:!0,enableGlobalSearch:!0,filterBy:!1},k2=R6e;var R8=a(z(),1);var P8=a(z(),1),QX=a(Y(),1),JX=a(ne(),1),$X=a(G(),1);var XX=a(vf(),1),{lock:vgt,unlock:ln}=(0,XX.__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 k8=a(E(),1),{Badge:A6e}=ln($X.privateApis);function eQ({item:e}){let{frontPageId:t,postsPageId:r}=(0,QX.useSelect)(o=>{let{getEntityRecord:n}=o(JX.store),i=n("root","site");return{frontPageId:i?.page_on_front,postsPageId:i?.page_for_posts}},[]);return(0,k8.jsx)(A1,{item:e,className:"fields-field__page-title",children:[t,r].includes(e.id)&&(0,k8.jsx)(A6e,{children:e.id===t?(0,P8.__)("Homepage"):(0,P8.__)("Posts Page")})})}var I6e={type:"text",id:"title",label:(0,R8.__)("Title"),placeholder:(0,R8.__)("No title"),getValue:({item:e})=>ft(e),render:eQ,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},A8=I6e;var I8=a(z(),1);var O6e={id:"title",type:"text",label:(0,I8.__)("Template"),placeholder:(0,I8.__)("No title"),getValue:({item:e})=>ft(e),render:P2,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},I1=O6e;var rj=a(z(),1);var Fre=a(z(),1);var Dre=a(kl(),1);var Wee=a(U(),1);var dv=a(_e(),1);function R2({controlled:e,default:t,name:r,state:o="value"}){let{current:n}=dv.useRef(e!==void 0),[i,s]=dv.useState(t),l=n?e:i,c=dv.useCallback(u=>{n||s(u)},[]);return[l,c]}var N6e=a(_e(),1),O1={...N6e};var nQ=a(_e(),1),oQ={};function cn(e,t){let r=nQ.useRef(oQ);return r.current===oQ&&(r.current=e(t)),r}var O8=O1.useInsertionEffect,M6e=O8&&O8!==O1.useLayoutEffect?O8:e=>e();function De(e){let t=cn(F6e).current;return t.next=e,M6e(t.effect),t.trampoline}function F6e(){let e={next:void 0,callback:D6e,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function D6e(){}var iQ=a(_e(),1),L6e=()=>{},Oe=typeof document<"u"?iQ.useLayoutEffect:L6e;var pm=a(_e(),1);var A2=a(_e(),1),N8=A2.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function sQ(){return A2.useContext(N8)}var aQ=a(E(),1);function I2(e){let{children:t,elementsRef:r,labelsRef:o,onMapChange:n}=e,i=De(n),s=pm.useRef(0),l=cn(V6e).current,c=cn(B6e).current,[u,d]=pm.useState(0),f=pm.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=pm.useMemo(()=>{let _=new Map;return Array.from(c.keys()).filter(w=>w.isConnected).sort(j6e).forEach((w,S)=>{let x=c.get(w)??{};_.set(w,{...x,index:S})}),_},[c,u]);Oe(()=>{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]),Oe(()=>{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]),Oe(()=>()=>{r.current=[]},[r]),Oe(()=>()=>{o&&(o.current=[])},[o]);let v=De(_=>(l.add(_),()=>{l.delete(_)}));Oe(()=>{l.forEach(_=>_(g))},[l,g]);let b=pm.useMemo(()=>({register:m,unregister:h,subscribeMapChange:v,elementsRef:r,labelsRef:o,nextIndexRef:s}),[m,h,v,r,o,s]);return(0,aQ.jsx)(N8.Provider,{value:b,children:t})}function B6e(){return new Map}function V6e(){return new Set}function j6e(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 O2=a(_e(),1),z6e=O2.createContext(void 0);function mm(){return O2.useContext(z6e)?.direction??"ltr"}function H6e(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 U6e=H6e("https://base-ui.com/production-error","Base UI"),Io=U6e;var fv=a(_e(),1);function _f(e,t,r,o){let n=cn(cQ).current;return W6e(n,e,t,r,o)&&uQ(n,[e,t,r,o]),n.callback}function lQ(e){let t=cn(cQ).current;return G6e(t,e)&&uQ(t,e),t.callback}function cQ(){return{callback:null,cleanup:null,refs:[]}}function W6e(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function G6e(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function uQ(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 fQ=a(_e(),1);var dQ=a(_e(),1),Y6e=parseInt(dQ.version,10);function u0(e){return Y6e>=e}function M8(e){if(!fQ.isValidElement(e))return null;let t=e,r=t.props;return(u0(19)?r?.ref:t.ref)??null}function N1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function _c(){}var M1=Object.freeze([]),ro=Object.freeze({});function pQ(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 mQ(e,t){return typeof e=="function"?e(t):e}function N2(e,t){return typeof e=="function"?e(t):e}var F8={};function gr(e,t,r,o,n){if(!r&&!o&&!n&&!e)return M2(t);let i=M2(e);return t&&(i=F1(i,t)),r&&(i=F1(i,r)),o&&(i=F1(i,o)),n&&(i=F1(i,n)),i}function hQ(e){if(e.length===0)return F8;if(e.length===1)return M2(e[0]);let t=M2(e[0]);for(let r=1;r<e.length;r+=1)t=F1(t,e[r]);return t}function M2(e){return D8(e)?{...vQ(e,F8)}:q6e(e)}function F1(e,t){return D8(t)?vQ(t,e):K6e(e,t)}function q6e(e){let t={...e};for(let r in t){let o=t[r];gQ(r,o)&&(t[r]=bQ(o))}return t}function K6e(e,t){if(!t)return e;for(let r in t){let o=t[r];switch(r){case"style":{e[r]=N1(e.style,o);break}case"className":{e[r]=L8(e.className,o);break}default:gQ(r,o)?e[r]=Z6e(e[r],o):e[r]=o}}return e}function gQ(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 D8(e){return typeof e=="function"}function vQ(e,t){return D8(e)?e(t):e??F8}function Z6e(e,t){return t?e?(...r)=>{let o=r[0];if(yQ(o)){let i=o;D1(i);let s=t(...r);return i.baseUIHandlerPrevented||e?.(...r),s}let n=t(...r);return e?.(...r),n}:bQ(t):e}function bQ(e){return e&&((...t)=>{let r=t[0];return yQ(r)&&D1(r),e(...t)})}function D1(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function L8(e,t){return t?e?t+" "+e:t:e}function yQ(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var B8=a(_e(),1);function Xt(e,t,r={}){let o=t.render,n=X6e(t,r);if(r.enabled===!1)return null;let i=r.state??ro;return $6e(e,o,n,i)}function X6e(e,t={}){let{className:r,style:o,render:n}=e,{state:i=ro,ref:s,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?mQ(r,i):void 0,f=u?N2(o,i):void 0,m=u?pQ(i,c):ro,h=u&&l?Q6e(l):void 0,g=u?N1(m,h)??{}:ro;return typeof document<"u"&&(u?Array.isArray(s)?g.ref=lQ([g.ref,M8(n),...s]):g.ref=_f(g.ref,M8(n),s):_f(null,null)),u?(d!==void 0&&(g.className=L8(g.className,d)),f!==void 0&&(g.style=N1(g.style,f)),g):ro}function Q6e(e){return Array.isArray(e)?hQ(e):gr(void 0,e)}var J6e=Symbol.for("react.lazy");function $6e(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===J6e&&(i=fv.Children.toArray(t)[0]),fv.cloneElement(i,n)}if(e&&typeof e=="string")return eFe(e,r);throw new Error(Io(8))}function eFe(e,t){return e==="button"?(0,B8.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,B8.createElement)("img",{alt:"",...t,key:t.key}):fv.createElement(e,t)}var F2=a(_e(),1);var wQ=0;function tFe(e,t="mui"){let[r,o]=F2.useState(e),n=e||r;return F2.useEffect(()=>{r==null&&(wQ+=1,o(`${t}-${wQ}`))},[r,t]),n}var _Q=O1.useId;function hm(e,t){if(_Q!==void 0){let r=_Q();return e??(t?`${t}-${r}`:r)}return tFe(e,t)}function gm(e){return hm(e,"base-ui")}var B2=a(_e(),1);var qe={};Wr(qe,{cancelOpen:()=>RFe,chipRemovePress:()=>dFe,clearPress:()=>uFe,closePress:()=>lFe,closeWatcher:()=>SFe,decrementPress:()=>mFe,disabled:()=>IFe,drag:()=>EFe,escapeKey:()=>_Fe,focusOut:()=>wFe,imperativeAction:()=>MFe,incrementPress:()=>pFe,initial:()=>NFe,inputBlur:()=>vFe,inputChange:()=>hFe,inputClear:()=>gFe,inputPaste:()=>bFe,inputPress:()=>yFe,itemPress:()=>aFe,keyboard:()=>CFe,linkPress:()=>cFe,listNavigation:()=>xFe,missing:()=>OFe,none:()=>rFe,outsidePress:()=>sFe,pointer:()=>TFe,scrub:()=>kFe,siblingOpen:()=>AFe,swipe:()=>FFe,trackPress:()=>fFe,triggerFocus:()=>iFe,triggerHover:()=>nFe,triggerPress:()=>oFe,wheel:()=>PFe,windowResize:()=>DFe});var rFe="none",oFe="trigger-press",nFe="trigger-hover",iFe="trigger-focus",sFe="outside-press",aFe="item-press",lFe="close-press",cFe="link-press",uFe="clear-press",dFe="chip-remove-press",fFe="track-press",pFe="increment-press",mFe="decrement-press",hFe="input-change",gFe="input-clear",vFe="input-blur",bFe="input-paste",yFe="input-press",wFe="focus-out",_Fe="escape-key",SFe="close-watcher",xFe="list-navigation",CFe="keyboard",TFe="pointer",EFe="drag",PFe="wheel",kFe="scrub",RFe="cancel-open",AFe="sibling-open",IFe="disabled",OFe="missing",NFe="initial",MFe="imperative-action",FFe="swipe",DFe="window-resize";function xt(e,t,r,o){let n=!1,i=!1,s=o??ro;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 j8=a(_e(),1);var SQ=a(_e(),1),LFe=[];function d0(e){SQ.useEffect(e,LFe)}var D2=null,xvt=globalThis.requestAnimationFrame,V8=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)}},L2=new V8,gs=class e{static create(){return new e}static request(t){return L2.request(t)}static cancel(t){return L2.cancel(t)}currentId=D2;request(t){this.cancel(),this.currentId=L2.request(()=>{this.currentId=D2,t()})}cancel=()=>{this.currentId!==D2&&(L2.cancel(this.currentId),this.currentId=D2)};disposeEffect=()=>this.cancel};function f0(){let e=cn(gs.create).current;return d0(e.disposeEffect),e}function p0(e,t=!1,r=!1){let[o,n]=j8.useState(e&&t?"idle":void 0),[i,s]=j8.useState(e);return e&&!i&&(s(!0),n("starting")),!e&&i&&o!=="ending"&&!r&&n("ending"),!e&&!i&&o==="ending"&&n(void 0),Oe(()=>{if(!e&&i&&o!=="ending"&&r){let l=gs.request(()=>{n("ending")});return()=>{gs.cancel(l)}}},[e,i,o,r]),Oe(()=>{if(!e||t)return;let l=gs.request(()=>{n(void 0)});return()=>{gs.cancel(l)}},[t,e]),Oe(()=>{if(!e||!t)return;e&&i&&o!=="idle"&&n("starting");let l=gs.request(()=>{n("idle")});return()=>{gs.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]=R2({controlled:t,default:r,name:"Collapsible",state:"open"}),{mounted:l,setMounted:c,transitionStatus:u}=p0(i,!0,!0),d=gm(),[f,m]=B2.useState(),h=f??d,g=De(v=>{let b=!i,_=xt(qe.triggerPress,v.nativeEvent);o(b,_),!_.isCanceled&&s(b)});return B2.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 V2=a(_e(),1),z8=V2.createContext(void 0);function j2(){let e=V2.useContext(z8);if(e===void 0)throw new Error(Io(15));return e}var pv=a(_e(),1);var BFe=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function z2(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}=sQ(),m=pv.useRef(-1),[h,g]=pv.useState(i??(n===BFe.GuessFromOrder?()=>{if(m.current===-1){let _=f.current;f.current+=1,m.current=_}return m.current}:-1)),v=pv.useRef(null),b=pv.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 Oe(()=>{if(i!=null)return;let _=v.current;if(_)return s(_,r),()=>{l(_)}},[i,s,l,r]),Oe(()=>{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 Za=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),VFe={[Za.startingStyle]:""},jFe={[Za.endingStyle]:""},vm={transitionStatus(e){return e==="starting"?VFe:e==="ending"?jFe:null}};var L1=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Za.startingStyle]="startingStyle",e[e.endingStyle=Za.endingStyle]="endingStyle",e})({});var CQ=(function(e){return e.panelOpen="data-panel-open",e})({});var zFe={[L1.open]:""},HFe={[L1.closed]:""},TQ={open(e){return e?{[CQ.panelOpen]:""}:null}},EQ={open(e){return e?zFe:HFe}};var g0=a(_e(),1);function H2(){return typeof window<"u"}function hv(e){return U2(e)?(e.nodeName||"").toLowerCase():"#document"}function Gr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xc(e){var t;return(t=(U2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function U2(e){return H2()?e instanceof Node||e instanceof Gr(e).Node:!1}function lt(e){return H2()?e instanceof Element||e instanceof Gr(e).Element:!1}function bo(e){return H2()?e instanceof HTMLElement||e instanceof Gr(e).HTMLElement:!1}function m0(e){return!H2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gr(e).ShadowRoot}function h0(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&n!=="inline"&&n!=="contents"}function PQ(e){return/^(table|td|th)$/.test(hv(e))}function B1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var UFe=/transform|translate|scale|rotate|perspective|filter/,WFe=/paint|layout|strict|content/,mv=e=>!!e&&e!=="none",H8;function W2(e){let t=lt(e)?zn(e):e;return mv(t.transform)||mv(t.translate)||mv(t.scale)||mv(t.rotate)||mv(t.perspective)||!G2()&&(mv(t.backdropFilter)||mv(t.filter))||UFe.test(t.willChange||"")||WFe.test(t.contain||"")}function kQ(e){let t=Sc(e);for(;bo(t)&&!Cc(t);){if(W2(t))return t;if(B1(t))return null;t=Sc(t)}return null}function G2(){return H8==null&&(H8=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),H8}function Cc(e){return/^(html|body|#document)$/.test(hv(e))}function zn(e){return Gr(e).getComputedStyle(e)}function V1(e){return lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sc(e){if(hv(e)==="html")return e;let t=e.assignedSlot||e.parentNode||m0(e)&&e.host||xc(e);return m0(t)?t.host:t}function RQ(e){let t=Sc(e);return Cc(t)?e.ownerDocument?e.ownerDocument.body:e.body:bo(t)&&h0(t)?t:RQ(t)}function bm(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=RQ(e),i=n===((o=e.ownerDocument)==null?void 0:o.body),s=Gr(n);if(i){let l=Y2(s);return t.concat(s,s.visualViewport||[],h0(n)?n:[],l&&r?bm(l):[])}else return t.concat(n,bm(n,[],r))}function Y2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var q2=a(_e(),1),U8=q2.createContext(void 0);function K2(e=!1){let t=q2.useContext(U8);if(t===void 0&&!e)throw new Error(Io(16));return t}var AQ=a(_e(),1);function IQ(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:AQ.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 gv(e={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:o=0,native:n=!0,composite:i}=e,s=g0.useRef(null),l=K2(!0),c=i??l!==void 0,{props:u}=IQ({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:o,isNativeButton:n}),d=g0.useCallback(()=>{let h=s.current;W8(h)&&c&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,c]);Oe(d,[d]);let f=g0.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||(D1(S),_?.(S),S.baseUIHandlerPrevented))return;let x=S.target===S.currentTarget,C=S.currentTarget,A=W8(C),k=!n&&GFe(C),R=x&&(n?A:!k),N=S.key==="Enter",P=S.key===" ",T=C.getAttribute("role"),M=T?.startsWith("menuitem")||T==="option"||T==="gridcell";if(x&&c&&P){if(S.defaultPrevented&&M)return;S.preventDefault(),k||n&&A?(C.click(),S.preventBaseUIHandler()):R&&(g?.(S),S.preventBaseUIHandler());return}R&&(!n&&(P||N)&&S.preventDefault(),!n&&N&&g?.(S))},onKeyUp(S){if(!t){if(D1(S),b?.(S),S.target===S.currentTarget&&n&&c&&W8(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 W8(e){return bo(e)&&e.tagName==="BUTTON"}function GFe(e){return!!(e?.tagName==="A"&&e?.href)}var vs=a(_e(),1);function Qt(e,t,r,o){return e.addEventListener(t,r,o),()=>{e.removeEventListener(t,r,o)}}function Mi(e){let t=cn(YFe,e).current;return t.next=e,Oe(t.effect),t}function YFe(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function qo(e){return e?.ownerDocument||document}var FQ=a(_e(),1);var MQ=a(Du(),1);function NQ(e){return e==null?e:"current"in e?e.current:e}function ym(e,t=!1,r=!0){let o=f0();return De((n,i=null)=>{o.cancel();let s=NQ(e);if(s==null)return;let l=s,c=()=>{MQ.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=Za.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 wm(e){let{enabled:t=!0,open:r,ref:o,onComplete:n}=e,i=De(n),s=ym(o,r,!1);FQ.useEffect(()=>{if(!t)return;let l=new AbortController;return s(i,l.signal),()=>{l.abort()}},[t,r,i,s])}var j1={height:void 0,width:void 0};function LQ(e){let{externalRef:t,hiddenUntilFound:r,id:o,keepMounted:n,mounted:i,onOpenChange:s,open:l,setMounted:c,setOpen:u,transitionStatus:d}=e,f=vs.useRef(null),m=vs.useRef(null),[h,g]=vs.useState(j1),v=vs.useRef(j1),b=vs.useRef(!1),_=vs.useRef(l),y=vs.useRef(!1),[w,S]=vs.useState(!1),x=vs.useRef(null),C=_f(t,f),A=Mi({mounted:i,open:l}),k=ym(f,!1,!1),R=!l&&!i,N=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,M=r&&R&&m.current!=="css-animation",j=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()}}),B=De(()=>{l&&i&&m.current==="css-animation"&&(y.current=!0)});Oe(()=>{!w||d==="starting"||S(!1)},[w,d]),vs.useEffect(()=>()=>{B(),F()},[B,F]),Oe(()=>{let O=f.current;if(!O)return;!l&&x.current&&F();let V=qFe(O,P);if(m.current=V,l&&d==="idle"&&_.current&&V==="css-animation"){v.current=v0(O);return}if(l&&d==="starting"){let Z=b.current;if(b.current=!1,V==="none"){j(v0(O)),S(!0);return}if(V==="css-transition"){let Q=KFe(O);if(j(v0(O)),!Z)return Q;let ce=z1(O,"transition-duration","0s");return D(ce),S(!0),Q}if(V==="css-animation"){if(j(v0(O)),!Z){z1(O,"animation-name","none")();return}let Q=z1(O,"animation-name","none"),ce=z1(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"){j(j1,!1),c(!1);return}j(v0(O));return}if(d!=="ending")return;if(V==="none"){c(!1);return}let W=v0(O);if(!((W.height??0)>0||(W.width??0)>0)){c(!1);return}j(W),V==="css-animation"&&z1(O,"animation-name","none")()},[i,l,F,j,c,D,P,d]),wm({enabled:l&&i&&N==="idle",open:!0,ref:f,onComplete(){l&&j(j1,!1)}}),vs.useEffect(()=>{if(l||!i||N!=="ending"||!f.current)return;let V=new AbortController,W=-1;function q(){A.current.open||(c(!1),j(j1,!1))}return W=gs.request(()=>{V.signal.aborted||k(q,V.signal)}),()=>{gs.cancel(W),V.abort()}},[A,i,l,N,k,j,c]),Oe(()=>{let O=f.current;!O||!r||!R||O.setAttribute("hidden","until-found")},[R,r]),vs.useEffect(function(){let V=f.current;if(!V)return;function W(q){let Z=xt(qe.none,q);s(!0,Z),!Z.isCanceled&&(b.current=!0,u(!0))}return Qt(V,"beforematch",W)},[s,u]);let L=n||r||i||l;return{height:T.height,props:{...M?{[L1.startingStyle]:""}:void 0,hidden:R,id:o},ref:C,shouldPreventOpenAnimation:P,shouldRender:L,transitionStatus:N,width:T.width}}function v0(e){return{height:e.scrollHeight,width:e.scrollWidth}}function qFe(e,t=!1){let r=Gr(e).getComputedStyle(e),o=(r.animationName.split(",").map(i=>i.trim()).some(i=>i!==""&&i!=="none")||t)&&DQ(r.animationDuration),n=DQ(r.transitionDuration);return o&&n||n?"css-transition":o?"css-animation":"none"}function DQ(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function z1(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 KFe(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=gs.request(r);return()=>{gs.cancel(o),r()}}var BQ=a(_e(),1);function VQ(e){let t=BQ.useRef(!0);t.current&&(t.current=!1,e())}var Sf={};Wr(Sf,{engine:()=>Z8,env:()=>Q8,os:()=>q8,screenReader:()=>X8});var q8={};Wr(q8,{android:()=>HQ,apple:()=>Y8,ios:()=>G8,linux:()=>$Fe,mac:()=>UQ,windows:()=>JFe});function ZFe(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:XFe,platform:QFe,maxTouchPoints:jQ}=ZFe(),vv=XFe.toLowerCase(),bv=QFe.toLowerCase();var G8=/^i(os$|p)/.test(bv)||bv==="macintel"&&jQ>1,zQ="android",HQ=bv===zQ||vv.includes(zQ),UQ=!G8&&bv.startsWith("mac"),JFe=bv.startsWith("win"),$Fe=!HQ&&/^(linux|chrome os)/.test(bv),Y8=UQ||G8;var Z8={};Wr(Z8,{blink:()=>tDe,gecko:()=>eDe,webkit:()=>K8});var K8=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),eDe=!K8&&vv.includes("firefox"),tDe=!K8&&vv.includes("chrom");var X8={};Wr(X8,{voiceOver:()=>rDe});var rDe=Y8;var Q8={};Wr(Q8,{jsdom:()=>oDe});var oDe=/jsdom|happydom/.test(vv);var H1=0,Xa=class e{static create(){return new e}currentId=H1;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=H1,r()},t)}isStarted(){return this.currentId!==H1}clear=()=>{this.currentId!==H1&&(clearTimeout(this.currentId),this.currentId=H1)};disposeEffect=()=>this.clear};function Tc(){let e=cn(Xa.create).current;return d0(e.disposeEffect),e}var Fi=a(_e(),1);function WQ(e){return"nativeEvent"in e}function xf(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function GQ(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var J8="data-base-ui-focusable";var $8="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function b0(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function tr(e,t){if(!e||!t)return!1;let r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&m0(r)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Hn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function _m(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(tr(o,r))return!o.hasAttribute("data-trigger-disabled");return!1}function Z2(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 YQ(e){return e.matches("html,body")}function qQ(e){return bo(e)&&e.matches($8)}function e7(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${$8}`)!=null}function KQ(e){if(!e||Sf.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function nDe(e,t){return t!=null&&!xf(t)?0:typeof e=="function"?e():e}function Cf(e,t,r){let o=nDe(e,r);return typeof o=="number"?o:o?.[t]}function t7(e){return typeof e=="function"?e():e}function X2(e,t){return t||e==="click"||e==="mousedown"}function ZQ(e){return e?.includes("mouse")&&e!=="mousedown"}var XQ=a(E(),1),QQ=Fi.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Xa,currentIdRef:{current:null},currentContextRef:{current:null}});function iDe(e,t){e.current=t.current}function r7(e){let{children:t,delay:r,timeoutMs:o=0}=e,n=Fi.useRef(r),i=Fi.useRef(r),s=Fi.useRef(null),l=Fi.useRef(null),c=Tc();return Oe(()=>{if(i.current=r,!s.current){n.current=r;return}n.current={open:Cf(n.current,"open"),close:Cf(r,"close")}},[r,s,n,i]),(0,XQ.jsx)(QQ.Provider,{value:Fi.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:i,currentIdRef:s,timeoutMs:o,currentContextRef:l,timeout:c}),[o,c]),children:t})}function o7(e,t={open:!1}){let{open:r}=t,o="rootStore"in e?e.rootStore:e,n=o.useState("floatingId"),i=Fi.useContext(QQ),{currentIdRef:s,delayRef:l,timeoutMs:c,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeout:m}=i,[h,g]=Fi.useState(!1),v=Fi.useRef(r),b=Fi.useRef(!1);return Oe(()=>{v.current=r},[r]),Oe(()=>()=>{b.current=!0},[]),Oe(()=>{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]),Oe(()=>{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:Cf(u.current,"close")},y!==null&&y!==n?(g(!0),_?.setIsInstantPhase(!0),_?.onOpenChange(!1,xt(qe.none))):(g(!1),_?.setIsInstantPhase(!1))},[r,n,o,s,l,u,d,m]),Oe(()=>()=>{if(s.current===n){if(d.current=null,!v.current)return;s.current=null,iDe(l,u),m.clear()}},[d,s,l,n,u,m]),Fi.useMemo(()=>({hasProvider:f,delayRef:l,isInstantPhase:h}),[f,l,h])}function Ec(...e){return()=>{for(let t=0;t<e.length;t+=1){let r=e[t];r&&r()}}}var eJ=["top","right","bottom","left"];var Sm=Math.min,bs=Math.max,xm=Math.round,W1=Math.floor,Pc=e=>({x:e,y:e}),sDe={left:"right",right:"left",bottom:"top",top:"bottom"};function G1(e,t,r){return bs(e,Sm(t,r))}function kc(e,t){return typeof e=="function"?e(t):e}function di(e){return e.split("-")[0]}function Rc(e){return e.split("-")[1]}function J2(e){return e==="x"?"y":"x"}function Y1(e){return e==="y"?"height":"width"}function ra(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function q1(e){return J2(ra(e))}function tJ(e,t,r){r===void 0&&(r=!1);let o=Rc(e),n=q1(e),i=Y1(n),s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=U1(s)),[s,U1(s)]}function rJ(e){let t=U1(e);return[Q2(e),t,Q2(t)]}function Q2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var JQ=["left","right"],$Q=["right","left"],aDe=["top","bottom"],lDe=["bottom","top"];function cDe(e,t,r){switch(e){case"top":case"bottom":return r?t?$Q:JQ:t?JQ:$Q;case"left":case"right":return t?aDe:lDe;default:return[]}}function oJ(e,t,r,o){let n=Rc(e),i=cDe(di(e),r==="start",o);return n&&(i=i.map(s=>s+"-"+n),t&&(i=i.concat(i.map(Q2)))),i}function U1(e){let t=di(e);return sDe[t]+e.slice(t.length)}function uDe(e){return{top:0,right:0,bottom:0,left:0,...e}}function $2(e){return typeof e!="number"?uDe(e):{top:e,right:e,bottom:e,left:e}}function yv(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 K1(e,t){return t<0||t>=e.length}function n7(e,t){return wv(e.current,{disabledIndices:t})}function i7(e,t){return wv(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function wv(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&&Z1(e,i,o));return i}function Z1(e,t,r){if(typeof r=="function"?r(t):r?.includes(t)??!1)return!0;let n=e[t];return n?fDe(n)?!r&&(n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"):!0:!1}function dDe(e){return e.visibility==="hidden"||e.visibility==="collapse"}function fDe(e,t=e?zn(e):null){return!e||!e.isConnected||!t||dDe(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}function Tf(e,t,r=!0){return e.filter(n=>n.parentId===t).flatMap(n=>[...!r||n.context?.open?[n]:[],...Tf(e,n.id,r)])}function y0(e){return`data-base-ui-${e}`}var Qa=a(_e(),1),sJ=a(Du(),1);var nJ={style:{transition:"none"}};var pDe="data-base-ui-swipe-ignore",mDe="data-swipe-ignore",hyt=`[${pDe}]`,gyt=`[${mDe}]`;var iJ={fallbackAxisSide:"end"};var aJ=a(E(),1),hDe=Qa.createContext(null),gDe=()=>Qa.useContext(hDe),vDe=y0("portal");function s7(e={}){let{ref:t,container:r,componentProps:o=ro,elementProps:n}=e,i=hm(),l=gDe()?.portalNode,[c,u]=Qa.useState(null),[d,f]=Qa.useState(null),m=De(b=>{b!==null&&f(b)}),h=Qa.useRef(null);Oe(()=>{if(r===null){h.current&&(h.current=null,f(null),u(null));return}if(i==null)return;let b=(r&&(U2(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=Xt("div",o,{ref:[t,m],props:[{id:i,[vDe]:""},n]});return{portalNode:d,portalSubtree:c&&g?sJ.createPortal(g,c):null}}var _v=a(_e(),1);function lJ(){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 bDe=a(E(),1),yDe=_v.createContext(null),wDe=_v.createContext(null),w0=()=>_v.useContext(yDe)?.id||null,Cm=e=>{let t=_v.useContext(wDe);return e??t};var oa=a(_e(),1);function _De(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 cJ(e){return e!=null&&e.clientX!=null}function a7(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=oa.useRef(!1),d=oa.useRef(null),[f,m]=oa.useState(),[h,g]=oa.useState([]),v=De(S=>{n.set("positionReference",S)}),b=De((S,x,C)=>{u.current||c.current.openEvent&&!cJ(c.current.openEvent)||n.set("positionReference",_De(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=xf(f)?s:i;oa.useEffect(()=>{if(!r){v(l);return}if(!y)return;function S(){d.current?.(),d.current=null}let x=Gr(s);function C(A){let k=Hn(A);tr(s,k)?S():b(A.clientX,A.clientY)}return!c.current.openEvent||cJ(c.current.openEvent)?d.current=Qt(x,"mousemove",C):v(l),S},[y,r,s,c,l,n,b,v,h]),oa.useEffect(()=>()=>{n.set("positionReference",null)},[n]),oa.useEffect(()=>{r&&!s&&(u.current=!1)},[r,s]),oa.useEffect(()=>{!r&&i&&(u.current=!0)},[r,i]);let w=oa.useMemo(()=>{function S(x){m(x.pointerType)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:_,onMouseEnter:_}},[_]);return oa.useMemo(()=>r?{reference:w,trigger:w}:{},[r,w])}var na=a(_e(),1);function SDe(){return!1}function xDe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function l7(e,t={}){let{enabled:r=!0,escapeKey:o=!0,outsidePress:n=!0,outsidePressEvent:i="sloppy",referencePress:s=SDe,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=Cm(c),g=De(typeof n=="function"?n:()=>!1),v=typeof n=="function"?g:n,b=v!==!1,_=De(()=>i),{escapeKey:y,outsidePress:w}=xDe(l),S=na.useRef(!1),x=na.useRef(!1),C=na.useRef(!1),A=na.useRef(!1),k=na.useRef(""),R=na.useRef(null),N=Tc(),P=Tc(),T=De(()=>{P.clear(),m.current.insideReactTree=!1}),M=De(q=>{let Z=m.current.floatingContext?.nodeId;return(h?Tf(h.nodesRef.current,Z):[]).some(ce=>ce.context?.open&&!ce.context.dataRef.current[q])}),j=De(q=>Z2(q,u.select("floatingElement"))||Z2(q,u.select("domReferenceElement"))),F=De(q=>{s()&&u.setOpen(!1,xt(qe.triggerPress,q.nativeEvent))}),D=De(q=>{if(!d||!r||!o||q.key!=="Escape"||A.current||!y&&M("__escapeKeyBubbles"))return;let Z=WQ(q)?q.nativeEvent:q,Q=xt(qe.escapeKey,Z);u.setOpen(!1,Q),Q.isCanceled||q.preventDefault(),!y&&!Q.isPropagationAllowed&&q.stopPropagation()}),B=De(()=>{m.current.insideReactTree=!0,P.start(0,T)}),L=De(q=>{if(!d||!r||q.button!==0)return;let Z=Hn(q.nativeEvent);tr(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)});na.useEffect(()=>{if(!d||!r)return;m.current.__escapeKeyBubbles=y,m.current.__outsidePressBubbles=w;let q=new Xa,Z=new Xa;function Q(){q.clear(),A.current=!0}function ce(){q.start(Sf.engine.webkit?5:0,()=>{A.current=!1})}function te(){C.current=!0,Z.start(0,()=>{C.current=!1})}function de(){S.current=!1,x.current=!1}function me(){let X=k.current,fe=X==="pen"||!X?"mouse":X,Ye=_(),Ze=typeof Ye=="function"?Ye():Ye;return typeof Ze=="string"?Ze:Ze[fe]}function ee(X){let fe=me();return fe==="intentional"&&X.type!=="click"||fe==="sloppy"&&X.type==="click"}function $(X){let fe=m.current.floatingContext?.nodeId,Ye=h&&Tf(h.nodesRef.current,fe).some(Ze=>Z2(X,Ze.context?.elements.floating));return j(X)||Ye}function ue(X){if(ee(X)){X.type!=="click"&&!j(X)&&(Z.clear(),C.current=!1),T();return}if(m.current.insideReactTree){T();return}let fe=Hn(X),Ye=`[${y0("inert")}]`,Ze=lt(fe)?fe.getRootNode():null,st=Array.from((m0(Ze)?Ze:qo(u.select("floatingElement"))).querySelectorAll(Ye)),Rt=u.context.triggerElements;if(fe&&(Rt.hasElement(fe)||Rt.hasMatchingElement(_t=>tr(_t,fe))))return;let ut=lt(fe)?fe:null;for(;ut&&!Cc(ut);){let _t=Sc(ut);if(Cc(_t)||!lt(_t))break;ut=_t}if(!(st.length&&lt(fe)&&!YQ(fe)&&!tr(fe,u.select("floatingElement"))&&st.every(_t=>!tr(ut,_t)))){if(bo(fe)&&!("touches"in X)){let _t=Cc(fe),pr=zn(fe),nt=/auto|scroll/,Ha=_t||nt.test(pr.overflowX),Ua=_t||nt.test(pr.overflowY),Er=Ha&&fe.clientWidth>0&&fe.scrollWidth>fe.clientWidth,Ri=Ua&&fe.clientHeight>0&&fe.scrollHeight>fe.clientHeight,sn=pr.direction==="rtl",vt=Ri&&(sn?X.offsetX<=fe.offsetWidth-fe.clientWidth:X.offsetX>fe.clientWidth),Ft=Er&&X.offsetY>fe.clientHeight;if(vt||Ft)return}if(!$(X)){if(me()==="intentional"&&C.current){Z.clear(),C.current=!1;return}typeof v=="function"&&!v(X)||M("__outsidePressBubbles")||(u.setOpen(!1,xt(qe.outsidePress,X)),T())}}}function ve(X){me()!=="sloppy"||X.pointerType==="touch"||!u.select("open")||!r||j(X)||ue(X)}function Ee(X){if(me()!=="sloppy"||!u.select("open")||!r||j(X))return;let fe=X.touches[0];fe&&(R.current={startTime:Date.now(),startX:fe.clientX,startY:fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},N.start(1e3,()=>{R.current&&(R.current.dismissOnTouchEnd=!1,R.current.dismissOnMouseDown=!1)}))}function ie(X,fe){let Ye=Hn(X);if(!Ye)return;let Ze=Qt(Ye,X.type,()=>{fe(X),Ze()})}function ae(X){k.current="touch",ie(X,Ee)}function pe(X){N.clear(),X.type==="pointerdown"&&(k.current=X.pointerType),!(X.type==="mousedown"&&R.current&&!R.current.dismissOnMouseDown)&&ie(X,fe=>{fe.type==="pointerdown"?ve(fe):ue(fe)})}function le(X){if(!S.current)return;let fe=x.current;if(de(),me()==="intentional"){if(X.type==="pointercancel"){fe&&te();return}if(!$(X)){if(fe){te();return}typeof v=="function"&&!v(X)||(Z.clear(),C.current=!0,T())}}}function se(X){if(me()!=="sloppy"||!R.current||j(X))return;let fe=X.touches[0];if(!fe)return;let Ye=Math.abs(fe.clientX-R.current.startX),Ze=Math.abs(fe.clientY-R.current.startY),st=Math.sqrt(Ye*Ye+Ze*Ze);st>5&&(R.current.dismissOnTouchEnd=!0),st>10&&(ue(X),N.clear(),R.current=null)}function Ae(X){ie(X,se)}function ye(X){me()!=="sloppy"||!R.current||j(X)||(R.current.dismissOnTouchEnd&&ue(X),N.clear(),R.current=null)}function Se(X){ie(X,ye)}let Pe=qo(f),Me=Ec(o&&Ec(Qt(Pe,"keydown",D),Qt(Pe,"compositionstart",Q),Qt(Pe,"compositionend",ce)),b&&Ec(Qt(Pe,"click",pe,!0),Qt(Pe,"pointerdown",pe,!0),Qt(Pe,"pointerup",le,!0),Qt(Pe,"pointercancel",le,!0),Qt(Pe,"mousedown",pe,!0),Qt(Pe,"mouseup",le,!0),Qt(Pe,"touchstart",ae,!0),Qt(Pe,"touchmove",Ae,!0),Qt(Pe,"touchend",Se,!0)));return()=>{Me(),q.clear(),Z.clear(),de(),C.current=!1}},[m,f,o,b,v,d,r,y,w,D,T,_,M,j,h,u,N]),na.useEffect(T,[v,T]);let V=na.useMemo(()=>({onKeyDown:D,onPointerDown:F,onClick:F}),[D,F]),W=na.useMemo(()=>({onKeyDown:D,onPointerDown:O,onMouseDown:O,onClickCapture:B,onMouseDownCapture(q){B(),L(q)},onPointerDownCapture(q){B(),L(q)},onMouseUpCapture:B,onTouchEndCapture:B,onTouchMoveCapture:B}),[D,B,L,O]);return na.useMemo(()=>r?{reference:V,floating:W,trigger:V}:{},[r,V,W])}var Di=a(_e(),1);function uJ(e,t,r){let{reference:o,floating:n}=e,i=ra(t),s=q1(t),l=Y1(s),c=di(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(Rc(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 pJ(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}=kc(t,e),g=$2(h),b=l[m?f==="floating"?"reference":"floating":f],_=yv(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=yv(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 CDe=50,mJ=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:pJ},c=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:f}=uJ(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<CDe&&(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}=uJ(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}=kc(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let _=di(n),y=ra(l),w=di(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),x=m||(w||!v?[U1(l)]:rJ(l)),C=g!=="none";!m&&C&&x.push(...oJ(l,v,g,S));let A=[l,...x],k=await c.detectOverflow(t,b),R=[],N=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&R.push(k[_]),f){let j=tJ(n,s,S);R.push(k[j[0]],k[j[1]])}if(N=[...N,{placement:n,overflows:R}],!R.every(j=>j<=0)){var P,T;let j=(((P=i.flip)==null?void 0:P.index)||0)+1,F=A[j];if(F&&(!(f==="alignment"?y!==ra(F):!1)||N.every(L=>ra(L.placement)===y?L.overflows[0]>0:!0)))return{data:{index:j,overflows:N},reset:{placement:F}};let D=(T=N.filter(B=>B.overflows[0]<=0).sort((B,L)=>B.overflows[1]-L.overflows[1])[0])==null?void 0:T.placement;if(!D)switch(h){case"bestFit":{var M;let B=(M=N.filter(L=>{if(C){let O=ra(L.placement);return O===y||O==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(O=>O>0).reduce((O,V)=>O+V,0)]).sort((L,O)=>L[1]-O[1])[0])==null?void 0:M[0];B&&(D=B);break}case"initialPlacement":D=l;break}if(n!==D)return{reset:{placement:D}}}return{}}}};function dJ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fJ(e){return eJ.some(t=>e[t]>=0)}var gJ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r,platform:o}=t,{strategy:n="referenceHidden",...i}=kc(e,t);switch(n){case"referenceHidden":{let s=await o.detectOverflow(t,{...i,elementContext:"reference"}),l=dJ(s,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:fJ(l)}}}case"escaped":{let s=await o.detectOverflow(t,{...i,altBoundary:!0}),l=dJ(s,r.floating);return{data:{escapedOffsets:l,escaped:fJ(l)}}}default:return{}}}}};var vJ=new Set(["left","top"]);async function TDe(e,t){let{placement:r,platform:o,elements:n}=e,i=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=di(r),l=Rc(r),c=ra(r)==="y",u=vJ.has(s)?-1:1,d=i&&c?-1:1,f=kc(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 bJ=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 TDe(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}=kc(e,t),d={x:r,y:o},f=await i.detectOverflow(t,u),m=ra(di(n)),h=J2(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=G1(w,g,S)}if(l){let _=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=v+f[_],S=v-f[y];v=G1(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}}}}}},wJ=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}=kc(e,t),d={x:r,y:o},f=ra(n),m=J2(f),h=d[m],g=d[f],v=kc(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=vJ.has(di(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}}}},_J=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}=kc(e,t),d=await s.detectOverflow(t,u),f=di(n),m=Rc(n),h=ra(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=Sm(v-d[b],y),x=Sm(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 N=bs(d.left,0),P=bs(d.right,0),T=bs(d.top,0),M=bs(d.bottom,0);h?k=g-2*(N!==0||P!==0?N+P:bs(d.left,d.right)):A=v-2*(T!==0||M!==0?T+M:bs(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 TJ(e){let t=zn(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=bo(e),i=n?e.offsetWidth:r,s=n?e.offsetHeight:o,l=xm(r)!==i||xm(o)!==s;return l&&(r=i,o=s),{width:r,height:o,$:l}}function u7(e){return lt(e)?e:e.contextElement}function _0(e){let t=u7(e);if(!bo(t))return Pc(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:i}=TJ(t),s=(i?xm(r.width):r.width)/o,l=(i?xm(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var EDe=Pc(0);function EJ(e){let t=Gr(e);return!G2()||!t.visualViewport?EDe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function PDe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Gr(e)?!1:t}function Sv(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=u7(e),s=Pc(1);t&&(o?lt(o)&&(s=_0(o)):s=_0(e));let l=PDe(i,r,o)?EJ(i):Pc(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=Gr(i),h=o&&lt(o)?Gr(o):o,g=m,v=Y2(g);for(;v&&o&&h!==g;){let b=_0(v),_=v.getBoundingClientRect(),y=zn(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=Gr(v),v=Y2(g)}}return yv({width:d,height:f,x:c,y:u})}function eA(e,t){let r=V1(e).scrollLeft;return t?t.left+r:Sv(xc(e)).left+r}function PJ(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-eA(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function kDe(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,i=n==="fixed",s=xc(o),l=t?B1(t.floating):!1;if(o===s||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=Pc(1),d=Pc(0),f=bo(o);if((f||!f&&!i)&&((hv(o)!=="body"||h0(s))&&(c=V1(o)),f)){let h=Sv(o);u=_0(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}let m=s&&!f&&!i?PJ(s,c):Pc(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 RDe(e){return Array.from(e.getClientRects())}function ADe(e){let t=xc(e),r=V1(e),o=e.ownerDocument.body,n=bs(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=bs(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+eA(e),l=-r.scrollTop;return zn(o).direction==="rtl"&&(s+=bs(t.clientWidth,o.clientWidth)-n),{width:n,height:i,x:s,y:l}}var SJ=25;function IDe(e,t){let r=Gr(e),o=xc(e),n=r.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,c=0;if(n){i=n.width,s=n.height;let d=G2();(!d||d&&t==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}let u=eA(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<=SJ&&(i-=g)}else u<=SJ&&(i+=u);return{width:i,height:s,x:l,y:c}}function ODe(e,t){let r=Sv(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,i=bo(e)?_0(e):Pc(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=IDe(e,r);else if(t==="document")o=ADe(xc(e));else if(lt(t))o=ODe(t,r);else{let n=EJ(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return yv(o)}function kJ(e,t){let r=Sc(e);return r===t||!lt(r)||Cc(r)?!1:zn(r).position==="fixed"||kJ(r,t)}function NDe(e,t){let r=t.get(e);if(r)return r;let o=bm(e,[],!1).filter(l=>lt(l)&&hv(l)!=="body"),n=null,i=zn(e).position==="fixed",s=i?Sc(e):e;for(;lt(s)&&!Cc(s);){let l=zn(s),c=W2(s);!c&&l.position==="fixed"&&(n=null),(i?!c&&!n:!c&&l.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||h0(s)&&!c&&kJ(e,s))?o=o.filter(d=>d!==s):n=l,s=Sc(s)}return t.set(e,o),o}function MDe(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,s=[...r==="clippingAncestors"?B1(t)?[]:NDe(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=bs(h.top,c),u=Sm(h.right,u),d=Sm(h.bottom,d),f=bs(h.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function FDe(e){let{width:t,height:r}=TJ(e);return{width:t,height:r}}function DDe(e,t,r){let o=bo(t),n=xc(t),i=r==="fixed",s=Sv(e,!0,i,t),l={scrollLeft:0,scrollTop:0},c=Pc(0);function u(){c.x=eA(n)}if(o||!o&&!i)if((hv(t)!=="body"||h0(n))&&(l=V1(t)),o){let h=Sv(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?PJ(n,l):Pc(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 c7(e){return zn(e).position==="static"}function CJ(e,t){if(!bo(e)||zn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return xc(e)===r&&(r=r.ownerDocument.body),r}function RJ(e,t){let r=Gr(e);if(B1(e))return r;if(!bo(e)){let n=Sc(e);for(;n&&!Cc(n);){if(lt(n)&&!c7(n))return n;n=Sc(n)}return r}let o=CJ(e,t);for(;o&&PQ(o)&&c7(o);)o=CJ(o,t);return o&&Cc(o)&&c7(o)&&!W2(o)?r:o||kQ(e)||r}var LDe=async function(e){let t=this.getOffsetParent||RJ,r=this.getDimensions,o=await r(e.floating);return{reference:DDe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function BDe(e){return zn(e).direction==="rtl"}var d7={convertOffsetParentRelativeRectToViewportRelativeRect:kDe,getDocumentElement:xc,getClippingRect:MDe,getOffsetParent:RJ,getElementRects:LDe,getClientRects:RDe,getDimensions:FDe,getScale:_0,isElement:lt,isRTL:BDe};function AJ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function VDe(e,t){let r=null,o,n=xc(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=W1(f),v=W1(n.clientWidth-(d+m)),b=W1(n.clientHeight-(f+h)),_=W1(d),w={rootMargin:-g+"px "+-v+"px "+-b+"px "+-_+"px",threshold:bs(0,Sm(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&&!AJ(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 X1(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=u7(e),d=n||i?[...u?bm(u):[],...t?bm(t):[]]:[];d.forEach(_=>{n&&_.addEventListener("scroll",r,{passive:!0}),i&&_.addEventListener("resize",r)});let f=u&&l?VDe(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?Sv(e):null;c&&b();function b(){let _=Sv(e);v&&!AJ(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 IJ=bJ;var OJ=yJ,NJ=hJ,MJ=_J,FJ=gJ;var DJ=wJ,tA=(e,t,r)=>{let o=new Map,n={platform:d7,...r},i={...n.platform,_c:o};return mJ(e,t,{...n,platform:i})};var un=a(_e(),1),BJ=a(_e(),1),VJ=a(Du(),1),zDe=typeof document<"u",HDe=function(){},rA=zDe?BJ.useLayoutEffect:HDe;function oA(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(!oA(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)&&!oA(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function jJ(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function LJ(e,t){let r=jJ(e);return Math.round(t*r)/r}function f7(e){let t=un.useRef(e);return rA(()=>{t.current=e}),t}function zJ(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]=un.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=un.useState(o);oA(m,o)||h(o);let[g,v]=un.useState(null),[b,_]=un.useState(null),y=un.useCallback(L=>{L!==C.current&&(C.current=L,v(L))},[]),w=un.useCallback(L=>{L!==A.current&&(A.current=L,_(L))},[]),S=i||g,x=s||b,C=un.useRef(null),A=un.useRef(null),k=un.useRef(d),R=c!=null,N=f7(c),P=f7(n),T=f7(u),M=un.useCallback(()=>{if(!C.current||!A.current)return;let L={placement:t,strategy:r,middleware:m};P.current&&(L.platform=P.current),tA(C.current,A.current,L).then(O=>{let V={...O,isPositioned:T.current!==!1};j.current&&!oA(k.current,V)&&(k.current=V,VJ.flushSync(()=>{f(V)}))})},[m,t,r,P,T]);rA(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[u]);let j=un.useRef(!1);rA(()=>(j.current=!0,()=>{j.current=!1}),[]),rA(()=>{if(S&&(C.current=S),x&&(A.current=x),S&&x){if(N.current)return N.current(S,x,M);M()}},[S,x,M,N,R]);let F=un.useMemo(()=>({reference:C,floating:A,setReference:y,setFloating:w}),[y,w]),D=un.useMemo(()=>({reference:S,floating:x}),[S,x]),B=un.useMemo(()=>{let L={position:r,left:0,top:0};if(!D.floating)return L;let O=LJ(D.floating,d.x),V=LJ(D.floating,d.y);return l?{...L,transform:"translate("+O+"px, "+V+"px)",...jJ(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:V}},[r,l,D.floating,d.x,d.y]);return un.useMemo(()=>({...d,update:M,refs:F,elements:D,floatingStyles:B}),[d,M,F,D,B])}var p7=(e,t)=>{let r=IJ(e);return{name:r.name,fn:r.fn,options:[e,t]}},m7=(e,t)=>{let r=OJ(e);return{name:r.name,fn:r.fn,options:[e,t]}},h7=(e,t)=>({fn:DJ(e).fn,options:[e,t]}),g7=(e,t)=>{let r=NJ(e);return{name:r.name,fn:r.fn,options:[e,t]}},v7=(e,t)=>{let r=MJ(e);return{name:r.name,fn:r.fn,options:[e,t]}};var b7=(e,t)=>{let r=FJ(e);return{name:r.name,fn:r.fn,options:[e,t]}};var C0=a(_e(),1),n$=a(Du(),1);var r$=a(_e(),1);var jt=(e,t,r,o,n,i,...s)=>{if(s.length>0)throw new Error(Io(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 $J=a(_e(),1),x7=a(Q1(),1),e$=a(KJ(),1);var ZJ=a(_e(),1);var w7=[],_7;function XJ(){return _7}function QJ(e){w7.push(e)}function S7(e){let t=(r,o)=>{let n=cn(sLe).current,i;try{_7=n;for(let s of w7)s.before(n);i=e(r,o);for(let s of w7)s.after(n);n.didInitialize=!0}finally{_7=void 0}return i};return t.displayName=e.displayName||e.name,t}function JJ(e){return ZJ.forwardRef(S7(e))}function sLe(){return{didInitialize:!1}}var aLe=u0(19),lLe=aLe?uLe:dLe;function iA(e,t,r,o,n){return lLe(e,t,r,o,n)}function cLe(e,t,r,o,n){let i=$J.useCallback(()=>t(e.getSnapshot(),r,o,n),[e,t,r,o,n]);return(0,x7.useSyncExternalStore)(e.subscribe,i,i)}QJ({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,x7.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function uLe(e,t,r,o,n){let i=XJ();if(!i)return cLe(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 dLe(e,t,r,o,n){return(0,e$.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,r,o,n))}var sA=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 iA(this,t,r,o,n)}};var xv=a(_e(),1);var x0=class extends sA{constructor(t,r={},o){super(t),this.context=r,this.selectors=o}useSyncedValue(t,r){xv.useDebugValue(t);let o=this;Oe(()=>{o.state[t]!==r&&o.set(t,r)},[o,t,r])}useSyncedValueWithCleanup(t,r){let o=this;Oe(()=>(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);Oe(()=>{r.update(t)},[r,...o])}useControlledProp(t,r){xv.useDebugValue(t);let o=this,n=r!==void 0;Oe(()=>{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 xv.useDebugValue(t),iA(this,this.selectors[t],r,o,n)}useContextCallback(t,r){xv.useDebugValue(t);let o=De(r??_c);this.context[t]=o}useStateSetter(t){let r=xv.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 aA=a(_e(),1);function t$(){let[,e]=aA.useState({});return aA.useCallback(()=>{e({})},[])}var fLe={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)},Lu=class extends x0{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:lJ(),nested:o,triggerElements:i},fLe),this.syncOnly=r}syncOpenEvent=(t,r)=>{(!t||!this.state.open||r!=null&&GQ(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 o$(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 Lu({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),Oe(()=>{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 i$={tabIndex:-1,[J8]:""};function s$(e,t,r=!1){let o=hm(),n=w0()!=null,i=C0.useRef(null);e===void 0&&i.current===null&&(i.current=t(o,n));let s=e??i.current;return o$({popupStore:s,treatPopupAsFloatingElement:r,floatingRootContext:s.state.floatingRootContext,floatingId:o,nested:n,onOpenChange:s.setOpen}),{store:s,internalStore:i.current}}function pLe(e,t){let r=C0.useRef(null),o=C0.useRef(null);return C0.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 mLe(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 hLe(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function a$(e,t,r,o={}){let n=r.reason,i=n===qe.triggerHover,s=t&&n===qe.triggerFocus,l=!t&&(n===qe.triggerPress||n===qe.escapeKey),c=hLe(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),mLe(d,t,r.trigger,c()),e.update(d)};i?n$.flushSync(u):u()}function l$(e,t,r,o){VQ(()=>{t===void 0&&e.state.open===!1&&r&&(e.state={...e.state,open:!0,activeTriggerId:o,preventUnmountingOnClose:!1})})}function c$(e,t,r,o){let n=r.useState("isMountedByTrigger",e),i=pLe(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 Oe(()=>{n&&r.update({activeTriggerElement:t.current,...o})},[n,r,t,...Object.values(o)]),{registerTrigger:s,isMountedByThisTrigger:n}}function u$(e,t={}){let{closeOnActiveTriggerUnmount:r=!1}=t,o=e.useState("open"),n=e.useState("triggerCount");Oe(()=>{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=xt(qe.none);e.setOpen(!1,u),u.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,n,r])}function d$(e,t,r){let{mounted:o,setMounted:n,transitionStatus:i}=p0(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 wm({enabled:o&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:i}}function f$(e,t){e.useSyncedValues(t),Oe(()=>()=>{e.update({activeTriggerProps:ro,inactiveTriggerProps:ro,popupProps:ro})},[e])}var Tm=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 p$(){return new Lu({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Tm,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function h$(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:p$(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:ro,inactiveTriggerProps:ro,popupProps:ro}}function g$(e,t,r=!1){return new Lu({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:r,onOpenChange:void 0})}var J1=jt(e=>e.triggerIdProp??e.activeTriggerId),C7=jt(e=>e.openProp??e.open),m$=jt(e=>(e.popupElement?.id??e.floatingId)||void 0);function v$(e,t){return t!==void 0&&C7(e)&&J1(e)===t}function gLe(e,t){return v$(e,t)?!0:t!==void 0&&C7(e)&&J1(e)==null&&e.triggerCount===1}var b$={open:C7,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:J1,activeTriggerElement:jt(e=>e.mounted?e.activeTriggerElement:null),popupId:m$,isTriggerActive:jt((e,t)=>t!==void 0&&J1(e)===t),isOpenedByTrigger:jt((e,t)=>v$(e,t)),isMountedByTrigger:jt((e,t)=>t!==void 0&&J1(e)===t&&e.mounted),triggerProps:jt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:jt((e,t)=>gLe(e,t)?m$(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=hm(),i=w0()!=null,s=cn(()=>new Lu({open:t,transitionStatus:void 0,onOpenChange:r,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new Tm,floatingId:n,syncOnly:!1,nested:i})).current;return Oe(()=>{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 T7(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]=Di.useState(null),[m,h]=Di.useState(void 0),[g,v]=Di.useState(void 0),b=Di.useRef(null),_=Cm(r),y=Di.useMemo(()=>({reference:i,floating:s,domReference:l}),[i,s,l]),w=zJ({...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=Di.useCallback(T=>{let M=lt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;f(M),w.refs.setReference(M)},[w.refs]),A=Di.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=Di.useCallback(T=>{v(T),w.refs.setFloating(T)},[w.refs]),R=Di.useMemo(()=>({...w.refs,setReference:A,setFloating:k,setPositionReference:C,domReference:b}),[w.refs,A,k,C]),N=Di.useMemo(()=>({...w.elements,domReference:l}),[w.elements,l]),P=Di.useMemo(()=>({...w,dataRef:n.context.dataRef,open:c,onOpenChange:n.setOpen,events:n.context.events,floatingId:u,refs:R,elements:N,nodeId:t,rootStore:n}),[w,R,N,t,n,c,u]);return Oe(()=>{l&&(b.current=l)},[l]),Oe(()=>{n.context.dataRef.current.floatingContext=P;let T=_?.nodesRef.current.find(M=>M.id===t);T&&(T.context=P)}),Di.useMemo(()=>({...w,context:P,refs:R,elements:N,rootStore:n}),[w,R,N,P,n])}var Bu=a(_e(),1);var E7=Sf.os.mac&&Sf.engine.webkit;function P7(e,t={}){let{enabled:r=!0,delay:o}=t,n="rootStore"in e?e.rootStore:e,{events:i,dataRef:s}=n.context,l=Bu.useRef(!1),c=Bu.useRef(null),u=Bu.useRef(!0),d=Tc();Bu.useEffect(()=>{let m=n.select("domReferenceElement");if(!r)return;let h=Gr(m);function g(){let _=n.select("domReferenceElement");!n.select("open")&&bo(_)&&_===b0(qo(_))&&(l.current=!0)}function v(){u.current=!0}function b(){u.current=!1}return Ec(Qt(h,"blur",g),E7&&Qt(h,"keydown",v,!0),E7&&Qt(h,"pointerdown",b,!0))},[n,r]),Bu.useEffect(()=>{if(!r)return;function m(h){if(h.reason===qe.triggerPress||h.reason===qe.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=Bu.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=Hn(h.nativeEvent);if(lt(v)){if(E7&&!h.relatedTarget){if(!u.current&&!qQ(v))return}else if(!KQ(v))return}let b=_m(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,xt(qe.triggerFocus,_,y));return}d.start(w,()=>{l.current||n.setOpen(!0,xt(qe.triggerFocus,_,y))})},onBlur(h){m();let g=h.relatedTarget,v=h.nativeEvent,b=lt(g)&&g.hasAttribute(y0("focus-guard"))&&g.getAttribute("data-type")==="outside";d.start(0,()=>{let _=n.select("domReferenceElement"),y=b0(qo(_));!g&&y===_||tr(s.current.floatingContext?.refs.floating.current,y)||tr(_,y)||b||_m(g??y,n.context.triggerElements)||n.setOpen(!1,xt(qe.triggerFocus,v))})}}},[s,o,n,d]);return Bu.useMemo(()=>r?{reference:f,trigger:f}:{},[r,f])}var R7=a(_e(),1);var k7=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 Xa,this.restTimeout=new Xa,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},lA=new WeakMap;function T0(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&lA.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),lA.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function cA(e,t){let{scopeElement:r,referenceElement:o,floatingElement:n}=t,i=lA.get(r);i&&i!==e&&T0(i),T0(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=r,e.pointerEventsReferenceElement=o,e.pointerEventsFloatingElement=n,lA.set(r,e),r.style.pointerEvents="none",o.style.pointerEvents="auto",n.style.pointerEvents="auto"}function E0(e){let t=e.context.dataRef.current,r=cn(()=>t.hoverInteractionState??k7.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=r),d0(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function A7(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=Cm(),f=w0(),m=E0(i),h=Tc(),g=De(()=>X2(u.current.openEvent?.type,m.interactedInside)),v=De(()=>ZQ(u.current.openEvent?.type)),b=De(()=>{T0(m)});Oe(()=>{s||(m.pointerType=void 0,m.restTimeoutPending=!1,m.interactedInside=!1,b())},[s,m,b]),R7.useEffect(()=>b,[b]),Oe(()=>{if(r&&s&&m.handleCloseOptions?.blockPointerEvents&&v()&&lt(c)&&l){let _=c,y=l,w=qo(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 cA(m,{scopeElement:A,referenceElement:_,floatingElement:y}),()=>{b()}}},[r,s,c,l,m,v,d,f,b]),R7.useEffect(()=>{if(!r)return;function _(){return!!(d&&f&&Tf(d.nodesRef.current,f).length>0)}function y(k){let R=Cf(o,"close",m.pointerType),N=()=>{i.setOpen(!1,xt(qe.triggerHover,k)),d?.events.emit("floating.closed",k)};R?m.openChangeTimeout.start(R,N):(m.openChangeTimeout.clear(),N())}function w(k){let R=Hn(k);if(!e7(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(_m(k.relatedTarget,i.context.triggerElements))return;let R=u.current.floatingContext?.nodeId??n,N=k.relatedTarget;if(!(d&&R&&lt(N)&&Tf(d.nodesRef.current,R,!1).some(T=>tr(T.context?.elements.floating,N)))){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,xt(qe.triggerHover,k)),d.events.emit("floating.closed",k)})}let A=l;return Ec(A&&Qt(A,"mouseenter",S),A&&Qt(A,"mouseleave",x),A&&Qt(A,"pointerdown",w,!0),()=>{d?.events.off("floating.closed",C)})},[r,l,i,u,o,n,v,g,b,m,d,f,h])}var Em=a(_e(),1),w$=a(Du(),1);var vLe={current:null};function I7(e,t={}){let{enabled:r=!0,delay:o=0,handleClose:n=null,mouseOnly:i=!1,restMs:s=0,move:l=!0,triggerElementRef:c=vLe,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,_=Cm(u),y=E0(g),w=Em.useRef(!1),S=Mi(n),x=Mi(o),C=Mi(s),A=Mi(r),k=Mi(h),R=Mi(m),N=De(()=>X2(v.current.openEvent?.type,y.interactedInside)),P=De(()=>k.current?.()!==!1),T=De((F,D,B)=>{let L=g.context.triggerElements;if(L.hasElement(D))return!F||!tr(F,D);if(!lt(B))return!1;let O=B;return L.hasMatchingElement(V=>tr(V,O))&&(!F||!tr(F,O))}),M=De(()=>{if(!y.handler)return;qo(g.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0}),j=De(()=>{T0(y)});return d&&(y.handleCloseOptions=S.current?.__options),Em.useEffect(()=>M,[M]),Em.useEffect(()=>{if(!r)return;function F(D){D.open?w.current=!1:(w.current=D.reason===qe.triggerHover,M(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return b.on("openchange",F),()=>{b.off("openchange",F)}},[r,b,y,M]),Em.useEffect(()=>{if(!r)return;function F(O,V=!0){let W=Cf(x.current,"close",y.pointerType);W?y.openChangeTimeout.start(W,()=>{g.setOpen(!1,xt(qe.triggerHover,O)),_?.events.emit("floating.closed",O)}):V&&(y.openChangeTimeout.clear(),g.setOpen(!1,xt(qe.triggerHover,O)),_?.events.emit("floating.closed",O))}let D=c.current??(d?g.select("domReferenceElement"):null);if(!lt(D))return;function B(O){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,i&&!xf(y.pointerType))return;let V=t7(C.current),W=Cf(x.current,"open",y.pointerType),q=Hn(O),Z=O.currentTarget??null,Q=g.select("domReferenceElement"),ce=Z;if(lt(q)&&!g.context.triggerElements.hasElement(q)){for(let ie of g.context.triggerElements.elements())if(tr(ie,q)){ce=ie;break}}lt(Z)&&lt(Q)&&!g.context.triggerElements.hasElement(Z)&&tr(Z,Q)&&(ce=Q);let te=ce==null?!1:T(Q,ce,q),de=g.select("open"),me=R.current?.()??g.select("transitionStatus")==="ending",ee=!de&&me&&w.current,$=!te&&lt(ce)&&lt(Q)&&tr(Q,ce)&&ee,ue=V>0&&!W,ve=te&&(de||ee)||$,Ee=!de||te;if(ve){P()&&g.setOpen(!0,xt(qe.triggerHover,O,ce));return}ue||(W?y.openChangeTimeout.start(W,()=>{Ee&&P()&&g.setOpen(!0,xt(qe.triggerHover,O,ce))}):Ee&&P()&&g.setOpen(!0,xt(qe.triggerHover,O,ce)))}function L(O){if(N()){j();return}M();let V=g.select("domReferenceElement"),W=qo(V);y.restTimeout.clear(),y.restTimeoutPending=!1;let q=v.current.floatingContext??f?.();if(_m(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(){j(),M(),A.current&&!N()&&Q===g.select("domReferenceElement")&&F(O,!0)}}),W.addEventListener("mousemove",y.handler),y.handler(O);return}(y.pointerType!=="touch"||!tr(g.select("floatingElement"),O.relatedTarget))&&F(O)}return l?Ec(Qt(D,"mousemove",B,{once:!0}),Qt(D,"mouseenter",B),Qt(D,"mouseleave",L)):Ec(Qt(D,"mouseenter",B),Qt(D,"mouseleave",L))},[M,j,v,x,g,r,S,y,d,T,N,i,l,C,c,_,A,f,R,P]),Em.useMemo(()=>{if(!r)return;function F(D){y.pointerType=D.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove(D){let{nativeEvent:B}=D,L=D.currentTarget,O=g.select("domReferenceElement"),V=g.select("open"),W=T(O,L,D.target);if(i&&!xf(y.pointerType))return;if(V&&W&&y.handleCloseOptions?.blockPointerEvents){let Q=g.select("floatingElement");if(Q){let ce=y.handleCloseOptions?.getScope?.()??L.ownerDocument.body;cA(y,{scopeElement:ce,referenceElement:L,floatingElement:Q})}}let q=t7(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,N())return;let Q=g.select("open");!y.blockMouseMove&&(!Q||W)&&P()&&g.setOpen(!0,xt(qe.triggerHover,B,L))}y.pointerType==="touch"?w$.flushSync(()=>{Z()}):W&&V?Z():(y.restTimeoutPending=!0,y.restTimeout.start(q,Z))}}},[r,y,N,T,i,g,C,P])}var _$=.1,bLe=_$*_$,Cr=.5;function uA(e,t,r,o,n,i){return o>=t!=i>=t&&e<=(n-r)*(t-o)/(i-o)+r}function dA(e,t,r,o,n,i,s,l,c,u){let d=!1;return uA(e,t,r,o,n,i)&&(d=!d),uA(e,t,n,i,s,l)&&(d=!d),uA(e,t,s,l,c,u)&&(d=!d),uA(e,t,c,u,r,o)&&(d=!d),d}function yLe(e,t,r){return e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height}function fA(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 O7(e={}){let{blockPointerEvents:t=!1}=e,r=new Xa,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*bLe;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=Hn(w),R=w.type==="mouseleave",N=tr(x,k),P=tr(S,k);if(N&&(m=!0,!R))return;if(P&&(m=!1,!R)){m=!0;return}if(R&&lt(w.relatedTarget)&&tr(x,w.relatedTarget))return;function T(){return!!(d&&Tf(d.nodesRef.current,u).length>0)}function M(){T()||_()}if(T())return;let j=S.getBoundingClientRect(),F=x.getBoundingClientRect(),D=n>F.right-F.width/2,B=i>F.bottom-F.height/2,L=F.width>j.width,O=F.height>j.height,V=(L?j:F).left,W=(L?j:F).right,q=(O?j:F).top,Z=(O?j:F).bottom;if(f==="top"&&i>=j.bottom-1||f==="bottom"&&i<=j.top+1||f==="left"&&n>=j.right-1||f==="right"&&n<=j.left+1){M();return}let Q=!1;switch(f){case"top":Q=fA(C,A,V,j.top+1,W,F.bottom-1);break;case"bottom":Q=fA(C,A,V,F.top+1,W,j.bottom-1);break;case"left":Q=fA(C,A,F.right-1,Z,j.left+1,q);break;case"right":Q=fA(C,A,j.right-1,Z,F.left+1,q);break;default:}if(Q)return;if(m&&!yLe(C,A,j)){M();return}if(!R&&b(C,A)){M();return}let ce=!1;switch(f){case"top":{let te=L?Cr/2:Cr*4,de=L||D?n+te:n-te,me=L?n-te:D?n+te:n-te,ee=i+Cr+1,$=D||L?F.bottom-Cr:F.top,ue=D?L?F.bottom-Cr:F.top:F.bottom-Cr;ce=dA(C,A,de,ee,me,ee,F.left,$,F.right,ue);break}case"bottom":{let te=L?Cr/2:Cr*4,de=L||D?n+te:n-te,me=L?n-te:D?n+te:n-te,ee=i-Cr,$=D||L?F.top+Cr:F.bottom,ue=D?L?F.top+Cr:F.bottom:F.top+Cr;ce=dA(C,A,de,ee,me,ee,F.left,$,F.right,ue);break}case"left":{let te=O?Cr/2:Cr*4,de=O||B?i+te:i-te,me=O?i-te:B?i+te:i-te,ee=n+Cr+1,$=B||O?F.right-Cr:F.left,ue=B?O?F.right-Cr:F.left:F.right-Cr;ce=dA(C,A,$,F.top,ue,F.bottom,ee,de,ee,me);break}case"right":{let te=O?Cr/2:Cr*4,de=O||B?i+te:i-te,me=O?i-te:B?i+te:i-te,ee=n-Cr,$=B||O?F.left+Cr:F.right,ue=B?O?F.left+Cr:F.right:F.left+Cr;ce=dA(C,A,ee,de,ee,me,$,F.top,ue,F.bottom);break}default:}ce?m||r.start(40,M):M()}};return o.__options={...e,blockPointerEvents:t},o}var N7=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Za.startingStyle]="startingStyle",e[e.endingStyle=Za.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),$1=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),wLe={[$1.popupOpen]:""},M_t={[$1.popupOpen]:"",[$1.pressed]:""},_Le={[N7.open]:""},SLe={[N7.closed]:""},xLe={[N7.anchorHidden]:""},S$={open(e){return e?wLe:null}};var P0={open(e){return e?_Le:SLe},anchorHidden(e){return e?xLe:null}};var k0="ArrowUp",R0="ArrowDown",eC="ArrowLeft",tC="ArrowRight",rC="Home",oC="End";var M7=new Set([eC,tC]),C$=new Set([eC,tC,rC,oC]),F7=new Set([k0,R0]),T$=new Set([k0,R0,rC,oC]),D7=new Set([...M7,...F7]),E$=new Set([...D7,rC,oC]),CLe="Shift",TLe="Control",ELe="Alt",PLe="Meta",P$=new Set([CLe,TLe,ELe,PLe]);function kLe(e){return bo(e)&&e.tagName==="INPUT"}function L7(e){return!!(kLe(e)&&e.selectionStart!=null||bo(e)&&e.tagName==="TEXTAREA")}function B7(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=pA(e),d=pA(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=pA(e),d=pA(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 pA(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 mA(e){return u0(19)?e:e?"true":void 0}var Ja=a(_e(),1);var RLe=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"}=kc(e,t)||{};if(u==null)return{};let m=$2(d),h={x:r,y:o},g=q1(n),v=Y1(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,N=k/2-b[v]/2-1,P=Math.min(m[y],N),T=Math.min(m[w],N),M=P,j=k-b[v]-T,F=k/2-b[v]/2+R,D=G1(M,F,j),B=!c.arrow&&Rc(n)!=null&&F!==D&&i.reference[v]/2-(F<M?P:T)-b[v]/2<0,L=B?F<M?F-M:F-j:0;return{[g]:h[g]+L,data:{[g]:D,centerOffset:F-D-L,...B&&{alignmentOffset:L}},reset:B}}}),k$=(e,t)=>({...RLe(e),options:[e,t]});var ALe=b7().fn,R$={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 ALe(e)).data?.referenceHidden||i}}}};var nC={sideX:"left",sideY:"top"},A$={name:"adaptiveOrigin",async fn(e){let{x:t,y:r,rects:{floating:o},elements:{floating:n},platform:i,strategy:s,placement:l}=e,c=Gr(n),u=c.getComputedStyle(n);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:r,data:nC};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=qo(n);m={width:y.documentElement.clientWidth,height:y.documentElement.clientHeight}}else await i.isElement?.(f)&&(m=await i.getDimensions(f));let h=di(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":nC.sideX,_=h==="top"?"bottom":nC.sideY;return{x:g,y:v,data:{sideX:b,sideY:_}}}};function N$(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 I$(e,t,r){let{rects:o,placement:n}=e;return{side:N$(t,di(n),r),align:Rc(n)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function M$(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]=Ja.useState(null);!v&&C!==null&&A(null);let k=b.side||"flip",R=b.align||"flip",N=b.fallbackAxisSide||"end",P=typeof t=="function"?t:void 0,T=De(P),M=P?T:t,j=Mi(t),F=Mi(v),B=mm()==="rtl",L=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":B?"left":"right","inline-start":B?"right":"left"}[o],O=i==="center"?L:`${L}-${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 te={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:V},de=Ja.useRef(null),me=Mi(n),ee=Mi(s),$=typeof n!="function"?n:0,ue=typeof s!="function"?s:0,ve=[];m&&ve.push(m),ve.push(p7(vt=>{let Ft=I$(vt,o,B),re=typeof me.current=="function"?me.current(Ft):me.current,Ce=typeof ee.current=="function"?ee.current(Ft):ee.current;return{mainAxis:re,crossAxis:Ce,alignmentAxis:Ce}},[$,ue,B,o]));let Ee=R==="none"&&k!=="shift",ie=!Ee&&(u||_||k==="shift"),ae=k==="none"?null:g7({...te,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:N}),pe=Ee?null:m7(vt=>{let Ft=qo(vt.elements.floating).documentElement;return{...te,rootBoundary:_?{x:0,y:0,width:Ft.clientWidth,height:Ft.clientHeight}:void 0,mainAxis:R!=="none",crossAxis:ie,limiter:u||_?void 0:h7(re=>{if(!de.current)return{};let{width:Ce,height:H}=de.current.getBoundingClientRect(),Ie=ra(di(re.placement)),Vt=Ie==="y"?Ce:H,Re=Ie==="y"?V.left+V.right:V.top+V.bottom;return{offset:Vt/2+Re/2}})}},[te,u,_,V,R]);k==="shift"||R==="shift"||i==="center"?ve.push(pe,ae):ve.push(ae,pe),ve.push(v7({...te,apply({elements:{floating:vt},availableWidth:Ft,availableHeight:re,rects:Ce}){if(!F.current)return;let H=vt.style;H.setProperty("--available-width",`${Ft}px`),H.setProperty("--available-height",`${re}px`);let Ie=Gr(vt).devicePixelRatio||1,{x:Vt,y:Re,width:Po,height:Fe}=Ce.reference,mr=(Math.round((Vt+Po)*Ie)-Math.round(Vt*Ie))/Ie,he=(Math.round((Re+Fe)*Ie)-Math.round(Re*Ie))/Ie;H.setProperty("--anchor-width",`${mr}px`),H.setProperty("--anchor-height",`${he}px`)}}),k$(vt=>({element:de.current||qo(vt.elements.floating).createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(vt){let{elements:Ft,middlewareData:re,placement:Ce,rects:H,y:Ie}=vt,Vt=di(Ce),Re=ra(Vt),Po=de.current,Fe=re.arrow?.x||0,mr=re.arrow?.y||0,he=Po?.clientWidth||0,ge=Po?.clientHeight||0,Xs=Fe+he/2,Ut=mr+ge/2,ze=Math.abs(re.shift?.y||0),Te=H.reference.height/2,it=typeof n=="function"?n(I$(vt,o,B)):n,ht=ze>it,bt={top:`${Xs}px calc(100% + ${it}px)`,bottom:`${Xs}px ${-it}px`,left:`calc(100% + ${it}px) ${Ut}px`,right:`${-it}px ${Ut}px`}[Vt],Pr=`${Xs}px ${H.reference.y+Te-Ie}px`;return Ft.floating.style.setProperty("--transform-origin",ie&&Re==="y"&&ht?Pr:bt),{}}},R$,w),Oe(()=>{!v&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[v,g]);let le=Ja.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:se,elements:Ae,x:ye,y:Se,middlewareData:Pe,update:Me,placement:X,context:fe,isPositioned:Ye,floatingStyles:Ze}=T7({rootContext:g,open:h?v:void 0,placement:O,middleware:ve,strategy:r,whileElementsMounted:h?void 0:(...vt)=>X1(...vt,le),nodeId:y,externalTree:x}),{sideX:st,sideY:Rt}=Pe.adaptiveOrigin||nC,ut=Ye?r:"fixed",_t=Ja.useMemo(()=>{let vt=w?{position:ut,[st]:ye,[Rt]:Se}:{position:ut,...Ze};return Ye||(vt.opacity=0),vt},[w,ut,st,ye,Rt,Se,Ze,Ye]),pr=Ja.useRef(null);Oe(()=>{if(!v)return;let vt=j.current,Ft=typeof vt=="function"?vt():vt,Ce=(O$(Ft)?Ft.current:Ft)||null||null;Ce!==pr.current&&(se.setPositionReference(Ce),pr.current=Ce)},[v,se,M,j]),Ja.useEffect(()=>{if(!v)return;let vt=j.current;typeof vt!="function"&&O$(vt)&&vt.current!==pr.current&&(se.setPositionReference(vt.current),pr.current=vt.current)},[v,se,M,j]),Ja.useEffect(()=>{if(h&&v&&Ae.reference&&Ae.floating)return X1(Ae.reference,Ae.floating,Me,le)},[h,v,Ae,Me,le]);let nt=di(X),Ha=N$(o,nt,B),Ua=Rc(X)||"center",Er=!!Pe.hide?.referenceHidden;Oe(()=>{S&&v&&Ye&&A(nt)},[S,v,Ye,nt]);let Ri=Ja.useMemo(()=>({position:"absolute",top:Pe.arrow?.y,left:Pe.arrow?.x}),[Pe.arrow]),sn=Pe.arrow?.centerOffset!==0;return Ja.useMemo(()=>({positionerStyles:_t,arrowStyles:Ri,arrowRef:de,arrowUncentered:sn,side:Ha,align:Ua,physicalSide:nt,anchorHidden:Er,refs:se,context:fe,isPositioned:Ye,update:Me}),[_t,Ri,de,sn,Ha,Ua,nt,Er,se,fe,Ye,Me])}function O$(e){return e!=null&&"current"in e}function hA(e){return e==="starting"?nJ:ro}function F$(e,t,{styles:r,transitionStatus:o,props:n,refs:i,hidden:s,inert:l=!1}){let c={...r};return l&&(c.pointerEvents="none"),Xt("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:c},hA(o),n],stateAttributesMapping:P0})}var D$=a(_e(),1);var V7=D$.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}=gv({disabled:i,focusableWhenDisabled:s,native:l});return Xt("button",t,{state:{disabled:i},ref:[r,f],props:[u,d]})});var Pm={};Wr(Pm,{Panel:()=>H$,Root:()=>B$,Trigger:()=>j$});var iC=a(_e(),1);var gA={...EQ,...vm};var L$=a(E(),1),B$=iC.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=iC.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),g=iC.useMemo(()=>({...m,onOpenChange:f,state:h}),[m,f,h]),v=Xt("div",t,{state:h,ref:r,props:d,stateAttributesMapping:gA});return(0,L$.jsx)(z8.Provider,{value:g,children:v})});var V$=a(_e(),1);var ILe={...TQ,...vm},j$=V$.forwardRef(function(t,r){let{panelId:o,open:n,handleTrigger:i,state:s,disabled:l}=j2(),{className:c,disabled:u=l,render:d,nativeButton:f=!0,style:m,...h}=t,{getButtonProps:g,buttonRef:v}=gv({disabled:u,focusableWhenDisabled:!0,native:f});return Xt("button",t,{state:s,ref:[r,v],props:[{"aria-controls":n?o:void 0,"aria-expanded":n,onClick:i},h,g],stateAttributesMapping:ILe})});var z$=a(_e(),1);var j7=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var H$=z$.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}=j2(),w=n??!1,S=i??!1;Oe(()=>{if(l)return v(l),()=>{v(void 0)}},[l,v]);let{height:x,props:C,ref:A,shouldPreventOpenAnimation:k,shouldRender:R,transitionStatus:N,width:P}=LQ({externalRef:r,hiddenUntilFound:w,id:h,keepMounted:S,mounted:d,onOpenChange:f,open:m,setMounted:g,setOpen:b,transitionStatus:y}),T={..._,transitionStatus:N},M=N2(c,T),j=Xt("div",{...t,style:void 0},{state:T,ref:A,props:[C,{style:{[j7.collapsiblePanelHeight]:x===void 0?"auto":`${x}px`,[j7.collapsiblePanelWidth]:P===void 0?"auto":`${P}px`}},u,M?{style:M}:void 0,k?{style:{animationName:"none"}}:void 0],stateAttributesMapping:gA});return R?j:null});var U$=a(_e(),1);function W$(e={}){let{highlightItemOnHover:t,highlightedIndex:r,onHighlightedIndexChange:o}=K2(),{ref:n,index:i}=z2(e),s=r===i,l=U$.useRef(null),c=_f(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 Li=a(_e(),1),X$=a(Du(),1);var G$=a(_e(),1);function Y$(e){let[t,r]=G$.useState({current:e,previous:null});return e!==t.current&&r({current:e,previous:t.current}),t.previous}var I0=a(_e(),1);function A0(e){let t=zn(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=bo(e),i=n?e.offsetWidth:r,s=n?e.offsetHeight:o;return(xm(r)!==i||xm(o)!==s)&&(r=i,o=s),{width:r,height:o}}function K$(e){let{popupElement:t,positionerElement:r,content:o,mounted:n,onMeasureLayout:i,onMeasureLayoutComplete:s,side:l,direction:c}=e,u=ym(t,!0,!1),d=f0(),f=I0.useRef(null),m=I0.useRef(!0),h=I0.useRef(_c),g=De(i),v=De(s),b=I0.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"}:ro},[l,c]);Oe(()=>{if(!n){h.current=_c,m.current=!0,f.current=null;return}if(!t||!r)return;h.current=q$(t,b),z7(t,"auto");let _=bA(t,"position","static"),y=bA(t,"transform","none"),w=bA(t,"scale","1"),S=q$(r,{"--available-width":"max-content","--available-height":"max-content"});function x(){_(),y(),S()}function C(){x(),w()}if(g?.(),m.current||f.current===null){vA(r,"max-content");let N=A0(t);return f.current=N,vA(r,N),C(),v?.(null,N),m.current=!1,()=>{h.current(),h.current=_c}}vA(r,"max-content");let A=f.current,k=A0(t);f.current=k,z7(t,A),C(),v?.(A,k),vA(r,k);let R=new AbortController;return d.request(()=>{z7(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=_c}},[o,t,r,u,d,n,g,v,b])}function bA(e,t,r){let o=e.style.getPropertyValue(t);return e.style.setProperty(t,r),()=>{e.style.setProperty(t,o)}}function q$(e,t){let r=[];for(let[o,n]of Object.entries(t))r.push(bA(e,o,n));return r.length?()=>{r.forEach(o=>o())}:_c}function z7(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 vA(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 O0=a(E(),1);function Q$(e){let{store:t,side:r,cssVars:o,children:n}=e,i=mm(),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=Y$(c?s:null),g=MLe(l,u),v=Li.useRef(null),[b,_]=Li.useState(null),[y,w]=Li.useState(null),S=Li.useRef(null),x=Li.useRef(null),C=ym(S,!0,!1),A=f0(),[k,R]=Li.useState(null),[N,P]=Li.useState(!1);Oe(()=>(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")}),M=De(L=>{S.current?.style.removeProperty("animation"),S.current?.style.removeProperty("transition"),x.current?.style.removeProperty("display"),L&&R(L)}),j=Li.useRef(null);Oe(()=>{(!c||!d)&&(j.current=null)},[c,d]),Oe(()=>{if(s&&h&&s!==h&&j.current!==s&&v.current){_(v.current),P(!0);let L=NLe(h,s);w(L),A.request(()=>{X$.flushSync(()=>{P(!1)}),C(()=>{_(null),R(null),v.current=null})}),j.current=s}},[s,h,b,C,A]),Oe(()=>{let L=S.current;if(!L)return;let O=qo(L).createElement("div");for(let V of Array.from(L.childNodes))O.appendChild(V.cloneNode(!0));v.current=O});let F=b!=null,D;F?D=(0,O0.jsxs)(Li.Fragment,{children:[(0,O0.jsx)("div",{"data-previous":!0,inert:mA(!0),ref:x,style:{...k?{[o.popupWidth]:`${k.width}px`,[o.popupHeight]:`${k.height}px`}:null,position:"absolute"},"data-ending-style":N?void 0:""},"previous"),(0,O0.jsx)("div",{"data-current":!0,ref:S,"data-starting-style":N?"":void 0,children:n},g)]}):D=(0,O0.jsx)("div",{"data-current":!0,ref:S,children:n},g),Oe(()=>{let L=x.current;!L||!b||L.replaceChildren(...Array.from(b.childNodes))},[b]),K$({popupElement:f,positionerElement:m,mounted:d,content:u,onMeasureLayout:T,onMeasureLayoutComplete:M,side:r,direction:i});let B={activationDirection:OLe(y),transitioning:F};return{children:D,state:B}}function OLe(e){if(e)return`${Z$(e.horizontal,5,"right","left")} ${Z$(e.vertical,5,"down","up")}`}function Z$(e,t,r,o){return e>t?r:e<-t?o:""}function NLe(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 MLe(e,t){let[r,o]=Li.useState(0),n=Li.useRef(e),i=Li.useRef(t),s=Li.useRef(!1);return Oe(()=>{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 J$(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}var yA=a(_e(),1),FLe=yA.createContext(void 0),DLe={disableStyleElements:!1};function $$(){return yA.useContext(FLe)??DLe}var tee=a(_e(),1);var N0=a(_e(),1);var wA="data-composite-item-active";var LLe=[];function eee(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=LLe}=e,[h,g]=N0.useState(0),v=o!=null,b=N0.useRef(null),_=_f(b,c),y=N0.useRef([]),w=N0.useRef(!1),S=s??h,x=De((N,P=!1)=>{if((l??g)(N),P){let T=y.current[N];B7(b.current,T,i,r)}}),C=De(N=>{if(N.size===0||w.current)return;w.current=!0;let P=Array.from(N.keys()),T=P.find(j=>j?.hasAttribute(wA))??null,M=T?P.indexOf(T):-1;if(M!==-1)x(M);else if(Z1(P,S,f)){let j=wv(P,{disabledIndices:f});K1(P,j)||x(j)}B7(b.current,T,i,r)});Oe(()=>{if(f==null||s!=null||!w.current)return;let N=y.current;if(Z1(N,S,f)){let P=wv(N,{disabledIndices:f});K1(N,P)||x(P)}},[f,s,S,y,x]);let A=De((N,P,T)=>n?n(N,P,T,y):T),k=De(N=>{let P=u?E$:D7;if(!P.has(N.key)||BLe(N,m)||!b.current)return;let M=i==="rtl",j=M?eC:tC,F={horizontal:j,vertical:R0,both:j}[r],D=M?tC:eC,B={horizontal:D,vertical:k0,both:D}[r],L=Hn(N.nativeEvent);if(L!=null&&L7(L)&&!J$(L)){let ce=L.selectionStart,te=L.selectionEnd,de=L.value??"";if(ce==null||N.shiftKey||ce!==te||N.key!==B&&ce<de.length||N.key!==F&&ce>0)return}let O=S,V=n7(y,f),W=i7(y,f);o!=null&&(O=o({disabledIndices:f,elementsRef:y,event:N,highlightedIndex:S,loopFocus:t,maxIndex:W,minIndex:V,onLoop:A,orientation:r,rtl:M}));let q={horizontal:[j],vertical:[R0],both:[j,R0]}[r],Z={horizontal:[D],vertical:[k0],both:[D,k0]}[r],Q=v?P:{horizontal:u?C$:M7,vertical:u?T$:F7,both:P}[r];u&&(N.key===rC?O=V:N.key===oC&&(O=W)),O===S&&(q.includes(N.key)||Z.includes(N.key))&&(t&&O===W&&q.includes(N.key)?(O=V,n&&(O=n(N,S,O,y))):t&&O===V&&Z.includes(N.key)?(O=W,n&&(O=n(N,S,O,y))):O=wv(y.current,{startingIndex:O,decrement:Z.includes(N.key),disabledIndices:f})),O!==S&&!K1(y.current,O)&&(d&&N.stopPropagation(),Q.has(N.key)&&N.preventDefault(),x(O,!0),queueMicrotask(()=>{y.current[O]?.focus()}))});return{props:{ref:_,onFocus(N){let P=b.current,T=Hn(N.nativeEvent);!P||T==null||!L7(T)||T.setSelectionRange(0,T.value.length??0)},onKeyDown:k},highlightedIndex:S,onHighlightedIndexChange:x,elementsRef:y,disabledIndices:f,onMapChange:C,relayKeyboardEvent:k}}function BLe(e,t){for(let r of P$.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}var H7=a(E(),1);function ree(e){let{render:t,className:r,style:o,refs:n=M1,props:i=M1,state:s=ro,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=mm(),{props:k,highlightedIndex:R,onHighlightedIndexChange:N,elementsRef:P,onMapChange:T,relayKeyboardEvent:M}=eee({grid:f,loopFocus:m,onLoop:h,orientation:d,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:_,stopEventPropagation:b,enableHomeAndEndKeys:g,direction:A,disabledIndices:y,modifierKeys:w}),j=Xt(x,e,{state:s,ref:n,props:[k,...i,C],stateAttributesMapping:l}),F=tee.useMemo(()=>({highlightedIndex:R,onHighlightedIndexChange:N,highlightItemOnHover:S,relayKeyboardEvent:M}),[R,N,S,M]);return(0,H7.jsx)(U8.Provider,{value:F,children:(0,H7.jsx)(I2,{elementsRef:P,onMapChange:D=>{v?.(D),T(D)},children:j})})}var _A=a(_e(),1),oee=a(Du(),1);var nee=a(E(),1),iee=_A.forwardRef(function(t,r){let{children:o,container:n,className:i,render:s,style:l,...c}=t,{portalNode:u,portalSubtree:d}=s7({container:n,ref:r,componentProps:t,elementProps:c});return!d&&!u?null:(0,nee.jsxs)(_A.Fragment,{children:[d,u&&oee.createPortal(o,u)]})});var see=a(Q1(),1);function VLe(){return _c}function jLe(){return!1}function zLe(){return!0}function aee(){return(0,see.useSyncExternalStore)(VLe,jLe,zLe)}var Ic={};Wr(Ic,{Indicator:()=>pee,List:()=>gee,Panel:()=>hee,Root:()=>uee,Tab:()=>dee});var Ko=a(_e(),1);var SA=a(_e(),1),U7=SA.createContext(void 0);function km(){let e=SA.useContext(U7);if(e===void 0)throw new Error(Io(64));return e}var lee=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});var Vu={tabActivationDirection:e=>({[lee.activationDirection]:e})};var W7=a(E(),1),uee=Ko.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=Ko.useRef([]),[h,g]=Ko.useState(()=>new Map),[v,b]=R2({controlled:c,default:n,name:"Tabs",state:"value"}),_=c!==void 0,[y,w]=Ko.useState(()=>new Map),S=Ko.useRef(void 0),x=Ko.useCallback(ee=>{if(ee===void 0)return null;for(let[$,ue]of y.entries())if(ue!=null&&ee===(ue.value??ue.index))return $;return null},[y]),[C,A]=Ko.useState(()=>({previousValue:v,tabActivationDirection:"none"})),{previousValue:k,tabActivationDirection:R}=C,N=R,P=!1;k!==v&&(N=cee(k,v,s,y),P=k!=null&&v!=null&&x(v)==null);let T=P?k:v,M=k!==T||R!==N;Oe(()=>{M&&A({previousValue:T,tabActivationDirection:N})},[T,M,N]);let j=De((ee,$)=>{let ue=cee(v,ee,s,y);$.activationDirection=ue,i?.(ee,$),!$.isCanceled&&b(ee)}),F=De((ee,$)=>{i?.(ee,xt($,void 0,void 0,{activationDirection:"none"}))}),D=De((ee,$)=>{g(ue=>{if(ue.get(ee)===$)return ue;let ve=new Map(ue);return ve.set(ee,$),ve})}),B=De((ee,$)=>{g(ue=>{if(!ue.has(ee)||ue.get(ee)!==$)return ue;let ve=new Map(ue);return ve.delete(ee),ve})}),L=Ko.useCallback(ee=>h.get(ee),[h]),O=Ko.useCallback(ee=>{for(let $ of y.values())if(ee===$?.value)return $?.id},[y]),V=Ko.useMemo(()=>({getTabElementBySelectedValue:x,getTabIdByPanelValue:O,getTabPanelIdByValue:L,onValueChange:j,orientation:s,registerMountedTabPanel:D,setTabMap:w,unregisterMountedTabPanel:B,tabActivationDirection:N,value:v}),[x,O,L,j,s,D,w,B,N,v]),W=Ko.useMemo(()=>{for(let ee of y.values())if(ee!=null&&ee.value===v)return ee},[y,v]),q=Ko.useMemo(()=>{for(let ee of y.values())if(ee!=null&&!ee.disabled)return ee.value},[y]),Z=Ko.useRef(!f),Q=Ko.useRef(n),ce=Ko.useRef(f),te=Ko.useRef(!1);Oe(()=>{if(_)return;function ee(Ee,ie){b(Ee),A(ae=>ae.previousValue===Ee&&ae.tabActivationDirection==="none"?ae:{previousValue:Ee,tabActivationDirection:"none"}),F(Ee,ie),Z.current=!1}if(y.size===0){te.current&&v!==null&&!S.current?.isConnected&&ee(null,qe.missing);return}te.current=!0,S.current=y.keys().next().value;let $=W?.disabled,ue=W==null&&v!==null;if(!$&&v===Q.current&&(ce.current=!1),ce.current&&$&&v===Q.current)return;let ve=Z.current;if($||ue){let Ee=q??null;if(v===Ee){Z.current=!1;return}let ie=qe.missing;ve?ie=qe.initial:$&&(ie=qe.disabled),ee(Ee,ie);return}ve&&W!=null&&(F(v,qe.initial),Z.current=!1)},[q,_,F,W,b,y,v]);let me=Xt("div",t,{state:{orientation:s,tabActivationDirection:N},ref:r,props:d,stateAttributesMapping:Vu});return(0,W7.jsx)(U7.Provider,{value:V,children:(0,W7.jsx)(I2,{elementsRef:m,children:me})})});function cee(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 Ef=a(_e(),1);var xA=a(_e(),1),G7=xA.createContext(void 0);function CA(){let e=xA.useContext(G7);if(e===void 0)throw new Error(Io(65));return e}var dee=Ef.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}=km(),{activateOnFocus:v,highlightedTabIndex:b,onTabActivation:_,registerTabResizeObserverElement:y,setHighlightedTabIndex:w,tabsListElement:S}=CA(),x=gm(l),C=Ef.useMemo(()=>({disabled:n,id:x,value:s}),[n,x,s]),{compositeProps:A,compositeRef:k,index:R}=W$({metadata:C}),N=s===f,P=Ef.useRef(!1),T=Ef.useRef(null);Oe(()=>{let Z=T.current;if(Z)return y(Z)},[y]),Oe(()=>{if(P.current){P.current=!1;return}if(!(N&&R>-1&&b!==R))return;let Z=S;if(Z!=null){let Q=b0(qo(Z));if(Q&&tr(Z,Q))return}n||w(R)},[N,R,b,w,n,S]);let{getButtonProps:M,buttonRef:j}=gv({disabled:n,native:c,focusableWhenDisabled:!0}),F=m(s),D=Ef.useRef(!1),B=Ef.useRef(!1);function L(Z){N||n||_(s,xt(qe.none,Z.nativeEvent,void 0,{activationDirection:"none"}))}function O(Z){N||(R>-1&&!n&&w(R),!n&&v&&(!D.current||D.current&&B.current)&&_(s,xt(qe.none,Z.nativeEvent,void 0,{activationDirection:"none"})))}function V(Z){if(N||n)return;D.current=!0;function Q(){D.current=!1,B.current=!1}(!Z.button||Z.button===0)&&(B.current=!0,qo(Z.currentTarget).addEventListener("pointerup",Q,{once:!0}))}return Xt("button",t,{state:{disabled:n,active:N,orientation:h,tabActivationDirection:g},ref:[r,j,k,T],props:[A,{role:"tab","aria-controls":F,"aria-selected":N,id:x,onClick:L,onFocus:O,onPointerDown:V,[wA]:N?"":void 0,onKeyDownCapture(){P.current=!0}},d,M],stateAttributesMapping:Vu})});var M0=a(_e(),1);var fee='!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 Cv=(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 TA=a(E(),1),HLe={...Vu,activeTabPosition:()=>null,activeTabSize:()=>null},pee=M0.forwardRef(function(t,r){let{className:o,render:n,renderBeforeHydration:i=!1,style:s,...l}=t,{nonce:c}=$$(),{getTabElementBySelectedValue:u,orientation:d,tabActivationDirection:f,value:m}=km(),{tabsListElement:h,registerIndicatorUpdateListener:g}=CA(),v=aee(),b=t$();M0.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 j=u(m);if(j!=null){A=!0;let{width:F,height:D}=A0(j),{width:B,height:L}=A0(h),O=j.getBoundingClientRect(),V=h.getBoundingClientRect(),W=B>0?V.width/B:1,q=L>0?V.height/L: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 _=j.offsetLeft,w=j.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,N=A?{[Cv.activeTabLeft]:`${_}px`,[Cv.activeTabRight]:`${y}px`,[Cv.activeTabTop]:`${w}px`,[Cv.activeTabBottom]:`${S}px`,[Cv.activeTabWidth]:`${x}px`,[Cv.activeTabHeight]:`${C}px`}:void 0,P=A&&x>0&&C>0,M=Xt("span",t,{state:{orientation:d,activeTabPosition:k,activeTabSize:R,tabActivationDirection:f},ref:r,props:[{role:"presentation",style:N,hidden:!P},l,{suppressHydrationWarning:!0}],stateAttributesMapping:HLe});return m==null?null:(0,TA.jsxs)(M0.Fragment,{children:[M,v&&i&&(0,TA.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:fee},suppressHydrationWarning:!0})]})});var F0=a(_e(),1);var mee=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=Za.startingStyle]="startingStyle",e[e.endingStyle=Za.endingStyle]="endingStyle",e})({});var ULe={...Vu,...vm},hee=F0.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}=km(),v=gm(),b=F0.useMemo(()=>({id:v,value:n}),[v,n]),{ref:_,index:y}=z2({metadata:b}),w=n===u,{mounted:S,transitionStatus:x,setMounted:C}=p0(w),A=!S,k=d(n),R={hidden:A,orientation:f,tabActivationDirection:m,transitionStatus:x},N=F0.useRef(null),P=Xt("div",t,{state:R,ref:[r,_,N],props:[{"aria-labelledby":k,hidden:A,id:v,role:"tabpanel",tabIndex:w?0:-1,inert:mA(!w),[mee.index]:y},c],stateAttributesMapping:ULe});return wm({open:w,ref:N,onComplete(){w||C(!1)}}),Oe(()=>{if(!(A&&!s)&&v!=null)return h(n,v),()=>{g(n,v)}},[A,s,n,v,h,g]),s||S?P:null});var Ac=a(_e(),1);var Y7=a(E(),1),gee=Ac.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}=km(),[g,v]=Ac.useState(0),[b,_]=Ac.useState(null),y=Ac.useRef(new Set),w=Ac.useRef(new Set),S=Ac.useRef(null);Oe(()=>{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"},N=Ac.useMemo(()=>({activateOnFocus:o,highlightedTabIndex:g,registerIndicatorUpdateListener:x,registerTabResizeObserverElement:C,onTabActivation:A,setHighlightedTabIndex:v,tabsListElement:b}),[o,g,x,C,A,v,b]);return(0,Y7.jsx)(G7.Provider,{value:N,children:(0,Y7.jsx)(ree,{render:s,className:n,style:l,state:k,refs:[r,_],props:[R,c],stateAttributesMapping:Vu,highlightedIndex:g,enableHomeAndEndKeys:!0,loopFocus:i,orientation:d,onHighlightedIndexChange:v,onMapChange:m,disabledIndices:M1})})});var ia={};Wr(ia,{Arrow:()=>Oee,Handle:()=>sC,Popup:()=>Aee,Portal:()=>Eee,Positioner:()=>kee,Provider:()=>Nee,Root:()=>bee,Trigger:()=>xee,Viewport:()=>Dee,createHandle:()=>Lee});var ju=a(_e(),1);var EA=a(_e(),1),q7=EA.createContext(void 0);function Rl(e){let t=EA.useContext(q7);if(t===void 0&&!e)throw new Error(Io(72));return t}var vee=a(_e(),1);var WLe={...b$,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)},D0=class e extends x0{constructor(t,r,o=!1){let n=new Tm,i={...GLe(),...t};i.floatingRootContext=g$(n,r,o),super(i,{popupRef:vee.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},WLe)}setOpen=(t,r)=>{a$(this,t,r,{extraState:{openChangeReason:r.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,xt(qe.triggerPress,t))}static useStore(t,r){return s$(t,(n,i)=>new e(r,n,i)).store}};function GLe(){return{...h$(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var PA=a(E(),1),bee=S7(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=D0.useStore(d?.store,{open:o,openProp:n,activeTriggerId:m,triggerIdProp:f});l$(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),u$(g,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:S,transitionStatus:x}=d$(b,g),C=g.useState("isInstantPhase"),A=g.useState("instantType"),k=g.useState("lastOpenChangeReason"),R=ju.useRef(null);Oe(()=>{v&&r&&g.setOpen(!1,xt(qe.disabled))},[v,r,g]),Oe(()=>{x==="ending"&&k===qe.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]),Oe(()=>{b&&_==null&&g.set("payload",void 0)},[g,_,b]);let N=ju.useCallback(()=>{g.setOpen(!1,xt(qe.imperativeAction))},[g]);ju.useImperativeHandle(l,()=>({unmount:S,close:N}),[S,N]);let P=b||y||!r&&s!=="none";return(0,PA.jsxs)(q7.Provider,{value:g,children:[P&&(0,PA.jsx)(YLe,{store:g,disabled:r,trackCursorAxis:s}),typeof h=="function"?h({payload:w}):h]})});function YLe({store:e,disabled:t,trackCursorAxis:r}){let o=e.useState("floatingRootContext"),n=l7(o,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),i=a7(o,{enabled:!t&&r!=="none",axis:r==="none"?void 0:r}),s=ju.useMemo(()=>gr(i.reference,n.reference),[i.reference,n.reference]),l=ju.useMemo(()=>gr(i.trigger,n.trigger),[i.trigger,n.trigger]),c=ju.useMemo(()=>gr(i$,i.floating,n.floating),[i.floating,n.floating]);return f$(e,{activeTriggerProps:s,inactiveTriggerProps:l,popupProps:c}),null}var RA=a(_e(),1);var kA=a(_e(),1),K7=kA.createContext(void 0);function yee(){return kA.useContext(K7)}var wee=(function(e){return e[e.popupOpen=$1.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});var See="data-base-ui-tooltip-trigger";function _ee(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 qLe(e){let t=e;for(;t;){if(t.hasAttribute(See))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=JJ(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=Rl(!0),v=s?.store??g;if(!v)throw new Error(Io(82));let b=gm(m),_=v.useState("isTriggerActive",b),y=v.useState("isOpenedByTrigger",b),w=v.useState("floatingRootContext"),S=RA.useRef(null),x=u??600,C=f??0,{registerTrigger:A,isMountedByThisTrigger:k}=c$(b,S,v,{payload:l,closeOnClick:d,closeDelay:C}),R=yee(),{delayRef:N,isInstantPhase:P,hasProvider:T}=o7(w,{open:y}),M=E0(w);v.useSyncedValue("isInstantPhase",P);let j=v.useState("disabled"),F=c??j,D=Mi(F),B=v.useState("trackCursorAxis"),L=v.useState("disableHoverablePopup"),O=RA.useRef(!1),V=Tc(),W=RA.useRef(void 0);function q(){let ve=R?.delay,Ee=typeof N.current=="object"?N.current.open:void 0,ie=x;return T&&(Ee!==0?ie=u??ve??x:ie=0),ie}function Z(ve){let Ee=S.current;if(!Ee||!ve)return!1;let ie=qLe(ve);return ie!==null&&ie!==Ee&&tr(Ee,ie)}function Q(ve){let Ee=Z(ve);return O.current=Ee,Ee&&(M.openChangeTimeout.clear(),M.restTimeout.clear(),M.restTimeoutPending=!1,V.clear()),Ee}let ce=I7(w,{enabled:!F,mouseOnly:!0,move:!1,handleClose:!L&&B!=="both"?O7():null,restMs:q,delay(){let ve=typeof N.current=="object"?N.current.close:void 0,Ee=C;return f==null&&T&&(Ee=ve),{close:Ee}},triggerElementRef:S,isActiveTrigger:_,isClosing:()=>v.select("transitionStatus")==="ending",shouldOpen(){return!O.current}}),te=P7(w,{enabled:!F}).reference,de=ve=>{let Ee=O.current,ie=_ee(ve),ae=Q(ie),pe=S.current,le=pe&&ie&&tr(pe,ie);if(ae&&v.select("open")&&v.select("lastOpenChangeReason")===qe.triggerHover){v.setOpen(!1,xt(qe.triggerHover,ve));return}if(Ee&&!ae&&le&&!D.current&&!v.select("open")&&pe&&xf(W.current)){let se=()=>{!O.current&&!D.current&&!v.select("open")&&v.setOpen(!0,xt(qe.triggerHover,ve,pe))},Ae=q();Ae===0?(V.clear(),se()):V.start(Ae,se)}},me=v.useState("triggerProps",k);return Xt("button",t,{state:{open:y},ref:[r,A,S],props:[ce,te,k||B!=="none"?me:void 0,{onMouseOver(ve){de(ve.nativeEvent)},onFocus(ve){Z(_ee(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,[wee.triggerDisabled]:F?"":void 0,[See]:F?void 0:""},h],stateAttributesMapping:S$})});var Tee=a(_e(),1);var AA=a(_e(),1),Z7=AA.createContext(void 0);function Cee(){let e=AA.useContext(Z7);if(e===void 0)throw new Error(Io(70));return e}var X7=a(E(),1),Eee=Tee.forwardRef(function(t,r){let{keepMounted:o=!1,...n}=t;return Rl().useState("mounted")||o?(0,X7.jsx)(Z7.Provider,{value:o,children:(0,X7.jsx)(iee,{ref:r,...n})}):null});var OA=a(_e(),1);var IA=a(_e(),1),Q7=IA.createContext(void 0);function L0(){let e=IA.useContext(Q7);if(e===void 0)throw new Error(Io(71));return e}var Pee=a(E(),1),kee=OA.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=iJ,style:_,...y}=t,w=Rl(),S=Cee(),x=w.useState("open"),C=w.useState("mounted"),A=w.useState("trackCursorAxis"),k=w.useState("disableHoverablePopup"),R=w.useState("floatingRootContext"),N=w.useState("instantType"),P=w.useState("transitionStatus"),T=w.useState("hasViewport"),M=M$({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?A$:void 0}),j=OA.useMemo(()=>({open:x,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:A!=="none"?"tracking-cursor":N}),[x,M.side,M.align,M.anchorHidden,A,N]),F=F$(t,j,{styles:M.positionerStyles,transitionStatus:P,props:y,refs:[r,w.useStateSetter("positionerElement")],hidden:!C,inert:!x||A==="both"||k});return(0,Pee.jsx)(Q7.Provider,{value:M,children:F})});var Ree=a(_e(),1);var KLe={...P0,...vm},Aee=Ree.forwardRef(function(t,r){let{render:o,className:n,style:i,...s}=t,l=Rl(),{side:c,align:u}=L0(),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");wm({open:d,ref:l.context.popupRef,onComplete(){d&&l.context.onOpenChangeComplete?.(!0)}}),A7(g,{enabled:!v,closeDelay:b});let _=l.useStateSetter("popupElement");return Xt("div",t,{state:{open:d,side:c,align:u,instant:f,transitionStatus:m},ref:[r,l.context.popupRef,_],props:[h,hA(m),s],stateAttributesMapping:KLe})});var Iee=a(_e(),1);var Oee=Iee.forwardRef(function(t,r){let{render:o,className:n,style:i,...s}=t,l=Rl(),{arrowRef:c,side:u,align:d,arrowUncentered:f,arrowStyles:m}=L0(),h=l.useState("open"),g=l.useState("instantType");return Xt("div",t,{state:{open:h,side:u,align:d,uncentered:f,instant:g},ref:[r,c],props:[{style:m,"aria-hidden":!0},s],stateAttributesMapping:P0})});var J7=a(_e(),1);var $7=a(E(),1),Nee=function(t){let{delay:r,closeDelay:o,timeout:n=400}=t,i=J7.useMemo(()=>({delay:r,closeDelay:o}),[r,o]),s=J7.useMemo(()=>({open:r,close:o}),[r,o]);return(0,$7.jsx)(K7.Provider,{value:i,children:(0,$7.jsx)(r7,{delay:s,timeoutMs:n,children:t.children})})};var Fee=a(_e(),1);var Mee=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});var ZLe={activationDirection:e=>e?{"data-activation-direction":e}:null},Dee=Fee.forwardRef(function(t,r){let{render:o,className:n,style:i,children:s,...l}=t,c=Rl(),u=L0(),d=c.useState("instantType"),{children:f,state:m}=Q$({store:c,side:u.side,cssVars:Mee,children:s}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:d};return Xt("div",t,{state:h,ref:r,props:[l,{children:f}],stateAttributesMapping:ZLe})});var sC=class{constructor(){this.store=new D0}open(t){let r=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!r)throw new Error(Io(81,t));this.store.setOpen(!0,xt(qe.imperativeAction,void 0,r))}close(){this.store.setOpen(!1,xt(qe.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Lee(){return new sC}function dn(e){return Xt(e.defaultTagName??"div",e,e)}var jee=a(U(),1),e9="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"&&QLe(document)),e.__wpStyleRuntime}function XLe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${e9}]`))if(r.getAttribute(e9)===t)return!0;return!1}function zee(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(XLe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(e9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function QLe(e){let t=t9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)zee(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 Hee(e,t){let r=t9();r.styles.set(e,t);for(let o of r.documents.keys())zee(o,e,t)}typeof process>"u",Hee("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 Bee={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",Hee("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 Vee={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},ys=(0,jee.forwardRef)(function({variant:t="body-md",render:r,className:o,...n},i){return dn({render:r,defaultTagName:"span",ref:i,props:gr(n,{className:J(Bee.text,Vee.heading,Vee.p,Bee[t],o)})})});var Yee=a(E(),1),r9="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"&&$Le(document)),e.__wpStyleRuntime}function JLe(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 Gee(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(JLe(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 $Le(e){let t=o9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Gee(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 e4e(e,t){let r=o9();r.styles.set(e,t);for(let o of r.documents.keys())Gee(o,e,t)}typeof process>"u",e4e("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 Uee={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"},aC=(0,Wee.forwardRef)(function({intent:t="none",className:r,...o},n){return(0,Yee.jsx)(ys,{ref:n,className:J(Uee.badge,Uee[`is-${t}-intent`],r),...o,variant:"body-sm"})});var qee=a(Pl(),1),NA=a(U(),1),Kee=a(z(),1),Xee=a(E(),1),n9="data-wp-hash";function i9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&r4e(document)),e.__wpStyleRuntime}function t4e(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 Zee(e,t,r){if(!e.head)return;let o=i9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(t4e(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 r4e(e){let t=i9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Zee(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 MA(e,t){let r=i9();r.styles.set(e,t);for(let o of r.documents.keys())Zee(o,e,t)}typeof process>"u",MA("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 lC={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",MA("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var o4e={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",MA("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 n4e={"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",MA("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 i4e={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},Qee=(0,NA.forwardRef)(function({tone:t="brand",variant:r="solid",size:o="default",className:n,focusableWhenDisabled:i=!0,disabled:s,loading:l,loadingAnnouncement:c=(0,Kee.__)("Loading"),children:u,...d},f){let m=J(i4e.button,o4e["box-sizing"],n4e["outset-ring--focus-except-active"],r!=="unstyled"&&lC.button,lC[`is-${t}`],lC[`is-${r}`],lC[`is-${o}`],l&&lC["is-loading"],n);return(0,NA.useEffect)(()=>{l&&c&&(0,qee.speak)(c)},[l,c]),(0,Xee.jsx)(V7,{ref:f,className:m,focusableWhenDisabled:i,disabled:s??l,...d,children:u})});var tte=a(U(),1);var Jee=a(U(),1),$ee=a(xe(),1),ete=a(E(),1),Pf=(0,Jee.forwardRef)(function({icon:t,size:r=24,...o},n){return(0,ete.jsx)($ee.SVG,{ref:n,...t.props,...o,width:r,height:r})});var ote=a(E(),1),s9="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"&&a4e(document)),e.__wpStyleRuntime}function s4e(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 rte(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(s4e(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 a4e(e){let t=a9();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 l4e(e,t){let r=a9();r.styles.set(e,t);for(let o of r.documents.keys())rte(o,e,t)}typeof process>"u",l4e("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 c4e={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"},l9=(0,tte.forwardRef)(function({className:t,icon:r,...o},n){return(0,ote.jsx)(Pf,{ref:n,icon:r,className:J(c4e.icon,t),size:24,...o})});l9.displayName="Button.Icon";var nte=Object.assign(Qee,{Icon:l9});var zu={};Wr(zu,{Content:()=>LA,FullBleed:()=>mte,Header:()=>DA,Root:()=>FA,Title:()=>gte});var ite=a(U(),1),c9="data-wp-hash";function u9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&d4e(document)),e.__wpStyleRuntime}function u4e(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 ste(e,t,r){if(!e.head)return;let o=u9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(u4e(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 d4e(e){let t=u9();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 ate(e,t){let r=u9();r.styles.set(e,t);for(let o of r.documents.keys())ste(o,e,t)}typeof process>"u",ate("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var f4e={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",ate("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 p4e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},FA=(0,ite.forwardRef)(function({render:t,...r},o){let n=J(p4e.root,f4e["box-sizing"]);return dn({defaultTagName:"div",render:t,ref:o,props:gr({className:n},r)})});var lte=a(U(),1),d9="data-wp-hash";function f9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&h4e(document)),e.__wpStyleRuntime}function m4e(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${d9}]`))if(r.getAttribute(d9)===t)return!0;return!1}function cte(e,t,r){if(!e.head)return;let o=f9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(m4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(d9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function h4e(e){let t=f9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)cte(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 g4e(e,t){let r=f9();r.styles.set(e,t);for(let o of r.documents.keys())cte(o,e,t)}typeof process>"u",g4e("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 v4e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},DA=(0,lte.forwardRef)(function({render:t,...r},o){return dn({defaultTagName:"div",render:t,ref:o,props:gr({className:v4e.header},r)})});var ute=a(U(),1),p9="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"&&y4e(document)),e.__wpStyleRuntime}function b4e(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 dte(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(b4e(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 y4e(e){let t=m9();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 w4e(e,t){let r=m9();r.styles.set(e,t);for(let o of r.documents.keys())dte(o,e,t)}typeof process>"u",w4e("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 _4e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},LA=(0,ute.forwardRef)(function({render:t,...r},o){return dn({defaultTagName:"div",render:t,ref:o,props:gr({className:_4e.content},r)})});var fte=a(U(),1),h9="data-wp-hash";function g9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&x4e(document)),e.__wpStyleRuntime}function S4e(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${h9}]`))if(r.getAttribute(h9)===t)return!0;return!1}function pte(e,t,r){if(!e.head)return;let o=g9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(S4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(h9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function x4e(e){let t=g9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)pte(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 C4e(e,t){let r=g9();r.styles.set(e,t);for(let o of r.documents.keys())pte(o,e,t)}typeof process>"u",C4e("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 T4e={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},mte=(0,fte.forwardRef)(function({render:t,...r},o){return dn({defaultTagName:"div",render:t,ref:o,props:gr({className:T4e.fullbleed},r)})});var hte=a(U(),1);var v9=a(E(),1),E4e=(0,v9.jsx)("div",{}),gte=(0,hte.forwardRef)(function({render:t=E4e,children:r,...o},n){return(0,v9.jsx)(ys,{ref:n,variant:"heading-lg",render:t,...o,children:r})});var vte=a(U(),1),bte=a(E(),1),b9=(0,vte.forwardRef)(function(t,r){return(0,bte.jsx)(Pm.Panel,{ref:r,...t})});var yte=a(U(),1),wte=a(E(),1),y9=(0,yte.forwardRef)(function(t,r){return(0,wte.jsx)(Pm.Root,{ref:r,...t})});var _te=a(U(),1),Ste=a(E(),1),w9=(0,_te.forwardRef)(function(t,r){return(0,Ste.jsx)(Pm.Trigger,{ref:r,...t})});var Tv={};Wr(Tv,{Content:()=>Nte,Header:()=>kte,HeaderDescription:()=>Ate,Root:()=>Cte});var xte=a(U(),1);var S9=a(E(),1),Cte=(0,xte.forwardRef)(function({render:t,...r},o){return(0,S9.jsx)(y9,{ref:o,render:(0,S9.jsx)(FA,{render:t}),...r})});var V0=a(U(),1);var Tte=a(U(),1),BA=(0,Tte.createContext)({setDescriptionId:()=>{}});var kf=a(E(),1),x9="data-wp-hash";function C9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&k4e(document)),e.__wpStyleRuntime}function P4e(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 Pte(e,t,r){if(!e.head)return;let o=C9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(P4e(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 k4e(e){let t=C9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Pte(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 T9(e,t){let r=C9();r.styles.set(e,t);for(let o of r.documents.keys())Pte(o,e,t)}typeof process>"u",T9("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 B0={"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",T9("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 Ete={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",T9("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 R4e={"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"},kte=(0,V0.forwardRef)(function({children:t,className:r,render:o,...n},i){let[s,l]=(0,V0.useState)(),c=(0,V0.useMemo)(()=>({setDescriptionId:l}),[l]);return dn({defaultTagName:"div",render:o,ref:i,props:gr(n,{className:J(Ete.heading,B0["heading-wrapper"],r),children:(0,kf.jsx)(BA.Provider,{value:c,children:(0,kf.jsxs)(w9,{className:B0.header,render:(0,kf.jsx)(DA,{}),nativeButton:!1,"aria-describedby":s,children:[(0,kf.jsx)("div",{className:B0["header-content"],children:t}),(0,kf.jsx)("div",{className:J(B0["header-trigger-positioner"]),children:(0,kf.jsx)("div",{className:J(B0["header-trigger-wrapper"],Ete.div,R4e["outset-ring--focus-parent-visible"]),children:(0,kf.jsx)(Pf,{icon:Vx,className:B0["header-trigger"]})})})]})})})})});var Rm=a(U(),1);var Rte=a(E(),1),Ate=(0,Rm.forwardRef)(function({children:t,className:r,...o},n){let i=(0,Rm.useId)(),{setDescriptionId:s}=(0,Rm.useContext)(BA);return(0,Rm.useEffect)(()=>(s(i),()=>s(void 0)),[i,s]),(0,Rte.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:r,...o,children:t})});var Ite=a(U(),1);var k9=a(E(),1),P9="data-wp-hash";function R9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&I4e(document)),e.__wpStyleRuntime}function A4e(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 Ote(e,t,r){if(!e.head)return;let o=R9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(A4e(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 I4e(e){let t=R9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Ote(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 O4e(e,t){let r=R9();r.styles.set(e,t);for(let o of r.documents.keys())Ote(o,e,t)}typeof process>"u",O4e("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 E9={"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"},Nte=(0,Ite.forwardRef)(function({className:t,render:r,children:o,hiddenUntilFound:n=!0,...i},s){return(0,k9.jsx)(b9,{ref:s,className:l=>J(E9.content,l.open&&l.transitionStatus==="idle"&&E9["overflow-visible"],t),hiddenUntilFound:n,...i,children:(0,k9.jsx)(LA,{className:E9["content-inner"],render:r,children:o})})});var Mte=a(U(),1);function A9(e,t,r){return(0,Mte.cloneElement)(e??t,{children:r})}var N4e=a(Dte(),1);var Lte=a(vf(),1),{lock:uPt,unlock:Bte}=(0,Lte.__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 M4e(){let e=N4e;if(e.ThemeProvider)return e.ThemeProvider;if(!e.privateApis)throw new Error("@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`.");return Bte(e.privateApis).ThemeProvider}var Vte=M4e();var jte=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"&&D4e(document)),e.__wpStyleRuntime}function F4e(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 zte(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(F4e(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 D4e(e){let t=O9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)zte(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 L4e(e,t){let r=O9();r.styles.set(e,t);for(let o of r.documents.keys())zte(o,e,t)}typeof process>"u",L4e("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var B4e={stack:"_19ce0419607e1896__stack"},V4e={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)"},oe=(0,jte.forwardRef)(function({direction:t,gap:r,align:o,justify:n,wrap:i,render:s,...l},c){let u={gap:r&&V4e[r],alignItems:o,justifyContent:n,flexDirection:t,flexWrap:i};return dn({render:s,ref:c,props:gr(l,{style:u,className:B4e.stack})})});var Ke={};Wr(Ke,{Popup:()=>ere,Portal:()=>VA,Positioner:()=>jA,Provider:()=>are,Root:()=>ire,Trigger:()=>ore});var Jte=a(U(),1);var Yte=a(U(),1);var 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"&&z4e(document)),e.__wpStyleRuntime}function j4e(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 Ute(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(j4e(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 z4e(e){let t=M9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Ute(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 H4e(e,t){let r=M9();r.styles.set(e,t);for(let o of r.documents.keys())Ute(o,e,t)}typeof process>"u",H4e("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 Hte={slot:"_11fc52b637ff8a7e__slot"},Wte="data-wp-compat-overlay-slot";function U4e(){return typeof document>"u"?null:document}function W4e(){let e;try{e=window.top?.wp}catch{}let t=e??window.wp;return typeof t?.components=="object"&&t.components!==null}var Rf=null;function G4e(e){let t=e.createElement("div");return t.setAttribute(Wte,""),Hte.slot&&t.classList.add(Hte.slot),e.body.appendChild(t),t}function Gte(){if(typeof window>"u"||!W4e()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=U4e();if(!e||!e.body)return;if(Rf&&Rf.ownerDocument===e&&Rf.isConnected)return Rf;let t=e.querySelector(`[${Wte}]`);return t instanceof HTMLDivElement?(Rf=t,t):(Rf?.isConnected&&Rf.remove(),Rf=G4e(e),Rf)}var qte=a(E(),1),VA=(0,Yte.forwardRef)(function({container:t,...r},o){return(0,qte.jsx)(ia.Portal,{container:t??Gte(),...r,ref:o})});var Kte=a(U(),1),Qte=a(E(),1),F9="data-wp-hash";function D9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&q4e(document)),e.__wpStyleRuntime}function Y4e(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${F9}]`))if(r.getAttribute(F9)===t)return!0;return!1}function Zte(e,t,r){if(!e.head)return;let o=D9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(Y4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(F9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function q4e(e){let t=D9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Zte(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 Xte(e,t){let r=D9();r.styles.set(e,t);for(let o of r.documents.keys())Zte(o,e,t)}typeof process>"u",Xte("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var K4e={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",Xte("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 Z4e={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},jA=(0,Kte.forwardRef)(function({align:t="center",className:r,side:o="top",sideOffset:n=4,...i},s){return(0,Qte.jsx)(ia.Positioner,{ref:s,align:t,side:o,sideOffset:n,...i,className:J(K4e["box-sizing"],Z4e.positioner,r)})});var cC=a(E(),1),L9="data-wp-hash";function B9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Q4e(document)),e.__wpStyleRuntime}function X4e(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${L9}]`))if(r.getAttribute(L9)===t)return!0;return!1}function $te(e,t,r){if(!e.head)return;let o=B9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(X4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(L9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function Q4e(e){let t=B9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)$te(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 J4e(e,t){let r=B9();r.styles.set(e,t);for(let o of r.documents.keys())$te(o,e,t)}typeof process>"u",J4e("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 $4e={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},eBe={background:"#1e1e1e"},ere=(0,Jte.forwardRef)(function({portal:t,positioner:r,children:o,className:n,...i},s){let l=(0,cC.jsx)(Vte,{color:eBe,children:(0,cC.jsx)(ia.Popup,{ref:s,className:J($4e.popup,n),...i,children:o})}),c=A9(r,(0,cC.jsx)(jA,{}),l);return A9(t,(0,cC.jsx)(VA,{}),c)});var tre=a(U(),1),rre=a(E(),1),ore=(0,tre.forwardRef)(function(t,r){return(0,rre.jsx)(ia.Trigger,{ref:r,...t})});var nre=a(E(),1);function ire(e){return(0,nre.jsx)(ia.Root,{...e})}var sre=a(E(),1);function are({...e}){return(0,sre.jsx)(ia.Provider,{...e})}var Am=a(U(),1);function lre(e){let t=(0,Am.useRef)(e);t.current=e;let r=(0,Am.useRef)(null),o=(0,Am.useRef)(!1),n=(0,Am.useCallback)(()=>{o.current||(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t.current(),r.current=null},0))},[]);return(0,Am.useEffect)(()=>(o.current=!1,()=>{o.current=!0,r.current&&clearTimeout(r.current)}),[]),n}var cre=a(U(),1),V9="data-wp-hash";function j9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&rBe(document)),e.__wpStyleRuntime}function tBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${V9}]`))if(r.getAttribute(V9)===t)return!0;return!1}function ure(e,t,r){if(!e.head)return;let o=j9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(tBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(V9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function rBe(e){let t=j9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)ure(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 oBe(e,t){let r=j9();r.styles.set(e,t);for(let o of r.documents.keys())ure(o,e,t)}typeof process>"u",oBe("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 nBe={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},Jt=(0,cre.forwardRef)(function({render:t,...r},o){return dn({render:t,ref:o,props:gr({className:nBe["visually-hidden"]},r,{"data-visually-hidden":""})})});var dre=a(U(),1),fre=a(z(),1),j0=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"&&sBe(document)),e.__wpStyleRuntime}function iBe(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 pre(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(iBe(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 sBe(e){let t=H9();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 HA(e,t){let r=H9();r.styles.set(e,t);for(let o of r.documents.keys())pre(o,e,t)}typeof process>"u",HA("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var aBe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",HA("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 lBe={"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",HA("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 zA={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",HA("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 cBe={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},U9=(0,dre.forwardRef)(function({children:t,variant:r="default",tone:o="brand",openInNewTab:n=!1,render:i,className:s,...l},c){return dn({render:i,defaultTagName:"a",ref:c,props:gr(l,{className:J(cBe.a,aBe["box-sizing"],lBe["outset-ring--focus-except-active"],r!=="unstyled"&&zA.link,r!=="unstyled"&&zA[`is-${o}`],r==="unstyled"&&zA["is-unstyled"],s),target:n?"_blank":void 0,children:(0,j0.jsxs)(j0.Fragment,{children:[t,n&&(0,j0.jsx)("span",{className:zA["link-icon"],role:"img","aria-label":(0,fre.__)("(opens in a new tab)")})]})})})});var hre=a(U(),1),W9="data-wp-hash";function G9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&dBe(document)),e.__wpStyleRuntime}function uBe(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 gre(e,t,r){if(!e.head)return;let o=G9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(uBe(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 dBe(e){let t=G9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)gre(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 vre(e,t){let r=G9();r.styles.set(e,t);for(let o of r.documents.keys())gre(o,e,t)}typeof process>"u",vre("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var fBe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",vre("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 mre={skeleton:"b20cc1690085c2f0__skeleton",pulse:"_9b143194fdb45f93__pulse","skeleton-pulse":"e2b9fe0690281bc8__skeleton-pulse"},Y9=(0,hre.forwardRef)(function({render:t,...r},o){return dn({render:t,ref:o,props:gr({className:J(mre.skeleton,mre.pulse,fBe["box-sizing"]),"aria-hidden":!0},r)})});var Tn={};Wr(Tn,{List:()=>_re,Panel:()=>Rre,Root:()=>Ire,Tab:()=>Mre});var Ev=a(U(),1);var yre=a(ke(),1),UA=a(E(),1),q9="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"&&mBe(document)),e.__wpStyleRuntime}function pBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${q9}]`))if(r.getAttribute(q9)===t)return!0;return!1}function wre(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(pBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(q9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function mBe(e){let t=K9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)wre(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 hBe(e,t){let r=K9();r.styles.set(e,t);for(let o of r.documents.keys())wre(o,e,t)}typeof process>"u",hBe("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 uC={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"},bre=1,_re=(0,Ev.forwardRef)(function({children:t,variant:r="default",className:o,activateOnFocus:n,...i},s){let[l,c]=(0,Ev.useState)(null),[u,d]=(0,Ev.useState)({first:!1,last:!1,isScrolling:!1});(0,Ev.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>bre,last:A<x-bre,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,yre.useMergeRefs)([s,m=>c(m)]);return(0,UA.jsxs)(Ic.List,{ref:f,activateOnFocus:n,"data-select-on-move":n?"true":"false",className:J(uC.tablist,u.first&&uC["is-overflowing-first"],u.last&&uC["is-overflowing-last"],uC[`is-${r}-variant`],o),...i,tabIndex:i.tabIndex??(u.isScrolling?-1:void 0),children:[t,(0,UA.jsx)(Ic.Indicator,{className:uC.indicator})]})});var Tre=a(U(),1);var Bi=a(U(),1);var dC=a(E(),1),WA=!1,Z9=WA?(0,Bi.createContext)(null):null;function gBe(){let e=(0,Bi.useContext)(Z9);(0,Bi.useEffect)(()=>{if(e)return e.registerTab()},[e])}function vBe(){}var Sre=WA?gBe:vBe;function bBe(){let e=(0,Bi.useContext)(Z9);(0,Bi.useEffect)(()=>{if(e)return e.registerPanel()},[e])}function yBe(){}var xre=WA?bBe:yBe;function wBe({children:e}){let t=(0,Bi.useRef)(0),r=(0,Bi.useRef)(0),o=lre(()=>{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,Bi.useCallback)(()=>(t.current+=1,o(),()=>{t.current-=1,o()}),[o]),i=(0,Bi.useCallback)(()=>(r.current+=1,o(),()=>{r.current-=1,o()}),[o]),s=(0,Bi.useMemo)(()=>({registerTab:n,registerPanel:i}),[n,i]);return(0,dC.jsx)(Z9.Provider,{value:s,children:e})}function _Be({children:e}){return(0,dC.jsx)(dC.Fragment,{children:e})}var Cre=WA?wBe:_Be;var kre=a(E(),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"&&xBe(document)),e.__wpStyleRuntime}function SBe(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 Ere(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(SBe(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 xBe(e){let t=Q9();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 Pre(e,t){let r=Q9();r.styles.set(e,t);for(let o of r.documents.keys())Ere(o,e,t)}typeof process>"u",Pre("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 CBe={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",Pre("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 TBe={"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"},Rre=(0,Tre.forwardRef)(function({className:t,...r},o){return xre(),(0,kre.jsx)(Ic.Panel,{ref:o,className:J(CBe.div,TBe["outset-ring--focus-visible"],t),...r})});var Are=a(U(),1);var J9=a(E(),1),Ire=(0,Are.forwardRef)(function({...t},r){return(0,J9.jsx)(Cre,{children:(0,J9.jsx)(Ic.Root,{ref:r,...t})})});var Ore=a(U(),1);var fC=a(E(),1),ej="data-wp-hash";function tj(){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 EBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${ej}]`))if(r.getAttribute(ej)===t)return!0;return!1}function Nre(e,t,r){if(!e.head)return;let o=tj(),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(ej,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function PBe(e){let t=tj();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Nre(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 kBe(e,t){let r=tj();r.styles.set(e,t);for(let o of r.documents.keys())Nre(o,e,t)}typeof process>"u",kBe("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 $9={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"},Mre=(0,Ore.forwardRef)(function({className:t,children:r,...o},n){return Sre(),(0,fC.jsxs)(Ic.Tab,{ref:n,className:J($9.tab,t),...o,children:[(0,fC.jsx)("span",{className:$9["tab-children"],children:r}),(0,fC.jsx)(Pf,{icon:hr,className:$9["tab-chevron"]})]})});var Oc=a(E(),1),{PATTERN_TYPES:RBe}=ln(Dre.privateApis);function Lre({item:e}){let t=(0,Fre.__)("This pattern cannot be edited.");return(0,Oc.jsx)(A1,{item:e,className:"fields-field__pattern-title",children:e.type===RBe.theme&&(0,Oc.jsxs)(Oc.Fragment,{children:[(0,Oc.jsx)(Jt,{children:t}),(0,Oc.jsxs)(Ke.Root,{children:[(0,Oc.jsx)(Ke.Trigger,{render:(0,Oc.jsx)(xn,{icon:XB,size:24})}),(0,Oc.jsx)(Ke.Popup,{children:t})]})]})})}var ABe={type:"text",id:"title",label:(0,rj.__)("Title"),placeholder:(0,rj.__)("No title"),getValue:({item:e})=>ft(e),render:Lre,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},pC=ABe;var oj=a(Lt(),1),nj=a(z(),1);var Vre=a(E(),1);function Bre(e){return typeof e.excerpt=="string"?(0,oj.decodeEntities)(e.excerpt):(0,oj.decodeEntities)(e.excerpt?.raw||"")}var IBe={id:"excerpt",type:"text",label:(0,nj.__)("Description"),placeholder:(0,nj.__)("Add a description"),getValue:({item:e})=>Bre(e),render:({item:e})=>{let t=Bre(e);return t?(0,Vre.jsx)(ys,{children:t}):null},Edit:{control:"textarea",rows:4},enableSorting:!1,enableHiding:!1,filterBy:!1,enableGlobalSearch:!0},ij=IBe;var Pv=a(z(),1),zre=a(kl(),1);var Hre=a(E(),1),{PATTERN_SYNC_TYPES:z0,PATTERN_TYPES:OBe}=ln(zre.privateApis),jre=[{value:z0.full,label:(0,Pv._x)("Synced","pattern (singular)"),description:(0,Pv.__)("Patterns that are kept in sync across the site.")},{value:z0.unsynced,label:(0,Pv._x)("Not synced","pattern (singular)"),description:(0,Pv.__)("Patterns that can be changed freely without affecting the site.")}];function NBe(e){return e.type&&e.type!==OBe.user||e.meta?.wp_pattern_sync_status===z0.unsynced?z0.unsynced:e.wp_pattern_sync_status||z0.full}var MBe={id:"sync-status",type:"text",label:(0,Pv.__)("Sync status"),readOnly:!0,enableSorting:!1,enableHiding:!0,elements:jre,filterBy:{operators:["is"],isPrimary:!0},render:({item:e})=>{let t=NBe(e);return(0,Hre.jsx)("span",{className:`fields-field__pattern-sync-status fields-field__pattern-sync-status-${t}`,children:jre.find(({value:r})=>r===t)?.label})}},sj=MBe;var qj=a(z(),1);var Tr=a(G(),1),Fv=a(GA(),1),Wj=a(ne(),1),IC=a(Y(),1),Yr=a(U(),1),Ss=a(z(),1);var Woe=a(Pl(),1),J0=a(yf(),1),Goe=a(It(),1);var lj=hC(),pt=e=>mC(e,lj),cj=hC();pt.write=e=>mC(e,cj);var YA=hC();pt.onStart=e=>mC(e,YA);var uj=hC();pt.onFrame=e=>mC(e,uj);var dj=hC();pt.onFinish=e=>mC(e,dj);var H0=[];pt.setTimeout=(e,t)=>{let r=pt.now()+t,o=()=>{let i=H0.findIndex(s=>s.cancel==o);~i&&H0.splice(i,1),Om-=~i?1:0},n={time:r,handler:e,cancel:o};return H0.splice(Wre(r),0,n),Om+=1,Gre(),n};var Wre=e=>~(~H0.findIndex(t=>t.time>e)||~H0.length);pt.cancel=e=>{YA.delete(e),uj.delete(e),dj.delete(e),lj.delete(e),cj.delete(e)};pt.sync=e=>{aj=!0,pt.batchedUpdates(e),aj=!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=()=>{YA.delete(r),t=null},o};var fj=typeof window<"u"?window.requestAnimationFrame:()=>{};pt.use=e=>fj=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"):qre()};var Im=-1,Om=0,aj=!1;function mC(e,t){aj?(t.delete(e),e(0)):(t.add(e),Gre())}function Gre(){Im<0&&(Im=0,pt.frameLoop!=="demand"&&fj(Yre))}function FBe(){Im=-1}function Yre(){~Im&&(fj(Yre),pt.batchedUpdates(qre))}function qre(){let e=Im;Im=pt.now();let t=Wre(Im);if(t&&(Kre(H0.splice(0,t),r=>r.handler()),Om-=t),!Om){FBe();return}YA.flush(),lj.flush(e?Math.min(64,Im-e):16.667),uj.flush(),cj.flush(),dj.flush()}function hC(){let e=new Set,t=e;return{add(r){Om+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return Om-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,Om-=t.size,Kre(t,o=>o(r)&&e.add(o)),Om+=e.size,t=e)}}}function Kre(e,t){e.forEach(r=>{try{t(r)}catch(o){pt.catch(o)}})}var Il=a(_e());function QA(){}var eoe=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),Ne={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 Hu(e,t){if(Ne.arr(e)){if(!Ne.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 Nr=(e,t)=>e.forEach(t);function Ol(e,t,r){if(Ne.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 sa=e=>Ne.und(e)?[]:Ne.arr(e)?e:[e];function Y0(e,t){if(e.size){let r=Array.from(e);e.clear(),Nr(r,t)}}var q0=(e,...t)=>Y0(e,r=>r(...t)),bj=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),yj,toe,Nm=null,roe=!1,wj=QA,DBe=e=>{e.to&&(toe=e.to),e.now&&(pt.now=e.now),e.colors!==void 0&&(Nm=e.colors),e.skipAnimation!=null&&(roe=e.skipAnimation),e.createStringInterpolator&&(yj=e.createStringInterpolator),e.requestAnimationFrame&&pt.use(e.requestAnimationFrame),e.batchedUpdates&&(pt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(wj=e.willAdvance),e.frameLoop&&(pt.frameLoop=e.frameLoop)},$a=Object.freeze({__proto__:null,get createStringInterpolator(){return yj},get to(){return toe},get colors(){return Nm},get skipAnimation(){return roe},get willAdvance(){return wj},assign:DBe}),gC=new Set,Al=[],pj=[],ZA=0,K0={get idle(){return!gC.size&&!Al.length},start(e){ZA>e.priority?(gC.add(e),pt.onStart(LBe)):(ooe(e),pt(gj))},advance:gj,sort(e){if(ZA)pt.onFrame(()=>K0.sort(e));else{let t=Al.indexOf(e);~t&&(Al.splice(t,1),noe(e))}},clear(){Al=[],gC.clear()}};function LBe(){gC.forEach(ooe),gC.clear(),pt(gj)}function ooe(e){Al.includes(e)||noe(e)}function noe(e){Al.splice(BBe(Al,t=>t.priority>e.priority),0,e)}function gj(e){let t=pj;for(let r=0;r<Al.length;r++){let o=Al[r];ZA=o.priority,o.idle||(wj(o),o.advance(e),o.idle||t.push(o))}return ZA=0,pj=Al,pj.length=0,Al=t,Al.length>0}function BBe(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},Nc="[-+]?\\d*\\.?\\d+",XA=Nc+"%";function JA(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var VBe=new RegExp("rgb"+JA(Nc,Nc,Nc)),jBe=new RegExp("rgba"+JA(Nc,Nc,Nc,Nc)),zBe=new RegExp("hsl"+JA(Nc,XA,XA)),HBe=new RegExp("hsla"+JA(Nc,XA,XA,Nc)),UBe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,WBe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,GBe=/^#([0-9a-fA-F]{6})$/,YBe=/^#([0-9a-fA-F]{8})$/;function qBe(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=GBe.exec(e))?parseInt(t[1]+"ff",16)>>>0:Nm&&Nm[e]!==void 0?Nm[e]:(t=VBe.exec(e))?(U0(t[1])<<24|U0(t[2])<<16|U0(t[3])<<8|255)>>>0:(t=jBe.exec(e))?(U0(t[1])<<24|U0(t[2])<<16|U0(t[3])<<8|Qre(t[4]))>>>0:(t=UBe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=YBe.exec(e))?parseInt(t[1],16)>>>0:(t=WBe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=zBe.exec(e))?(Zre(Xre(t[1]),qA(t[2]),qA(t[3]))|255)>>>0:(t=HBe.exec(e))?(Zre(Xre(t[1]),qA(t[2]),qA(t[3]))|Qre(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 Zre(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 U0(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Xre(e){return(parseFloat(e)%360+360)%360/360}function Qre(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function qA(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Jre(e){let t=qBe(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 Mm=(e,t,r)=>{if(Ne.fun(e))return e;if(Ne.arr(e))return Mm({range:e,output:t,extrapolate:r});if(Ne.str(e.output[0]))return yj(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=ZBe(u,i);return KBe(u,i[d],i[d+1],n[d],n[d+1],c,s,l,o.map)}};function KBe(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 ZBe(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function vj(){return vj=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},vj.apply(this,arguments)}var W0=Symbol.for("FluidValue.get"),kv=Symbol.for("FluidValue.observers"),ws=e=>!!(e&&e[W0]),fi=e=>e&&e[W0]?e[W0]():e,_j=e=>e[kv]||null;function XBe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Rv(e,t){let r=e[kv];r&&r.forEach(o=>{XBe(o,t)})}var G0=class{constructor(t){if(this[W0]=void 0,this[kv]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");QBe(this,t)}},QBe=(e,t)=>soe(e,W0,t);function Fm(e,t){if(e[W0]){let r=e[kv];r||soe(e,kv,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Dm(e,t){let r=e[kv];if(r&&r.has(t)){let o=r.size-1;o?r.delete(t):e[kv]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var soe=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),KA=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,JBe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,$re=new RegExp(`(${KA.source})(%|[a-z]+)`,"i"),$Be=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,$A=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,aoe=e=>{let[t,r]=eVe(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&&$A.test(r))return aoe(r);if(r)return r}return e},eVe=e=>{let t=$A.exec(e);if(!t)return[,];let[,r,o]=t;return[r,o]},hj,tVe=(e,t,r,o,n)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(o)}, ${n})`,eI=e=>{hj||(hj=Nm?new RegExp(`(${Object.keys(Nm).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>fi(i).replace($A,aoe).replace(JBe,Jre).replace(hj,Jre)),r=t.map(i=>i.match(KA).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=>Mm(vj({},e,{output:i})));return i=>{var s;let l=!$re.test(t[0])&&((s=t.find(u=>$re.test(u)))==null?void 0:s.replace(KA,"")),c=0;return t[0].replace(KA,()=>`${n[c++](i)}${l||""}`).replace($Be,tVe)}},loe="react-spring: ",coe=e=>{let t=e,r=!1;if(typeof t!="function")throw new TypeError(`${loe}once requires a function parameter`);return(...o)=>{r||(t(...o),r=!0)}},rVe=coe(console.warn);function uoe(){rVe(`${loe}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var eRt=coe(console.warn);function Z0(e){return Ne.str(e)&&(e[0]=="#"||/\d/.test(e)||!bj()&&$A.test(e)||e in(Nm||{}))}var vC=bj()?Il.useEffect:Il.useLayoutEffect,oVe=()=>{let e=(0,Il.useRef)(!1);return vC(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Sj(){let e=(0,Il.useState)()[1],t=oVe();return()=>{t.current&&e(Math.random())}}function doe(e,t){let[r]=(0,Il.useState)(()=>({inputs:t,result:e()})),o=(0,Il.useRef)(),n=o.current,i=n;return i?t&&i.inputs&&nVe(t,i.inputs)||(i={inputs:t,result:e()}):i=r,(0,Il.useEffect)(()=>{o.current=i,n==r&&(r.inputs=r.result=void 0)},[i]),i.result}function nVe(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 xj=e=>(0,Il.useEffect)(e,iVe),iVe=[];var PC=a(_e()),kC=a(_e());var hoe=a(_e()),Af=a(_e()),bC=Symbol.for("Animated:node"),sVe=e=>!!e&&e[bC]===e,Mc=e=>e&&e[bC],nI=(e,t)=>eoe(e,bC,t),yC=e=>e&&e[bC]&&e[bC].getPayload(),tI=class{constructor(){this.payload=void 0,nI(this,this)}getPayload(){return this.payload||[]}},Av=class e extends tI{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,Ne.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 Ne.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,Ne.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Iv=class e extends Av{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=Mm({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(Ne.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=Mm({output:[this.getValue(),t]})),this._value=0,super.reset()}},rI={dependencies:null},Ov=class extends tI{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let r={};return Ol(this.source,(o,n)=>{sVe(o)?r[n]=o.getValue(t):ws(o)?r[n]=fi(o):t||(r[n]=o)}),r}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&Nr(this.payload,t=>t.reset())}_makePayload(t){if(t){let r=new Set;return Ol(t,this._addToPayload,r),Array.from(r)}}_addToPayload(t){rI.dependencies&&ws(t)&&rI.dependencies.add(t);let r=yC(t);r&&Nr(r,o=>this.add(o))}},Cj=class e extends Ov{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(aVe)),!0)}};function aVe(e){return(Z0(e)?Iv:Av).create(e)}function iI(e){let t=Mc(e);return t?t.constructor:Ne.arr(e)?Cj:Z0(e)?Iv:Av}function oI(){return oI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},oI.apply(this,arguments)}var foe=(e,t)=>{let r=!Ne.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Af.forwardRef)((o,n)=>{let i=(0,Af.useRef)(null),s=r&&(0,Af.useCallback)(g=>{i.current=cVe(n,g)},[n]),[l,c]=lVe(o,t),u=Sj(),d=()=>{let g=i.current;if(r&&!g)return;(g?t.applyAnimatedValues(g,l.getValue(!0)):!1)===!1&&u()},f=new Tj(d,c),m=(0,Af.useRef)();vC(()=>(m.current=f,Nr(c,g=>Fm(g,f)),()=>{m.current&&(Nr(m.current.deps,g=>Dm(g,m.current)),pt.cancel(m.current.update))})),(0,Af.useEffect)(d,[]),xj(()=>()=>{let g=m.current;Nr(g.deps,v=>Dm(v,g))});let h=t.getComponentProps(l.getValue());return hoe.createElement(e,oI({},h,{ref:s}))})},Tj=class{constructor(t,r){this.update=t,this.deps=r}eventObserved(t){t.type=="change"&&pt.write(this.update)}};function lVe(e,t){let r=new Set;return rI.dependencies=r,e.style&&(e=oI({},e,{style:t.createAnimatedStyle(e.style)})),e=new Ov(e),rI.dependencies=null,[e,r]}function cVe(e,t){return e&&(Ne.fun(e)?e(t):e.current=t),t}var poe=Symbol.for("AnimatedComponent"),goe=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=n=>new Ov(n),getComponentProps:o=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:o},i=s=>{let l=moe(s)||"Anonymous";return Ne.str(s)?s=i[s]||(i[s]=foe(s,n)):s=s[poe]||(s[poe]=foe(s,n)),s.displayName=`Animated(${l})`,s};return Ol(e,(s,l)=>{Ne.arr(e)&&(l=moe(s)),i[l]=i(s)}),{animated:i}},moe=e=>Ne.str(e)?e:e&&Ne.str(e.displayName)?e.displayName:Ne.fun(e)&&e.name||null;function _s(){return _s=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},_s.apply(this,arguments)}function Nv(e,...t){return Ne.fun(e)?e(...t):e}var xC=(e,t)=>e===!0||!!(t&&e&&(Ne.fun(e)?e(t):sa(e).includes(t))),koe=(e,t)=>Ne.obj(e)?t&&e[t]:e,Roe=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,uVe=e=>e,Aoe=(e,t=uVe)=>{let r=dVe;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);Ne.und(i)||(o[n]=i)}return o},dVe=["config","onProps","onStart","onChange","onPause","onResume","onRest"],fVe={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 pVe(e){let t={},r=0;if(Ol(e,(o,n)=>{fVe[n]||(t[n]=o,r++)}),r)return t}function Ioe(e){let t=pVe(e);if(t){let r={to:t};return Ol(e,(o,n)=>n in t||(r[n]=o)),r}return _s({},e)}function CC(e){return e=fi(e),Ne.arr(e)?e.map(CC):Z0(e)?$a.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function kj(e){return Ne.fun(e)||Ne.arr(e)&&Ne.obj(e[0])}var mVe={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}},lI=1.70158,sI=lI*1.525,voe=lI+1,boe=2*Math.PI/3,yoe=2*Math.PI/4.5,aI=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,hVe={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=>voe*e*e*e-lI*e*e,easeOutBack:e=>1+voe*Math.pow(e-1,3)+lI*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((sI+1)*2*e-sI)/2:(Math.pow(2*e-2,2)*((sI+1)*(e*2-2)+sI)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*boe),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*boe)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*yoe))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*yoe)/2+1,easeInBounce:e=>1-aI(1-e),easeOutBounce:aI,easeInOutBounce:e=>e<.5?(1-aI(1-2*e))/2:(1+aI(2*e-1))/2},Rj=_s({},mVe.default,{mass:1,damping:1,easing:hVe.linear,clamp:!1}),Aj=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,Rj)}};function gVe(e,t,r){r&&(r=_s({},r),woe(r,t),t=_s({},r,t)),woe(e,t),Object.assign(e,t);for(let s in Rj)e[s]==null&&(e[s]=Rj[s]);let{mass:o,frequency:n,damping:i}=e;return Ne.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 woe(e,t){if(!Ne.und(t.decay))e.duration=void 0;else{let r=!Ne.und(t.tension)||!Ne.und(t.friction);(r||!Ne.und(t.frequency)||!Ne.und(t.damping)||!Ne.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var _oe=[],Ij=class{constructor(){this.changed=!1,this.values=_oe,this.toValues=null,this.fromValues=_oe,this.to=void 0,this.from=void 0,this.config=new Aj,this.immediate=!1}};function Ooe(e,{key:t,props:r,defaultProps:o,state:n,actions:i}){return new Promise((s,l)=>{var c;let u,d,f=xC((c=r.cancel)!=null?c:o?.cancel,t);if(f)g();else{Ne.und(r.pause)||(n.paused=xC(r.pause,t));let v=o?.pause;v!==!0&&(v=n.paused||xC(v,t)),u=Nv(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&&!$a.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(_s({},r,{callId:e,cancel:f}),s)}catch(v){l(v)}}})}var Bj=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?X0(e.get()):t.every(r=>r.noop)?Noe(e.get()):Fc(e.get(),t.every(r=>r.finished)),Noe=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Fc=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),X0=e=>({value:e,cancelled:!0,finished:!1});function Moe(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=Aoe(t,(b,_)=>_==="onRest"?void 0:b),d,f,m=new Promise((b,_)=>(d=b,f=_)),h=b=>{let _=n<=(r.cancelId||0)&&X0(o)||n!==r.asyncId&&Fc(o,!1);if(_)throw b.result=_,f(b),b},g=(b,_)=>{let y=new cI,w=new uI;return(async()=>{if($a.skipAnimation)throw TC(r),w.result=Fc(o,!1),f(w),w;h(y);let S=Ne.obj(b)?_s({},b):_s({},_,{to:b});S.parentId=n,Ol(u,(C,A)=>{Ne.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($a.skipAnimation)return TC(r),Fc(o,!1);try{let b;Ne.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=Fc(o.get(),!0,!1)}catch(b){if(b instanceof cI)v=b.result;else if(b instanceof uI)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 Ne.fun(s)&&pt.batchedUpdates(()=>{s(v,o,o.item)}),v})()}function TC(e,t){Y0(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var cI=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}},uI=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},Oj=e=>e instanceof EC,vVe=1,EC=class extends G0{constructor(...t){super(...t),this.id=vVe++,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=Mc(this);return t&&t.getValue()}to(...t){return $a.to(this,t)}interpolate(...t){return uoe(),$a.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){Rv(this,{type:"change",parent:this,value:t,idle:r})}_onPriorityChange(t){this.idle||K0.sort(this),Rv(this,{type:"priority",parent:this,priority:t})}},Mv=Symbol.for("SpringPhase"),Foe=1,Nj=2,Mj=4,Ej=e=>(e[Mv]&Foe)>0,Lm=e=>(e[Mv]&Nj)>0,wC=e=>(e[Mv]&Mj)>0,Soe=(e,t)=>t?e[Mv]|=Nj|Foe:e[Mv]&=~Nj,xoe=(e,t)=>t?e[Mv]|=Mj:e[Mv]&=~Mj,Fj=class extends EC{constructor(t,r){if(super(),this.key=void 0,this.animation=new Ij,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,!Ne.und(t)||!Ne.und(r)){let o=Ne.obj(t)?_s({},t):_s({},r,{from:t});Ne.und(o.default)&&(o.default=!0),this.start(o)}}get idle(){return!(Lm(this)||this._state.asyncTo)||wC(this)}get goal(){return fi(this.animation.to)}get velocity(){let t=Mc(this);return t instanceof Av?t.lastVelocity||0:t.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return Ej(this)}get isAnimating(){return Lm(this)}get isPaused(){return wC(this)}get isDelayed(){return this._state.delayed}advance(t){let r=!0,o=!1,n=this.animation,{config:i,toValues:s}=n,l=yC(n.to);!l&&ws(n.to)&&(s=sa(fi(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==Iv?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=Ne.arr(i.velocity)?i.velocity[f]:i.velocity,y,w=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(Ne.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=!Ne.und(x),A=b==m?d.v0>0:b<m,k,R=!1,N=1,P=Math.ceil(t/N);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 M=-i.tension*1e-6*(g-m),j=-i.friction*.001*y,F=(M+j)/i.mass;y=y+F*N,g=g+y*N}}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=Mc(this),u=c.getValue();if(r){let d=fi(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(Lm(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 Ne.und(t)?(o=this.queue||[],this.queue=[]):o=[Ne.obj(t)?t:_s({},r,{to:t})],Promise.all(o.map(n=>this._update(n))).then(n=>Bj(this,n))}stop(t){let{to:r}=this.animation;return this._focus(this.get()),TC(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=Ne.obj(o)?o[r]:o,(o==null||kj(o))&&(o=void 0),n=Ne.obj(n)?n[r]:n,n==null&&(n=void 0);let i={to:o,from:n};return Ej(this)||(t.reverse&&([o,n]=[n,o]),n=fi(n),Ne.und(n)?Mc(this)||this._set(o):this._set(n)),i}_update(t,r){let o=_s({},t),{key:n,defaultProps:i}=this;o.default&&Object.assign(i,Aoe(o,(c,u)=>/^on/.test(u)?koe(c,n):c)),Toe(this,o,"onProps"),SC(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 Ooe(++this._lastCallId,{key:n,props:o,defaultProps:i,state:l,actions:{pause:()=>{wC(this)||(xoe(this,!0),q0(l.pauseQueue),SC(this,"onPause",Fc(this,_C(this,this.animation.to)),this))},resume:()=>{wC(this)&&(xoe(this,!1),Lm(this)&&this._resume(),q0(l.resumeQueue),SC(this,"onResume",Fc(this,_C(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(o.loop&&c.finished&&!(r&&c.noop)){let u=Doe(o);if(u)return this._update(u,!0)}return c})}_merge(t,r,o){if(r.cancel)return this.stop(!0),o(X0(this));let n=!Ne.und(t.to),i=!Ne.und(t.from);if(n||i)if(r.callId>this._lastToId)this._lastToId=r.callId;else return o(X0(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||Ne.und(f))&&(f=m),r.reverse&&([f,m]=[m,f]);let h=!Hu(m,d);h&&(c.from=m),m=fi(m);let g=!Hu(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&&gVe(b,Nv(r.config,s),r.config!==l.config?Nv(l.config,s):void 0);let w=Mc(this);if(!w||Ne.und(f))return o(Fc(this,!0));let S=Ne.und(r.reset)?i&&!r.default:!Ne.und(m)&&xC(r.reset,s),x=S?m:this.get(),C=CC(f),A=Ne.num(C)||Ne.arr(C)||Z0(C),k=!v&&(!A||xC(l.immediate||r.immediate,s));if(g){let T=iI(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,N=ws(f),P=!1;if(!N){let T=S||!Ej(this)&&h;(g||T)&&(P=Hu(CC(x),C),N=!P),(!Hu(c.immediate,k)&&!k||!Hu(b.decay,_)||!Hu(b.velocity,y))&&(N=!0)}if(P&&Lm(this)&&(c.changed&&!S?N=!0:N||this._stop(u)),!v&&((N||ws(u))&&(c.values=w.getPayload(),c.toValues=ws(f)?null:R==Iv?[1]:sa(C)),c.immediate!=k&&(c.immediate=k,!k&&!S&&this._set(u)),N)){let{onRest:T}=c;Nr(bVe,j=>Toe(this,r,j));let M=Fc(this,_C(this,u));q0(this._pendingCalls,M),this._pendingCalls.add(o),c.changed&&pt.batchedUpdates(()=>{c.changed=!S,T?.(M,this),S?Nv(l.onRest,M):c.onStart==null||c.onStart(M,this)})}S&&this._set(x),v?o(Moe(r.to,r,this._state,this)):N?this._start():Lm(this)&&!g?this._pendingCalls.add(o):o(Noe(x))}_focus(t){let r=this.animation;t!==r.to&&(_j(this)&&this._detach(),r.to=t,_j(this)&&this._attach())}_attach(){let t=0,{to:r}=this.animation;ws(r)&&(Fm(r,this),Oj(r)&&(t=r.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;ws(t)&&Dm(t,this)}_set(t,r=!0){let o=fi(t);if(!Ne.und(o)){let n=Mc(this);if(!n||!Hu(o,n.getValue())){let i=iI(o);!n||n.constructor!=i?nI(this,i.create(o)):n.setValue(o),n&&pt.batchedUpdates(()=>{this._onChange(o,r)})}}return Mc(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,SC(this,"onStart",Fc(this,_C(this,t.to)),this))}_onChange(t,r){r||(this._onStart(),Nv(this.animation.onChange,t,this)),Nv(this.defaultProps.onChange,t,this),super._onChange(t,r)}_start(){let t=this.animation;Mc(this).reset(fi(t.to)),t.immediate||(t.fromValues=t.values.map(r=>r.lastPosition)),Lm(this)||(Soe(this,!0),wC(this)||this._resume())}_resume(){$a.skipAnimation?this.finish():K0.start(this)}_stop(t,r){if(Lm(this)){Soe(this,!1);let o=this.animation;Nr(o.values,i=>{i.done=!0}),o.toValues&&(o.onChange=o.onPause=o.onResume=void 0),Rv(this,{type:"idle",parent:this});let n=r?X0(this.get()):Fc(this.get(),_C(this,t??o.to));q0(this._pendingCalls,n),o.changed&&(o.changed=!1,SC(this,"onRest",n,this))}}};function _C(e,t){let r=CC(t),o=CC(e.get());return Hu(o,r)}function Doe(e,t=e.loop,r=e.to){let o=Nv(t);if(o){let n=o!==!0&&Ioe(o),i=(n||e).reverse,s=!n||n.reset;return Dj(_s({},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 Dj(e){let{to:t,from:r}=e=Ioe(e),o=new Set;return Ne.obj(t)&&Coe(t,o),Ne.obj(r)&&Coe(r,o),e.keys=o.size?Array.from(o):null,e}function Coe(e,t){Ol(e,(r,o)=>r!=null&&t.add(o))}var bVe=["onStart","onRest","onChange","onPause","onResume"];function Toe(e,t,r){e.animation[r]=t[r]!==Roe(t,r)?koe(t[r],e.key):void 0}function SC(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 yVe=["onStart","onChange","onRest"],wVe=1,dI=class{constructor(t,r){this.id=wVe++,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(_s({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];Ne.und(o)||this.springs[r].set(o)}}update(t){return t&&this.queue.push(Dj(t)),this}start(t){let{queue:r}=this;return t?r=sa(t).map(Dj):this.queue=[],this._flush?this._flush(this,r):(Boe(this,r),_Ve(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){let o=this.springs;Nr(sa(r),n=>o[n].stop(!!t))}else TC(this._state,this._lastAsyncId),this.each(o=>o.stop(!!t));return this}pause(t){if(Ne.und(t))this.start({pause:!0});else{let r=this.springs;Nr(sa(t),o=>r[o].pause())}return this}resume(t){if(Ne.und(t))this.start({pause:!1});else{let r=this.springs;Nr(sa(t),o=>r[o].resume())}return this}each(t){Ol(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,Y0(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&&Y0(r,([c,u])=>{u.value=l,c(u,this,this._item)}),s&&(this._started=!1,Y0(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 _Ve(e,t){return Promise.all(t.map(r=>Loe(e,r))).then(r=>Bj(e,r))}async function Loe(e,t,r){let{keys:o,to:n,from:i,loop:s,onRest:l,onResolve:c}=t,u=Ne.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=Ne.arr(n)||Ne.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Nr(yVe,v=>{let b=t[v];if(Ne.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,q0(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||Roe(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(Ooe(++e._lastAsyncId,{props:t,state:f,actions:{pause:QA,resume:QA,start(v,b){h?(TC(f,e._lastAsyncId),b(X0(e))):(v.onRest=l,b(Moe(d,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});let g=Bj(e,await Promise.all(m));if(s&&g.finished&&!(r&&g.noop)){let v=Doe(t,s,n);if(v)return Boe(e,[v]),Loe(e,v,!0)}return c&&pt.batchedUpdates(()=>c(g,e,e.item)),g}function SVe(e,t){let r=new Fj;return r.key=e,t&&Fm(r,t),r}function xVe(e,t,r){t.keys&&Nr(t.keys,o=>{(e[o]||(e[o]=r(o)))._prepareNode(t)})}function Boe(e,t){Nr(t,r=>{xVe(e.springs,r,o=>SVe(o,e))})}function CVe(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 TVe=["children"],Vj=e=>{let{children:t}=e,r=CVe(e,TVe),o=(0,kC.useContext)(fI),n=r.pause||!!o.pause,i=r.immediate||!!o.immediate;r=doe(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=fI;return PC.createElement(s,{value:r},t)},fI=EVe(Vj,{});Vj.Provider=fI.Provider;Vj.Consumer=fI.Consumer;function EVe(e,t){return Object.assign(e,PC.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Eoe;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(Eoe||(Eoe={}));var Lj=class extends EC{constructor(t,r){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Mm(...r);let o=this._get(),n=iI(o);nI(this,n.create(o))}advance(t){let r=this._get(),o=this.get();Hu(r,o)||(Mc(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&Poe(this._active)&&Pj(this)}_get(){let t=Ne.arr(this.source)?this.source.map(fi):sa(fi(this.source));return this.calc(...t)}_start(){this.idle&&!Poe(this._active)&&(this.idle=!1,Nr(yC(this),t=>{t.done=!1}),$a.skipAnimation?(pt.batchedUpdates(()=>this.advance()),Pj(this)):K0.start(this))}_attach(){let t=1;Nr(sa(this.source),r=>{ws(r)&&Fm(r,this),Oj(r)&&(r.idle||this._active.add(r),t=Math.max(t,r.priority+1))}),this.priority=t,this._start()}_detach(){Nr(sa(this.source),t=>{ws(t)&&Dm(t,this)}),this._active.clear(),Pj(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=sa(this.source).reduce((r,o)=>Math.max(r,(Oj(o)?o.priority:0)+1),0))}};function PVe(e){return e.idle!==!1}function Poe(e){return!e.size||Array.from(e).every(PVe)}function Pj(e){e.idle||(e.idle=!0,Nr(yC(e),t=>{t.done=!0}),Rv(e,{type:"idle",parent:e}))}$a.assign({createStringInterpolator:eI,to:(e,t)=>new Lj(e,t)});var uRt=K0.advance;var joe=a(Du());function Uj(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 kVe=["style","children","scrollTop","scrollLeft"],zoe=/^--/;function RVe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!zoe.test(e)&&!(RC.hasOwnProperty(e)&&RC[e])?t+"px":(""+t).trim()}var Voe={};function AVe(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=Uj(o,kVe),u=Object.values(c),d=Object.keys(c).map(f=>r||e.hasAttribute(f)?f:Voe[f]||(Voe[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=RVe(f,n[f]);zoe.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 RC={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},IVe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),OVe=["Webkit","Ms","Moz","O"];RC=Object.keys(RC).reduce((e,t)=>(OVe.forEach(r=>e[IVe(r,t)]=e[t]),e),RC);var NVe=["x","y","z"],MVe=/^(matrix|translate|scale|rotate|skew)/,FVe=/^(translate)/,DVe=/^(rotate|skew)/,jj=(e,t)=>Ne.num(e)&&e!==0?e+t:e,pI=(e,t)=>Ne.arr(e)?e.every(r=>pI(r,t)):Ne.num(e)?e===t:parseFloat(e)===t,zj=class extends Ov{constructor(t){let{x:r,y:o,z:n}=t,i=Uj(t,NVe),s=[],l=[];(r||o||n)&&(s.push([r||0,o||0,n||0]),l.push(c=>[`translate3d(${c.map(u=>jj(u,"px")).join(",")})`,pI(c,0)])),Ol(i,(c,u)=>{if(u==="transform")s.push([c||""]),l.push(d=>[d,d===""]);else if(MVe.test(u)){if(delete i[u],Ne.und(c))return;let d=FVe.test(u)?"px":DVe.test(u)?"deg":"";s.push(sa(c)),l.push(u==="rotate3d"?([f,m,h,g])=>[`rotate3d(${f},${m},${h},${jj(g,d)})`,pI(g,0)]:f=>[`${u}(${f.map(m=>jj(m,d)).join(",")})`,pI(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new Hj(s,l)),super(i)}},Hj=class extends G0{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 Nr(this.inputs,(o,n)=>{let i=fi(o[0]),[s,l]=this.transforms[n](Ne.arr(i)?i:o.map(fi));t+=" "+s,r=r&&l}),r?"none":t}observerAdded(t){t==1&&Nr(this.inputs,r=>Nr(r,o=>ws(o)&&Fm(o,this)))}observerRemoved(t){t==0&&Nr(this.inputs,r=>Nr(r,o=>ws(o)&&Dm(o,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Rv(this,t)}},LVe=["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"],BVe=["scrollTop","scrollLeft"];$a.assign({batchedUpdates:joe.unstable_batchedUpdates,createStringInterpolator:eI,colors:ioe});var VVe=goe(LVe,{applyAnimatedValues:AVe,createAnimatedStyle:e=>new zj(e),getComponentProps:e=>Uj(e,BVe)}),bRt=VVe.animated;var AC=a(U(),1);function Hoe(e){return{top:e.offsetTop,left:e.offsetLeft}}function Uoe(e){let t=(0,AC.useRef)(null),r=(0,AC.useRef)(void 0);return t.current&&(r.current=Hoe(t.current)),(0,AC.useLayoutEffect)(()=>{let o=r.current;if(!o||!t.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=new dI({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=Hoe(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:jVe}=ln(J0.privateApis);function Yoe({children:e,index:t,className:r}){let o=Uoe(t);return(0,Be.jsx)("div",{ref:o,className:r,children:e})}function Q0(e){return Array.isArray(e)?e:e?[e]:[]}function zVe({render:e,multiple:t,...r}){let[o,n]=(0,Yr.useState)(!1);return window.__experimentalDataViewsMediaModal?(0,Be.jsxs)(Be.Fragment,{children:[e&&e({open:()=>n(!0)}),o&&(0,Be.jsx)(jVe,{...r,multiple:t,isOpen:o,onClose:()=>{n(!1),r.onClose?.()},onSelect:i=>{n(!1),r.onSelect?.(i)}})]}):(0,Be.jsx)(J0.MediaUpload,{...r,render:e,multiple:t?"add":void 0})}function Gj({open:e,children:t,label:r,showTooltip:o=!1,onFilesDrop:n,attachment:i,isUploading:s=!1}){let l=i&&(0,Fv.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)(Tr.Spinner,{})}),!s&&(0,Be.jsx)(Tr.DropZone,{onFilesDrop:u=>n(u,i?.id)})]});return o?(0,Be.jsxs)(Ke.Root,{children:[(0,Be.jsx)(Ke.Trigger,{render:c}),(0,Be.jsx)(Ke.Popup,{children:r})]}):c}var HVe=["application/zip","application/x-zip-compressed","application/x-rar-compressed","application/x-7z-compressed","application/x-tar","application/x-gzip"];function UVe({attachment:e}){return(0,Be.jsx)(Tr.__experimentalTruncate,{className:"fields__media-edit-filename",children:e.title.rendered})}function qoe(e){return(0,Be.jsx)(Gj,{...e,children:(0,Be.jsx)("span",{className:"fields__media-edit-placeholder",children:e.label})})}function Koe({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)(Tr.Button,{__next40pxDefaultSize:!0,icon:s?kr:tB,label:s?(0,Ss.__)("Move left"):(0,Ss.__)("Move up"),size:"small",disabled:o||t===0,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"up")}}),(0,Be.jsx)(Tr.Button,{__next40pxDefaultSize:!0,icon:s?hr:Vx,label:s?(0,Ss.__)("Move right"):(0,Ss.__)("Move down"),size:"small",disabled:o||t===r-1,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"down")}})]})}function Zoe({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)(Tr.Icon,{icon:B4}):r.startsWith("video")?(0,Be.jsx)(Tr.Icon,{icon:YV}):HVe.includes(r)?(0,Be.jsx)(Tr.Icon,{icon:E4}):(0,Be.jsx)(Tr.Icon,{icon:kB})}function WVe({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,Fv.isBlobURL)(u.source_url),h=u.id;return(0,Be.jsxs)(Yoe,{index:d,className:J("fields__media-edit-expanded-item",{"has-preview-image":f}),children:[(0,Be.jsx)(Gj,{open:()=>{c(h),i()},label:m?(0,Ss.__)("Replace"):(0,Ss.sprintf)((0,Ss.__)("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)(Tr.__experimentalVStack,{spacing:0,alignment:"center",justify:"center",className:"fields__media-edit-expanded-preview-stack",children:(!m||f)&&(0,Be.jsx)(Zoe,{attachment:u})})})}),!m&&(0,Be.jsx)("div",{className:"fields__media-edit-expanded-overlay",children:(0,Be.jsxs)(Tr.__experimentalHStack,{className:"fields__media-edit-expanded-actions",spacing:0,alignment:"flex-end",expanded:!1,children:[r&&e.length>1&&(0,Be.jsx)(Koe,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"horizontal"}),(0,Be.jsx)(Tr.Button,{__next40pxDefaultSize:!0,icon:Ii,label:(0,Ss.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})})]},u.id)}),(r||!e?.length)&&(0,Be.jsx)(qoe,{open:()=>{c(void 0),i()},label:t,onFilesDrop:s,isUploading:l})]})}function GVe({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)(Tr.__experimentalVStack,{spacing:0,children:e.map((u,d)=>{let f=(0,Fv.isBlobURL)(u.source_url),m=r&&e.length>1,h=u.id;return(0,Be.jsxs)(Yoe,{index:d,className:"fields__media-edit-compact",children:[(0,Be.jsx)(Gj,{open:()=>{c(h),i()},label:(0,Ss.__)("Replace"),showTooltip:!0,onFilesDrop:s,attachment:u,isUploading:l,children:(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(Zoe,{attachment:u}),!f&&(0,Be.jsx)(UVe,{attachment:u})]})}),!f&&(0,Be.jsxs)(Tr.__experimentalHStack,{className:"fields__media-edit-compact-movers",spacing:0,alignment:"flex-end",expanded:!1,children:[m&&(0,Be.jsx)(Koe,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"vertical"}),(0,Be.jsx)(Tr.Button,{__next40pxDefaultSize:!0,icon:Ii,label:(0,Ss.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})]},u.id)})})}),(r||!e?.length)&&(0,Be.jsx)(qoe,{open:()=>{c(void 0),i()},label:t,onFilesDrop:s,isUploading:l})]})}function Xoe({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,Yr.useState)(!1),f=(0,Yr.useRef)(null),[m,h]=(0,Yr.useState)(void 0);(0,Yr.useEffect)(()=>{let L=f.current,O=()=>{d(!0)};return L?.addEventListener("invalid",O),()=>L?.removeEventListener("invalid",O)},[]);let g=(0,IC.useSelect)(L=>{if(!c)return null;let V=Q0(c).toSorted((q,Z)=>q-Z),{getEntityRecords:W}=L(Wj.store);return W("postType","attachment",{include:V})},[c]),v=(0,Yr.useRef)(null);g!==null&&(v.current=g);let b=g;if(g===null&&v.current&&c){let L=new Set(v.current.map(O=>O.id));Q0(c).every(O=>L.has(O))&&(b=v.current)}let _=(0,Yr.useMemo)(()=>{if(!b)return null;let L=Q0(c),O=new Map(b.map(V=>[V.id,V]));return L.map(V=>O.get(V)).filter(V=>V!==void 0)},[b,c]),{createErrorNotice:y}=(0,IC.useDispatch)(Goe.store),{receiveEntityRecords:w}=(0,IC.useDispatch)(Wj.store),[S,x]=(0,Yr.useState)(),C=(0,Yr.useRef)(void 0),[A,k]=(0,Yr.useState)(!1),[R,N]=(0,Yr.useState)([]);(0,Yr.useEffect)(()=>{A&&(k(!1),C.current?.())},[A]);let P=(0,Yr.useCallback)(L=>r(t.setValue({item:e,value:L})),[e,t,r]),T=(0,Yr.useCallback)(L=>{let V=Q0(c).filter(W=>W!==L);d(!0),P(V.length?V:void 0)},[c,P]),M=(0,Yr.useCallback)((L,O)=>{if(!_)return;let V=_.map(Z=>Z.id),W=V.indexOf(L),q=O==="up"?W-1:W+1;[V[W],V[q]]=[V[q],V[W]],P(V)},[_,P]),j=(0,Yr.useCallback)((L,O)=>{x(O),(0,J0.uploadMedia)({allowedTypes:n?.length?n:void 0,filesList:L,onFileChange(V){let W=V.filter(Q=>(0,Fv.isBlobURL)(Q.url)).map(Q=>Q.url);if(N(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=Q0(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),N([]),y(V.message,{type:"snackbar"})},multiple:!!i})},[n,c,i,y,P,w]),F=t.placeholder||(i?(0,Ss.__)("Choose files"):(0,Ss.__)("Choose file")),D=(0,Yr.useMemo)(()=>{if(!R.length)return _;let L=[..._||[]],O=R.map(V=>({id:V,source_url:V,mime_type:(0,Fv.getBlobTypeByURL)(V)}));if(S!==void 0){let V=L.findIndex(W=>W.id===S);L.splice(V,1,...O)}else L.push(...O);return L},[_,S,R]);(0,Yr.useEffect)(()=>{if(!u)return;let L=f.current;if(L)if(l){let O=l?.custom;h(O),O?.type==="invalid"?L.setCustomValidity(O.message||(0,Ss.__)("Invalid")):L.setCustomValidity("")}else L.setCustomValidity(""),h(void 0)},[u,t.isValid,l]),(0,Yr.useEffect)(()=>{u&&m?.message&&(0,Woe.speak)(m.message)},[u,m?.message]);let B=(0,Yr.useCallback)(L=>{u||(!L.relatedTarget||!L.currentTarget.contains(L.relatedTarget))&&d(!0)},[u]);return(0,Be.jsxs)("div",{onBlur:B,children:[(0,Be.jsx)("fieldset",{className:"fields__media-edit","data-field-id":t.id,children:(0,Be.jsx)(zVe,{onSelect:L=>{if(!i){P(L.id),x(void 0);return}let O=Array.isArray(L)?L.map(W=>W.id):[L.id],V=Q0(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(L.id!==S){let W=V.filter(q=>q!==L.id);P(W.map(q=>q===S?L.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:L})=>{C.current=L;let O=s?WVe:GVe;return(0,Be.jsxs)(Tr.__experimentalVStack,{spacing:2,children:[t.label&&(o?(0,Be.jsx)(Jt,{render:(0,Be.jsx)("legend",{}),children:t.label}):(0,Be.jsx)(Tr.BaseControl.VisualLabel,{as:"legend",style:{marginBottom:0},children:t.label})),(0,Be.jsx)(O,{allItems:D,addButtonLabel:F,multiple:i,removeItem:T,moveItem:M,open:()=>k(!0),onFilesDrop:j,isUploading:!!R.length,setTargetItemId:x}),t.description&&(0,Be.jsx)(Tr.__experimentalText,{variant:"muted",className:"fields__media-edit-description",children:t.description})]})}})}),(0,Be.jsx)(Jt,{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)(Tr.Icon,{className:"components-validated-control__indicator-icon",icon:hf,size:16,fill:"currentColor"}),m.message]})]})}var Yj=a(E(),1),Qoe=({item:e,config:t})=>{let r=e?._embedded?.["wp:featuredmedia"]?.[0],o=r?.source_url;return o?(0,Yj.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,Yj.jsx)("span",{className:"fields-controls__featured-image-placeholder"})};var Joe=a(E(),1),YVe={id:"featured_media",type:"media",label:(0,qj.__)("Featured Image"),placeholder:(0,qj.__)("Set featured image"),Edit:e=>(0,Joe.jsx)(Xoe,{...e,isExpanded:!0}),render:Qoe,setValue:({value:e})=>({featured_media:e??0}),enableSorting:!1,filterBy:!1},Kj=YVe;var nne=a(z(),1);var NC=a(U(),1),gI=a(ne(),1),Xj=a(G(),1),Qj=a(Y(),1),Jj=a(z(),1);var Zj=a(Y(),1),Nl=a(ne(),1);function mI(e){let t=e.type,r=e?.available_templates??{},o=Object.keys(r).length>0;return(0,Zj.useSelect)(n=>{let i=!!n(Nl.store).getCurrentTheme()?.is_block_theme;if(!n(Nl.store).getPostType(t)?.viewable)return null;let l=i&&(n(Nl.store).canUser("create",{kind:"postType",name:"wp_template"})??!1),c=o||l,u=c?!!n(Nl.store).canUser("read",{kind:"postType",name:"wp_template"}):!1;return(!i||!u)&&c?"classic":i&&u?"block-theme":null},[t,o])}function qVe(e,t){return t?e==="page"?`${e}-${t}`:`single-${e}-${t}`:e==="page"?"page":`single-${e}`}var OC="";function hI(e,t,r){return(0,Zj.useSelect)(o=>{if(!e||!t)return OC;let n=String(t),i=ln(o(Nl.store)).getHomePage();if(e==="page"&&i?.postType==="page"&&i?.postId===n){let f=o(Nl.store).getEntityRecords("postType","wp_template",{per_page:-1})?.find(m=>m.slug==="front-page");if(f)return ft(f)}let s=ln(o(Nl.store)).getPostsPageId();if(e==="page"&&s===n){let d=o(Nl.store).getDefaultTemplateId({slug:"home"});if(!d)return OC;let f=o(Nl.store).getEntityRecord("postType","wp_template",d);return f?ft(f):OC}let l=qVe(e,r),c=o(Nl.store).getDefaultTemplateId({slug:l});if(!c)return OC;let u=o(Nl.store).getEntityRecord("postType","wp_template",c);return u?ft(u):OC},[e,t,r])}var vI=a(E(),1),KVe=[];function ZVe({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,NC.useMemo)(()=>Object.entries(e?.available_templates??{}).map(([l,c])=>({label:c,value:l})),[e]),s=(0,Qj.useSelect)(l=>{let{getHomePage:c,getPostsPageId:u}=ln(l(gI.store)),d=String(o),f=u()===d,m=e.type==="page"&&c()?.postId===d;return!f&&!m},[o,e.type]);return(0,vI.jsx)(Xj.SelectControl,{label:(0,Jj.__)("Template"),hideLabelFromVision:!0,value:n,options:i,onChange:r,disabled:!s})}function XVe({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,Qj.useSelect)(f=>{let m=f(gI.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:o})??KVe,{getHomePage:h,getPostsPageId:g}=ln(f(gI.store)),v=String(n),b=g()===v,_=o==="page"&&h()?.postId===v;return{templates:m,canSwitchTemplate:!b&&!_}},[n,o]),c=hI(o,n,i),u=t.getValue({item:e}),d=(0,NC.useMemo)(()=>{let f=s.map(m=>({label:ft(m),value:m.slug}));return[{label:c,value:""},...f]},[s,c]);return(0,vI.jsx)(Xj.SelectControl,{label:(0,Jj.__)("Template"),hideLabelFromVision:!0,value:u,options:d,onChange:r,disabled:!l})}var $oe=({data:e,field:t,onChange:r})=>{let o=(0,NC.useCallback)(s=>r({[t.id]:s}),[t.id,r]),n=mI(e);return!n||!["block-theme","classic"].includes(n)?null:(0,vI.jsx)(n==="classic"?ZVe:XVe,{data:e,field:t,onChange:o})};var ene=a(Y(),1),tne=a(ne(),1),rne=a(z(),1);var Dv=a(E(),1);function QVe({item:e,field:t}){let r=t.getValue({item:e}),o=e?.available_templates??{},n=r&&o[r]?o[r]:(0,rne.__)("Default template");return(0,Dv.jsx)(Dv.Fragment,{children:n})}function JVe({item:e,field:t}){let r=e.type,o=e.slug,n=e.id,i=t.getValue({item:e}),s=hI(r,n,o),l=(0,ene.useSelect)(c=>{if(!i)return;let d=c(tne.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,Dv.jsx)(Dv.Fragment,{children:l??s})}var one=({item:e,field:t})=>{let r=mI(e);return!r||!["block-theme","classic"].includes(r)?null:(0,Dv.jsx)(r==="classic"?QVe:JVe,{item:e,field:t})};var $Ve={id:"template",type:"text",label:(0,nne.__)("Template"),Edit:$oe,render:one,enableSorting:!1,filterBy:!1},$j=$Ve;var yne=a(z(),1);var ez=a($0(),1),yI=a(G(),1),tz=a(Y(),1),Of=a(U(),1),rz=a(ne(),1),dne=a(ke(),1),fne=a(Lt(),1),Bm=a(z(),1),pne=a(ho(),1);var lne=a(Lt(),1),cne=a(z(),1);function MC(e){return typeof e.title=="object"&&"rendered"in e.title&&e.title.rendered?(0,lne.decodeEntities)(e.title.rendered):`#${e?.id} (${(0,cne.__)("no title")})`}var If=a(E(),1);function n8e(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 une=(e,t)=>{let r=(0,ez.default)(e||"").toLowerCase(),o=(0,ez.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function i8e({data:e,onChangeControl:t}){let[r,o]=(0,Of.useState)(""),n=e.parent,i=e.id,s=e.type,{parentPostTitle:l,pageItems:c,isHierarchical:u}=(0,tz.useSelect)(h=>{let{getEntityRecord:g,getEntityRecords:v,getPostType:b}=h(rz.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?MC(w):"",pageItems:y?v("postType",s,S):null}},[r,n,i,s]),d=(0,Of.useMemo)(()=>{let h=(_,y=0)=>_.map(x=>[{value:x.id,label:"\u2014 ".repeat(y)+(0,fne.decodeEntities)(x.name),rawName:x.name},...h(x.children||[],y+1)]).sort(([x],[C])=>{let A=une(x.rawName,r),k=une(C.rawName,r);return A>=k?1:-1}).flat();if(!c)return[];let g=c.map(_=>({id:_.id,parent:_.parent??null,name:MC(_)}));r||(g=n8e(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,If.jsx)(yI.ComboboxControl,{label:(0,Bm.__)("Parent"),help:(0,Bm.__)("Choose a parent page."),value:n?.toString(),options:d,onFilterValueChange:(0,dne.debounce)(h=>f(h),300),onChange:m,hideLabelFromVision:!0})}var mne=({data:e,field:t,onChange:r})=>{let{id:o}=t,n=(0,tz.useSelect)(s=>s(rz.store).getEntityRecord("root","__unstableBase")?.home,[]),i=(0,Of.useCallback)(s=>r({[o]:s}),[o,r]);return(0,If.jsx)("fieldset",{className:"fields-controls__parent",children:(0,If.jsxs)("div",{children:[(0,Of.createInterpolateElement)((0,Bm.sprintf)((0,Bm.__)('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,pne.filterURLForDisplay)(n).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,If.jsx)("wbr",{})}),(0,If.jsx)("p",{children:(0,Of.createInterpolateElement)((0,Bm.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,If.jsx)(yI.ExternalLink,{href:(0,Bm.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"),children:void 0})})}),(0,If.jsx)(i8e,{data:e,onChangeControl:i})]})})};var hne=a(Y(),1),gne=a(ne(),1),vne=a(z(),1);var ew=a(E(),1),bne=({item:e})=>{let t=(0,hne.useSelect)(r=>{let{getEntityRecord:o}=r(gne.store);return e?.parent?o("postType",e.type,e.parent):null},[e.parent,e.type]);return t?(0,ew.jsx)(ew.Fragment,{children:MC(t)}):(0,ew.jsx)(ew.Fragment,{children:(0,vne.__)("None")})};var s8e={id:"parent",type:"text",label:(0,yne.__)("Parent"),Edit:mne,render:bne,enableSorting:!0,filterBy:!1},oz=s8e;var Sne=a(z(),1);var rw=a(G(),1),wne=a(U(),1),FC=a(z(),1),tw=a(E(),1);function a8e({data:e,onChange:t,field:r}){let[o,n]=(0,wne.useState)(!!r.getValue({item:e})),i=s=>{n(s),s||t({password:""})};return(0,tw.jsxs)(rw.__experimentalVStack,{as:"fieldset",spacing:4,className:"fields-controls__password",children:[(0,tw.jsx)(rw.CheckboxControl,{label:(0,FC.__)("Password protected"),help:(0,FC.__)("Only visible to those who know the password"),checked:o,onChange:i}),o&&(0,tw.jsx)("div",{className:"fields-controls__password-input",children:(0,tw.jsx)(rw.TextControl,{label:(0,FC.__)("Password"),onChange:s=>t({password:s}),value:r.getValue({item:e})||"",placeholder:(0,FC.__)("Use a secure password"),type:"text",maxLength:255})})]})}var _ne=a8e;var l8e={id:"password",type:"text",label:(0,Sne.__)("Password"),Edit:_ne,enableSorting:!1,enableHiding:!1,isVisible:e=>e.status!=="private",filterBy:!1},nz=l8e;var Cne=a(z(),1);var _I=a(G(),1);var Ml=a(z(),1),c8e=[{value:"draft",label:(0,Ml.__)("Draft"),icon:e0,description:(0,Ml.__)("Not ready to publish.")},{value:"future",label:(0,Ml.__)("Scheduled"),icon:lm,description:(0,Ml.__)("Publish automatically on a chosen date.")},{value:"pending",label:(0,Ml.__)("Pending Review"),icon:r1,description:(0,Ml.__)("Waiting for review before publishing.")},{value:"private",label:(0,Ml.__)("Private"),icon:Jx,description:(0,Ml.__)("Only visible to site admins and editors.")},{value:"publish",label:(0,Ml.__)("Published"),icon:tv,description:(0,Ml.__)("Visible to everyone.")},{value:"trash",label:(0,Ml.__)("Trash"),icon:gf}],wI=c8e;var ow=a(E(),1);function u8e({item:e,field:t}){let r=t.getValue({item:e}),o=wI.find(({value:s})=>s===r),n=o?.label||r,i=o?.icon;return(0,ow.jsxs)(_I.__experimentalHStack,{alignment:"left",spacing:0,children:[i&&(0,ow.jsx)("div",{className:"fields-controls__status-icon",children:(0,ow.jsx)(_I.Icon,{icon:i})}),(0,ow.jsx)("span",{children:n})]})}var xne=u8e;var d8e="isAny",f8e={label:(0,Cne.__)("Status"),id:"status",type:"text",elements:wI,getValue:({item:e})=>e.status==="auto-draft"?"draft":e.status,render:xne,Edit:"radio",enableSorting:!1,filterBy:{operators:[d8e]}},iz=f8e;var nw=a(z(),1),p8e={id:"comment_status",label:(0,nw.__)("Comments"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,nw.__)("Open"),description:(0,nw.__)("Visitors can add new comments and replies.")},{value:"closed",label:(0,nw.__)("Closed"),description:(0,nw.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}]},sz=p8e;var Nf=a(z(),1),SI=a(G(),1),az=a(E(),1);function m8e({data:e,onChange:t}){let r=e?.ping_status??"open",o=n=>{t({...e,ping_status:n?"open":"closed"})};return(0,az.jsx)(SI.CheckboxControl,{label:(0,Nf.__)("Enable pingbacks & trackbacks"),checked:r==="open",onChange:o,help:(0,az.jsx)(SI.ExternalLink,{href:(0,Nf.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,Nf.__)("Learn more about pingbacks & trackbacks")})})}var h8e={id:"ping_status",label:(0,Nf.__)("Trackbacks & Pingbacks"),type:"text",Edit:m8e,enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,Nf.__)("Allow"),description:(0,Nf.__)("Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")},{value:"closed",label:(0,Nf.__)("Don't allow"),description:(0,Nf.__)("Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")}]},lz=h8e;var iw=a(z(),1),g8e={id:"discussion",label:(0,iw.__)("Discussion"),type:"text",render:({item:e})=>{let t=e.comment_status==="open",r=e.ping_status==="open";return t&&r?(0,iw.__)("Open"):t&&!r?(0,iw.__)("Comments only"):!t&&r?(0,iw.__)("Pings only"):(0,iw.__)("Closed")},filterBy:!1},cz=g8e;var Ene=a(z(),1);var Wu=a(z(),1),LC=a(U(),1),Vm=a(an(),1),Uu=a(E(),1),DC=e=>(0,Vm.dateI18n)((0,Vm.getSettings)().formats.datetimeAbbreviated,(0,Vm.getDate)(e)),v8e=({item:e})=>{if(["draft","private"].includes(e.status??""))return(0,LC.createInterpolateElement)((0,Wu.sprintf)((0,Wu.__)("<span>Modified: <time>%s</time></span>"),DC(e.date??null)),{span:(0,Uu.jsx)("span",{}),time:(0,Uu.jsx)("time",{})});if(e.status==="future")return(0,LC.createInterpolateElement)((0,Wu.sprintf)((0,Wu.__)("<span>Scheduled: <time>%s</time></span>"),DC(e.date??null)),{span:(0,Uu.jsx)("span",{}),time:(0,Uu.jsx)("time",{})});if(e.status==="publish")return(0,LC.createInterpolateElement)((0,Wu.sprintf)((0,Wu.__)("<span>Published: <time>%s</time></span>"),DC(e.date??null)),{span:(0,Uu.jsx)("span",{}),time:(0,Uu.jsx)("time",{})});let n=(0,Vm.getDate)(e.modified??null)>(0,Vm.getDate)(e.date??null)?e.modified:e.date;return e.status==="pending"?(0,LC.createInterpolateElement)((0,Wu.sprintf)((0,Wu.__)("<span>Modified: <time>%s</time></span>"),DC(n??null)),{span:(0,Uu.jsx)("span",{}),time:(0,Uu.jsx)("time",{})}):(0,Uu.jsx)("time",{children:DC(e.date??null)})},Tne=v8e;var b8e={id:"date",type:"datetime",label:(0,Ene.__)("Date"),render:Tne,filterBy:{operators:["before","after"]}},uz=b8e;var Pne=a(z(),1),y8e={id:"scheduled_date",type:"datetime",label:(0,Pne.__)("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},dz=y8e;var Ine=a(z(),1);var xI=a(z(),1),kne=a(an(),1),Rne=a(E(),1);function Ane({item:e}){return e.modified?(0,Rne.jsx)(ys,{children:(0,xI.sprintf)((0,xI.__)("Last edited %s."),(0,kne.humanTimeDiff)(e.modified))}):null}var w8e={id:"last_edited_date",type:"datetime",label:(0,Ine.__)("Last edited"),render:Ane,getValue:({item:e})=>e.modified,isVisible:e=>!!e.modified,readOnly:!0,enableHiding:!1,enableSorting:!1,filterBy:!1},fz=w8e;var Lne=a(z(),1),Bne=a(Y(),1),Vne=a(ne(),1);var One=a(z(),1),Nne=a(U(),1);var CI=a(G(),1),Mne=a(Y(),1),Fne=a(ne(),1),jm=a(E(),1);function _8e({item:e}){let t=e?.author,r=e?._embedded?.author?.[0]?.id,o=!!(t&&(!r||t!==r)),n=(0,Mne.useSelect)(u=>{if(!o)return null;let{getEntityRecord:d}=u(Fne.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,Nne.useState)(!1);return(0,jm.jsxs)(CI.__experimentalHStack,{alignment:"left",spacing:0,children:[!!s&&(0,jm.jsx)("div",{className:J("fields-controls__author-avatar",{"is-loaded":l}),children:(0,jm.jsx)("img",{onLoad:()=>c(!0),alt:(0,One.__)("Author avatar"),src:s})}),!s&&(0,jm.jsx)("div",{className:"fields-controls__author-icon",children:(0,jm.jsx)(CI.Icon,{icon:$g})}),(0,jm.jsx)("span",{className:"fields-controls__author-name",children:i})]})}var Dne=_8e;var S8e={label:(0,Lne.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,Bne.resolveSelect)(Vne.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:Dne,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"]}},BC=S8e;var mz=a(z(),1),Hne=a(Y(),1),Une=a(ne(),1);var jne=a(U(),1),zne=a(Y(),1),TI=a(ne(),1);var zm=a(E(),1);function x8e(e){switch(e){case"theme":return Ya;case"plugin":return aV;case"site":return VB;default:return $g}}function pz({item:e}){let[t,r]=(0,jne.useState)(!1),o=e.original_source,n=x8e(o),i=e.author_text,s=e.author,l=(0,zne.useSelect)(c=>{if(o==="site"){let d=c(TI.store).getEntityRecord("root","__unstableBase")?.site_logo;return d?c(TI.store).getEntityRecord("postType","attachment",d)?.source_url:void 0}if(!(o!=="user"||!s))return c(TI.store).getUser(s)?.avatar_urls?.[48]},[o,s]);return(0,zm.jsxs)(oe,{direction:"row",align:"center",children:[l&&(0,zm.jsx)("div",{className:J("fields-controls__author-avatar",{"is-loaded":t}),children:(0,zm.jsx)("img",{onLoad:()=>r(!0),alt:"",src:l})}),!l&&(0,zm.jsx)("div",{className:"fields-controls__author-icon",children:(0,zm.jsx)(Pf,{icon:n})}),(0,zm.jsx)("span",{className:"fields-controls__author-name",children:i})]})}async function Wne(e){let t=await(0,Hne.resolveSelect)(Une.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 hz={label:(0,mz.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:pz,getElements:()=>Wne("wp_template")},gz={label:(0,mz.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:pz,enableSorting:!1,filterBy:{isPrimary:!0},getElements:()=>Wne("wp_template_part")};var Gne=a(z(),1),C8e={id:"notesCount",label:(0,Gne.__)("Notes"),type:"integer",enableSorting:!1,filterBy:!1},vz=C8e;var bz=a(Lt(),1),sw=a(z(),1),EI=a(G(),1),yz=a(E(),1),T8e={id:"excerpt",type:"text",label:(0,sw.__)("Excerpt"),placeholder:(0,sw.__)("Add an excerpt"),description:(0,yz.jsx)(EI.ExternalLink,{href:(0,sw.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,sw.__)("Learn more about manual excerpts")}),render:({item:e})=>{let t;return typeof e.excerpt=="string"?t=e.excerpt?(0,bz.decodeEntities)(e.excerpt):(0,sw.__)("Add an excerpt"):t=(0,bz.decodeEntities)(e.excerpt?.raw||""),(0,yz.jsx)(EI.__experimentalText,{align:"left",numberOfLines:3,truncate:!0,children:t})},Edit:{control:"textarea",rows:4},enableSorting:!1,filterBy:!1},wz=T8e;var _z=a(Lt(),1),PI=a(z(),1);var Yne=a(E(),1),qne=e=>e.source==="custom"&&!e.has_theme_file&&e.is_custom,Kne=({item:e})=>(0,_z.decodeEntities)(e.description||""),Zne=({item:e})=>{let{description:t}=e;return t&&(0,Yne.jsx)(ys,{children:(0,_z.decodeEntities)(t)})},E8e={id:"description",type:"text",label:(0,PI.__)("Description"),placeholder:(0,PI.__)("Add a description"),getValue:Kne,render:Zne,Edit:{control:"textarea",rows:4},isVisible:qne,enableSorting:!1,filterBy:!1,enableGlobalSearch:!0},Sz={id:"description_readonly",type:"text",label:(0,PI.__)("Description"),getValue:Kne,render:Zne,readOnly:!0,isVisible:e=>!qne(e)&&!!e.description,enableSorting:!1,enableHiding:!1,filterBy:!1},xz=E8e;var Fl=a(z(),1),Xne=a(Y(),1),Qne=a(ne(),1),P8e=[{id:"aside",caption:(0,Fl.__)("Aside")},{id:"audio",caption:(0,Fl.__)("Audio")},{id:"chat",caption:(0,Fl.__)("Chat")},{id:"gallery",caption:(0,Fl.__)("Gallery")},{id:"image",caption:(0,Fl.__)("Image")},{id:"link",caption:(0,Fl.__)("Link")},{id:"quote",caption:(0,Fl.__)("Quote")},{id:"standard",caption:(0,Fl.__)("Standard")},{id:"status",caption:(0,Fl.__)("Status")},{id:"video",caption:(0,Fl.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0}),k8e={id:"format",label:(0,Fl.__)("Format"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,getElements:async()=>{let e=await(0,Xne.resolveSelect)(Qne.store).getThemeSupports();return P8e.filter(t=>e?.formats?.includes(t.id)).map(t=>({value:t.id,label:t.caption}))}},Cz=k8e;var oie=a(z(),1);var VC=a(G(),1),aa=a(z(),1),$ne=a(aw(),1),eie=a(an(),1),tie=a(U(),1),jC=a(E(),1),R8e=189;function rie({item:e}){let t="";typeof e.content=="string"?t=e.content:typeof e.content=="function"&&(t=e.content(e));let r=(0,aa._x)("words","Word count type. Do not translate!"),o=(0,tie.useMemo)(()=>t?(0,$ne.count)(t,r):0,[t,r]),n=e.modified;if(!o&&!n)return null;let i;if(o){let s=Math.round(o/R8e),l=(0,aa.sprintf)((0,aa._n)("%s word","%s words",o),o.toLocaleString()),c=s<=1?(0,aa.__)("1 minute"):(0,aa.sprintf)((0,aa._n)("%s minute","%s minutes",s),s.toLocaleString());i=(0,aa.sprintf)((0,aa.__)("%1$s, %2$s read time."),l,c)}return(0,jC.jsxs)(VC.__experimentalVStack,{spacing:1,children:[i&&(0,jC.jsx)(VC.__experimentalText,{variant:"muted",children:i}),n&&(0,jC.jsx)(VC.__experimentalText,{variant:"muted",children:(0,aa.sprintf)((0,aa.__)("Last edited %s."),(0,eie.humanTimeDiff)(n))})]})}var A8e={label:(0,oie.__)("Post content information"),id:"post-content-info",type:"text",readOnly:!0,render:rie,enableSorting:!1,enableHiding:!1,filterBy:!1},Tz=A8e;var Ez=a(z(),1),I8e={id:"sticky",type:"boolean",label:(0,Ez.__)("Sticky"),description:(0,Ez.__)("Pin this post to the top of the blog."),enableSorting:!1,enableHiding:!1,isVisible:e=>!!e._links?.["wp:action-sticky"],filterBy:!1},Pz=I8e;var kz=a(z(),1),O8e={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},Rz=O8e;var Hm=a(z(),1),N8e={id:"default_comment_status",type:"text",label:(0,Hm.__)("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,Hm.__)("Comments open"):(0,Hm.__)("Comments closed"),elements:[{value:"open",label:(0,Hm.__)("Open"),description:(0,Hm.__)("Visitors can add new comments and replies.")},{value:"",label:(0,Hm.__)("Closed"),description:(0,Hm.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}],enableSorting:!1,enableHiding:!1,filterBy:!1},Az=N8e;var Iz=a(z(),1),M8e={id:"posts_page_title",type:"text",label:(0,Iz.__)("Blog title"),description:(0,Iz.__)("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},Oz=M8e;var nie=a(z(),1),F8e={id:"view-post",label:(0,nie._x)("View","verb"),isPrimary:!0,icon:fs,isEligible(e){return e.status!=="trash"},callback(e,{onActionPerformed:t}){let r=e[0];window.open(r?.link,"_blank"),t&&t(e)}},Nz=F8e;var Mz=a(Y(),1),iie=a(ne(),1),Um=a(z(),1),sie=a(It(),1),aie=a(U(),1),Ff=a(G(),1),Mf=a(E(),1);function D8e(e){return typeof e.menu_order=="number"&&Number.isInteger(e.menu_order)}function L8e({items:e,closeModal:t,onActionPerformed:r}){let[o,n]=(0,aie.useState)(e[0]),{editEntityRecord:i,saveEditedEntityRecord:s}=(0,Mz.useDispatch)(iie.store),{createSuccessNotice:l,createErrorNotice:c}=(0,Mz.useDispatch)(sie.store),u=D8e(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,Um.__)("Order updated."),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,Um.__)("An error occurred while updating the order");c(g,{type:"snackbar"})}}return(0,Mf.jsx)("form",{onSubmit:d,children:(0,Mf.jsxs)(Ff.__experimentalVStack,{spacing:"5",children:[(0,Mf.jsx)("div",{children:(0,Um.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,Mf.jsx)(Ff.__experimentalInputControl,{label:(0,Um.__)("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,Mf.jsxs)(Ff.__experimentalHStack,{justify:"right",children:[(0,Mf.jsx)(Ff.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,Um.__)("Cancel")}),(0,Mf.jsx)(Ff.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!u,children:(0,Um.__)("Save")})]})]})})}var B8e={id:"order-pages",label:(0,Um.__)("Order"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:L8e},Fz=B8e;var Dz=a(Y(),1),lie=a(ne(),1),Vi=a(z(),1),cie=a(It(),1),Lz=a(U(),1),Lf=a(G(),1);var Df=a(E(),1),V8e={id:"duplicate-post",label:(0,Vi._x)("Duplicate","action label"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,Lz.useState)({...e[0],title:(0,Vi.sprintf)((0,Vi._x)("%s (Copy)","post"),ft(e[0]))}),[i,s]=(0,Lz.useState)(!1),{saveEntityRecord:l}=(0,Dz.useDispatch)(lie.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Dz.useDispatch)(cie.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,Vi.__)("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,Vi.sprintf)((0,Vi.__)('"%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,Vi.__)("An error occurred while duplicating the page.");u(y,{type:"snackbar"})}finally{s(!1),t?.()}}return(0,Df.jsx)("form",{onSubmit:d,children:(0,Df.jsxs)(Lf.__experimentalVStack,{spacing:3,children:[typeof o.id=="string"&&(0,Df.jsx)("div",{children:(0,Vi.__)("You are about to duplicate a bundled template. Changes will not be live until you activate the new template.")}),(0,Df.jsx)(Lf.__experimentalInputControl,{label:(0,Vi.__)("Title"),placeholder:(0,Vi.__)("No title"),value:ft(o),onChange:f=>n(m=>({...m,title:f||(0,Vi.__)("No title")}))}),(0,Df.jsxs)(Lf.__experimentalHStack,{spacing:2,justify:"end",children:[(0,Df.jsx)(Lf.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Vi.__)("Cancel")}),(0,Df.jsx)(Lf.Button,{variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,__next40pxDefaultSize:!0,children:(0,Vi._x)("Duplicate","action label")})]})]})})}},Bz=V8e;var Vz=a(Y(),1),uie=a(ne(),1),Lv=a(z(),1),die=a(U(),1),fie=a(kl(),1),Bf=a(G(),1),pie=a(It(),1);var Wm=a(E(),1),{PATTERN_TYPES:j8e}=ln(fie.privateApis),z8e={id:"rename-post",label:(0,Lv.__)("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)?LX(e)&&!window?.__experimentalTemplateActivate?x2(e)&&e.is_custom&&e.permissions?.update:BX(e)?e.source==="custom"&&!e?.has_theme_file&&e.permissions?.update:e.type===j8e.user&&e.permissions?.update:e.permissions?.update},RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o]=e,[n,i]=(0,die.useState)(()=>ft(o,"")),{editEntityRecord:s,saveEditedEntityRecord:l}=(0,Vz.useDispatch)(uie.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Vz.useDispatch)(pie.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,Lv.__)("Name updated"),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,Lv.__)("An error occurred while updating the name");u(g,{type:"snackbar"})}}return(0,Wm.jsx)("form",{onSubmit:d,children:(0,Wm.jsxs)(Bf.__experimentalVStack,{spacing:"5",children:[(0,Wm.jsx)(Bf.TextControl,{label:(0,Lv.__)("Name"),value:n,onChange:i,required:!0}),(0,Wm.jsxs)(Bf.__experimentalHStack,{justify:"right",children:[(0,Wm.jsx)(Bf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,Lv.__)("Cancel")}),(0,Wm.jsx)(Bf.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Lv.__)("Save")})]})]})})}},jz=z8e;var ji=a(Y(),1),Bv=a(ne(),1),fn=a(z(),1),Gm=a(It(),1),mie=a(U(),1),kI=a(At(),1),Vf=a(G(),1),hie=a(ho(),1),gie=a(Fu(),1);var Vv=a(E(),1),H8e=e=>e?e.source==="custom"&&(!!e?.plugin||e?.has_theme_file):!1,U8e=async(e,{allowUndo:t=!0}={})=>{let r="edit-site-template-reverted";if((0,ji.dispatch)(Gm.store).removeNotice(r),!H8e(e)){(0,ji.dispatch)(Gm.store).createErrorNotice((0,fn.__)("This template is not revertable."),{type:"snackbar"});return}try{let o=(0,ji.select)(Bv.store).getEntityConfig("postType",e.type);if(!o){(0,ji.dispatch)(Gm.store).createErrorNotice((0,fn.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let n=(0,hie.addQueryArgs)(`${o.baseURL}/${e.id}`,{context:"edit",source:e.origin}),i=await(0,gie.default)({path:n});if(!i){(0,ji.dispatch)(Gm.store).createErrorNotice((0,fn.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let s=({blocks:u=[]})=>(0,kI.__unstableSerializeAndClean)(u),l=(0,ji.select)(Bv.store).getEditedEntityRecord("postType",e.type,e.id);(0,ji.dispatch)(Bv.store).editEntityRecord("postType",e.type,e.id,{content:s,blocks:l.blocks,source:"custom"},{undoIgnore:!0});let c=(0,kI.parse)(i?.content?.raw);if((0,ji.dispatch)(Bv.store).editEntityRecord("postType",e.type,i.id,{content:s,blocks:c,source:"theme"}),t){let u=()=>{(0,ji.dispatch)(Bv.store).editEntityRecord("postType",e.type,l.id,{content:s,blocks:l.blocks,source:"custom"})};(0,ji.dispatch)(Gm.store).createSuccessNotice((0,fn.__)("Template reset."),{type:"snackbar",id:r,actions:[{label:(0,fn.__)("Undo"),onClick:u}]})}}catch(o){let n=o.message&&o.code!=="unknown_error"?o.message:(0,fn.__)("Template revert failed. Please reload.");(0,ji.dispatch)(Gm.store).createErrorNotice(n,{type:"snackbar"})}},W8e={id:"reset-post",label:(0,fn.__)("Reset"),isEligible:e=>window?.__experimentalTemplateActivate?e.type==="wp_template_part"&&e?.source==="custom"&&e?.has_theme_file:wf(e)&&e?.source==="custom"&&(!!(e.type==="wp_template"&&e?.plugin)||e?.has_theme_file),icon:pf,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,mie.useState)(!1),{saveEditedEntityRecord:i}=(0,ji.useDispatch)(Bv.store),{createSuccessNotice:s,createErrorNotice:l}=(0,ji.useDispatch)(Gm.store),c=async()=>{try{for(let u of e)await U8e(u,{allowUndo:!1}),await i("postType",u.type,u.id);s(e.length>1?(0,fn.sprintf)((0,fn.__)("%d items reset."),e.length):(0,fn.sprintf)((0,fn.__)('"%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,fn.__)("An error occurred while reverting the template."):(0,fn.__)("An error occurred while reverting the templates."):d=e.length===1?(0,fn.__)("An error occurred while reverting the template part."):(0,fn.__)("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,Vv.jsxs)(Vf.__experimentalVStack,{spacing:"5",children:[(0,Vv.jsx)(Vf.__experimentalText,{children:(0,fn.__)("Reset to default and clear all customizations?")}),(0,Vv.jsxs)(Vf.__experimentalHStack,{justify:"right",children:[(0,Vv.jsx)(Vf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,fn.__)("Cancel")}),(0,Vv.jsx)(Vf.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0),await c(),r?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,fn.__)("Reset")})]})]})}},zz=W8e;var RI=a(z(),1),vie=a(kl(),1);var bie=a(E(),1),{CreatePatternModalContents:G8e,useDuplicatePatternProps:Y8e}=ln(vie.privateApis),q8e={id:"duplicate-pattern",label:(0,RI._x)("Duplicate","action label"),isEligible:e=>e.type!=="wp_template_part",modalHeader:(0,RI._x)("Duplicate pattern","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=Y8e({pattern:r,onSuccess:()=>t?.()});return(0,bie.jsx)(G8e,{onClose:t,confirmLabel:(0,RI._x)("Duplicate","action label"),...o})}},Hz=q8e;var lw=function(){return lw=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},lw.apply(this,arguments)};function yie(e){return e.toLowerCase()}var K8e=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Z8e=/[^A-Z0-9]+/gi;function _ie(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,o=r===void 0?K8e:r,n=t.stripRegexp,i=n===void 0?Z8e:n,s=t.transform,l=s===void 0?yie:s,c=t.delimiter,u=c===void 0?" ":c,d=wie(wie(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 wie(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(o,n){return o.replace(n,r)},e)}function Sie(e,t){return t===void 0&&(t={}),_ie(e,lw({delimiter:"."},t))}function jv(e,t){return t===void 0&&(t={}),Sie(e,lw({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 uw=e=>new DataView(new ArrayBuffer(e)),jf=e=>new Uint8Array(e.buffer||e),cw=e=>new TextEncoder().encode(String(e)),zv=e=>Math.min(4294967295,Number(e)),xie=e=>Math.min(65535,Number(e));function X8e(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:cw(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:jf(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:Tie(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function Tie(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=Q8e(n.value);r.enqueue(i),o+=i.byteLength}}},cancel(r){t.throw?.(r)}})}function Q8e(e){return typeof e=="string"?cw(e):e instanceof Uint8Array?e:jf(e)}function Eie(e,t,r){let[o,n]=(function(i){return i?i instanceof Uint8Array?[i,1]:ArrayBuffer.isView(i)||i instanceof ArrayBuffer?[jf(i),1]:[cw(i),0]:[void 0,0]})(t);if(e instanceof File)return{o:Uz(o||cw(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:Uz(o||cw(c)),u:BigInt(u),l:n}}return o=Uz(o,e!==void 0||r!==void 0),typeof e=="string"?{o,u:BigInt(cw(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:J8e(e,r),l:n}}function J8e(e,t){return t>-1?BigInt(t):e?void 0:0n}function Uz(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 Pie=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);Pie[e]=t}function Cie(e,t=0){t^=-1;for(var r=0,o=e.length;r<o;r++)t=t>>>8^Pie[255&t^e[r]];return(-1^t)>>>0}function kie(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 $8e({o:e,l:t},r){return 8*(!t||(r??(function(o){try{e7e.decode(o)}catch{return 0}return 1})(e)))}var e7e=new TextDecoder("utf8",{fatal:1});function t7e(e,t=0){let r=uw(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|t),kie(e.t,r,10),r.setUint16(26,e.o.length,1),jf(r)}async function*r7e(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=Cie(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=Cie(o,e.m),e.u+=BigInt(o.length),yield o}}}function o7e(e,t){let r=uw(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,zv(e.u),1),r.setUint32(12,zv(e.u),1)),jf(r)}function n7e(e,t,r=0,o=0){let n=uw(46);return n.setUint32(0,1347092738),n.setUint32(4,755182848),n.setUint16(8,2048|r),kie(e.t,n,12),n.setUint32(16,e.isFile?e.m:0,1),n.setUint32(20,zv(e.u),1),n.setUint32(24,zv(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,zv(t),1),jf(n)}function i7e(e,t,r){let o=uw(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),jf(o)}function Rie(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var s7e=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 Eie(...Rie(r)[0])})(e));function Aie(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(s7e(t.metadata))),new Response(a7e(e,t),{headers:r})}function a7e(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]=Rie(i.value);return{done:0,value:Object.assign(X8e(...l),Eie(...s))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}})(e);return Tie((async function*(o,n){let i=[],s=0n,l=0n,c=0;for await(let f of o){let m=$8e(f,n.buffersAreUTF8);yield t7e(f,m),yield new Uint8Array(f.o),f.isFile&&(yield*r7e(f));let h=f.u>=0xffffffffn,g=12*(s>=0xffffffffn)|28*h;yield o7e(f,h),i.push(n7e(f,s,m,g)),i.push(f.o),g&&i.push(i7e(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=uw(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 jf(f)}let d=uw(22);d.setUint32(0,1347093766),d.setUint16(8,xie(l),1),d.setUint16(10,xie(l),1),d.setUint32(12,zv(u),1),d.setUint32(16,zv(s),1),yield jf(d)})(r,t),r)}var Wz=a(GA(),1),Gz=a(z(),1);function Iie(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 l7e={id:"export-pattern",label:(0,Gz.__)("Export as JSON"),icon:yB,supportsBulk:!0,isEligible:e=>e.type==="wp_block",callback:async e=>{if(e.length===1)return(0,Wz.downloadBlob)(`${jv(ft(e[0])||e[0].slug)}.json`,Iie(e[0]),"application/json");let t={},r=e.map(o=>{let n=jv(ft(o)||o.slug);return t[n]=(t[n]||0)+1,{name:`${n+(t[n]>1?"-"+(t[n]-1):"")}.json`,lastModified:new Date,input:Iie(o)}});return(0,Wz.downloadBlob)((0,Gz.__)("patterns-export")+".zip",await Aie(r).blob(),"application/zip")}},Yz=l7e;var Oie=a(ho(),1),AI=a(z(),1),c7e={id:"view-post-revisions",context:"list",label(e){let t=e[0]._links?.["version-history"]?.[0]?.count??0;return(0,AI.sprintf)((0,AI.__)("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,Oie.addQueryArgs)("revision.php",{revision:r?._links?.["predecessor-version"]?.[0]?.id});document.location.href=o,t&&t(e)}},qz=c7e;var Nie=a(ne(),1),En=a(z(),1),Mie=a(It(),1);var Fie=a(U(),1),Kz=a(Y(),1),zf=a(G(),1),Die=a(Lt(),1);var Hv=a(E(),1),u7e={id:"permanently-delete",label:(0,En.__)("Permanently delete"),supportsBulk:!0,icon:gf,isEligible(e){if(wf(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,Fie.useState)(!1),{createSuccessNotice:i,createErrorNotice:s}=(0,Kz.useDispatch)(Mie.store),{deleteEntityRecord:l}=(0,Kz.useDispatch)(Nie.store);return(0,Hv.jsxs)(zf.__experimentalVStack,{spacing:"5",children:[(0,Hv.jsx)(zf.__experimentalText,{children:e.length>1?(0,En.sprintf)((0,En._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,En.sprintf)((0,En.__)('Are you sure you want to permanently delete "%s"?'),(0,Die.decodeEntities)(ft(e[0])))}),(0,Hv.jsxs)(zf.__experimentalHStack,{justify:"right",children:[(0,Hv.jsx)(zf.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,En.__)("Cancel")}),(0,Hv.jsx)(zf.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,En.sprintf)((0,En.__)('"%s" permanently deleted.'),ft(e[0])):u=(0,En.__)("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,En.__)("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,En.__)("An error occurred while permanently deleting the items."):d.size===1?u=(0,En.sprintf)((0,En.__)("An error occurred while permanently deleting the items: %s"),[...d][0]):u=(0,En.sprintf)((0,En.__)("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,En.__)("Delete permanently")})]})]})}},Zz=u7e;var Lie=a(ne(),1),xs=a(z(),1),Bie=a(It(),1);var d7e={id:"restore",label:(0,xs.__)("Restore"),isPrimary:!0,icon:pf,supportsBulk:!0,isEligible(e){return!wf(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(Bie.store),{editEntityRecord:i,saveEditedEntityRecord:s}=t.dispatch(Lie.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,xs.sprintf)((0,xs.__)('"%s" has been restored.'),ft(e[0])):e[0].type==="page"?c=(0,xs.sprintf)((0,xs.__)("%d pages have been restored."),e.length):c=(0,xs.sprintf)((0,xs.__)("%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,xs.__)("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,xs.__)("An error occurred while restoring the posts."):u.size===1?c=(0,xs.sprintf)((0,xs.__)("An error occurred while restoring the posts: %s"),[...u][0]):c=(0,xs.sprintf)((0,xs.__)("Some errors occurred while restoring the posts: %s"),[...u].join(","))}n(c,{type:"snackbar"})}}},Xz=d7e;var Qz=a(Y(),1),Vie=a(ne(),1),Zo=a(z(),1),jie=a(It(),1),zie=a(U(),1),Hf=a(G(),1);var Uv=a(E(),1),f7e={id:"move-to-trash",label:(0,Zo._x)("Trash","verb"),isPrimary:!0,icon:gf,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,zie.useState)(!1),{createSuccessNotice:i,createErrorNotice:s}=(0,Qz.useDispatch)(jie.store),{deleteEntityRecord:l}=(0,Qz.useDispatch)(Vie.store);return(0,Uv.jsxs)(Hf.__experimentalVStack,{spacing:"5",children:[(0,Uv.jsx)(Hf.__experimentalText,{children:e.length===1?(0,Zo.sprintf)((0,Zo.__)('Are you sure you want to move "%s" to the trash?'),ft(e[0])):(0,Zo.sprintf)((0,Zo._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,Uv.jsxs)(Hf.__experimentalHStack,{justify:"right",children:[(0,Uv.jsx)(Hf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,Zo.__)("Cancel")}),(0,Uv.jsx)(Hf.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,Zo.sprintf)((0,Zo.__)('"%s" moved to the trash.'),ft(e[0])):u=(0,Zo.sprintf)((0,Zo._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,Zo.__)("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,Zo.__)("An error occurred while moving the items to the trash."):d.size===1?u=(0,Zo.sprintf)((0,Zo.__)("An error occurred while moving the item to the trash: %s"),[...d][0]):u=(0,Zo.sprintf)((0,Zo.__)("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,Zo._x)("Trash","verb")})]})]})}},Jz=f7e;var vr=a(z(),1),Gie=a(U(),1),Uf=a(G(),1),Yie=a(kl(),1),eH=a(Lt(),1);var Hie=a(It(),1),Uie=a(ne(),1),$z=a(Y(),1);function p7e(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 Wie=async(e,t,r)=>{let{createSuccessNotice:o,createErrorNotice:n}=(0,$z.dispatch)(Hie.store),{deleteEntityRecord:i}=(0,$z.dispatch)(Uie.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=p7e(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 Wv=a(E(),1),{PATTERN_TYPES:m7e}=ln(Yie.privateApis),h7e={id:"delete-post",label:(0,vr.__)("Delete"),isPrimary:!0,icon:gf,isEligible(e){return wf(e)?x2(e):e.type===m7e.user},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,Gie.useState)(!1),i=e.every(s=>wf(s)&&s?.has_theme_file);return(0,Wv.jsxs)(Uf.__experimentalVStack,{spacing:"5",children:[(0,Wv.jsx)(Uf.__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,Wv.jsxs)(Uf.__experimentalHStack,{justify:"right",children:[(0,Wv.jsx)(Uf.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,vr.__)("Cancel")}),(0,Wv.jsx)(Uf.Button,{variant:"primary",onClick:async()=>{n(!0),await Wie(e,{success:{messages:{getMessage:l=>i?(0,vr.sprintf)((0,vr.__)('"%s" reset.'),(0,eH.decodeEntities)(ft(l))):(0,vr.sprintf)((0,vr._x)('"%s" deleted.',"template part"),(0,eH.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")})]})]})}},tH=h7e;var ose=a(Y(),1),Wf=a(z(),1),nse=a(It(),1),ise=a(U(),1),sse=a(At(),1);var zi=a(G(),1),ese=a(ke(),1),OI=a(ne(),1),fw=a(Y(),1),II=a(U(),1),dw=a(z(),1);var tse=a(It(),1),rse=a(At(),1);var qie=a(Y(),1),Kie=a(ne(),1),Zie=()=>(0,qie.useSelect)(e=>e(Kie.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),[])??[],Xie=(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}`},Qie=e=>jv(e).replace(/[^\w-]+/g,"")||"wp-custom-part";var Pn=a(E(),1);function Jie(e,t){return`fields-create-template-part-modal__area-option-${e}-${t}`}function $ie(e,t){return`fields-create-template-part-modal__area-option-description-${e}-${t}`}function pw({modalTitle:e,...t}){let r=(0,fw.useSelect)(o=>o(OI.store).getPostType("wp_template_part")?.labels?.add_new_item,[]);return(0,Pn.jsx)(zi.Modal,{title:e||r,onRequestClose:t.closeModal,overlayClassName:"fields-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,Pn.jsx)(rH,{...t})})}var g7e=e=>e==="header"?Yx:e==="footer"?Ux:e==="sidebar"?l1:e==="navigation-overlay"?Qx:nv;function rH({defaultArea:e="uncategorized",blocks:t=[],confirmLabel:r=(0,dw.__)("Add"),closeModal:o,onCreate:n,onError:i,defaultTitle:s=""}){let{createErrorNotice:l}=(0,fw.useDispatch)(tse.store),{saveEntityRecord:c}=(0,fw.useDispatch)(OI.store),u=Zie(),[d,f]=(0,II.useState)(s),[m,h]=(0,II.useState)(e),[g,v]=(0,II.useState)(!1),b=(0,ese.useInstanceId)(pw),_=(0,fw.useSelect)(w=>w(OI.store).getCurrentTheme()?.default_template_part_areas,[]);async function y(){if(!(!d||g))try{v(!0);let w=Xie(d,u),S=Qie(w),x=await c("postType","wp_template_part",{slug:S,title:w,content:(0,rse.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,dw.__)("An error occurred while creating the template part.");l(S,{type:"snackbar"}),i?.()}finally{v(!1)}}return(0,Pn.jsx)("form",{onSubmit:async w=>{w.preventDefault(),await y()},children:(0,Pn.jsxs)(zi.__experimentalVStack,{spacing:"4",children:[(0,Pn.jsx)(zi.TextControl,{label:(0,dw.__)("Name"),value:d,onChange:f,required:!0}),(0,Pn.jsxs)("fieldset",{className:"fields-create-template-part-modal__area-fieldset",children:[(0,Pn.jsx)(zi.BaseControl.VisualLabel,{as:"legend",children:(0,dw.__)("Area")}),(0,Pn.jsx)("div",{className:"fields-create-template-part-modal__area-radio-group",children:(_??[]).map(w=>{let S=g7e(w.icon);return(0,Pn.jsxs)("div",{className:"fields-create-template-part-modal__area-radio-wrapper",children:[(0,Pn.jsx)("input",{type:"radio",id:Jie(w.area,b),name:`fields-create-template-part-modal__area-${b}`,value:w.area,checked:m===w.area,onChange:()=>{h(w.area)},"aria-describedby":$ie(w.area,b)}),(0,Pn.jsx)(zi.Icon,{icon:S,className:"fields-create-template-part-modal__area-radio-icon"}),(0,Pn.jsx)("label",{htmlFor:Jie(w.area,b),className:"fields-create-template-part-modal__area-radio-label",children:w.label}),(0,Pn.jsx)(zi.Icon,{icon:Ro,className:"fields-create-template-part-modal__area-radio-checkmark"}),(0,Pn.jsx)("p",{className:"fields-create-template-part-modal__area-radio-description",id:$ie(w.area,b),children:w.description})]},w.area)})})]}),(0,Pn.jsxs)(zi.__experimentalHStack,{justify:"right",children:[(0,Pn.jsx)(zi.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{o()},children:(0,dw.__)("Cancel")}),(0,Pn.jsx)(zi.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!d||g,isBusy:g,children:r})]})]})})}var ase=a(E(),1),v7e={id:"duplicate-template-part",label:(0,Wf._x)("Duplicate","action label"),isEligible:e=>e.type==="wp_template_part",modalHeader:(0,Wf._x)("Duplicate template part","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=(0,ise.useMemo)(()=>r.blocks??(0,sse.parse)(typeof r.content=="string"?r.content:r.content.raw,{__unstableSkipMigrationLogs:!0}),[r.content,r.blocks]),{createSuccessNotice:n}=(0,ose.useDispatch)(nse.store);function i(s){n((0,Wf.sprintf)((0,Wf._x)('"%s" duplicated.',"template part"),ft(s)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()}return(0,ase.jsx)(rH,{blocks:o,defaultArea:r.area,defaultTitle:(0,Wf.sprintf)((0,Wf._x)("%s (Copy)","template part"),ft(r)),onCreate:i,onError:t,confirmLabel:(0,Wf._x)("Duplicate","action label"),closeModal:t??(()=>{})})}},oH=v7e;var zC=a(z(),1),lse=a(G(),1);var Ym=a(E(),1),b7e={id:"alt_text",type:"text",label:(0,zC.__)("Alt text"),isVisible:e=>e?.media_type==="image",render:({item:e})=>e?.alt_text||"-",Edit:({field:e,onChange:t,data:r})=>(0,Ym.jsx)(lse.TextareaControl,{label:e.label,value:r.alt_text||"",onChange:o=>t({alt_text:o}),help:(0,Ym.jsxs)(Ym.Fragment,{children:[(0,Ym.jsx)(U9,{href:(0,zC.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),openInNewTab:!0,children:(0,zC.__)("Describe the purpose of the image.")}),(0,Ym.jsx)("br",{}),(0,zC.__)("Leave empty if decorative.")]}),rows:2}),enableSorting:!1,filterBy:!1},nH=b7e;var pse=a(z(),1);var MI=a(U(),1),iH=a(z(),1);function NI(e){return e?typeof e=="string"?e:typeof e=="object"&&(e.rendered||e.raw)||"":""}var FI=a(E(),1);function cse({item:e}){let[t,r]=(0,MI.useState)(null),o=e.post,n=e._embedded?.["wp:attached-to"]?.[0]?.id,i=e._embedded?.["wp:attached-to"]?.[0]?.title;return(0,MI.useEffect)(()=>{o&&o===n&&r(NI(i)||(0,iH.__)("(no title)")),o||r((0,iH.__)("(Unattached)"))},[o,n,i]),(0,FI.jsx)(FI.Fragment,{children:t})}var DI=a(ne(),1),LI=a(G(),1),sH=a(z(),1),Gv=a(U(),1),use=a(ke(),1),dse=a(Y(),1);var aH=a(E(),1);function fse({data:e,onChange:t}){let r=e.post&&e?._embedded?.["wp:attached-to"]?.[0]?[{label:NI(e._embedded?.["wp:attached-to"]?.[0]?.title),value:e.post.toString()}]:[],[o,n]=(0,Gv.useState)(r),[i,s]=(0,Gv.useState)([]),[l,c]=(0,Gv.useState)(!1),[u,d]=(0,Gv.useState)(e?.post?.toString()??null),f=(0,dse.useSelect)(b=>b(DI.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,DI.__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,Gv.createInterpolateElement)((0,sH.__)("Search for a post or page to attach this media to or <button>detach current</button>."),{button:(0,aH.jsx)(LI.Button,{__next40pxDefaultSize:!0,onClick:m,variant:"link",accessibleWhenDisabled:!0,disabled:!u})});return(0,aH.jsx)(LI.ComboboxControl,{className:"dataviews-media-field__attached-to",isLoading:l,label:(0,sH.__)("Attached to"),help:v,value:u,options:o,onFilterValueChange:(0,use.debounce)(b=>h(b),300),onChange:g,hideLabelFromVision:!0})}var y7e={id:"attached_to",type:"text",label:(0,pse.__)("Attached to"),Edit:fse,render:cse,enableSorting:!1,filterBy:!1},lH=y7e;var gse=a(z(),1),vse=a(Y(),1),bse=a(ne(),1);var mse=a(z(),1),mw=a(U(),1);var BI=a(G(),1),qm=a(E(),1);function hse({item:e}){let t=e?._embedded?.author?.[0],r=t?.name,o=t?.avatar_urls?.[48],[n,i]=(0,mw.useState)("loading");(0,mw.useEffect)(()=>{i("loading")},[o]);let s=(0,mw.useCallback)(c=>{c?.complete&&i("instant")},[]),l=()=>{n==="loading"&&i("loaded")};return(0,qm.jsxs)(BI.__experimentalHStack,{alignment:"left",spacing:0,children:[!!o&&(0,qm.jsx)("div",{className:J("media-author-field__avatar",{"is-loading":n==="loading","is-loaded":n==="loaded"}),children:(0,qm.jsx)("img",{ref:s,onLoad:l,alt:(0,mse.__)("Author avatar"),src:o})}),!o&&(0,qm.jsx)("div",{className:"media-author-field__icon",children:(0,qm.jsx)(BI.Icon,{icon:$g})}),(0,qm.jsx)("span",{className:"media-author-field__name",children:r})]})}var w7e={label:(0,gse.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,vse.resolveSelect)(bse.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),render:hse,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},cH=w7e;var yse=a(z(),1),wse=a(G(),1);function Km(e){return e?typeof e=="string"?e:typeof e=="object"&&"raw"in e&&e.raw||"":""}var _se=a(E(),1),_7e={id:"caption",type:"text",label:(0,yse.__)("Caption"),getValue:({item:e})=>Km(e?.caption),render:({item:e})=>Km(e?.caption)||"-",Edit:({field:e,onChange:t,data:r})=>(0,_se.jsx)(wse.TextareaControl,{label:e.label,value:Km(r.caption)||"",onChange:o=>t({caption:o}),rows:2}),enableSorting:!1,filterBy:!1},uH=_7e;var Sse=a(z(),1),S7e={id:"date",type:"datetime",label:(0,Sse.__)("Date added"),filterBy:{operators:["before","after"]},readOnly:!0},dH=S7e;var xse=a(z(),1),Cse=a(G(),1);var fH=a(E(),1),x7e={id:"description",type:"text",label:(0,xse.__)("Description"),getValue:({item:e})=>Km(e?.description),render:({item:e})=>(0,fH.jsx)("div",{children:Km(e?.description)||"-"}),Edit:({field:e,onChange:t,data:r})=>(0,fH.jsx)(Cse.TextareaControl,{label:e.label,value:Km(r.description)||"",onChange:o=>t({description:o}),rows:5}),enableSorting:!1,filterBy:!1},pH=x7e;var kse=a(z(),1),Rse=a(ho(),1);var Tse=a(U(),1),Ese=a(ho(),1);var Yv=a(E(),1),C7e=15;function Pse({item:e}){let t=(0,Tse.useMemo)(()=>e?.source_url?(0,Ese.getFilename)(e.source_url):null,[e?.source_url]);return t?t.length<=C7e?(0,Yv.jsx)("span",{className:"dataviews-media-field__filename",children:t}):(0,Yv.jsxs)(Ke.Root,{children:[(0,Yv.jsx)(Ke.Trigger,{render:(0,Yv.jsx)("span",{className:"dataviews-media-field__filename",children:t})}),(0,Yv.jsx)(Ke.Popup,{children:t})]}):""}var T7e={id:"filename",type:"text",label:(0,kse.__)("File name"),getValue:({item:e})=>(0,Rse.getFilename)(e?.source_url||""),render:Pse,enableSorting:!1,filterBy:!1,readOnly:!0},mH=T7e;var Hi=a(z(),1),Ise=1024,Ose=1024*Ise,Nse=1024*Ose,Mse=1024*Nse,Fse=1024*Mse,Dse=1024*Fse,Lse=1024*Dse,E7e=1024*Lse;function Ase(e,t,r=2){return(0,Hi.sprintf)((0,Hi._x)("%1$s %2$s","file size"),e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r}),t)}function P7e(e,t=2){if(e===0)return Ase(0,(0,Hi._x)("B","unit symbol"),t);let r={[(0,Hi._x)("YB","unit symbol")]:E7e,[(0,Hi._x)("ZB","unit symbol")]:Lse,[(0,Hi._x)("EB","unit symbol")]:Dse,[(0,Hi._x)("PB","unit symbol")]:Fse,[(0,Hi._x)("TB","unit symbol")]:Mse,[(0,Hi._x)("GB","unit symbol")]:Nse,[(0,Hi._x)("MB","unit symbol")]:Ose,[(0,Hi._x)("KB","unit symbol")]:Ise,[(0,Hi._x)("B","unit symbol")]:1};for(let[o,n]of Object.entries(r))if(e>=n)return Ase(e/n,o,t);return""}var k7e={id:"filesize",type:"text",label:(0,Hi.__)("File size"),getValue:({item:e})=>e?.media_details?.filesize?P7e(e?.media_details?.filesize):"",isVisible:e=>!!e?.media_details?.filesize,enableSorting:!1,filterBy:!1,readOnly:!0},hH=k7e;var hw=a(z(),1),R7e={id:"media_dimensions",type:"text",label:(0,hw.__)("Dimensions"),getValue:({item:e})=>e?.media_details?.width&&e?.media_details?.height?(0,hw.sprintf)((0,hw._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},gH=R7e;var Bse=a(z(),1),A7e={id:"mime_type",type:"text",label:(0,Bse.__)("File type"),getValue:({item:e})=>e?.mime_type||"",render:({item:e})=>e?.mime_type||"-",enableSorting:!1,filterBy:!1,readOnly:!0},vH=A7e;var Hwe=a(z(),1);var Vwe=a(z(),1),kG=a(be(),1),jwe=a(Y(),1),AE=a(ne(),1);var ml=a(U(),1),og=a(Y(),1),TG=a(z(),1),Tp=a(ne(),1),W_=a(be(),1),Mwe=a(It(),1),Fwe=a(kl(),1),Dwe=a(At(),1),Lwe=a(ho(),1);var Vse=a(U(),1),gw=a(Y(),1),jse=a(ke(),1),zse=a(be(),1);var VI=a(E(),1);function I7e(e,t,r){if(!r)return t;let o=e.get(t);return o||(o=(0,gw.createRegistry)({"core/block-editor":zse.storeConfig},t),o.registerStore("core/editor",HC),e.set(t,o)),o}var O7e=(0,jse.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...r})=>{let o=(0,gw.useRegistry)(),[n]=(0,Vse.useState)(()=>new WeakMap),i=I7e(n,o,t);return i===o?(0,VI.jsx)(e,{registry:o,...r}):(0,VI.jsx)(gw.RegistryProvider,{value:i,children:(0,VI.jsx)(e,{registry:i,...r})})},"withRegistryProvider"),Hse=O7e;var Jh=a(U(),1),ey=a(Y(),1),Pa=a(ne(),1),s0e=a(z(),1),a0e=a(Dt(),1),l0e=a(ke(),1),c0e=a(At(),1),MM=a(be(),1);var jI=a(U(),1),Use=a(E(),1),Wse=(0,jI.createContext)(void 0);function Gse({value:e,onChange:t,settings:r={},children:o}){let n={media:e,onChange:t,fields:r.fields||[]};return(0,Use.jsx)(Wse.Provider,{value:n,children:o})}function vw(){let e=(0,jI.useContext)(Wse);if(!e)throw new Error("useMediaEditorContext must be used within MediaEditorProvider");return e}var Yse=a(G(),1),qse=a(U(),1),zI=a(z(),1);function qv(e){return e?e.startsWith("image/")?{type:"image"}:e.startsWith("video/")?{type:"video"}:e.startsWith("audio/")?{type:"audio"}:{type:"application"}:{type:"application"}}var Un=a(E(),1);function N7e({mediaType:e,mediaUrl:t,altText:r,displayTitle:o,mimeType:n,onLoad:i,onError:s,loadingState:l}){switch(e.type){case"image":return(0,Un.jsx)("img",{className:l==="loaded"?"loaded":"",src:t,alt:r||"",onLoad:i,onError:s});case"video":return(0,Un.jsx)("video",{src:t,controls:!0,onError:s,children:o});case"audio":return(0,Un.jsx)("audio",{src:t,controls:!0,onError:s,children:o});default:return(0,Un.jsxs)("div",{className:"media-editor-preview__file-info",children:[(0,Un.jsx)("p",{className:"media-editor-preview__file-name",children:o}),(0,Un.jsx)("p",{className:"media-editor-preview__mime-type",children:n}),(0,Un.jsx)("a",{href:t,target:"_blank",rel:"noopener",className:"media-editor-preview__download-link",children:(0,zI.__)("View file")})]})}}function Kse(e){let[t,r]=(0,qse.useState)("loading"),{media:o}=vw(),{source_url:n,mime_type:i,alt_text:s,title:l}=o||{},c=qv(i);if(!n)return(0,Un.jsx)("div",{className:"media-editor-preview media-editor-preview--empty",children:(0,Un.jsx)("p",{children:(0,zI.__)("No media file available.")})});if(t==="error")return(0,Un.jsxs)("div",{className:"media-editor-preview media-editor-preview--error",children:[(0,Un.jsx)("p",{children:(0,zI.__)("Failed to load media file.")}),(0,Un.jsx)("p",{className:"media-editor-preview__url",children:n})]});let u=typeof l=="string"?l:l?.rendered||l?.raw;return(0,Un.jsxs)("div",{...e,className:`media-editor-preview media-editor-preview--${c.type}`,children:[c.type==="image"&&t==="loading"&&(0,Un.jsx)("div",{className:"media-editor-preview__spinner",children:(0,Un.jsx)(Yse.Spinner,{})}),(0,Un.jsx)(N7e,{mediaType:c,mediaUrl:n,altText:s,displayTitle:u,mimeType:i,onLoad:()=>r("loaded"),onError:()=>r("error"),loadingState:t})]})}var YI=a(U(),1);var bH=a(z(),1);var oo="isAny",no="isNone",Ui="isAll",Wn="isNotAll",Cs="between",Ts="inThePast",la="over",yo="is",wo="isNot",Zm="lessThan",Xm="greaterThan",Qm="lessThanOrEqual",Jm="greaterThanOrEqual",$m="before",eh="after",th="beforeInc",rh="afterInc",Gu="contains",Yu="notContains",qu="startsWith",oh="on",nh="notOn",HI=["asc","desc"],Zse={asc:"\u2191",desc:"\u2193"},UI={asc:"ascending",desc:"descending"},WI={asc:(0,bH.__)("Sort ascending"),desc:(0,bH.__)("Sort descending")},Xse={asc:M4,desc:k4},GI="table",Qse="grid",Jse="list",$se="activity",eae="pickerGrid",tae="pickerTable",rae="pickerActivity";var oae=(0,YI.createContext)({view:{type:GI},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,YI.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInitiallyLoaded:!1,config:{perPageSizes:[]},intersectionObserver:null});oae.displayName="DataViewsContext";var $e=oae;var Qu=a(z(),1);var Qv=a(z(),1),nO=a(G(),1),tl=a(U(),1),xae=a(Oo(),1);var iae=a(G(),1),sae=a(z(),1),aae=a(E(),1),yH="dataviews-selection-checkbox";function ih({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,sae.__)("(no title)");return(0,aae.jsx)(iae.CheckboxControl,{className:yH,"aria-label":d,"aria-disabled":i,checked:u,onChange:()=>{i||t(c?e.filter(f=>l!==f):[...e,l])},...s})}var Kv=a(G(),1),dae=a(z(),1),yw=a(U(),1);var fae=a(Y(),1),wH=a(ke(),1);var lae=a(vf(),1),{lock:cae,unlock:St}=(0,lae.__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 Mr=a(E(),1),{Menu:bw,kebabCase:M7e}=St(Kv.privateApis);function F7e({action:e,onClick:t,items:r,variant:o}){let n=typeof e.label=="string"?e.label:e.label(r);return(0,Mr.jsx)(Kv.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",variant:o,onClick:t,children:n})}function D7e({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Mr.jsx)(bw.Item,{disabled:e.disabled,onClick:t,children:(0,Mr.jsx)(bw.ItemLabel,{children:o})})}function UC({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,Mr.jsx)(Kv.Modal,{title:n||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${M7e(e.id)}`,children:(0,Mr.jsx)(e.RenderModal,{items:t,closeModal:r})})}function _H({actions:e,item:t,registry:r,setActiveModalAction:o}){let{primaryActions:n,regularActions:i}=(0,yw.useMemo)(()=>e.reduce((l,c)=>((c.isPrimary?l.primaryActions:l.regularActions).push(c),l),{primaryActions:[],regularActions:[]}),[e]),s=l=>l.map(c=>(0,Mr.jsx)(D7e,{action:c,onClick:()=>{if("RenderModal"in c){o(c);return}c.callback([t],{registry:r})},items:[t]},c.id));return(0,Mr.jsxs)(bw.Group,{children:[s(n),s(i)]})}function ww({item:e,actions:t,isCompact:r}){let o=(0,fae.useRegistry)(),{primaryActions:n,eligibleActions:i}=(0,yw.useMemo)(()=>{let l=t.filter(u=>!u.isEligible||u.isEligible(e));return{primaryActions:l.filter(u=>u.isPrimary),eligibleActions:l}},[t,e]),s=(0,wH.useViewportMatch)("medium","<");return r?(0,Mr.jsx)(uae,{item:e,actions:i,isSmall:!0,registry:o}):(0,Mr.jsxs)(oe,{direction:"row",justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,Mr.jsx)(SH,{item:e,actions:n,registry:o}),(n.length<i.length||s)&&(0,Mr.jsx)(uae,{item:e,actions:i,registry:o})]})}function uae({item:e,actions:t,isSmall:r,registry:o}){let[n,i]=(0,yw.useState)(null);return(0,Mr.jsxs)(Mr.Fragment,{children:[(0,Mr.jsxs)(bw,{placement:"bottom-end",children:[(0,Mr.jsx)(bw.TriggerButton,{render:(0,Mr.jsx)(Kv.Button,{size:r?"small":"compact",icon:go,label:(0,dae.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,Mr.jsx)(bw.Popover,{children:(0,Mr.jsx)(_H,{actions:t,item:e,registry:o,setActiveModalAction:i})})]}),!!n&&(0,Mr.jsx)(UC,{action:n,items:[e],closeModal:()=>i(null)})]})}function SH({item:e,actions:t,registry:r,buttonVariant:o}){let[n,i]=(0,yw.useState)(null);return(0,wH.useViewportMatch)("medium","<")||!Array.isArray(t)||t.length===0?null:(0,Mr.jsxs)(Mr.Fragment,{children:[t.map(l=>(0,Mr.jsx)(F7e,{action:l,onClick:()=>{if("RenderModal"in l){i(l);return}l.callback([e],{registry:r})},items:[e],variant:o},l.id)),!!n&&(0,Mr.jsx)(UC,{action:n,items:[e],closeModal:()=>i(null)})]})}var KI=a(G(),1),qI=a(z(),1),Zv=a(U(),1),L7e=a(Y(),1);var B7e=a(ke(),1);var sh=a(z(),1);function pae(e,t,r,o=!1){return e>0?(0,sh.sprintf)((0,sh._n)("%d Item selected","%d Items selected",e),e):o||r<=t?(0,sh.sprintf)((0,sh._n)("%d Item","%d Items",r),r):(0,sh.sprintf)((0,sh._n)("%1$d of %2$d Item","%1$d of %2$d Items",r),t,r)}var WC=a(E(),1);function ZI(e,t){return e.some(r=>r.supportsBulk&&(!r.isEligible||r.isEligible(t)))}function XI(e,t){return(0,Zv.useMemo)(()=>ZI(e,t),[e,t])}function QI(e,t){return(0,Zv.useMemo)(()=>t.some(r=>ZI(e,r)),[e,t])}function JI({selection:e,onChangeSelection:t,data:r,actions:o,getItemId:n,disableSelectAll:i=!1}){let s=(0,Zv.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,WC.jsx)(KI.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:c,disabled:!c,onChange:()=>{t([])},"aria-label":(0,qI.__)("Deselect all")}):(0,WC.jsx)(KI.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,qI.__)("Deselect all"):(0,qI.__)("Select all")})}var Gf=a(z(),1);var Yf=a(G(),1),ah=a(U(),1);function $I(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}=St(Yf.privateApis);function V7e({children:e}){return ah.Children.toArray(e).filter(Boolean).map((t,r)=>(0,Ot.jsxs)(ah.Fragment,{children:[r>0&&(0,Ot.jsx)(br.Separator,{}),t]},r))}var j7e=(0,ah.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,ah.useContext)($e);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=$I(r,o).filter(k=>!f.includes(k.id)),C=(c||u)&&!!x.length,A=(0,Gf.isRTL)();return(0,Ot.jsxs)(br,{children:[(0,Ot.jsxs)(br.TriggerButton,{render:(0,Ot.jsx)(Yf.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:Zse[r.sort.direction]})]}),(0,Ot.jsx)(br.Popover,{style:{minWidth:"240px"},children:(0,Ot.jsxs)(V7e,{children:[v&&(0,Ot.jsx)(br.Group,{children:HI.map(k=>{let R=r.sort&&h&&r.sort.direction===k,N=`${t}-${k}`;return(0,Ot.jsx)(br.RadioItem,{name:"view-table-sorting",value:N,checked:R,onChange:()=>{n({...r,sort:{field:t,direction:k},showLevels:!1})},children:(0,Ot.jsx)(br.ItemLabel,{children:WI[k]})},N)})}),b&&(0,Ot.jsx)(br.Group,{children:(0,Ot.jsx)(br.Item,{prefix:(0,Ot.jsx)(Yf.Icon,{icon:Gx}),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,Gf.__)("Add filter")})})}),(l||g||C)&&y&&(0,Ot.jsxs)(br.Group,{children:[l&&(0,Ot.jsx)(br.Item,{prefix:(0,Ot.jsx)(Yf.Icon,{icon:A4}),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,Gf.__)("Move left")})}),l&&(0,Ot.jsx)(br.Item,{prefix:(0,Ot.jsx)(Yf.Icon,{icon:O4}),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,Gf.__)("Move right")})}),c&&!!x.length&&(0,Ot.jsxs)(br,{children:[(0,Ot.jsx)(br.SubmenuTriggerItem,{children:(0,Ot.jsx)(br.ItemLabel,{children:(0,Gf.__)("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,Gf.__)("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)(Yf.Icon,{icon:c1}),onClick:()=>{i(y),n({...r,fields:f.filter(k=>k!==t)})},children:(0,Ot.jsx)(br.ItemLabel,{children:(0,Gf.__)("Hide column")})})]})]})})]})}),z7e=j7e,_w=z7e;var mae=a(U(),1),xH=a(E(),1);function H7e({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 lh({item:e,isItemClickable:t,onClickItem:r,renderItemLink:o,className:n,children:i,...s}){if(!t(e))return(0,xH.jsx)("div",{className:n,...s,children:i});if(o){let c=o({item:e,className:`${n} ${n}--clickable`,...s,children:i});return(0,mae.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=H7e({item:e,isItemClickable:t,onClickItem:r,className:n});return(0,xH.jsx)("div",{...l,...s,children:i})}var Ku=a(E(),1);function U7e({item:e,level:t,titleField:r,mediaField:o,descriptionField:n,onClickItem:i,renderItemLink:s,isItemClickable:l}){return(0,Ku.jsxs)(oe,{direction:"row",gap:"md",align:"flex-start",justify:"flex-start",children:[o&&(0,Ku.jsx)(lh,{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,Ku.jsx)(o.render,{item:e,field:o,config:{sizes:"32px"}})}),(0,Ku.jsxs)(oe,{direction:"column",align:"flex-start",className:"dataviews-view-table__primary-column-content",children:[r&&(0,Ku.jsxs)(lh,{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,Ku.jsxs)("span",{className:"dataviews-view-table__level",children:[Array(t).fill("\u2014").join(" "),"\xA0"]}),(0,Ku.jsx)(r.render,{item:e,field:r})]}),n&&(0,Ku.jsx)(n.render,{item:e,field:n})]})]})}var eO=U7e;var Xv=a(U(),1),hae=a(z(),1),W7e=e=>(0,hae.isRTL)()?Math.abs(e.scrollLeft)<=1:e.scrollLeft+e.clientWidth>=e.scrollWidth-1;function gae({scrollContainerRef:e,enabledHorizontal:t=!1}){let[r,o]=(0,Xv.useState)(!1),[n,i]=(0,Xv.useState)(!1),s=(0,Xv.useCallback)(()=>{let l=e.current;l&&(t&&o(W7e(l)),i(l.scrollTop>0))},[e,t]);return(0,Xv.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 ca(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 GC=a(U(),1),bae=a(Oo(),1);function vae(e,t,r){return e.slice(Math.min(t,r),Math.max(t,r)+1)}function G7e({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?[]:vae(o,c,u),f=n.filter(m=>!d.includes(m));return[...new Set([...f,...vae(o,c,i)])]}function Y7e({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 tO({data:e,actions:t,getItemId:r,selection:o,onChangeSelection:n}){let i=(0,GC.useRef)(null),s=(0,GC.useRef)(!1);(0,GC.useEffect)(()=>{let f=()=>{s.current=!0};return document.addEventListener("touchstart",f,{once:!0}),()=>document.removeEventListener("touchstart",f)},[]);let l=e.filter(f=>ZI(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,bae.isAppleOS)()?h.metaKey:h.ctrlKey,v=h.target instanceof Element&&!!h.target.closest(`.${yH}`);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:Y7e({targetId:f,orderedIds:l,selection:o})??f,lastTargetId:null}),n(G7e({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 ch=a(G(),1),wae=a(z(),1),_ae=a(U(),1);var el=a(E(),1);function yae({field:e,isVisible:t,onToggleVisibility:r}){return(0,el.jsx)(ch.__experimentalItem,{onClick:e.enableHiding?r:void 0,children:(0,el.jsxs)(oe,{direction:"row",gap:"sm",justify:"flex-start",align:"center",children:[(0,el.jsx)("div",{style:{height:24,width:24},children:t&&(0,el.jsx)(ch.Icon,{icon:Ro})}),(0,el.jsx)("span",{className:"dataviews-view-config__label",children:e.label})]})})}function q7e(e){return!!e}function rO({showLabel:e=!0}){let{view:t,fields:r,onChangeView:o}=(0,_ae.useContext)($e),n=$I(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})=>q7e(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,el.jsxs)(oe,{direction:"column",className:"dataviews-field-control",children:[e&&(0,el.jsx)(ch.BaseControl.VisualLabel,{children:(0,wae.__)("Properties")}),(0,el.jsx)(oe,{direction:"column",className:"dataviews-view-config__properties",children:(0,el.jsxs)(ch.__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,el.jsx)(yae,{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,el.jsx)(yae,{field:b,isVisible:v,onToggleVisibility:()=>{o({...t,fields:v?u.filter(_=>_!==g.id):[...u,g.id]})}},g.id)})]})})]})}var oO=a(U(),1);function Zu(e,t={delay:400}){let[r,o]=(0,oO.useState)(!1);return(0,oO.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 Cae(e,t){if(e)return e;if(t==="integer"||t==="number")return"end"}function K7e({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 Sae({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,tl.useContext)($e),x=XI(o,t),C=x&&d.includes(i),{showTitle:A=!0,showMedia:k=!0,showDescription:R=!0,infiniteScrollEnabled:N}=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":N?S.totalItems:void 0,"aria-posinset":w,role:N?"article":void 0,onClickCapture:_,onMouseDown:M=>{let j=(0,xae.isAppleOS)()?M.metaKey:M.ctrlKey;M.button===0&&j&&window.navigator.userAgent.toLowerCase().includes("firefox")&&M.preventDefault(),b(M)},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)(ih,{item:t,selection:d,onChangeSelection:v,getItemId:f,titleField:l,disabled:!x})})}),T&&(0,gt.jsx)("td",{children:(0,gt.jsx)(eO,{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(M=>{let{width:j,maxWidth:F,minWidth:D,align:B}=s.layout?.styles?.[M]??{},L=n.find(V=>V.id===M),O=Cae(B,L?.type);return(0,gt.jsx)("td",{style:{width:j,maxWidth:F,minWidth:D},children:(0,gt.jsx)(K7e,{fields:n,item:t,column:M,align:O})},M)}),!!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:M=>M.stopPropagation(),children:(0,gt.jsx)(ww,{item:t,actions:o})})]})}function Z7e({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,tl.useContext)($e),_=Zu(i),y=h.groupBy?.field?r.find($=>$.id===h.groupBy?.field):null,w=y?ca(t,y):null,S=w?Array.from(w.values()).flat():t,{getSelectionProps:x}=tO({data:S,actions:e,getItemId:o,selection:c,onChangeSelection:l}),C=(0,tl.useRef)(new Map),A=(0,tl.useRef)(void 0),[k,R]=(0,tl.useState)(),[N,P]=(0,tl.useState)(null);(0,tl.useEffect)(()=>{A.current&&(A.current.focus(),A.current=void 0)});let T=(0,tl.useId)(),{isHorizontalScrollEnd:M,isVerticallyScrolled:j}=gae({scrollContainerRef:b,enabledHorizontal:!!e?.length}),F=QI(e,t);if(k){A.current=k,R(void 0);return}let D=$=>{let ue=C.current.get($.id),ve=ue?C.current.get(ue.fallback):void 0;R(ve?.node)},B=$=>{$.preventDefault(),$.stopPropagation();let ue={getBoundingClientRect:()=>({x:$.clientX,y:$.clientY,top:$.clientY,left:$.clientX,right:$.clientX,bottom:$.clientY,width:0,height:0,toJSON:()=>({})})};window.requestAnimationFrame(()=>{P(ue)})},L=!!t?.length,O=r.find($=>$.id===h.titleField),V=r.find($=>$.id===h.mediaField),W=r.find($=>$.id===h.descriptionField),{showTitle:q=!0,showMedia:Z=!0,showDescription:Q=!0}=h,ce=O&&q||V&&Z||W&&Q,te=h.fields??[],de=($,ue)=>ve=>{ve?C.current.set($,{node:ve,fallback:te[ue>0?ue-1:1]}):C.current.delete($)},me=h.infiniteScrollEnabled&&!w,ee=(0,Qv.isRTL)();return L?(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":!me&&_}),"aria-busy":i,"aria-describedby":T,role:me?"feed":void 0,inert:!me&&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"}),te.map(($,ue)=>(0,gt.jsx)("col",{className:J(`dataviews-view-table__col-${$}`,{"dataviews-view-table__col-expand":!ce&&ue===te.length-1})},`col-${$}`)),!!e?.length&&(0,gt.jsx)("col",{className:"dataviews-view-table__col-actions"})]}),N&&(0,gt.jsx)(nO.Popover,{anchor:N,onClose:()=>P(null),placement:"bottom-start",children:(0,gt.jsx)(rO,{showLabel:!1})}),(0,gt.jsx)("thead",{className:J({"dataviews-view-table__thead--stuck":j}),onContextMenu:B,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:B,children:(0,gt.jsx)(JI,{selection:c,onChangeSelection:l,data:t,actions:e,getItemId:o})}),ce&&(0,gt.jsx)("th",{scope:"col",children:O&&(0,gt.jsx)(_w,{ref:de(O.id,0),fieldId:O.id,view:h,fields:r,onChangeView:s,onHide:D,setOpenedFilter:u,canMove:!1,canInsertLeft:ee?h.layout?.enableMoving??!0:!1,canInsertRight:ee?!1:h.layout?.enableMoving??!0})}),te.map(($,ue)=>{let{width:ve,maxWidth:Ee,minWidth:ie,align:ae}=h.layout?.styles?.[$]??{},pe=r.find(Ae=>Ae.id===$),le=Cae(ae,pe?.type),se=h.layout?.enableMoving??!0;return(0,gt.jsx)("th",{style:{width:ve,maxWidth:Ee,minWidth:ie,textAlign:le},"aria-sort":h.sort?.direction&&h.sort?.field===$?UI[h.sort.direction]:void 0,scope:"col",children:(0,gt.jsx)(_w,{ref:de($,ue),fieldId:$,view:h,fields:r,onChangeView:s,onHide:D,setOpenedFilter:u,canMove:se,canInsertLeft:se,canInsertRight:se})},$)}),!!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":!M}),children:(0,gt.jsx)("span",{className:"dataviews-view-table-header",children:(0,Qv.__)("Actions")})})]})}),L&&y&&w?Array.from(w.entries()).map(([$,ue])=>(0,gt.jsxs)("tbody",{children:[(0,gt.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,gt.jsx)("td",{colSpan:te.length+(ce?1:0)+(F?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:h.groupBy?.showLabel===!1?$:(0,Qv.sprintf)((0,Qv.__)("%1$s: %2$s"),y.label,$)})}),ue.map((ve,Ee)=>{let ie=o(ve)||Ee.toString();return(0,gt.jsx)(Sae,{item:ve,level:h.showLevels&&typeof n=="function"?n(ve):void 0,hasBulkActions:F,actions:e,fields:r,id:ie,view:h,titleField:O,mediaField:V,descriptionField:W,selection:c,getItemId:o,onChangeSelection:l,...x(ie),onClickItem:d,renderItemLink:m,isItemClickable:f,isActionsColumnSticky:!M},o(ve))})]},`group-${$}`)):(0,gt.jsx)("tbody",{children:L&&t.map(($,ue)=>{let ve=o($)||ue.toString();return(0,gt.jsx)(Sae,{item:$,level:h.showLevels&&typeof n=="function"?n($):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:!M,posinset:me?ue+1:void 0},o($))})})]}),me&&i&&(0,gt.jsx)("div",{className:"dataviews-loading",id:T,children:(0,gt.jsx)("p",{className:"dataviews-loading-more",children:(0,gt.jsx)(nO.Spinner,{})})})]}):(0,gt.jsx)("div",{className:J("dataviews-no-results",{"is-refreshing":_}),id:T,children:v})}var Tae=Z7e;var Aae=a(G(),1),cO=a(z(),1);var ua=a(G(),1);var qC=a(z(),1),Rae=a(ke(),1),dh=a(U(),1);var X7e=a(G(),1),Q7e=a(z(),1),iO=a(U(),1);var J7e=a(E(),1),$7e=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}],e9e=$7e[2].value;function sO(){let e=(0,iO.useContext)($e),t=e.view;return(0,iO.useMemo)(()=>{let r=e.containerWidth,o=32,n=t.layout?.previewSize??e9e,i=Math.floor((r+o)/(n+o));return Math.max(1,i)},[e.containerWidth,t.layout?.previewSize])}var Eae=a(U(),1);var Pae=a(E(),1),YC=(0,Eae.forwardRef)(({className:e,previewSize:t,...r},o)=>(0,Pae.jsx)("div",{ref:o,className:J("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...r}));var aO=a(U(),1);function uh(e,t){let{intersectionObserver:r}=(0,aO.useContext)($e);(0,aO.useEffect)(()=>{let o=e.current;if(!(!o||t===void 0||!r))return r.observe(o),()=>{r.unobserve(o)}},[e,r,t])}function lO(e,t,r){let n=!!e?.length&&t?e[0].position:void 0;return n&&r?(n-1)%r:0}var Et=a(E(),1),{Badge:t9e}=St(ua.privateApis);function r9e(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 kae=(0,dh.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=XI(u,c),R=l(c),N=(0,dh.useRef)(null),P=(0,dh.useCallback)(V=>{N.current=V,typeof S=="function"?S(V):S&&(S.current=V)},[S]);uh(N,_);let T=(0,Rae.useInstanceId)(e),M=r.includes(R),j=(0,Et.jsx)("span",{className:"dataviews-view-grid__media-placeholder"}),F=C&&d?.render,D=F?(0,Et.jsx)(d.render,{item:c,field:d,config:b}):j,B=x&&f?.render?(0,Et.jsx)(f.render,{item:c,field:f}):null,L,O;return i(c)&&n&&(B?(L={"aria-labelledby":`dataviews-view-grid__title-field-${T}`},O={id:`dataviews-view-grid__title-field-${T}`}):L={"aria-label":(0,qC.__)("Navigate to item")}),(0,Et.jsxs)(oe,{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&&M}),children:[(0,Et.jsx)(lh,{item:c,isItemClickable:i,onClickItem:n,renderItemLink:s,className:J("dataviews-view-grid__media",{"dataviews-view-grid__media--placeholder":!F}),...L,children:D}),v&&(0,Et.jsx)(ih,{item:c,selection:r,onChangeSelection:o,getItemId:l,titleField:f,disabled:!k}),!!u?.length&&(0,Et.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,Et.jsx)(ww,{item:c,actions:u,isCompact:!0})}),x&&(0,Et.jsx)("div",{className:"dataviews-view-grid__title-actions",children:(0,Et.jsx)(lh,{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:B})}),(0,Et.jsxs)(oe,{direction:"column",gap:"xs",children:[A&&m?.render&&(0,Et.jsx)(m.render,{item:c,field:m}),!!g?.length&&(0,Et.jsx)(oe,{direction:"row",className:"dataviews-view-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:g.map(V=>(0,Et.jsx)(t9e,{className:"dataviews-view-grid__field-value",children:(0,Et.jsx)(V.render,{item:c,field:V})},V.id))}),!!h?.length&&(0,Et.jsx)(oe,{direction:"column",className:"dataviews-view-grid__fields",gap:"xs",children:h.map(V=>(0,Et.jsx)(ua.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsxs)(Ke.Root,{children:[(0,Et.jsx)(Ke.Trigger,{render:(0,Et.jsx)(ua.FlexItem,{className:"dataviews-view-grid__field-name",children:V.header})}),(0,Et.jsx)(Ke.Popup,{children:V.label})]}),(0,Et.jsx)(ua.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,Et.jsx)(V.render,{item:c,field:V})})]})},V.id))})]})]})});function CH({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,dh.useContext)($e),_=sO(),y=QI(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,M)=>{let j=s.find(D=>D.id===M);if(!j)return T;let F=i.layout?.badgeFields?.includes(M)?"badgeFields":"regularFields";return T[F].push(j),T},{regularFields:[],badgeFields:[]}),R="900px",N=Math.ceil(e.length/_),P=lO(e,t,_);return(0,Et.jsxs)(Et.Fragment,{children:[t&&(0,Et.jsxs)(ua.Composite,{render:(0,Et.jsx)(YC,{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,M)=>(0,Et.jsx)(ua.Composite.Item,{render:j=>(0,Et.jsx)(oe,{...j,direction:"column",role:"article",className:"dataviews-view-grid__row__gridcell dataviews-view-grid__card dataviews-view-grid__placeholder"}),"aria-hidden":!0,tabIndex:-1},`placeholder-${M}`)),e.map(T=>{let M=m(T),j=g(M),F=T.position;return(0,Et.jsx)(ua.Composite.Item,{render:D=>(0,Et.jsx)(kae,{...D,id:M,role:"article",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:T,actions:h,onMouseDown:B=>{D.onMouseDown?.(B),j.onMouseDown(B)},onClickCapture:B=>{D.onClickCapture?.(B),j.onClickCapture(B)},mediaField:S,titleField:w,descriptionField:x,regularFields:A,badgeFields:k,hasBulkActions:y,posinset:F,setsize:v.totalItems,config:{sizes:R}})},M)})]}),!t&&(0,Et.jsx)(ua.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":N,ref:b,inert:o,children:r9e(e,_).map((T,M)=>(0,Et.jsx)(ua.Composite.Row,{render:(0,Et.jsx)("div",{role:"row","aria-rowindex":M+1,"aria-label":(0,qC.sprintf)((0,qC.__)("Row %d"),M+1),className:"dataviews-view-grid__row",style:{gridTemplateColumns:`repeat( ${_}, minmax(0, 1fr) )`}}),children:T.map(j=>{let F=m(j),D=g(F);return(0,Et.jsx)(ua.Composite.Item,{render:B=>(0,Et.jsx)(kae,{...B,id:F,role:"gridcell",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:j,actions:h,onMouseDown:L=>{B.onMouseDown?.(L),D.onMouseDown(L)},onClickCapture:L=>{B.onClickCapture?.(L),D.onClickCapture(L)},mediaField:S,titleField:w,descriptionField:x,regularFields:A,badgeFields:k,hasBulkActions:y,config:{sizes:R}})},F)})},M))})]})}var rl=a(E(),1);function o9e({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=Zu(!!n),g=!!t?.length,v=d.groupBy?.field?r.find(x=>x.id===d.groupBy?.field):null,b=v?ca(t,v):null,_=d.infiniteScrollEnabled&&!b,y=b?Array.from(b.values()).flat():t,{getSelectionProps:w}=tO({data:y,actions:e,getItemId:o,selection:u,onChangeSelection:i});if(!g)return(0,rl.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,rl.jsxs)(rl.Fragment,{children:[g&&v&&b&&(0,rl.jsx)(oe,{direction:"column",gap:"lg",children:Array.from(b.entries()).map(([x,C])=>(0,rl.jsxs)(oe,{direction:"column",gap:"sm",children:[(0,rl.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,rl.jsx)(CH,{...S,data:C,isInfiniteScroll:!1})]},x))}),!b&&(0,rl.jsx)(CH,{...S,data:t,isInfiniteScroll:!!_}),_&&n&&(0,rl.jsx)("p",{className:"dataviews-loading-more",children:(0,rl.jsx)(Aae.Spinner,{})})]})}var Iae=o9e;var uO=a(ke(),1),Wi=a(G(),1),No=a(U(),1),KC=a(z(),1);var kH=a(Y(),1);var tt=a(E(),1),{Menu:TH}=St(Wi.privateApis);function EH(e){return`${e}-item-wrapper`}function n9e(e,t){return`${e}-primary-action-${t}`}function PH(e){return`${e}-dropdown`}function i9e({idPrefix:e,primaryAction:t,item:r}){let o=(0,kH.useRegistry)(),[n,i]=(0,No.useState)(!1),s=n9e(e,t.id),l=typeof t.label=="string"?t.label:t.label([r]);return"RenderModal"in t?(0,tt.jsx)("div",{role:"gridcell",children:(0,tt.jsx)(Wi.Composite.Item,{id:s,render:(0,tt.jsx)(Wi.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:l,size:"small",onClick:()=>i(!0)}),children:n&&(0,tt.jsx)(UC,{action:t,items:[r],closeModal:()=>i(!1)})})},t.id):(0,tt.jsx)("div",{role:"gridcell",children:(0,tt.jsx)(Wi.Composite.Item,{id:s,render:(0,tt.jsx)(Wi.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([r],{registry:o})},children:l})})},t.id)}function Oae({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,No.useRef)(null),_=`${r}-label`,y=`${r}-description`,w=(0,kH.useRegistry)(),[S,x]=(0,No.useState)(!1),[C,A]=(0,No.useState)(null),k=({type:L})=>{x(L==="mouseenter")},{paginationInfo:R}=(0,No.useContext)($e);(0,No.useEffect)(()=>{o&&b.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},[o]);let{primaryAction:N,eligibleActions:P}=(0,No.useMemo)(()=>{let L=t.filter(V=>!V.isEligible||V.isEligible(n));return{primaryAction:L.filter(V=>V.isPrimary)[0],eligibleActions:L}},[t,n]),T=N&&t.length===1,M=h&&s?.render?(0,tt.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,tt.jsx)(s.render,{item:n,field:s,config:{sizes:"52px"}})}):null,j=m&&i?.render?(0,tt.jsx)(i.render,{item:n,field:i}):null,F=g&&l?.render,D=!!M&&!F&&!u.length,B=P?.length>0&&(0,tt.jsxs)(oe,{direction:"row",gap:"md",className:"dataviews-view-list__item-actions",children:[N&&(0,tt.jsx)(i9e,{idPrefix:r,primaryAction:N,item:n}),!T&&(0,tt.jsxs)("div",{role:"gridcell",children:[(0,tt.jsxs)(TH,{placement:"bottom-end",children:[(0,tt.jsx)(TH.TriggerButton,{render:(0,tt.jsx)(Wi.Composite.Item,{id:PH(r),render:(0,tt.jsx)(Wi.Button,{size:"small",icon:go,label:(0,KC.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:d})})}),(0,tt.jsx)(TH.Popover,{children:(0,tt.jsx)(_H,{actions:P,item:n,registry:w,setActiveModalAction:A})})]}),!!C&&(0,tt.jsx)(UC,{action:C,items:[n],closeModal:()=>A(null)})]})]});return(0,tt.jsx)(Wi.Composite.Row,{ref:b,render:(0,tt.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,tt.jsxs)(oe,{direction:"row",className:"dataviews-view-list__item-wrapper",children:[(0,tt.jsx)("div",{role:"gridcell",children:(0,tt.jsx)(Wi.Composite.Item,{id:EH(r),"aria-pressed":o,"aria-labelledby":_,"aria-describedby":y,className:"dataviews-view-list__item",onClick:()=>c(n)})}),(0,tt.jsxs)(oe,{direction:"row",gap:"md",justify:"start",align:D?"center":"flex-start",style:{flex:1,minWidth:0},children:[M,(0,tt.jsxs)(oe,{direction:"column",gap:"xs",className:"dataviews-view-list__field-wrapper",children:[(0,tt.jsxs)(oe,{direction:"row",align:"center",children:[(0,tt.jsx)("div",{className:"dataviews-title-field dataviews-view-list__title-field",id:_,children:j}),B]}),F&&(0,tt.jsx)("div",{className:"dataviews-view-list__field",children:(0,tt.jsx)(l.render,{item:n,field:l})}),(0,tt.jsx)("div",{className:"dataviews-view-list__fields",id:y,children:u.map(L=>(0,tt.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,tt.jsx)(Jt,{className:"dataviews-view-list__field-label",render:(0,tt.jsx)("span",{}),children:L.label}),(0,tt.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,tt.jsx)(L.render,{item:n,field:L})})]},L.id))})]})]})]})})}function s9e(e){return!!e}function RH(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,uO.useInstanceId)(RH,"view-list"),m=Zu(!!i),{paginationInfo:h}=(0,No.useContext)($e),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(s9e),w=W=>s([n(W)]),S=(0,No.useCallback)(W=>`${f}-${n(W)}`,[f,n]),x=(0,No.useCallback)((W,q)=>q.startsWith(S(W)),[S]),[C,A]=(0,No.useState)(void 0),k=(0,No.useRef)(null);(0,No.useEffect)(()=>{g&&A(EH(S(g)))},[g,S]);let R=r.findIndex(W=>x(W,C??"")),N=(0,uO.usePrevious)(R),P=R!==-1,T=(0,No.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,No.useEffect)(()=>{!P&&(N!==void 0&&N!==-1)&&T(N,EH)},[P,T,N]);let M=(0,No.useCallback)(W=>{W.key==="ArrowDown"&&(W.preventDefault(),T(R+1,PH)),W.key==="ArrowUp"&&(W.preventDefault(),T(R-1,PH))},[T,R]),j=!!r?.length,F=c.groupBy?.field?o.find(W=>W.id===c.groupBy?.field):null,D=j&&F?ca(r,F):null,B=c.infiniteScrollEnabled&&!D,L=B&&(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":!B&&m}),V={ref:k,id:f,render:(0,tt.jsx)("div",{}),activeId:C,setActiveId:A,inert:!B&&i?"true":void 0};return j?j&&F&&D?(0,tt.jsx)(Wi.Composite,{...V,className:"dataviews-view-list__group",role:"grid",children:(0,tt.jsx)(oe,{direction:"column",gap:"lg",className:O,children:Array.from(D.entries()).map(([W,q])=>(0,tt.jsxs)(oe,{direction:"column",children:[(0,tt.jsx)("h3",{className:"dataviews-view-list__group-header",children:c.groupBy?.showLabel===!1?W:(0,KC.sprintf)((0,KC.__)("%1$s: %2$s"),F.label,W)}),q.map(Z=>{let Q=S(Z);return(0,tt.jsx)(Oae,{view:c,idPrefix:Q,actions:t,item:Z,isSelected:Z===g,onSelect:w,mediaField:b,titleField:v,descriptionField:_,otherFields:y,onDropdownTriggerKeyDown:M},Q)})]},W))})}):(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(Wi.Composite,{...V,className:O,role:c.infiniteScrollEnabled?"feed":"grid",children:r.map((W,q)=>{let Z=S(W);return(0,tt.jsx)(Oae,{view:c,idPrefix:Z,actions:t,item:W,isSelected:W===g,onSelect:w,mediaField:b,titleField:v,descriptionField:_,otherFields:y,onDropdownTriggerKeyDown:M,posinset:c.infiniteScrollEnabled?q+1:void 0},Z)})}),(L||B&&i)&&(0,tt.jsx)("p",{className:"dataviews-loading-more","aria-hidden":!i,children:(0,tt.jsx)(Wi.Spinner,{})})]}):(0,tt.jsx)("div",{className:J("dataviews-no-results",{"is-refreshing":m}),children:d})}var Vae=a(G(),1);var dO=a(z(),1),Nae=a(U(),1);var Sw=a(E(),1);function Mae({groupName:e,groupData:t,groupField:r,showLabel:o=!0,children:n}){let i=o?(0,Nae.createInterpolateElement)((0,dO.sprintf)((0,dO.__)("%s: <groupName />"),r.label).trim(),{groupName:(0,Sw.jsx)(r.render,{item:t[0],field:r})}):(0,Sw.jsx)(r.render,{item:t[0],field:r});return(0,Sw.jsxs)(oe,{direction:"column",className:"dataviews-view-activity__group",children:[(0,Sw.jsx)("h3",{className:"dataviews-view-activity__group-header",children:i}),n]},e)}var Jv=a(U(),1),Fae=a(Y(),1),Dae=a(ke(),1);var Mo=a(E(),1);function a9e(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,Jv.useRef)(null),_=(0,Fae.useRegistry)(),{paginationInfo:y}=(0,Jv.useContext)($e),{primaryActions:w,eligibleActions:S}=(0,Jv.useMemo)(()=>{let P=r.filter(M=>!M.isEligible||M.isEligible(o));return{primaryActions:P.filter(M=>M.isPrimary),eligibleActions:P}},[r,o]),x=(0,Dae.useViewportMatch)("medium","<"),C=t.layout?.density??"balanced",A=h&&C!=="compact"&&i?.render?(0,Mo.jsx)(i.render,{item:o,field:i,config:{sizes:C==="comfortable"?"32px":"24px"}}):null,k=(0,Mo.jsx)("div",{className:"dataviews-view-activity__item-type-icon",children:A||(0,Mo.jsx)("span",{className:"dataviews-view-activity__item-bullet","aria-hidden":"true"})}),R=m&&n?.render?(0,Mo.jsx)(n.render,{item:o,field:n}):null,N=(0,Jv.useMemo)(()=>C==="comfortable"?"md":"sm",[C]);return(0,Mo.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,Mo.jsxs)(oe,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,Mo.jsx)(oe,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-activity__item-type",children:k}),(0,Mo.jsxs)(oe,{direction:"column",gap:N,align:"flex-start",className:"dataviews-view-activity__item-content",children:[R&&(0,Mo.jsx)(lh,{item:o,isItemClickable:f,onClickItem:u,renderItemLink:d,className:"dataviews-view-activity__item-title",children:R}),g&&s&&(0,Mo.jsx)("div",{className:"dataviews-view-activity__item-description",children:(0,Mo.jsx)(s.render,{item:o,field:s})}),(0,Mo.jsx)("div",{className:"dataviews-view-activity__item-fields",children:l.map(P=>(0,Mo.jsxs)("div",{className:"dataviews-view-activity__item-field",children:[(0,Mo.jsx)(Jt,{className:"dataviews-view-activity__item-field-label",render:(0,Mo.jsx)("span",{}),children:P.label}),(0,Mo.jsx)("span",{className:"dataviews-view-activity__item-field-value",children:(0,Mo.jsx)(P.render,{item:o,field:P})})]},P.id))}),!!w?.length&&(0,Mo.jsx)(SH,{item:o,actions:w,registry:_,buttonVariant:"secondary"})]}),(w.length<S.length||x&&S.length>0)&&(0,Mo.jsx)("div",{className:"dataviews-view-activity__item-actions",children:(0,Mo.jsx)(ww,{item:o,actions:S,isCompact:!0})})]})})}var Lae=a9e;var Bae=a(_e(),1);function l9e(e){return!!e}function AH(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(l9e);return t.map((u,d)=>(0,Bae.createElement)(Lae,{...e,key:o(u),item:u,mediaField:s,titleField:i,descriptionField:l,otherFields:c,posinset:n.infiniteScrollEnabled?d+1:void 0}))}var ol=a(E(),1);function jae(e){let{empty:t,data:r,fields:o,isLoading:n,view:i,className:s}=e,l=Zu(!!n),c=!!r?.length,u=i.groupBy?.field?o.find(v=>v.id===i.groupBy?.field):null,d=c&&u?ca(r,u):null,f=i.infiniteScrollEnabled&&!d;if(!c)return(0,ol.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,ol.jsx)(oe,{direction:"column",gap:"sm",className:h,inert:m?"true":void 0,children:g.map(([v,b])=>(0,ol.jsx)(Mae,{groupName:v,groupData:b,groupField:u,showLabel:i.groupBy?.showLabel!==!1,children:(0,ol.jsx)(AH,{...e,data:b})},v))}):(0,ol.jsxs)(ol.Fragment,{children:[(0,ol.jsx)("div",{className:h,role:i.infiniteScrollEnabled?"feed":void 0,inert:m?"true":void 0,children:(0,ol.jsx)(AH,{...e})}),f&&n&&(0,ol.jsx)("p",{className:"dataviews-loading-more",children:(0,ol.jsx)(Vae.Spinner,{})})]})}var Es=a(G(),1),QC=a(z(),1),qae=a(ke(),1),pO=a(U(),1);var XC=a(G(),1),Hae=a(Y(),1),Xu=a(U(),1);var fO=a(z(),1);var ZC=a(G(),1),xw=a(U(),1),nl=a(z(),1);var qf=a(E(),1);function c9e(e,t){return!e.infiniteScrollEnabled&&t.totalItems>0&&t.totalPages>1}function IH(){let{view:e,onChangeView:t,paginationInfo:r}=(0,xw.useContext)($e);if(!c9e(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,nl.sprintf)((0,nl.__)("Page %1$d of %2$d"),n,o):c.toString()}});return(0,qf.jsxs)(oe,{direction:"row",className:"dataviews-pagination",justify:"end",align:"center",gap:"xl",children:[(0,qf.jsx)(oe,{direction:"row",justify:"flex-start",align:"center",gap:"xs",className:"dataviews-pagination__page-select",children:(0,xw.createInterpolateElement)((0,nl.sprintf)((0,nl._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",o),{div:(0,qf.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,qf.jsx)(ZC.SelectControl,{"aria-label":(0,nl.__)("Current page"),value:n.toString(),options:i,onChange:s=>{t({...e,page:+s})},size:"small",variant:"minimal"})})}),(0,qf.jsxs)(oe,{direction:"row",gap:"xs",align:"center",children:[(0,qf.jsx)(ZC.Button,{onClick:()=>t({...e,page:n-1}),disabled:n===1,accessibleWhenDisabled:!0,label:(0,nl.__)("Previous page"),icon:(0,nl.isRTL)()?xl:Cl,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,qf.jsx)(ZC.Button,{onClick:()=>t({...e,page:n+1}),disabled:n>=o,accessibleWhenDisabled:!0,label:(0,nl.__)("Next page"),icon:(0,nl.isRTL)()?Cl:xl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var zae=(0,xw.memo)(IH);var Gn=a(E(),1),OH=[];function $v(e){return(0,Xu.useMemo)(()=>!!e?.length&&e?.every(t=>t.supportsBulk),[e])}function u9e({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,Gn.jsx)(XC.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:s,disabled:!s,onChange:()=>{r([])},"aria-label":(0,fO.__)("Deselect all")}):(0,Gn.jsx)(XC.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,fO.__)("Deselect all"):(0,fO.__)("Select all")})}function d9e({actions:e,items:t,selection:r}){let o=(0,Hae.useRegistry)(),[n,i]=(0,Xu.useState)(null);return(0,Gn.jsx)(oe,{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,Gn.jsx)(XC.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 Uae(){let{data:e,selection:t,onChangeSelection:r,getItemId:o,actions:n=OH,paginationInfo:i,view:s}=(0,Xu.useContext)($e),l=$v(n),c=(0,Xu.useMemo)(()=>e.filter(d=>t.includes(o(d))),[t,o,e]);if(!n.length)return null;let u=pae(t.length,e.length,i.totalItems,!!s.infiniteScrollEnabled);return(0,Gn.jsxs)(oe,{direction:"row",className:"dataviews-picker-footer__bulk-selection",gap:"md",align:"center",children:[l&&(0,Gn.jsx)(u9e,{selection:t,selectedItems:c,onChangeSelection:r,data:e,getItemId:o,disableSelectAll:!!s.infiniteScrollEnabled}),(0,Gn.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:u})]})}function Wae(){let{data:e,selection:t,getItemId:r,actions:o=OH}=(0,Xu.useContext)($e),n=(0,Xu.useMemo)(()=>e.filter(i=>t.includes(r(i))),[t,r,e]);return o.length?(0,Gn.jsx)("div",{className:"dataviews-picker-footer__actions",children:(0,Gn.jsx)(d9e,{actions:o,items:n,selection:t})}):null}function Gae(){return(0,Gn.jsxs)(oe,{direction:"row",gap:"md",align:"center",children:[(0,Gn.jsx)(Uae,{}),(0,Gn.jsx)(Wae,{})]})}function NH(){let{actions:e=OH,paginationInfo:t,view:r}=(0,Xu.useContext)($e),o=!r.infiniteScrollEnabled&&!!t.totalItems&&t.totalPages>1;return!e.length&&!o?null:(0,Gn.jsxs)(oe,{direction:"row",justify:"space-between",align:"center",className:"dataviews-footer",gap:"sm",children:[(0,Gn.jsx)(Uae,{}),(0,Gn.jsx)(zae,{}),(0,Gn.jsx)(Wae,{})]})}var Ct=a(E(),1),{Badge:f9e}=St(Es.privateApis);function Yae({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,pO.useRef)(null),w=r.includes(_);uh(y,m);let S=s?.render?(0,Ct.jsx)(s.render,{item:i,field:s,config:f}):null,x=g&&l?.render?(0,Ct.jsx)(l.render,{item:i,field:l}):null;return(0,Ct.jsxs)(Es.Composite.Item,{ref:y,"aria-label":l?l.getValue({item:i})||(0,QC.__)("(no title)"):void 0,render:({children:C,...A})=>(0,Ct.jsx)(oe,{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,Ct.jsx)("div",{className:"dataviews-view-picker-grid__media",children:S}),v&&S&&(0,Ct.jsx)(ih,{item:i,selection:r,onChangeSelection:o,getItemId:n,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1}),g&&(0,Ct.jsx)(oe,{direction:"row",justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,Ct.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:x})}),(0,Ct.jsxs)(oe,{direction:"column",gap:"xs",children:[b&&c?.render&&(0,Ct.jsx)(c.render,{item:i,field:c}),!!d?.length&&(0,Ct.jsx)(oe,{direction:"row",className:"dataviews-view-picker-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:d.map(C=>(0,Ct.jsx)(f9e,{className:"dataviews-view-picker-grid__field-value",children:(0,Ct.jsx)(C.render,{item:i,field:C})},C.id))}),!!u?.length&&(0,Ct.jsx)(oe,{direction:"column",className:"dataviews-view-picker-grid__fields",gap:"xs",children:u.map(C=>(0,Ct.jsx)(Es.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,Ct.jsxs)(Ct.Fragment,{children:[(0,Ct.jsx)(Es.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:C.header}),(0,Ct.jsx)(Es.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,Ct.jsx)(C.render,{item:i,field:C})})]})},C.id))})]})]},_)}function Kae({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,qae.useInstanceId)(Kae,"dataviews-view-picker-grid-group__header");return(0,Ct.jsxs)(oe,{direction:"column",gap:"sm",role:"group","aria-labelledby":n,children:[(0,Ct.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:n,children:r?(0,QC.sprintf)((0,QC.__)("%1$s: %2$s"),t.label,e):e}),o]},e)}function p9e({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,pO.useContext)($e),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 B=r.find(O=>O.id===D);if(!B)return F;let L=l.layout?.badgeFields?.includes(D)?"badgeFields":"regularFields";return F[L].push(B),F},{regularFields:[],badgeFields:[]}),w=!!t?.length,S=l.layout?.previewSize,x=$v(e),C="900px",A=l.groupBy?.field?r.find(F=>F.id===l.groupBy?.field):null,k=A?ca(t,A):null,R=(l.infiniteScrollEnabled&&!k)??!1,N=l?.page??1,P=l?.perPage??0,T=R?f?.totalItems:void 0,M=sO(),j=lO(t,R,M);return(0,Ct.jsxs)(Ct.Fragment,{children:[w&&A&&k&&(0,Ct.jsx)(Es.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,Ct.jsx)(oe,{direction:"column",gap:"lg",children:F,...D}),children:Array.from(k.entries()).map(([F,D])=>(0,Ct.jsx)(Kae,{groupName:F,groupField:A,showLabel:l.groupBy?.showLabel!==!1,children:(0,Ct.jsx)(YC,{previewSize:S,style:{gridTemplateColumns:S&&`repeat(auto-fill, minmax(${S}px, 1fr))`},"aria-busy":n,ref:d,children:D.map(B=>{let L=B.position??(N-1)*P+t.indexOf(B)+1;return(0,Ct.jsx)(Yae,{view:l,multiselect:x,selection:s,onChangeSelection:i,getItemId:o,item:B,mediaField:g,titleField:h,descriptionField:v,regularFields:_,badgeFields:y,config:{sizes:C},posinset:L,setsize:T},o(B))})})},F))}),w&&!k&&(0,Ct.jsxs)(Es.Composite,{render:(0,Ct.jsx)(YC,{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:j}).map((F,D)=>(0,Ct.jsx)(Es.Composite.Item,{render:({children:B,...L})=>(0,Ct.jsx)(oe,{direction:"column",children:B,...L}),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,Ct.jsx)(Yae,{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,Ct.jsx)("div",{className:J({"dataviews-loading":n,"dataviews-no-results":!n}),children:n?(0,Ct.jsx)("p",{children:(0,Ct.jsx)(Es.Spinner,{})}):u}),w&&n&&(0,Ct.jsx)("p",{className:"dataviews-loading-more",children:(0,Ct.jsx)(Es.Spinner,{})})]})}var Zae=p9e;var mO=a(z(),1),eb=a(G(),1),il=a(U(),1);var Nt=a(E(),1);function m9e({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 Xae({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,il.useContext)($e),h=l.includes(r),[g,v]=(0,il.useState)(!1),b=(0,il.useRef)(null);uh(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)(eb.Composite.Item,{ref:b,render:({children:R,...N})=>(0,Nt.jsx)("tr",{className:J("dataviews-view-table__row",{"is-selected":h,"is-hovered":g}),onMouseEnter:x,onMouseLeave:C,children:R,...N}),"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)(ih,{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)(eO,{item:e,titleField:_?n:void 0,mediaField:y?i:void 0,descriptionField:w?s:void 0,isItemClickable:()=>!1})}),A.map(R=>{let{width:N,maxWidth:P,minWidth:T,align:M}=o.layout?.styles?.[R]??{};return(0,Nt.jsx)("td",{style:{width:N,maxWidth:P,minWidth:T},role:"presentation",children:(0,Nt.jsx)(m9e,{fields:t,item:e,column:R,align:M})},R)})]},r)}function h9e({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,il.useRef)(new Map),h=(0,il.useRef)(void 0),[g,v]=(0,il.useState)(),b=$v(e)??!1;(0,il.useEffect)(()=>{h.current&&(h.current.focus(),h.current=void 0)});let _=u.groupBy?.field?r.find(D=>D.id===u.groupBy?.field):null,y=_?ca(t,_):null,w=u.infiniteScrollEnabled&&!y,S=(0,il.useId)();if(g){h.current=g,v(void 0);return}let x=D=>{let B=m.current.get(D.id),L=B?m.current.get(B.fallback):void 0;v(L?.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:N=!0,showMedia:P=!0,showDescription:T=!0}=u,M=A&&N||k&&P||R&&T,j=u.fields??[],F=(D,B)=>L=>{L?m.current.set(D,{node:L,fallback:j[B>0?B-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)(JI,{selection:l,onChangeSelection:s,data:t,actions:e,getItemId:o,disableSelectAll:w})}),M&&(0,Nt.jsx)("th",{children:A&&(0,Nt.jsx)(_w,{ref:F(A.id,0),fieldId:A.id,view:u,fields:r,onChangeView:i,onHide:x,setOpenedFilter:c,canMove:!1})}),j.map((D,B)=>{let{width:L,maxWidth:O,minWidth:V,align:W}=u.layout?.styles?.[D]??{};return(0,Nt.jsx)("th",{style:{width:L,maxWidth:O,minWidth:V,textAlign:W},"aria-sort":u.sort?.direction&&u.sort?.field===D?UI[u.sort.direction]:void 0,scope:"col",children:(0,Nt.jsx)(_w,{ref:F(D,B),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,B])=>(0,Nt.jsxs)(eb.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:j.length+(M?1:0)+1,className:"dataviews-view-table__group-header-cell",role:"presentation",children:u.groupBy?.showLabel===!1?D:(0,mO.sprintf)((0,mO.__)("%1$s: %2$s"),_.label,D)})}),B.map((L,O)=>(0,Nt.jsx)(Xae,{item:L,fields:r,id:o(L)||O.toString(),view:u,titleField:A,mediaField:k,descriptionField:R,selection:l,getItemId:o,onChangeSelection:s,multiselect:b},o(L)))]},`group-${D}`)):(0,Nt.jsx)(eb.Composite,{render:(0,Nt.jsx)("tbody",{role:"presentation"}),virtualFocus:!0,orientation:"vertical",children:C&&t.map((D,B)=>{let L=o(D),O=D.position;return(0,Nt.jsx)(Xae,{item:D,fields:r,id:L||B.toString(),view:u,titleField:A,mediaField:k,descriptionField:R,selection:l,getItemId:o,onChangeSelection:s,multiselect:b,posinset:O},L)})})]}),(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)(eb.Spinner,{})}):f),C&&n&&(0,Nt.jsx)("p",{className:"dataviews-loading-more",children:(0,Nt.jsx)(eb.Spinner,{})})]})]})}var Qae=h9e;var Cw=a(G(),1),Tw=a(U(),1),Jae=a(ke(),1),hO=a(z(),1);var Wt=a(E(),1);function g9e(e){return!!e}function v9e({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,Tw.useRef)(null);uh(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,Wt.jsx)(l.render,{item:i,field:l,config:{sizes:y==="comfortable"?"32px":"24px"}}):null,S=(0,Wt.jsx)("div",{className:"dataviews-view-picker-activity__item-type-icon",children:w||(0,Wt.jsx)("span",{className:"dataviews-view-picker-activity__item-bullet","aria-hidden":"true"})}),x=h&&s?.render?(0,Wt.jsx)(s.render,{item:i,field:s}):null,C=v&&c?.render?(0,Wt.jsx)(c.render,{item:i,field:c}):null,A=(0,Tw.useMemo)(()=>y==="comfortable"?"md":"sm",[y]);return(0,Wt.jsx)(Cw.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,Wt.jsx)("div",{}),children:(0,Wt.jsxs)(oe,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,Wt.jsx)(oe,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-picker-activity__item-type",children:S}),(0,Wt.jsxs)(oe,{direction:"column",gap:A,align:"flex-start",className:"dataviews-view-picker-activity__item-content",children:[x&&(0,Wt.jsx)("div",{className:"dataviews-view-picker-activity__item-title",children:x}),C&&(0,Wt.jsx)("div",{className:"dataviews-view-picker-activity__item-description",children:C}),(0,Wt.jsx)("div",{className:"dataviews-view-picker-activity__item-fields",children:u.map(k=>(0,Wt.jsxs)("div",{className:"dataviews-view-picker-activity__item-field",children:[(0,Wt.jsx)(Jt,{render:(0,Wt.jsx)("span",{}),className:"dataviews-view-picker-activity__item-field-label",children:k.label}),(0,Wt.jsx)("span",{className:"dataviews-view-picker-activity__item-field-value",children:(0,Wt.jsx)(k.render,{item:i,field:k})})]},k.id))})]})]})})}function $ae({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,Jae.useInstanceId)($ae,"dataviews-view-picker-activity-group__header");return(0,Wt.jsxs)(oe,{direction:"column",role:"group","aria-labelledby":n,className:"dataviews-view-picker-activity-group",children:[(0,Wt.jsx)("h3",{className:"dataviews-view-picker-activity-group__header",id:n,children:r?(0,hO.sprintf)((0,hO.__)("%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,Tw.useContext)($e),m=$v(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(g9e),_=s.groupBy?.field?t.find(k=>k.id===s.groupBy?.field):null,y=_?ca(e,_):null,S=(s.infiniteScrollEnabled&&!y)??!1?f?.totalItems:void 0,x=!!e?.length,C=!!(_&&y),A=k=>(0,Wt.jsx)(v9e,{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,Wt.jsxs)(Wt.Fragment,{children:[(0,Wt.jsx)(Cw.Composite,{virtualFocus:!0,orientation:"vertical",role:"listbox","aria-multiselectable":m,"aria-label":d,"aria-busy":o,render:C?(0,Wt.jsx)(oe,{direction:"column",gap:"sm"}):void 0,className:J("dataviews-view-picker-activity",c),children:C&&y?Array.from(y.entries()).map(([k,R])=>(0,Wt.jsx)($ae,{groupName:k,groupField:_,showLabel:s.groupBy?.showLabel!==!1,children:R.map(A)},k)):e.map(A)}),o&&(0,Wt.jsx)("p",{className:"dataviews-loading-more",children:(0,Wt.jsx)(Cw.Spinner,{})})]}):(0,Wt.jsx)("div",{className:J({"dataviews-loading":o,"dataviews-no-results":!o}),children:o?(0,Wt.jsx)("p",{children:(0,Wt.jsx)(Cw.Spinner,{})}):u})}var Ew=a(G(),1),Pw=a(z(),1),tle=a(U(),1);var kw=a(E(),1);function fh(){let e=(0,tle.useContext)($e),t=e.view;return(0,kw.jsxs)(Ew.__experimentalToggleGroupControl,{label:(0,Pw.__)("Density"),value:t.layout?.density||"balanced",onChange:r=>{e.onChangeView({...t,layout:{...t.layout,density:r}})},isBlock:!0,children:[(0,kw.jsx)(Ew.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,Pw._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,kw.jsx)(Ew.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,Pw._x)("Balanced","Density option for DataView layout")},"balanced"),(0,kw.jsx)(Ew.__experimentalToggleGroupControlOption,{value:"compact",label:(0,Pw._x)("Compact","Density option for DataView layout")},"compact")]})}var rle=a(G(),1),ole=a(z(),1),nle=a(U(),1);var ile=a(E(),1),b9e=[{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 sle(){let e=(0,nle.useContext)($e),t=e.view,r=b9e.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)(rle.RangeControl,{showTooltip:!1,label:(0,ole.__)("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 tb=a(E(),1);function MH(){return(0,tb.jsxs)(tb.Fragment,{children:[(0,tb.jsx)(fh,{}),(0,tb.jsx)(sle,{})]})}var ph=[{type:GI,label:(0,Qu.__)("Table"),component:Tae,icon:Pk,viewConfigOptions:fh},{type:Qse,label:(0,Qu.__)("Grid"),component:Iae,icon:Rk,viewConfigOptions:MH},{type:Jse,label:(0,Qu.__)("List"),component:RH,icon:(0,Qu.isRTL)()?FB:Wx,viewConfigOptions:fh},{type:$se,label:(0,Qu.__)("Activity"),component:jae,icon:lm,viewConfigOptions:fh},{type:eae,label:(0,Qu.__)("Grid"),component:Zae,icon:Rk,viewConfigOptions:MH,isPicker:!0},{type:tae,label:(0,Qu.__)("Table"),component:Qae,icon:Pk,viewConfigOptions:fh,isPicker:!0},{type:rae,label:(0,Qu.__)("Activity"),component:ele,icon:lm,viewConfigOptions:fh,isPicker:!0}];var zw=a(U(),1);var yh=a(G(),1),Qf=a(z(),1),i5=a(U(),1);var ale=a(_e(),1),lle=(0,ale.createContext)(!0);function ule(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function gO(e){let t=[];for(let r of e)t.push(...r);return t}function JC(e){return e.slice().reverse()}function $C(...e){}function da(e,t){return typeof Object.hasOwn=="function"?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function Rw(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}function eT(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function dle(e,t){let r={...e};for(let o of t)da(r,o)&&delete r[o];return r}function fle(e,t){let r={};for(let o of t)da(e,o)&&(r[o]=e[o]);return r}function vO(e){return e}function ple(e=$C){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)}function Gi(e,t){if(!e)throw typeof t!="string"?new Error("Invariant failed"):new Error(t)}function FH(e){return Object.keys(e)}function mle(e,...t){let r=typeof e=="function"?e(...t):e;return r==null?!1:!r}function Aw(e){return e.disabled||e["aria-disabled"]===!0||e["aria-disabled"]==="true"}function Yi(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 Iw=y9e();function y9e(){return typeof window<"u"&&!!window.document?.createElement}function Ju(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function ob(e,t=!1){let{activeElement:r}=Ju(e);if(!r?.nodeName)return null;if(w9e(r)&&r.contentDocument?.body)return ob(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=Ju(r).getElementById(o);if(n)return n}}return r}function rb(e,t){return e===t||e.contains(t)}function Ow(e){return e?.nodeType===1}function hle(e){return typeof e?.nodeType=="number"}function w9e(e){return e.tagName==="IFRAME"}function mh(e){let t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?_9e.indexOf(e.type)!==-1:!1}var _9e=["button","color","file","image","reset","submit"];function S9e(e){if(typeof e.checkVisibility=="function")return e.checkVisibility();let t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function Ps(e){try{return e.tagName==="TEXTAREA"?!0:e.tagName!=="INPUT"?!1:e.selectionStart!==null}catch{return!1}}function bO(e){return e.isContentEditable||Ps(e)}function gle(e){if(Ps(e))return e.value;if(e.isContentEditable){let t=Ju(e).createRange();return t.selectNodeContents(e),t.toString()}return""}function tT(e){let t=0,r=0;if(Ps(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let o=Ju(e).getSelection();if(o?.rangeCount&&o.anchorNode&&rb(e,o.anchorNode)&&o.focusNode&&rb(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 x9e=["dialog","menu","listbox","tree","grid"],cle={menu:"menuitem",listbox:"option",tree:"treeitem"};function vle(e,t){let r=e?.getAttribute("role");return r&&x9e.indexOf(r)!==-1?r:t}function ble(e){if(e!=null&&da(cle,e))return cle[e]}function rT(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=Ju(e);return rT(e.parentElement)||r.scrollingElement||r.body}function yO(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function yle(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:C9e(c,u)?(n>s&&(o=!0),-1):(n<s&&(o=!0),1)}),o?r.map(([n,i])=>i):e}function C9e(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function wle(){return Iw&&!!navigator.maxTouchPoints}function wO(){return Iw?/mac|iphone|ipad|ipod/i.test(navigator.platform):!1}function Nw(){return Iw&&wO()&&/apple/i.test(navigator.vendor)}function _le(){return Iw&&/firefox\//i.test(navigator.userAgent)}function Sle(e){let{currentTarget:t,target:r}=e;return t?hle(r)?!rb(t,r):!0:!1}function pi(e){return e.target===e.currentTarget}function xle(e){if(!Ow(e))return!1;let t=e,r=t.tagName.toLowerCase();return r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit"}function Cle(e){let t=wO();return t&&!e.metaKey||!t&&!e.ctrlKey?!1:xle(e.currentTarget)}function Tle(e){return e.altKey?xle(e.currentTarget):!1}function nb(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 Ele(e,t,r){let o=new KeyboardEvent(t,r);return e.dispatchEvent(o)}function DH(e,t){let r=new MouseEvent("click",t);return e.dispatchEvent(r)}function _O(e,t){let r=t||e.currentTarget,o=e.relatedTarget;return!hle(o)||!rb(r,o)}function Ple(e){return e.type==="input"}function ib(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 $u(e,t,r,o=window){let n=[];try{o.document.addEventListener(e,t,r);for(let s of Array.from(o.frames))n.push($u(e,t,r,s))}catch{}return()=>{try{o.document.removeEventListener(e,t,r)}catch{}for(let s of n)s()}}var T9e="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 SO(e){return!(!e.matches(T9e)||!S9e(e)||e.closest("[inert]"))}function Dl(e){let t=ob(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return r?r===e.id:!1}function kle(e){let t=ob(e);if(!t)return!1;if(rb(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 Rle(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest",...t})):e.focus()}function Ale(e){return async()=>{let t=await e?.();return Ale(async()=>(await t?.(),e))}}var RMt=E9e();function E9e({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]=Ale(async()=>{await h?.();let v=await g?.();return async()=>{await v?.(),await u?.()}});t.length>e;)t.shift()}}}var qi=a(_e(),1),yr=a(_e(),1),sb=a(E(),1);function Ile(e,t){if(typeof e=="function"){let r=e(t);if(typeof r=="function")return r}else e&&(e.current=t)}function P9e(e){return!e||!(0,yr.isValidElement)(e)?!1:"ref"in e.props||"ref"in e}function k9e(e){return P9e(e)?{...e.props}.ref||e.ref:null}function R9e(e,t){let r={...e};for(let o in t){if(!da(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 LH={...qi},Ole=LH.useId,OMt=LH.useDeferredValue,Nle=LH.useInsertionEffect,Fr=Iw?yr.useLayoutEffect:yr.useEffect;function A9e(e){let[t]=(0,yr.useState)(e);return t}function Lle(e){let t=(0,yr.useRef)(e);return Fr(()=>{t.current=e}),t}function Mt(e){let t=(0,yr.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return Nle?Nle(()=>{t.current=e}):t.current=e,(0,yr.useCallback)((...r)=>t.current?.(...r),[])}function Ble(e){let[t,r]=(0,yr.useState)(null);return Fr(()=>{if(t==null||!e)return;let o=null;return e(n=>(o=n,t)),()=>{e(o)}},[t,e]),[t,r]}function Xo(...e){return(0,yr.useMemo)(()=>{if(e.some(Boolean))return t=>{let r=[];for(let o of e){if(!o)continue;let n=Ile(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():Ile(o,null)}}},e)}function Ll(e){if(Ole){let o=Ole();return e||o}let[t,r]=(0,yr.useState)(e);return Fr(()=>{e||t||r(`id-${Math.random().toString(36).slice(2,8)}`)},[e,t]),e||t}function Vle(e,t){let r=i=>{if(typeof i=="string")return i},[o,n]=(0,yr.useState)(()=>r(t));return Fr(()=>{n((e&&"current"in e?e.current:e)?.tagName.toLowerCase()||r(t))},[e,t]),o}function jle(e,t,r){let o=A9e(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 ed(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 zle(e,t){let r=(0,yr.useRef)(!1);Fr(()=>{if(r.current)return e();r.current=!0},t),Fr(()=>()=>{r.current=!1},[])}function Hle(){return(0,yr.useReducer)(()=>[],[])}function Qo(e){return Mt(typeof e=="function"?e:()=>e)}function td(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 CO(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 Mle=!1;function Ule(){return(0,yr.useEffect)(()=>{Mle||($u("mousemove",O9e,!0),$u("mousedown",xO,!0),$u("mouseup",xO,!0),$u("keydown",xO,!0),$u("scroll",xO,!0),Mle=!0)},[]),Mt(()=>BH)}var BH=!1,Fle=0,Dle=0;function I9e(e){let t=e.movementX||e.screenX-Fle,r=e.movementY||e.screenY-Dle;return Fle=e.screenX,Dle=e.screenY,t||r||!1}function O9e(e){I9e(e)&&(BH=!0)}function xO(){BH=!1}function Rr(e){let t=qi.forwardRef((r,o)=>e({...r,ref:o}));return t.displayName=e.displayName||e.name,t}function rd(e,t){return qi.memo(e,t)}function Dr(e,t){let{wrapElement:r,render:o,...n}=t,i=Xo(t.ref,k9e(o)),s;if(qi.isValidElement(o)){let l={...o.props,ref:i};s=qi.cloneElement(o,R9e(n,l))}else o?s=o(n):s=(0,sb.jsx)(e,{...n});return r?r(s):s}function Lr(e){let t=(r={})=>e(r);return t.displayName=e.name,t}function fa(e=[],t=[]){let r=qi.createContext(void 0),o=qi.createContext(void 0),n=()=>qi.useContext(r),i=(u=!1)=>{let d=qi.useContext(o),f=n();return u?d:d||f},s=()=>{let u=qi.useContext(o),d=n();if(!(u&&u===d))return d},l=u=>e.reduceRight((d,f)=>(0,sb.jsx)(f,{...u,children:d}),(0,sb.jsx)(r.Provider,{...u}));return{context:r,scopedContext:o,useContext:n,useScopedContext:i,useProviderContext:s,ContextProvider:l,ScopedContextProvider:u=>(0,sb.jsx)(l,{...u,children:t.reduceRight((d,f)=>(0,sb.jsx)(f,{...u,children:d}),(0,sb.jsx)(o.Provider,{...u}))})}}var mi=a(_e(),1),N9e="div",M9e=Symbol("accessibleWhenDisabled"),F9e=Nw(),D9e=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"];function L9e(e){let{tagName:t,readOnly:r,type:o}=e;return t==="TEXTAREA"&&!r||t==="SELECT"&&!r?!0:t==="INPUT"&&!r?D9e.includes(o):!!(e.isContentEditable||e.getAttribute("role")==="combobox"&&e.dataset.name)}function B9e(e){return e?e==="button"||e==="summary"||e==="input"||e==="select"||e==="textarea"||e==="a":!0}function V9e(e){return e?e==="button"||e==="input"||e==="select"||e==="textarea":!0}function j9e(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 z9e({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 VH(e,t){return Mt(r=>{e?.(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var Wle=!1,jH=!0;function H9e(e){let t=e.target;Ow(t)&&!t.hasAttribute("data-focus-visible")&&(jH=!1)}function U9e(e){e.metaKey||e.ctrlKey||e.altKey||(jH=!0)}var oT=Lr(function({focusable:t=!0,accessibleWhenDisabled:r,autoFocus:o,onFocusVisible:n,...i}){let s=(0,mi.useRef)(null),[l,c]=CO(i,M9e,r);r??=l,(0,mi.useEffect)(()=>{t&&(Wle||($u("mousedown",H9e,!0),$u("keydown",U9e,!0),Wle=!0))},[t]);let u=t&&Aw(i),d=u&&!r,[f,m]=(0,mi.useState)(!1),h=(0,mi.useRef)(!1),g=(0,mi.useRef)(null),v=Mt(O=>{g.current?.(),g.current=null,h.current=!1,O?.removeAttribute("data-focus-visible")});(0,mi.useEffect)(()=>{t&&d&&(v(s.current),f&&m(!1))},[t,d,f,v]),(0,mi.useEffect)(()=>{if(!t||!f)return;let O=s.current;if(!O||typeof IntersectionObserver>"u")return;let V=new IntersectionObserver(()=>{SO(O)||(h.current=!1,m(!1))});return V.observe(O),()=>V.disconnect()},[t,f]),(0,mi.useEffect)(()=>()=>g.current?.(),[]);let b=VH(i.onKeyPressCapture,u),_=VH(i.onMouseDownCapture,u),y=VH(i.onClickCapture,u),w=(O,V)=>{if(V&&(O.currentTarget=V),!t)return;let W=O.currentTarget;if(W&&Dl(W)&&(n?.(O),!O.defaultPrevented)){if(W.dataset.focusVisible="true",h.current=!0,j9e(W)){if(g.current?.(),g.current=null,typeof IntersectionObserver<"u"){let q=new IntersectionObserver(()=>{SO(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||!pi(O))return;let V=O.currentTarget;ib(V,"focusout",()=>w(O,V))}),C=i.onFocusCapture,A=Mt(O=>{if(C?.(O),O.defaultPrevented||!t)return;if(!pi(O)){m(!1);return}let V=O.currentTarget,W=()=>w(O,V);jH||L9e(O.target)?ib(O.target,"focusout",W):m(!1)}),k=i.onBlur,R=Mt(O=>{k?.(O),t&&_O(O)&&(v(O.currentTarget),m(!1))}),N=(0,mi.useContext)(lle),P=Mt(O=>{t&&o&&O&&N&&queueMicrotask(()=>{Dl(O)||SO(O)&&O.focus()})}),T=Vle(s),M=t&&B9e(T),j=t&&V9e(T),[F,D]=(0,mi.useState)(!1);F9e&&(0,mi.useEffect)(()=>{if(!t)return;let O=s.current;if(!O)return;let{type:V}=O,W=O.tagName==="INPUT"&&(V==="checkbox"||V==="radio");D(mh(O)||W)},[t]);let B=i.style,L=(0,mi.useMemo)(()=>d?{pointerEvents:"none",...B}:B,[d,B]);return i={"data-focus-visible":t&&f||void 0,"data-autofocus":o||void 0,"aria-disabled":u||void 0,...i,...c,ref:Xo(s,P,i.ref),style:L,tabIndex:z9e({focusable:t,trulyDisabled:d,nativeTabbable:M,supportsDisabled:j,safariTabIndex:F,tabIndexProp:i.tabIndex}),disabled:j&&d?!0:void 0,contentEditable:u?void 0:i.contentEditable,onKeyPressCapture:b,onClickCapture:y,onMouseDownCapture:_,onKeyDownCapture:x,onFocusCapture:A,onBlur:R},Yi(i)}),LMt=Rr(function(t){return Dr(N9e,oT(t))});var hh=a(_e(),1),W9e="button";function Gle(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return e.key==="Enter"?mh(t)||t.tagName==="SUMMARY"||t.tagName==="A":e.key===" "?mh(t)||t.tagName==="SUMMARY"||t.tagName==="INPUT"||t.tagName==="SELECT":!1}var G9e=Symbol("command"),zH=Lr(function({clickOnEnter:t=!0,clickOnSpace:r=!0,...o}){let n=(0,hh.useRef)(null),[i,s]=(0,hh.useState)(!1);(0,hh.useEffect)(()=>{n.current&&s(mh(n.current))},[]);let[l,c]=(0,hh.useState)(!1),u=(0,hh.useRef)(!1),d=Aw(o),[f,m]=CO(o,G9e,!0);Fr(()=>{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||!pi(w)||Ps(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=Gle(w);if(x){if(!R){w.preventDefault();let{view:N,...P}=w,T=()=>DH(S,P);_le()?ib(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=Gle(w);if(u.current=!1,x||c(!1),w.defaultPrevented||!pi(w)||d||w.metaKey||x)return;w.preventDefault();let C=w.currentTarget,{view:A,...k}=w;queueMicrotask(()=>DH(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:Xo(n,o.ref),onKeyDown:g,onKeyUp:b,onBlur:y},o=oT(o),o}),HMt=Rr(function(t){return Dr(W9e,zH(t))});var nT=fa(),Yle=nT.useContext,GMt=nT.useScopedContext,YMt=nT.useProviderContext,qle=nT.ContextProvider,Kle=nT.ScopedContextProvider;var TO=a(_e(),1),Y9e="div",HH=Lr(function({store:t,shouldRegisterItem:r=!0,getItem:o=vO,element:n,...i}){let s=Yle();t=t||s;let l=Ll(i.id),c=(0,TO.useRef)(n);return(0,TO.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:Xo(c,i.ref)},Yi(i)}),QMt=Rr(function(t){return Dr(Y9e,HH(t))});var UH=a(_e(),1),iT=fa([qle],[Kle]),t3t=iT.useContext,EO=iT.useScopedContext,Zle=iT.useProviderContext,PO=iT.ContextProvider,Mw=iT.ScopedContextProvider,Xle=(0,UH.createContext)(void 0),Qle=(0,UH.createContext)(void 0);function ab(e,t){let r=e.__unstableInternals;return Gi(r,"Invalid store"),r[t]}function $le(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 kO(e,t){return e===t||e!==e&&t!==t}function ece(e,t,r,o){let n;for(let i of FH(t))kO(t[i],r[i])||o!==void 0&&$le([i],o)||(n??={...e},n[i]=t[i]);return n}var q9e=100;function K9e(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 Z9e(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 tce(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 RO(e){e.notifiedListeners??=tce(e)}function GH(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 WH(e,t,r){for(let o of e)if(o.group===t&&!o.recovering&&!(r&&!o.keyedListeners.has(r))){RO(o);for(let n of o.group.listeners){if(n===o.currentListener)break;GH(o,n)&&o.notifiedListeners?.add(n)}}}function X9e(e,t,r){for(let o of e)o.group===t&&(o.recovering||GH(o,r)&&(RO(o),o.notifiedListeners?.add(r)))}function Q9e({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)&&(GH(i,o)?(RO(i),i.notifiedListeners?.add(o)):n&&(RO(i),i.recoverToLive=!0)))}function J9e(e,t,r){for(let o of e)o.group===t&&o.notifiedListeners?.delete(r)}function $9e({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 eje(e,t){if(!e.disposables.size)return;let r=e.disposables.get(t);r&&(e.disposables.delete(t),r())}function rce(e,t,r){let o=e.disposables.get(t);if(!o){e.disposables.set(t,r);return}e.disposables.set(t,()=>{o(),r()})}function oce(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&&rce(e,t,c)}function Jle({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)&&!$le(e.listenerKeys.get(s),o)||(n?.add(s),oce(e,s,t(),r,t,o))}function pa(e,...t){let r=e,o=r,n=$C,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 M=()=>{c.delete(T)&&(c.size||n())};if(P)return M;let j=FH(r),F=[];for(let L of t){let O=L?.getState?.();if(!O)continue;let V=j.filter(W=>da(O,W));if(V.length){if(t.length===1||V.length===j.length){for(let W of V)F.push(gi(L,[W],q=>{R(W,q[W],!0)}));continue}F.push(gh(L,V,(W,q)=>{for(let Z of V)W[Z]!==q[Z]&&R(Z,W[Z],!0)}));for(let W of V){let q=L?.getState?.();q&&R(W,q[W],!0)}}}let D=[];for(let L of u)D.push(L());let B=t.map(sT);return n=Rw(...F,...D,...B),M},g=(P,T,M)=>{M!==void 0&&(M?Z9e(P.listenersByKey,M,T):P.allKeysListeners?.delete(T))},v=[],b=(P,T,M=d)=>{let j=P?[...P]:null,F=M.listeners.has(T);return F||J9e(v,M,T),j?Q9e({fastPathFrames:v,group:M,keys:j,listener:T}):(F&&WH(v,M),X9e(v,M,T)),F&&(WH(v,M,T),g(M,T,M.listenerKeys.get(T))),M.listeners.add(T),j?(M.listenersByKey??=new Map,K9e(M.listenersByKey,j,T),$9e({fastPathFrames:v,group:M,keys:j,listener:T})):(M.allKeysListeners??=new Set,M.allKeysListeners.add(T)),M.listenerKeys.set(T,j),()=>{let D=M.disposables.get(T);M.disposables.delete(T),WH(v,M,T);let B=M.listenerKeys.get(T);g(M,T,j),B!==j&&g(M,T,B),M.listenerKeys.delete(T),M.listeners.delete(T),D?.()}},_=(P,T)=>b(P,T),y=(P,T,M)=>{let j=P.listeners.has(T);if(j){P.suspendCounts??=new Map;let D=P.suspendCounts.get(T)??0;P.suspendCounts.set(T,D+1)}let F;try{let D=r;eje(P,T),r!==D&&(F=ece(M,r,D));let B=T(r,F??M);B&&rce(P,T,B)}finally{if(j){let D=P.suspendCounts,B=D?.get(T);B&&B>1?D?.set(T,B-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=>pa(fle(r,P),N),C=P=>pa(dle(r,P),N),A=()=>r,k=(P,T,M)=>{if(!(M instanceof Set)&&!P.allKeysListeners?.size){let j=P.listenersByKey?.get(M);if(!j)return;let F={group:P,keyedListeners:j,updatedKey:M,currentListener:null};v.push(F);try{for(let D of j){if(F.notifiedListeners?.has(D)||(F.currentListener=D,F.notifiedListeners?.add(D),oce(P,D,r,T,A,M),!P.allKeysListeners?.size&&!F.recoverToLive))continue;let B=F.notifiedListeners??tce(F);F.notifiedListeners=B,F.recovering=!0,Jle({group:P,getState:A,prevState:T,updatedKey:M,notifiedListeners:B});return}}finally{v.pop()}return}Jle({group:P,getState:A,prevState:T,updatedKey:M})},R=(P,T,M=!1)=>{if(!da(r,P))return;let j=r[P],F=typeof T=="function"?T(j):T;if(kO(F,j))return;let D=s;s=!0;let B=r,L={...r,[P]:F};r=L;let O=!1;try{if(!M&&t.length){for(let V of t)if(V?.setState?.(P,F),!kO(r[P],F)){O=!0;break}if(O){let V=0;for(;V<q9e;V+=1){let W=!1;for(let q of t){let Z=r[P];q?.setState?.(P,Z),kO(r[P],Z)||(W=!0)}if(!W)break}}}O||k(d,r===L?B:{...r,[P]:B[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)}))},N={getState:A,setState:R,__unstableInternals:{setup:m,init:h,subscribe:_,sync:w,batch:S,pick:x,omit:C}};return N}function hi(e,...t){if(e)return ab(e,"setup")(...t)}function sT(e,...t){if(e)return ab(e,"init")(...t)}function gh(e,...t){if(e)return ab(e,"subscribe")(...t)}function gi(e,...t){if(e)return ab(e,"sync")(...t)}function lb(e,...t){if(e)return ab(e,"batch")(...t)}function AO(e,...t){if(e)return ab(e,"omit")(...t)}function nce(e,...t){if(e)return ab(e,"pick")(...t)}function Fw(...e){let t={};for(let o of e){let n=o?.getState?.();n&&Object.assign(t,n)}let r=pa(t,...e);return Object.assign({},...e,r)}function tje(e){let t=e.find(n=>!!n.element),r=[...e].reverse().find(n=>!!n.element)?.element,o=t?.element?.parentElement;if(!r)return Ju(o).body;for(;o;){if(o.contains(r))return o;o=o.parentElement}return Ju(o).body}function rje(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=rje(e.store),s=pa({items:r,renderedItems:n.renderedItems},i),l=pa(n,e.store),c=f=>{let m=yle(f,h=>h.element);s.setState("renderedItems",m),l.setState("renderedItems",m)};hi(l,()=>sT(s)),hi(s,()=>lb(s,["items"],f=>{l.setState("items",f.items)})),hi(s,()=>lb(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=tje(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=>Rw(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 oje={id:null};function Dc(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function nje(e,t){return e.filter(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function sce(e,t){return e.filter(r=>r.rowId===t)}function ace({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 lce(e,t,r=!1){let o=e.findIndex(n=>n.id===t);return[...e.slice(o+1),...r?[oje]:[],...e.slice(0,o)]}function IO(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 cce(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}function ije(e){return{id:"__EMPTY_ITEM__",disabled:!0,rowId:e}}function sje(e,t,r){let o=cce(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?Dc(n):n[i-1];n[i]=l&&t!==l.id&&r?l:ije(l?.rowId)}}return e}function aje(e){let t=IO(e),r=cce(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 uce(e={}){let t=e.store?.getState(),r=ice(e),o=Bt(e.activeId,t?.activeId,e.defaultActiveId),n=pa({...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);hi(n,()=>gi(n,["renderedItems","activeId"],l=>{n.setState("activeId",c=>c!==void 0?c:Dc(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(L=>L.id===f),B=b[D];if(B){let L=S?-1:1,O=ace({items:b,fromIndex:D+L,step:L,rowId:B.rowId,excludeId:f});return O!==void 0?O:h&&(y?h!=="horizontal":h!=="vertical")?ace({items:b,fromIndex:L===1?0:b.length-1,step:L,rowId:B.rowId,excludeId:f}):void 0}}let C=y?gO(sje(IO(b),f,x)):b;if(C=S?JC(C):C,C=y?aje(C):C,f==null)return Dc(C)?.id;let A=C.find(D=>D.id===f);if(!A)return Dc(C)?.id;let k=C.some(D=>D.rowId),R=C.indexOf(A),N=C.slice(R+1),P=sce(N,A.rowId);if(d){let D=nje(P,f);return(D.slice(d)[0]||D[D.length-1])?.id}let T=h&&(y?h!=="horizontal":h!=="vertical"),M=k&&g&&(y?g!=="horizontal":g!=="vertical"),j=w?(!k||y)&&T&&v:y?v:!1;if(T)return Dc(lce(M&&!j?C:sce(C,A.rowId),f,j),f)?.id;if(M){let D=Dc(j?P:N,f);return j?D?.id||null:D?.id}let F=Dc(P,f);return!F&&j?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:()=>Dc(n.getState().renderedItems)?.id,last:()=>Dc(JC(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 dce=Dc,fce=IO;function od(e,t){return t&&e.item(t)||null}function pce(e,t=!1){if(Ps(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=Ju(e).getSelection();r?.selectAllChildren(e),t&&r?.collapseToEnd()}}var qH=Symbol("FOCUS_SILENTLY");function mce(e){e[qH]=!0,e.focus({preventScroll:!0})}function hce(e){let t=e[qH];return delete e[qH],t}function cb(e,t,r){if(!t||t===r)return!1;let o=e.item(t.id);return!(!o||r&&o.element===r)}var id=a(_e(),1),bce=a(E(),1);var nd=a(_e(),1),KH=a(Q1(),1),gce=()=>()=>{};function Yt(e,t=vO){let r=nd.useCallback(n=>e?gh(e,null,n):gce(),[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&&da(s,n))return s[n]};return(0,KH.useSyncExternalStore)(r,o,o)}function OO(e,t){let r=nd.useRef({}),o=nd.useCallback(i=>e?gh(e,null,i):gce(),[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||!da(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,KH.useSyncExternalStore)(o,n,n)}function Fo(e,t,r,o){let n=da(t,r)?t[r]:void 0,i=Lle({value:n,setValue:o?t[o]:void 0});Fr(()=>gi(e,[r],(s,l)=>{let{value:c,setValue:u}=i.current;u&&s[r]!==l[r]&&s[r]!==c&&u(s[r])}),[e,r]),Fr(()=>{if(n!==void 0)return e.setState(r,n),lb(e,[r],()=>{n!==void 0&&e.setState(r,n)})})}function Dw(e,t){let[r,o]=nd.useState(()=>e(t));Fr(()=>sT(r),[r]);let n=nd.useCallback(i=>Yt(r,i),[r]);return[nd.useMemo(()=>({...r,useState:n}),[r,n]),Mt(()=>{o(i=>e({...t,...i.getState()}))})]}var cje="button";function uje(e){return bO(e)?!0:e.tagName==="INPUT"&&!mh(e)}function dje(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 fje(e,t=!1){let{top:r}=e.getBoundingClientRect();return t?r+e.clientHeight:r}function vce(e,t,r,o=!1){if(!t||!r)return;let{renderedItems:n}=t.getState(),i=rT(e);if(!i)return;let s=dje(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=od(t,l)?.element;if(!f)continue;let m=fje(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 pje(e,t){return pi(e)?!1:cb(t,e.target)}var ZH=Lr(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=EO();t=t||d;let f=Ll(u.id),m=(0,id.useRef)(null),h=(0,id.useContext)(Qle),g=Aw(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}=OO(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,id.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,id.useRef)(!1),N=(0,id.useRef)(null),P=Mt(O=>{if(k?.(O),O.defaultPrevented||Sle(O)||!f||!t||pje(O,t))return;let{virtualFocus:V,baseElement:W}=t.getState();if(t.setActiveId(f),bO(O.currentTarget)&&pce(O.currentTarget),!V||!pi(O)||uje(O.currentTarget))return;let q=(te,de,me)=>{Nw()&&te.hasAttribute("data-autofocus")&&te.scrollIntoView({block:"nearest",inline:"nearest"}),R.current=!0,de===me||cb(t,de)?mce(me):me.focus()};if(W?.isConnected){q(O.currentTarget,O.relatedTarget,W);return}if(v===!1)return;let{currentTarget:Z,relatedTarget:Q}=O,ce=()=>{N.current?.(),N.current=null};ce(),N.current=gh(t,null,()=>{if(ob(Z)!==Z){ce();return}let te=t.getState(),de=te.baseElement;de?.isConnected&&(ce(),te.virtualFocus&&q(Z,Q,de))})}),T=u.onBlurCapture,M=Mt(O=>{T?.(O),!O.defaultPrevented&&t?.getState()?.virtualFocus&&R.current&&(R.current=!1,O.preventDefault(),O.stopPropagation())}),j=u.onKeyDown,F=Qo(o),D=Qo(n),B=Mt(O=>{if(j?.(O),O.defaultPrevented||!pi(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||!Ps(W.baseElement)),te={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:()=>vce(V,t,t?.up,!0),PageDown:()=>vce(V,t,t?.down)}[O.key];if(te){if(bO(V)){let me=tT(V),ee=Q&&O.key==="ArrowLeft",$=Q&&O.key==="ArrowRight",ue=Z&&O.key==="ArrowUp",ve=Z&&O.key==="ArrowDown";if($||ve){let{length:Ee}=gle(V);if(me.end!==Ee)return}else if((ee||ue)&&me.start!==0)return}let de=te();if(F(O)||de!==void 0){if(!D(O))return;O.preventDefault(),t.move(de)}}}),L=(0,id.useMemo)(()=>({id:f,baseElement:y}),[f,y]);return u=td(u,O=>(0,bce.jsx)(Xle.Provider,{value:L,children:O}),[L]),u={"data-active-item":w||void 0,...u,id:f,ref:Xo(m,u.ref),tabIndex:C?u.tabIndex:-1,onFocus:P,onBlurCapture:M,onKeyDown:B},u=zH(u),u=HH({store:t,...u,getItem:A,shouldRegisterItem:f?v:!1}),Yi({...u,"aria-setsize":S,"aria-posinset":x})}),T3t=rd(Rr(function(t){return Dr(cje,ZH(t))}));var sd=a(_e(),1),NO=a(E(),1);var mje="div";function hje(e){return e.some(t=>!!t.rowId)}function gje(e){let t=e.target;return t&&!Ps(t)?!1:e.key.length===1&&!e.ctrlKey&&!e.metaKey}function vje(e){return e.key==="Shift"||e.key==="Control"||e.key==="Alt"||e.key==="Meta"}function yce(e,t,r){return Mt(o=>{if(t?.(o),o.defaultPrevented||o.isPropagationStopped()||!pi(o)||vje(o)||gje(o))return;let n=od(e,e.getState().activeId)?.element;if(!n)return;let{view:i,...s}=o;n!==r?.current&&n.focus(),Ele(n,o.type,s)||o.preventDefault(),o.currentTarget.contains(n)&&o.stopPropagation()})}function bje(e){return dce(gO(JC(fce(e))))}function wce(e,t){let{virtualFocus:r,baseElement:o}=e.getState();if(!r||!o||!Ps(o)){t();return}let n=o.scrollLeft,i=o.scrollTop;t(),o.scrollLeft=n,o.scrollTop=i}function yje(e){let[t,r]=(0,sd.useState)(!1),o=(0,sd.useCallback)(()=>r(!0),[]),n=Yt(e,i=>t?od(e,i.activeId):null);return(0,sd.useEffect)(()=>{let i=n?.element;t&&i&&(r(!1),wce(e,()=>{i.focus({preventScroll:!0})}))},[e,n,t]),o}var wje=rd(function({store:t,focusOnMove:r,previousElementRef:o}){let n=Yt(t,"moves"),i=Yt(t,"baseElement");return(0,sd.useEffect)(()=>{if(!n||!r)return;let{activeId:s}=t.getState(),l=od(t,s)?.element;l&&wce(t,()=>Rle(l))},[t,n,r]),Fr(()=>{if(!n||!i)return;let{activeId:s}=t.getState();if(s!==null)return;let l=o.current;o.current=null,l&&nb(l,{relatedTarget:i}),Dl(i)||i.focus()},[t,n,i]),null}),XH=Lr(function({store:t,composite:r=!0,focusOnMove:o=r,moveOnKeyPress:n=!0,...i}){let s=Zle();t=t||s,Gi(t,!1);let l=(0,sd.useRef)(null),c=(0,sd.useRef)(null),u=yje(t),[,d]=Ble(r?t.setBaseElement:null),f=Yt(t,"virtualFocus"),m=Yt(t,k=>k.virtualFocus?k.activeId:null);Fr(()=>{if(!t||!r||!f)return;let k=c.current;if(c.current=null,!k)return;let R=od(t,m)?.element||ob(k);R!==k&&nb(k,{relatedTarget:R})},[t,m,f,r]);let h=yce(t,i.onKeyDownCapture,c),g=yce(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 N=k.relatedTarget,P=hce(k.currentTarget);pi(k)&&P&&(k.stopPropagation(),c.current=N)}),_=i.onFocus,y=Mt(k=>{if(_?.(k),k.defaultPrevented||!r||!t)return;let{relatedTarget:R}=k,{virtualFocus:N}=t.getState();N?pi(k)&&!cb(t,R)&&queueMicrotask(u):pi(k)&&t.setActiveId(null)}),w=i.onBlurCapture,S=Mt(k=>{if(w?.(k),k.defaultPrevented||!t)return;let{virtualFocus:R,activeId:N}=t.getState();if(!R)return;let P=od(t,N)?.element,T=k.relatedTarget,M=cb(t,T),j=c.current;c.current=null,pi(k)&&M?(T===P?j&&j!==T&&nb(j,k):P?nb(P,k):j&&nb(j,k),k.stopPropagation()):!cb(t,k.target)&&P&&nb(P,k)}),x=i.onKeyDown,C=Qo(n),A=Mt(k=>{if(x?.(k),k.nativeEvent.isComposing||k.defaultPrevented||!t||!pi(k))return;let{orientation:R,renderedItems:N,activeId:P,rtl:T}=t.getState();if(od(t,P)?.element?.isConnected)return;let M=R!=="horizontal",j=R!=="vertical",F=hje(N);if((k.key==="ArrowLeft"||k.key==="ArrowRight"||k.key==="Home"||k.key==="End")&&Ps(k.currentTarget))return;let B={ArrowUp:(F||M)&&(()=>F?bje(N)?.id:t?.last()),ArrowRight:(F||j)&&(T?t.last:t.first),ArrowDown:(F||M)&&t.first,ArrowLeft:(F||j)&&(T?t.first:t.last),Home:t.first,End:t.last,PageUp:t.first,PageDown:t.last}[k.key];if(B){let L=B();if(L!==void 0){if(!C(k))return;k.preventDefault(),t.move(L)}}});return i=td(i,k=>(0,NO.jsxs)(Mw,{value:t,children:[k,r&&(0,NO.jsx)(wje,{store:t,focusOnMove:o,previousElementRef:c})]}),[t,r,o]),i={"aria-activedescendant":Yt(t,k=>{if(t&&r&&k.virtualFocus)return od(t,k.activeId)?.id}),...i,ref:Xo(l,d,i.ref),onKeyDownCapture:h,onKeyUpCapture:g,onFocusCapture:b,onFocus:y,onBlurCapture:S,onKeyDown:A},i=oT({focusable:Yt(t,k=>r&&(k.virtualFocus||k.activeId===null)),...i}),i}),N3t=Rr(function(t){return Dr(mje,XH(t))});var aT=fa(),D3t=aT.useContext,L3t=aT.useScopedContext,QH=aT.useProviderContext,_ce=aT.ContextProvider,Sce=aT.ScopedContextProvider;var JH=a(_e(),1),lT=fa([_ce],[Sce]),z3t=lT.useContext,H3t=lT.useScopedContext,U3t=lT.useProviderContext,xce=lT.ContextProvider,MO=lT.ScopedContextProvider,W3t=(0,JH.createContext)(void 0),G3t=(0,JH.createContext)(void 0);var ub=a(_e(),1),$H=a(E(),1);var Pce=a(Du(),1),_je="div";function Cce(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function Tce(e){let t=e?.trim()||"0s",r=t.endsWith("ms")?1:1e3,o=Number.parseFloat(t)*r;return Number.isNaN(o)?0:o}function Ece(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=Tce(n[l%n.length]),d=Tce(i[l%i.length]);s=Math.max(s,u+d)}return s}function Sje(e){let{transitionProperty:t,transitionDuration:r,transitionDelay:o,animationName:n,animationDuration:i,animationDelay:s}=getComputedStyle(e);return Math.max(Ece(t,o,r),Ece(n,s,i))}function eU(e,t,r){return!r&&t!==!1&&(!e||!!t)}var xje=Lr(function({store:t,alwaysVisible:r,unstable_otherElementRef:o,...n}){let i=QH();t=t||i,Gi(t,!1);let s=(0,ub.useRef)(null),l=Ll(n.id),[c,u]=(0,ub.useState)(null),d=Yt(t,"open"),f=Yt(t,"mounted"),m=Yt(t,"animated"),h=Yt(t,"contentElement"),g=Yt(t.disclosure,"contentElement"),v=(0,ub.useRef)(!1);Fr(()=>{s.current&&t?.setContentElement(s.current)},[t]),Fr(()=>{let w;return t?.setState("animated",S=>(w=S,!0)),()=>{w!==void 0&&t?.setState("animated",w)}},[t]),Fr(()=>{if(!m){d?v.current&&(v.current=!1,u("enter")):(v.current=!0,u(null));return}if(!h?.isConnected){u(null);return}return ple(()=>{u(d?"enter":f?"leave":null)})},[m,h,d,f]),Fr(()=>{if(!t||!m||!c||!h)return;let w=()=>t?.setState("animating",!1),S=()=>(0,Pce.flushSync)(w);if(c==="leave"&&d||c==="enter"&&!d)return;if(typeof m=="number")return Cce(m,S);let x=[h];g&&x.push(g);let C=o?.current;C&&x.push(C);let A=Math.max(...x.map(Sje));if(!A){c==="enter"&&t.setState("animated",!1),w();return}return Cce(Math.max(A-1e3/60,0),S)},[t,m,h,g,o,d,c]),n=td(n,w=>(0,$H.jsx)(MO,{value:t,children:w}),[t]);let b=eU(f,n.hidden,r),_=n.style,y=(0,ub.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:Xo(l?t.setContentElement:null,s,n.ref),style:y},Yi(n)}),Cje=Rr(function(t){return Dr(_je,xje(t))}),J3t=Rr(function({unmountOnHide:t,...r}){let o=QH();return Yt(r.store||o,n=>!t||n?.mounted)===!1?null:(0,$H.jsx)(Cje,{...r})});function kce(e={}){let t=Fw(e.store,AO(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=pa({open:o,animated:n,animating:!!n&&o,mounted:o,contentElement:Bt(r?.contentElement,null),disclosureElement:Bt(r?.disclosureElement,null)},t);return hi(i,()=>gi(i,["animated","animating"],s=>{s.animated||i.setState("animating",!1)})),hi(i,()=>gh(i,["open"],()=>{i.getState().animated&&i.setState("animating",!0)})),hi(i,()=>gi(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 Rce(e,t,r){return ed(t,[r.store,r.disclosure]),Fo(e,r,"open","setOpen"),Fo(e,r,"mounted","setMounted"),Fo(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}var cT=fa([xce],[MO]),l6t=cT.useContext,c6t=cT.useScopedContext,Ace=cT.useProviderContext,Ice=cT.ContextProvider,Oce=cT.ScopedContextProvider;var FO=a(_e(),1),DO=(0,FO.createContext)(void 0),uT=fa([Ice,PO],[Oce,Mw]),tU=uT.useContext,Lw=uT.useScopedContext,LO=uT.useProviderContext,Nce=uT.ContextProvider,Mce=uT.ScopedContextProvider,BO=(0,FO.createContext)(void 0),Fce=(0,FO.createContext)(!1);function Dce(e,t,r){return ed(t,[r.store]),Fo(e,r,"items","setItems"),e}function Lce(e){return{id:Ll(e.id),...e}}function Bce(e,t,r){return e=Dce(e,t,r),Fo(e,r,"activeId","setActiveId"),Fo(e,r,"includesBaseElement"),Fo(e,r,"virtualFocus"),Fo(e,r,"orientation"),Fo(e,r,"rtl"),Fo(e,r,"focusLoop"),Fo(e,r,"focusWrap"),Fo(e,r,"focusShift"),e}function Vce(e={}){return kce(e)}function jce(e,t,r){return Rce(e,t,r)}function zce({popover:e,...t}={}){let r=Fw(t.store,AO(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let o=r?.getState(),n=Vce({...t,store:r}),i=Bt(t.placement,o?.placement,"bottom"),s=pa({...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 Hce(e,t,r){return ed(t,[r.popover]),Fo(e,r,"placement"),jce(e,t,r)}var Tje="div",rU=Lr(function({store:t,...r}){let o=Ace();return t=t||o,r={...r,ref:Xo(t?.setAnchorElement,r.ref)},r}),D6t=Rr(function(t){return Dr(Tje,rU(t))});var Uce=a(_e(),1),Eje="div";function Pje(e){let t=e.relatedTarget;return Ow(t)?rb(e.currentTarget,t):!1}var oU=Symbol("composite-hover");function kje(e){let{relatedTarget:t}=e;if(!Ow(t))return!1;let r=t;do{if(da(r,oU)&&r[oU])return!0;r=r.parentElement}while(r);return!1}var nU=Lr(function({store:t,focusOnHover:r=!0,blurOnHoverEnd:o=!!r,...n}){let i=EO();t=t||i,Gi(t,!1);let s=Ule(),l=n.onMouseMove,c=Qo(r),u=Mt(g=>{if(l?.(g),!g.defaultPrevented&&s()&&c(g)){if(!kle(g.currentTarget)){let v=t?.getState().baseElement;v&&!Dl(v)&&v.focus()}t?.setActiveId(g.currentTarget.id)}}),d=n.onMouseLeave,f=Qo(o),m=Mt(g=>{d?.(g),!g.defaultPrevented&&s()&&(Pje(g)||kje(g)||c(g)&&f(g)&&(t?.setActiveId(null),t?.getState().baseElement?.focus()))}),h=(0,Uce.useCallback)(g=>{g&&(g[oU]=!0)},[]);return n={...n,ref:Xo(h,n.ref),onMouseMove:u,onMouseLeave:m},Yi(n)}),z6t=rd(Rr(function(t){return Dr(Eje,nU(t))}));var kn=a(_e(),1);var Rje="input";function Wce(e,t,r){return r?e.find(o=>!o.disabled&&o.value)?.value===t:!1}function Gce(e,t){if(!t||e==null)return!1;let r=eT(e),o=eT(t);return r.length!==e.length||o.length!==t.length?!1:o.length>r.length&&o.toLowerCase().startsWith(r.toLowerCase())}function Aje(e){return e==="inline"||e==="list"||e==="both"||e==="none"}function Ije(e){return e.find(t=>t.disabled?!1:t.element?.getAttribute("role")!=="tab")?.id}var Oje=Lr(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 _=LO();t=t||_,Gi(t,!1);let y=(0,kn.useRef)(null),[w,S]=Hle(),x=(0,kn.useRef)(!1),C=(0,kn.useRef)(!1),A=Yt(t,X=>X.virtualFocus&&o),k=v==="inline"||v==="both",[R,N]=(0,kn.useState)(k);zle(()=>{k&&N(!0)},[k]);let P=Yt(t,"value"),T=(0,kn.useRef)(void 0);(0,kn.useEffect)(()=>gi(t,["selectedValue","activeId"],(X,fe)=>{T.current=fe.selectedValue}),[t]);let M=Yt(t,X=>{if(k&&R&&!(X.activeValue&&Array.isArray(X.selectedValue)&&(X.selectedValue.includes(X.activeValue)||T.current?.includes(X.activeValue))))return X.activeValue}),j=Yt(t,"renderedItems"),F=Yt(t,"open"),D=Yt(t,"contentElement"),B=(0,kn.useMemo)(()=>!k||!R?P:Wce(j,M,A)?Gce(P,M)?P+(M?.slice(P.length)||""):P:M||P,[k,R,j,M,A,P]);(0,kn.useEffect)(()=>{let X=y.current;if(!X)return;let fe=()=>N(!0);return X.addEventListener("combobox-item-move",fe),()=>{X.removeEventListener("combobox-item-move",fe)}},[]),(0,kn.useEffect)(()=>{if(!k||!R||!M||!Wce(j,M,A)||!Gce(P,M))return;let X=$C;return queueMicrotask(()=>{let fe=y.current;if(!fe)return;let{start:Ye,end:Ze}=tT(fe),st=P.length,Rt=M.length;yO(fe,st,Rt),X=()=>{if(!Dl(fe))return;let{start:ut,end:_t}=tT(fe);ut===st&&_t===Rt&&yO(fe,Ye,Ze)}}),()=>X()},[w,k,R,M,j,A,P]);let L=Mt(n),O=(0,kn.useRef)(null),V=(0,kn.useRef)(void 0),W=(0,kn.useRef)(!1),q=(0,kn.useRef)(!1);(0,kn.useEffect)(()=>{if(!F||!D)return;let X=rT(D);if(!X)return;let fe=()=>{x.current=!1,W.current=!0},Ye=()=>{if(q.current||(W.current=!0),!t||!x.current)return;let{activeId:st}=t.getState();st!==null&&st!==O.current&&(x.current=!1)},Ze={passive:!0,capture:!0};return X.addEventListener("wheel",fe,Ze),X.addEventListener("touchmove",fe,Ze),X.addEventListener("scroll",Ye,Ze),()=>{X.removeEventListener("wheel",fe,!0),X.removeEventListener("touchmove",fe,!0),X.removeEventListener("scroll",Ye,!0)}},[F,D,t]),Fr(()=>{W.current=!1,P&&(C.current||(x.current=!0))},[P]),Fr(()=>{A!=="always"&&F||(x.current=F)},[A,F]),Fr(()=>{F||(V.current=void 0)},[F]);let Z=Yt(t,"resetValueOnSelect");ed(()=>{let X=x.current;if(!t||!F||!X&&(!Z||W.current))return;let{baseElement:fe,contentElement:Ye,activeId:Ze}=t.getState();if(!(fe&&!Dl(fe))){if(Ye?.hasAttribute("data-placing")){let st=new MutationObserver(S);return st.observe(Ye,{attributeFilter:["data-placing"]}),()=>st.disconnect()}if(A&&X){let st=L(j),Rt=st!==void 0?st:Ije(j)??t.first();O.current=Rt;let ut=Rt??null,_t=t.item(ut)?.value,pr=V.current;ut!==Ze||pr?.id!==ut||pr?.value!==_t?(V.current={id:ut,value:_t},t.move(ut)):t.setState("activeValue",_t)}else{let st=t.item(Ze||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,L,j]),(0,kn.useEffect)(()=>{if(!k)return;let X=y.current;if(!X)return;let fe=[X,D].filter(Ze=>!!Ze),Ye=Ze=>{fe.every(st=>_O(Ze,st))&&t?.setValue(B)};for(let Ze of fe)Ze.addEventListener("focusout",Ye);return()=>{for(let Ze of fe)Ze.removeEventListener("focusout",Ye)}},[k,D,t,B]);let Q=X=>X.currentTarget.value.length>=s,ce=b.onChange,te=Qo(l??Q),de=Qo(i??!t.tag),me=Mt(X=>{if(ce?.(X),X.defaultPrevented||!t)return;let fe=X.currentTarget,{value:Ye,selectionStart:Ze,selectionEnd:st}=fe,Rt=X.nativeEvent;if(x.current=!0,Ple(Rt)&&(Rt.isComposing&&(x.current=!1,C.current=!0),k)){let ut=Rt.inputType==="insertText"||Rt.inputType==="insertCompositionText",_t=Ze===Ye.length;N(ut&&_t)}if(de(X)){let ut=Ye===t.getState().value;t.setValue(Ye),queueMicrotask(()=>{yO(fe,Ze,st)}),k&&A&&ut&&S()}te(X)&&t.show(),(!A||!x.current)&&t.setActiveId(null)}),ee=b.onCompositionEnd,$=Mt(X=>{x.current=!0,C.current=!1,ee?.(X),!X.defaultPrevented&&A&&S()}),ue=b.onMouseDown,ve=Qo(m??(()=>t.getState().includesBaseElement)),Ee=Qo(h),ie=Qo(u??Q),ae=Mt(X=>{ue?.(X),!X.defaultPrevented&&(X.button||X.ctrlKey||t&&(ve(X)&&t.setActiveId(null),Ee(X)&&t.setValue(B),ie(X)&&ib(X.currentTarget,"mouseup",t.show)))}),pe=b.onKeyDown,le=Qo(f??Q),se=Mt(X=>{if(pe?.(X),X.repeat||(x.current=!1),X.defaultPrevented||!t)return;let{open:fe}=t.getState();if(fe&&X.key==="Enter"){X.preventDefault();return}X.ctrlKey||X.altKey||X.shiftKey||X.metaKey||fe||(X.key==="ArrowUp"||X.key==="ArrowDown")&&le(X)&&(X.preventDefault(),t.show())}),Ae=b.onBlur,ye=Mt(X=>{x.current=!1,Ae?.(X)}),Se=Ll(b.id),Pe=Aje(v)?v:void 0,Me=Yt(t,X=>X.activeId===null);return b={role:"combobox","aria-autocomplete":Pe,"aria-haspopup":vle(D,"listbox"),"aria-expanded":F,"aria-controls":D?.id,"data-active-item":Me||void 0,value:B,...b,id:Se,ref:Xo(y,b.ref),onChange:me,onCompositionEnd:$,onMouseDown:ae,onKeyDown:se,onBlur:ye},b=XH({store:t,focusable:r,...b,moveOnKeyPress:X=>mle(g,X)?!1:(k&&N(!0),!0)}),b=rU({store:t,...b}),{autoComplete:"off",...b}}),VO=Rr(function(t){return Dr(Rje,Oje(t))});var jO=a(_e(),1),iU=a(E(),1);var Nje="div";function Mje(e,t){if(t!=null)return e==null?!1:Array.isArray(e)?e.includes(t):e===t}function Fje(e){return ble(e)??"option"}var Dje=Lr(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=Lw();t=t||f,Gi(t,!1);let{resetValueOnSelectState:m,multiSelectable:h,selected:g}=OO(t,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable(R){return Array.isArray(R.selectedValue)},selected(R){return Mje(R.selectedValue,r)}}),v=(0,jO.useCallback)(R=>{let N={...R,value:r};return u?u(N):N},[r,u]);n=n??!h,o=o??(r!=null&&!h);let b=d.onClick,_=Qo(n),y=Qo(i),w=Qo(s??m??h),S=Qo(o),x=Mt(R=>{b?.(R),!R.defaultPrevented&&(Tle(R)||Cle(R)||(r!=null&&(y(R)&&(w(R)&&t?.resetValue(),t?.setSelectedValue(N=>Array.isArray(N)?N.includes(r)?N.filter(P=>P!==r):[...N,r]:r)),_(R)&&t?.setValue(r)),S(R)&&t?.hide()))}),C=d.onKeyDown,A=Mt(R=>{if(C?.(R),R.defaultPrevented)return;let N=t?.getState().baseElement;if(!N||Dl(N))return;let P=R.key.length===1&&!R.ctrlKey&&!R.metaKey,T=(wO()?R.metaKey:R.ctrlKey)&&R.key.toLowerCase()==="v",M=R.key==="Backspace"||R.key==="Delete";(P||T||M)&&(queueMicrotask(()=>N.focus()),Ps(N)&&t?.setValue(N.value))});h&&g!=null&&(d={"aria-selected":g,...d}),d=td(d,R=>(0,iU.jsx)(BO.Provider,{value:r,children:(0,iU.jsx)(Fce.Provider,{value:g??!1,children:R})}),[r,g]),d={role:Fje((0,jO.useContext)(DO)),children:r,...d,onClick:x,onKeyDown:A};let k=Qo(c);return d=ZH({store:t,...d,getItem:v,moveOnKeyPress:R=>{if(!k(R))return!1;let N=new Event("combobox-item-move");return t?.getState().baseElement?.dispatchEvent(N),!0}}),d=nU({store:t,focusOnHover:l,...d}),d}),zO=rd(Rr(function(t){return Dr(Nje,Dje(t))}));var HO=a(_e(),1),Yce=a(E(),1);var Lje="span";function sU(e){return eT(e).toLowerCase()}function Bje(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 Vje(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 jje(e){let t=[],r=[],o=0;for(let i of e){let s=sU(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 zje(e,t){if(!t.length)return t;let{starts:r,ends:o}=jje(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 Hje(e,t){if(!e||!t)return e;let r=ule(t).map(sU),o=[],n=(c,u=!1)=>(0,Yce.jsx)("span",{"data-autocomplete-value":u?"":void 0,"data-user-value":u?void 0:"",children:c},o.length),i=zje(e,Vje(Bje(sU(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 Uje=Lr(function({store:t,value:r,userValue:o,...n}){let i=Lw();t=t||i;let s=(0,HO.useContext)(BO),l=r??s,c=Yt(t,u=>o??u?.value);return n={children:(0,HO.useMemo)(()=>{if(l)return c?Hje(l,c):l},[l,c]),...n},Yi(n)}),UO=Rr(function(t){return Dr(Lje,Uje(t))});var Wje="label",Gje=Lr(function({store:t,...r}){let o=LO();return t=t||o,Gi(t,!1),r={htmlFor:Yt(t,n=>n.baseElement?.id),...r},Yi(r)}),WO=rd(Rr(function(t){return Dr(Wje,Gje(t))}));var GO=a(_e(),1),aU=a(E(),1);var Yje="div",qje=Lr(function({store:t,alwaysVisible:r,...o}){let n=Lw(!0),i=tU();t=t||i;let s=!!t&&t===n;Gi(t,!1);let l=(0,GO.useRef)(null),c=Ll(o.id),u=Yt(t,"mounted"),d=eU(u,o.hidden,r),f=d?{...o.style,display:"none"}:o.style,m=Yt(t,w=>Array.isArray(w.selectedValue)),h=jle(l,"role",o.role),g=(h==="listbox"||h==="tree"||h==="grid")&&m||void 0,[v,b]=(0,GO.useState)(!1),_=Yt(t,"contentElement");Fr(()=>{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=td(o,w=>(0,aU.jsx)(Mce,{value:t,children:(0,aU.jsx)(DO.Provider,{value:h,children:w})}),[t,h]);let y=c&&(!n||!s)?t.setContentElement:null;return o={hidden:d,...o,id:c,ref:Xo(y,l,o.ref),style:f},Yi(o)}),YO=Rr(function(t){return Dr(Yje,qje(t))});var lU=a(_e(),1),SFt=(0,lU.createContext)(null),xFt=(0,lU.createContext)(null),dT=fa([PO],[Mw]),qce=dT.useContext,CFt=dT.useScopedContext,TFt=dT.useProviderContext,EFt=dT.ContextProvider,PFt=dT.ScopedContextProvider;var Kje=Nw()&&wle();function Kce({tag:e,...t}={}){let r=Fw(t.store,nce(e,["value","rtl"]));let o=e?.getState(),n=r?.getState(),i=Bt(t.activeId,n?.activeId,t.defaultActiveId,null),s=uce({...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=zce({...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=pa(f,s,l,r);return Kje&&hi(m,()=>gi(m,["virtualFocus"],()=>{m.setState("virtualFocus",!1)})),hi(m,()=>{if(e)return Rw(gi(m,["selectedValue"],h=>{Array.isArray(h.selectedValue)&&e.setValues(h.selectedValue)}),gi(e,["values"],h=>{m.setState("selectedValue",h.values)}))}),hi(m,()=>gi(m,["resetValueOnHide","mounted"],h=>{h.resetValueOnHide&&(h.mounted||m.setState("value",c))})),hi(m,()=>gi(m,["open"],h=>{h.open||(m.setState("activeId",i),m.setState("moves",0))})),hi(m,()=>gi(m,["moves","activeId"],(h,g)=>{h.moves===g.moves&&m.setState("activeValue",void 0)})),hi(m,()=>lb(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 Xje(e){let t=qce();return e={...e,tag:e.tag!==void 0?e.tag:t},Lce(e)}function Qje(e,t,r){return ed(t,[r.tag]),Fo(e,r,"value","setValue"),Fo(e,r,"selectedValue","setSelectedValue"),Fo(e,r,"resetValueOnHide"),Fo(e,r,"resetValueOnSelect"),Object.assign(Bce(Hce(e,t,r),t,r),{tag:r.tag})}function cU(e={}){e=Xje(e);let[t,r]=Dw(Kce,e);return Qje(t,r,e)}var Zce=a(E(),1);function qO(e={}){return(0,Zce.jsx)(Nce,{value:cU(e),children:e.children})}var $ce=a($0(),1);var eue=a(ke(),1),vh=a(z(),1),db=a(U(),1),ad=a(G(),1);var $je=[],fT=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:$je;var pT=a(U(),1),eze=[];function Yn({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:eze,[o,n]=(0,pT.useState)(r),[i,s]=(0,pT.useState)(!1);return(0,pT.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 $t=a(E(),1);function Xce(e=""){return(0,$ce.default)(e.trim().toLowerCase())}var Qce=(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 Jce(e,t){return`${e}-${t}`}var tue=({selected:e})=>(0,$t.jsx)("span",{className:J("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,$t.jsx)(ad.Icon,{icon:Ro})}),rue=({selected:e})=>(0,$t.jsx)("span",{className:J("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function oue({view:e,filter:t,onChangeView:r}){let o=(0,eue.useInstanceId)(oue,"dataviews-filter-list-box"),[n,i]=(0,db.useState)(t.operators?.length===1?void 0:null),s=e.filters?.find(c=>c.field===t.field),l=fT(t,s);return(0,$t.jsx)(ad.Composite,{virtualFocus:!0,focusLoop:!0,activeId:n,setActiveId:i,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,vh.sprintf)((0,vh.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!n&&t.elements.length&&i(Jce(o,t.elements[0].value))},render:(0,$t.jsx)(ad.Composite.Typeahead,{}),children:t.elements.map(c=>(0,$t.jsxs)(ad.Composite.Hover,{render:(0,$t.jsx)(ad.Composite.Item,{id:Jce(o,c.value),render:(0,$t.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:Qce(t,s,c.value)}:d)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:Qce(t,s,c.value)}];r({...e,page:1,filters:u})}}),children:[t.singleSelection&&(0,$t.jsx)(rue,{selected:l===c.value}),!t.singleSelection&&(0,$t.jsx)(tue,{selected:l.includes(c.value)}),(0,$t.jsx)("span",{className:"dataviews-filters__search-widget-listitem-value",title:c.label,children:c.label})]},c.value))})}function tze({view:e,filter:t,onChangeView:r}){let[o,n]=(0,db.useState)(""),i=(0,db.useDeferredValue)(o),s=e.filters?.find(u=>u.field===t.field),l=fT(t,s),c=(0,db.useMemo)(()=>{let u=Xce(i);return t.elements.filter(d=>Xce(d.label).includes(u))},[t.elements,i]);return(0,$t.jsxs)(qO,{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,$t.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,$t.jsx)(Jt,{render:(0,$t.jsx)(WO,{}),children:(0,vh.__)("Search items")}),(0,$t.jsx)(VO,{autoSelect:"always",placeholder:(0,vh.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,$t.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,$t.jsx)(ad.Icon,{icon:wV})})]}),(0,$t.jsxs)(YO,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[c.map(u=>(0,$t.jsxs)(zO,{resetValueOnSelect:!1,value:u.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,$t.jsx)(rue,{selected:l===u.value}),!t.singleSelection&&(0,$t.jsx)(tue,{selected:l.includes(u.value)}),(0,$t.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-value",title:u.label,children:[(0,$t.jsx)(UO,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:u.label}),!!u.description&&(0,$t.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:u.description})]})]},u.value)),!c.length&&(0,$t.jsx)("p",{children:(0,vh.__)("No results found")})]})]})}function nue(e){let{elements:t,isLoading:r}=Yn({elements:e.filter.elements,getElements:e.filter.getElements});if(r)return(0,$t.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,$t.jsx)(ad.Spinner,{})});if(t.length===0)return(0,$t.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,vh.__)("No elements found")});let o=t.length>10?tze:oue;return(0,$t.jsx)(o,{...e,filter:{...e.filter,elements:t}})}var iue=a(n2(),1),sue=a(ke(),1),uU=a(U(),1),aue=a(G(),1);var dU=a(E(),1);function lue({filter:e,view:t,onChangeView:r,fields:o}){let n=t.filters?.find(u=>u.field===e.field),i=fT(e,n),s=(0,uU.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,uU.useMemo)(()=>(t.filters??[]).reduce((u,d)=>(u[d.field]=d.value,u),{}),[t.filters]),c=(0,sue.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,dU.jsx)(aue.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,dU.jsx)(s.Edit,{hideLabelFromVision:!0,data:l,field:s,operator:n.operator,onChange:c})})}var rze=Math.pow(10,8)*24*60*60*1e3,hDt=-rze,KO=6048e5,cue=864e5,fU=6e4,pU=36e5;var oze=3600;var uue=oze*24,gDt=uue*7,nze=uue*365.2425,ize=nze/12,vDt=ize*3,mU=Symbol.for("constructDateFrom");function Jo(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 qt(e,t){return Jo(t||e,e)}function ZO(e,t,r){let o=qt(e,r?.in);return isNaN(t)?Jo(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function XO(e,t,r){let o=qt(e,r?.in);if(isNaN(t))return Jo(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=Jo(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 sze={};function bh(){return sze}function Kf(e,t){let r=bh(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=qt(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 fb(e,t){return Kf(e,{...t,weekStartsOn:1})}function QO(e,t){let r=qt(e,t?.in),o=r.getFullYear(),n=Jo(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);let i=fb(n),s=Jo(r,0);s.setFullYear(o,0,4),s.setHours(0,0,0,0);let l=fb(s);return r.getTime()>=i.getTime()?o+1:r.getTime()>=l.getTime()?o:o-1}function hU(e){let t=qt(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 due(e,...t){let r=Jo.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function gU(e,t){let r=qt(e,t?.in);return r.setHours(0,0,0,0),r}function fue(e,t,r){let[o,n]=due(r?.in,e,t),i=gU(o),s=gU(n),l=+i-hU(i),c=+s-hU(s);return Math.round((l-c)/cue)}function pue(e,t){let r=QO(e,t),o=Jo(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),fb(o)}function mue(e,t,r){return ZO(e,t*7,r)}function hue(e,t,r){return XO(e,t*12,r)}function gue(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Zf(e){return!(!gue(e)&&typeof e!="number"||isNaN(+qt(e)))}function vue(e,t){let r=qt(e,t?.in),o=r.getMonth();return r.setFullYear(r.getFullYear(),o+1,0),r.setHours(23,59,59,999),r}function mT(e,t){let r=qt(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function JO(e,t){let r=qt(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var aze={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"}},bue=(e,t,r)=>{let o,n=aze[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 $O(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var lze={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},cze={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},uze={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yue={date:$O({formats:lze,defaultWidth:"full"}),time:$O({formats:cze,defaultWidth:"full"}),dateTime:$O({formats:uze,defaultWidth:"full"})};var dze={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wue=(e,t,r,o)=>dze[e];function Bw(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 fze={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},pze={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mze={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"]},hze={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"]},gze={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"}},vze={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"}},bze=(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"},_ue={ordinalNumber:bze,era:Bw({values:fze,defaultWidth:"wide"}),quarter:Bw({values:pze,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Bw({values:mze,defaultWidth:"wide"}),day:Bw({values:hze,defaultWidth:"wide"}),dayPeriod:Bw({values:gze,defaultWidth:"wide",formattingValues:vze,defaultFormattingWidth:"wide"})};function Vw(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)?wze(l,f=>f.test(s)):yze(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 yze(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function wze(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Sue(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 _ze=/^(\d+)(th|st|nd|rd)?/i,Sze=/\d+/i,xze={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},Cze={any:[/^b/i,/^(a|c)/i]},Tze={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Eze={any:[/1/i,/2/i,/3/i,/4/i]},Pze={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},kze={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]},Rze={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},Aze={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]},Ize={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},Oze={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}},xue={ordinalNumber:Sue({matchPattern:_ze,parsePattern:Sze,valueCallback:e=>parseInt(e,10)}),era:Vw({matchPatterns:xze,defaultMatchWidth:"wide",parsePatterns:Cze,defaultParseWidth:"any"}),quarter:Vw({matchPatterns:Tze,defaultMatchWidth:"wide",parsePatterns:Eze,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Vw({matchPatterns:Pze,defaultMatchWidth:"wide",parsePatterns:kze,defaultParseWidth:"any"}),day:Vw({matchPatterns:Rze,defaultMatchWidth:"wide",parsePatterns:Aze,defaultParseWidth:"any"}),dayPeriod:Vw({matchPatterns:Ize,defaultMatchWidth:"any",parsePatterns:Oze,defaultParseWidth:"any"})};var vU={code:"en-US",formatDistance:bue,formatLong:yue,formatRelative:wue,localize:_ue,match:xue,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Cue(e,t){let r=qt(e,t?.in);return fue(r,JO(r))+1}function Tue(e,t){let r=qt(e,t?.in),o=+fb(r)-+pue(r);return Math.round(o/KO)+1}function e5(e,t){let r=qt(e,t?.in),o=r.getFullYear(),n=bh(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Jo(t?.in||e,0);s.setFullYear(o+1,0,i),s.setHours(0,0,0,0);let l=Kf(s,t),c=Jo(t?.in||e,0);c.setFullYear(o,0,i),c.setHours(0,0,0,0);let u=Kf(c,t);return+r>=+l?o+1:+r>=+u?o:o-1}function Eue(e,t){let r=bh(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=e5(e,t),i=Jo(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),Kf(i,t)}function Pue(e,t){let r=qt(e,t?.in),o=+Kf(r,t)-+Eue(r,t);return Math.round(o/KO)+1}function rr(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Xf={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return rr(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):rr(r+1,2)},d(e,t){return rr(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 rr(e.getHours()%12||12,t.length)},H(e,t){return rr(e.getHours(),t.length)},m(e,t){return rr(e.getMinutes(),t.length)},s(e,t){return rr(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return rr(n,t.length)}};var jw={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 Xf.y(e,t)},Y:function(e,t,r,o){let n=e5(e,o),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return rr(s,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):rr(i,t.length)},R:function(e,t){let r=QO(e);return rr(r,t.length)},u:function(e,t){let r=e.getFullYear();return rr(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 rr(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 rr(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 Xf.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 rr(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=Pue(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):rr(n,t.length)},I:function(e,t,r){let o=Tue(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):rr(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Xf.d(e,t)},D:function(e,t,r){let o=Cue(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):rr(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 rr(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 rr(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 rr(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=jw.noon:o===0?n=jw.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=jw.evening:o>=12?n=jw.afternoon:o>=4?n=jw.morning:n=jw.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 Xf.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Xf.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):rr(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):rr(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Xf.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Xf.s(e,t)},S:function(e,t){return Xf.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return Rue(o);case"XXXX":case"XX":return pb(o);default:return pb(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return Rue(o);case"xxxx":case"xx":return pb(o);default:return pb(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+kue(o,":");default:return"GMT"+pb(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+kue(o,":");default:return"GMT"+pb(o,":")}},t:function(e,t,r){let o=Math.trunc(+e/1e3);return rr(o,t.length)},T:function(e,t,r){return rr(+e,t.length)}};function kue(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+rr(i,2)}function Rue(e,t){return e%60===0?(e>0?"-":"+")+rr(Math.abs(e)/60,2):pb(e,t)}function pb(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=rr(Math.trunc(o/60),2),i=rr(o%60,2);return r+n+t+i}var Aue=(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"})}},Iue=(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"})}},Nze=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return Aue(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}}",Aue(o,t)).replace("{{time}}",Iue(n,t))},Oue={p:Iue,P:Nze};var Mze=/^D+$/,Fze=/^Y+$/,Dze=["D","DD","YY","YYYY"];function Nue(e){return Mze.test(e)}function Mue(e){return Fze.test(e)}function Fue(e,t,r){let o=Lze(e,t,r);if(console.warn(o),Dze.includes(e))throw new RangeError(o)}function Lze(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 Bze=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vze=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jze=/^'([^]*?)'?$/,zze=/''/g,Hze=/[a-zA-Z]/;function yU(e,t,r){let o=bh(),n=r?.locale??o.locale??vU,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=qt(e,r?.in);if(!Zf(l))throw new RangeError("Invalid time value");let c=t.match(Vze).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=Oue[f];return m(d,n.formatLong)}return d}).join("").match(Bze).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:Uze(d)};if(bU[f])return{isToken:!0,value:d};if(f.match(Hze))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&&Mue(f)||!r?.useAdditionalDayOfYearTokens&&Nue(f))&&Fue(f,t,String(e));let m=bU[f[0]];return m(l,f,n.localize,u)}).join("")}function Uze(e){let t=e.match(jze);return t?t[1].replace(zze,"'"):e}function mb(e,t,r){return ZO(e,-t,r)}function Due(e,t){let r=()=>Jo(t?.in,NaN),o=t?.additionalDigits??2,n=qze(e),i;if(n.date){let u=Kze(n.date,o);i=Zze(u.restDateString,u.year)}if(!i||isNaN(+i))return r();let s=+i,l=0,c;if(n.time&&(l=Xze(n.time),isNaN(l)))return r();if(n.timezone){if(c=Qze(n.timezone),isNaN(c))return r()}else{let u=new Date(s+l),d=qt(0,t?.in);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return qt(s+l+c,t?.in)}var t5={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Wze=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Gze=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Yze=/^([+-])(\d{2})(?::?(\d{2}))?$/;function qze(e){let t={},r=e.split(t5.dateTimeDelimiter),o;if(r.length>2)return t;if(/:/.test(r[0])?o=r[0]:(t.date=r[0],o=r[1],t5.timeZoneDelimiter.test(t.date)&&(t.date=e.split(t5.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length))),o){let n=t5.timezone.exec(o);n?(t.time=o.replace(n[1],""),t.timezone=n[1]):t.time=o}return t}function Kze(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 Zze(e,t){if(t===null)return new Date(NaN);let r=e.match(Wze);if(!r)return new Date(NaN);let o=!!r[4],n=hT(r[1]),i=hT(r[2])-1,s=hT(r[3]),l=hT(r[4]),c=hT(r[5])-1;if(o)return rHe(t,l,c)?Jze(t,l,c):new Date(NaN);{let u=new Date(0);return!eHe(t,i,s)||!tHe(t,n)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(n,s)),u)}}function hT(e){return e?parseInt(e):1}function Xze(e){let t=e.match(Gze);if(!t)return NaN;let r=wU(t[1]),o=wU(t[2]),n=wU(t[3]);return oHe(r,o,n)?r*pU+o*fU+n*1e3:NaN}function wU(e){return e&&parseFloat(e.replace(",","."))||0}function Qze(e){if(e==="Z")return 0;let t=e.match(Yze);if(!t)return 0;let r=t[1]==="+"?-1:1,o=parseInt(t[2]),n=t[3]&&parseInt(t[3])||0;return nHe(o,n)?r*(o*pU+n*fU):NaN}function Jze(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 $ze=[31,null,31,30,31,30,31,31,30,31,30,31];function Lue(e){return e%400===0||e%4===0&&e%100!==0}function eHe(e,t,r){return t>=0&&t<=11&&r>=1&&r<=($ze[t]||(Lue(e)?29:28))}function tHe(e,t){return t>=1&&t<=(Lue(e)?366:365)}function rHe(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function oHe(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function nHe(e,t){return t>=0&&t<=59}function r5(e,t,r){return XO(e,-t,r)}function Bue(e,t,r){return mue(e,-t,r)}function o5(e,t,r){return hue(e,-t,r)}var Ve=a(z(),1),Do=a(U(),1),ks=a(an(),1);var _U=a(E(),1),$o={Name:(0,_U.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,_U.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Vue(e,t){switch(t){case"days":return mb(new Date,e);case"weeks":return Bue(new Date,e);case"months":return r5(new Date,e);case"years":return o5(new Date,e);default:return new Date}}var jue={label:(0,Ve.__)("Is none of"),filterText:(e,t)=>(0,Do.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(", ")),$o),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"},n5=[{name:oo,label:(0,Ve.__)("Includes"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),$o),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:no,...jue},{name:Ui,label:(0,Ve.__)("Includes all"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),$o),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:Wn,...jue},{name:Cs,label:(0,Ve.__)("Between (inc)"),filterText:(e,t)=>(0,Do.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]),$o),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:Ts,label:(0,Ve.__)("In the past"),filterText:(e,t)=>(0,Do.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}`),$o),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Vue(r.value,r.unit),n=(0,ks.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:la,label:(0,Ve.__)("Over"),filterText:(e,t)=>(0,Do.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}`),$o),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Vue(r.value,r.unit);return(0,ks.getDate)(t.getValue({item:e}))<o},selection:"custom"},{name:yo,label:(0,Ve.__)("Is"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:wo,label:(0,Ve.__)("Is not"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:Zm,label:(0,Ve.__)("Less than"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<r},selection:"single"},{name:Xm,label:(0,Ve.__)("Greater than"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:Qm,label:(0,Ve.__)("Less than or equal"),filterText:(e,t)=>(0,Do.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),$o),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:Jm,label:(0,Ve.__)("Greater than or equal"),filterText:(e,t)=>(0,Do.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),$o),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:$m,label:(0,Ve.__)("Before"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,ks.getDate)(r);return(0,ks.getDate)(t.getValue({item:e}))<o},selection:"single"},{name:eh,label:(0,Ve.__)("After"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,ks.getDate)(r);return(0,ks.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:th,label:(0,Ve.__)("Before (inc)"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,ks.getDate)(r);return(0,ks.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:rh,label:(0,Ve.__)("After (inc)"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,ks.getDate)(r);return(0,ks.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:Gu,label:(0,Ve.__)("Contains"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),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:Yu,label:(0,Ve.__)("Doesn't contain"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),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,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),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:oh,label:(0,Ve.__)("On"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,ks.getDate)(r),n=(0,ks.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:nh,label:(0,Ve.__)("Not on"),filterText:(e,t)=>(0,Do.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,ks.getDate)(r),n=(0,ks.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],hb=e=>n5.find(t=>t.name===e),zue=()=>n5.map(e=>e.name),Hue=e=>n5.filter(t=>t.selection==="single").some(t=>t.name===e),Uue=e=>n5.some(t=>t.name===e);var en=a(E(),1),iHe="Enter",sHe=" ",aHe=({activeElements:e,filterInView:t,filter:r})=>{if(e===void 0||e.length===0)return r.name;let o=hb(t?.operator);return o!==void 0?o.filterText(r,e):(0,Qf.sprintf)((0,Qf.__)("Unknown status for %1$s"),r.name)};function lHe({filter:e,view:t,onChangeView:r}){let o=e.operators?.map(s=>({value:s,label:hb(s)?.label||s})),n=t.filters?.find(s=>s.field===e.field),i=n?.operator||e.operators[0];return o.length>1&&(0,en.jsxs)(oe,{direction:"row",gap:"sm",justify:"flex-start",className:"dataviews-filters__summary-operators-container",align:"center",children:[(0,en.jsx)(yh.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,en.jsx)(yh.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,Qf.__)("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=hb(c)?.selection,m=hb(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 Wue({addFilterRef:e,openedFilter:t,fields:r,...o}){let n=(0,i5.useRef)(null),{filter:i,view:s,onChangeView:l}=o,c=s.filters?.find(_=>_.field===i.field),u=[],d=(0,i5.useMemo)(()=>{let _=r.find(y=>y.id===i.field);return _&&{..._,getValue:({item:y})=>y[_.id]}},[r,i.field]),{elements:f}=Yn({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,Qf.__)("Reset"):(0,Qf.__)("Remove");return(0,en.jsx)(yh.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,en.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,en.jsxs)(Ke.Root,{children:[(0,en.jsx)(Ke.Trigger,{render:(0,en.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&&[iHe,sHe].includes(w.key)&&(y(),w.preventDefault())},"aria-disabled":h,"aria-pressed":_,"aria-expanded":_,ref:n,children:(0,en.jsx)(aHe,{activeElements:u,filterInView:c,filter:i})})}),(0,en.jsx)(Ke.Popup,{children:(0,Qf.sprintf)((0,Qf.__)("Filter by: %1$s"),i.name.toLowerCase())})]}),v&&(0,en.jsxs)(Ke.Root,{children:[(0,en.jsx)(Ke.Trigger,{render:(0,en.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,en.jsx)(yh.Icon,{icon:Ii})})}),(0,en.jsx)(Ke.Popup,{children:b})]})]}),renderContent:()=>(0,en.jsxs)(oe,{direction:"column",justify:"flex-start",children:[(0,en.jsx)(lHe,{...o}),o.filter.hasElements?(0,en.jsx)(nue,{...o,filter:{...o.filter,elements:f}}):(0,en.jsx)(lue,{...o,fields:r})]})})}var s5=a(G(),1),Gue=a(z(),1),Yue=a(U(),1);var Jf=a(E(),1),{Menu:gT}=St(s5.privateApis);function SU({filters:e,view:t,onChangeView:r,setOpenedFilter:o,triggerProps:n}){let i=e.filter(s=>!s.isVisible);return(0,Jf.jsxs)(gT,{children:[(0,Jf.jsx)(gT.TriggerButton,{...n}),(0,Jf.jsx)(gT.Popover,{children:i.map(s=>(0,Jf.jsx)(gT.Item,{onClick:()=>{o(s.field),r({...t,page:1,filters:[...t.filters||[],{field:s.field,value:void 0,operator:s.operators[0]}]})},children:(0,Jf.jsx)(gT.ItemLabel,{children:s.name})},s.field))})]})}function cHe({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,Jf.jsx)(SU,{triggerProps:{render:(0,Jf.jsx)(s5.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!i.length,ref:n}),children:(0,Gue.__)("Add filter")},filters:e,view:t,onChangeView:r,setOpenedFilter:o})}var que=(0,Yue.forwardRef)(cHe);var Kue=a(G(),1),Zue=a(z(),1),Xue=a(E(),1);function Que({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,Xue.jsx)(Kue.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,Zue.__)("Reset")})}var Jue=a(U(),1);function uHe(e,t){return(0,Jue.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=>Hue(l)),operators:n,isVisible:s||i||!!t.filters?.some(l=>l.field===o.id&&Uue(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 vT=uHe;var bT=a(E(),1);function dHe({className:e}){let{fields:t,view:r,onChangeView:o,openedFilter:n,setOpenedFilter:i}=(0,zw.useContext)($e),s=(0,zw.useRef)(null),l=vT(t,r),c=(0,bT.jsx)(que,{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,bT.jsx)(Wue,{filter:f,view:r,fields:t,onChangeView:o,addFilterRef:s,openedFilter:n},f.field)),c];return d.push((0,bT.jsx)(Que,{filters:l,view:r,onChangeView:o},"reset-filters")),(0,bT.jsx)(oe,{direction:"row",justify:"flex-start",gap:"sm",style:{width:"fit-content"},wrap:"wrap",className:e,children:d})}var yT=(0,zw.memo)(dHe);var wh=a(U(),1),$ue=a(G(),1);var a5=a(z(),1);var ld=a(E(),1);function fHe(){let{filters:e,view:t,onChangeView:r,setOpenedFilter:o,isShowingFilter:n,setIsShowingFilter:i}=(0,wh.useContext)($e),s=(0,wh.useRef)(null),l=(0,wh.useCallback)(h=>{r(h),i(!0)},[r,i]);if(e.length===0)return null;let c=e.some(h=>h.isVisible),u={label:(0,a5.__)("Add filter"),"aria-expanded":!1,isPressed:!1},d={label:(0,a5._x)("Filter","verb"),"aria-expanded":n,isPressed:n,onClick:()=>{n||o(null),i(!n)}},f=e.some(h=>h.isPrimary||h.isLocked),m=(0,ld.jsx)($ue.Button,{ref:s,className:"dataviews-filters__visibility-toggle",size:"compact",icon:Gx,disabled:f,accessibleWhenDisabled:!0,...c?d:u});return(0,ld.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:c?(0,ld.jsx)(pHe,{buttonRef:s,filtersCount:t.filters?.length,children:m}):(0,ld.jsx)(SU,{filters:e,view:t,onChangeView:l,setOpenedFilter:o,triggerProps:{render:m}})})}function pHe({buttonRef:e,filtersCount:t,children:r}){return(0,wh.useEffect)(()=>()=>{e.current?.focus()},[e]),(0,ld.jsxs)(ld.Fragment,{children:[r,!!t&&(0,ld.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var l5=fHe;var ede=a(U(),1);var tde=a(E(),1);function mHe(e){let{isShowingFilter:t}=(0,ede.useContext)($e);return t?(0,tde.jsx)(yT,{...e}):null}var c5=mHe;var rde=a(U(),1),ode=a(G(),1),nde=a(z(),1);var gb=a(E(),1);function xU({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,gb.jsx)("p",{children:(0,nde.__)("No results")})}=(0,rde.useContext)($e),w=Zu(!s,{delay:200});if(!s)return w?(0,gb.jsx)("div",{className:"dataviews-loading",children:(0,gb.jsx)("p",{children:(0,gb.jsx)(ode.Spinner,{})})}):null;let S=ph.find(x=>x.type===c.type&&b[x.type])?.component;return(0,gb.jsx)("div",{className:"dataviews-layout__container",ref:_,children:(0,gb.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(z(),1),Lc=a(U(),1),sde=a(G(),1),ade=a(ke(),1);var lde=a(E(),1),hHe=(0,Lc.memo)(function({label:t}){let{view:r,onChangeView:o}=(0,Lc.useContext)($e),[n,i,s]=(0,ade.useDebouncedInput)(r.search);(0,Lc.useEffect)(()=>{r.search!==s&&i(r.search??"")},[r.search,i]);let l=(0,Lc.useRef)(o),c=(0,Lc.useRef)(r);(0,Lc.useEffect)(()=>{l.current=o,c.current=r},[o,r]),(0,Lc.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,lde.jsx)(sde.SearchControl,{className:"dataviews-search",onChange:i,value:n,label:u,placeholder:u,size:"compact"})}),CU=hHe;var tn=a(G(),1),$f=a(z(),1),Bc=a(U(),1);var EU=a(TU(),1),ude=a(ke(),1);var zt=a(E(),1),{Menu:wT}=St(tn.privateApis),gHe={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function PU(){let{view:e,onChangeView:t,defaultLayouts:r}=(0,Bc.useContext)($e),o=Object.keys(r);if(o.length<=1)return null;let n=ph.find(i=>e.type===i.type);return(0,zt.jsxs)(wT,{children:[(0,zt.jsx)(wT.TriggerButton,{render:(0,zt.jsx)(tn.Button,{size:"compact",icon:n?.icon,label:(0,$f.__)("Layout")})}),(0,zt.jsx)(wT.Popover,{children:o.map(i=>{let s=ph.find(l=>l.type===i);return s?(0,zt.jsx)(wT.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,EU.default)("Invalid dataview")},children:(0,zt.jsx)(wT.ItemLabel,{children:s.label})},i):null})})]})}function vHe(){let{view:e,fields:t,onChangeView:r}=(0,Bc.useContext)($e),o=(0,Bc.useMemo)(()=>t.filter(i=>i.enableSorting!==!1).map(i=>({label:i.label,value:i.id})),[t]);return(0,zt.jsx)(tn.SelectControl,{label:(0,$f.__)("Sort by"),value:e.sort?.field,options:o,onChange:n=>{r({...e,sort:{direction:e?.sort?.direction||"desc",field:n},showLevels:!1})}})}function bHe(){let{view:e,fields:t,onChangeView:r}=(0,Bc.useContext)($e);if(t.filter(i=>i.enableSorting!==!1).length===0)return null;let n=e.sort?.direction;return!n&&e.sort?.field&&(n="desc"),(0,zt.jsx)(tn.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",isBlock:!0,label:(0,$f.__)("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,EU.default)("Invalid direction")},children:HI.map(i=>(0,zt.jsx)(tn.__experimentalToggleGroupControlOptionIcon,{value:i,icon:Xse[i],label:WI[i]},i))})}function yHe(){let{view:e,config:t,onChangeView:r}=(0,Bc.useContext)($e),{infiniteScrollEnabled:o}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||o?null:(0,zt.jsx)(tn.__experimentalToggleGroupControl,{isBlock:!0,label:(0,$f.__)("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,zt.jsx)(tn.__experimentalToggleGroupControlOption,{value:n,label:n.toString()},n))})}function wHe(){let{onReset:e}=(0,Bc.useContext)($e);return e===void 0?null:(0,zt.jsx)(tn.Button,{variant:"tertiary",size:"compact",disabled:e===!1,accessibleWhenDisabled:!0,className:"dataviews-view-config__reset-button",onClick:()=>{typeof e=="function"&&e()},children:(0,$f.__)("Reset view")})}function kU(){let{view:e,onReset:t}=(0,Bc.useContext)($e),r=(0,ude.useInstanceId)(dde,"dataviews-view-config-dropdown"),o=ph.find(i=>i.type===e.type),n=typeof t=="function";return(0,zt.jsx)(tn.Dropdown,{expandOnMobile:!0,popoverProps:{...gHe,id:r},renderToggle:({onToggle:i,isOpen:s})=>(0,zt.jsxs)("div",{className:"dataviews-view-config__toggle-wrapper",children:[(0,zt.jsx)(tn.Button,{size:"compact",icon:dB,label:(0,$f._x)("View options","View is used as a noun"),onClick:i,"aria-expanded":s?"true":"false","aria-controls":r}),n&&(0,zt.jsx)("span",{className:"dataviews-view-config__modified-indicator"})]}),renderContent:()=>(0,zt.jsx)(tn.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,zt.jsxs)(oe,{direction:"column",className:"dataviews-view-config",gap:"xl",children:[(0,zt.jsxs)(oe,{direction:"row",justify:"space-between",align:"center",className:"dataviews-view-config__header",children:[(0,zt.jsx)(tn.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:(0,$f.__)("Appearance")}),(0,zt.jsx)(wHe,{})]}),(0,zt.jsxs)(oe,{direction:"column",gap:"lg",children:[(0,zt.jsxs)(oe,{direction:"row",gap:"sm",className:"dataviews-view-config__sort-controls",children:[(0,zt.jsx)(vHe,{}),(0,zt.jsx)(bHe,{})]}),!!o?.viewConfigOptions&&(0,zt.jsx)(o.viewConfigOptions,{}),(0,zt.jsx)(yHe,{}),(0,zt.jsx)(rO,{})]})]})})})}function dde(){return(0,zt.jsxs)(zt.Fragment,{children:[(0,zt.jsx)(PU,{}),(0,zt.jsx)(kU,{})]})}var _He=(0,Bc.memo)(dde),fde=_He;var pde=a(G(),1),mde=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 hde=a(E(),1),{ValidatedCheckboxControl:SHe}=St(pde.privateApis);function gde({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,mde.useCallback)(()=>{t(l({item:r,value:!s({item:r})}))},[r,s,t,l]);return(0,hde.jsx)(SHe,{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 u5=a(G(),1),vde=a(U(),1);var RU=a(E(),1),{ValidatedComboboxControl:xHe}=St(u5.privateApis);function d5({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,vde.useCallback)(v=>r(u({item:e,value:v??""})),[e,r,u]),{elements:h,isLoading:g}=Yn({elements:t.elements,getElements:t.getElements});return g?(0,RU.jsx)(u5.Spinner,{}):(0,RU.jsx)(xHe,{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 m5=a(G(),1),Bl=a(U(),1),p5=a(z(),1),sl=a(an(),1);var Uw=a(G(),1),AU=a(U(),1),cd=a(z(),1);var Hw=a(E(),1),CHe={[Ts]:[{value:"days",label:(0,cd.__)("Days")},{value:"weeks",label:(0,cd.__)("Weeks")},{value:"months",label:(0,cd.__)("Months")},{value:"years",label:(0,cd.__)("Years")}],[la]:[{value:"days",label:(0,cd.__)("Days ago")},{value:"weeks",label:(0,cd.__)("Weeks ago")},{value:"months",label:(0,cd.__)("Months ago")},{value:"years",label:(0,cd.__)("Years ago")}]};function f5({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let s=CHe[i===Ts?"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,AU.useCallback)(y=>o(f({item:t,value:{value:Number(y),unit:v}})),[o,f,t,v]),_=(0,AU.useCallback)(y=>o(f({item:t,value:{value:g,unit:y}})),[o,f,t,g]);return(0,Hw.jsx)(Uw.BaseControl,{id:l,className:J(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,help:u,children:(0,Hw.jsxs)(oe,{direction:"row",gap:"sm",children:[(0,Hw.jsx)(Uw.__experimentalNumberControl,{className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:g,onChange:b,disabled:m}),(0,Hw.jsx)(Uw.SelectControl,{className:"dataviews-controls__relative-date-unit",label:(0,cd.__)("Unit"),value:v,options:s,onChange:_,hideLabelFromVision:!0,disabled:m})]})})}var bde=a(U(),1);function _T(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,bde.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 yde=a(an(),1);function ST(e){if(!e)return null;let t=(0,yde.getDate)(e);return t&&Zf(t)?t:null}var _h=a(E(),1),{DateCalendar:THe,ValidatedInputControl:EHe}=St(m5.privateApis),IU=e=>e?(0,sl.dateI18n)("Y-m-d\\TH:i",(0,sl.getDate)(e)):"";function PHe({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,Bl.useState)(()=>ST(b)||new Date),w=(0,Bl.useRef)(null),S=(0,Bl.useRef)(void 0),x=(0,Bl.useRef)(null),{minConstraint:C,maxConstraint:A,disabledMatchers:k}=_T(h,ST),R=(0,Bl.useCallback)(D=>r(f({item:e,value:D})),[e,r,f]);(0,Bl.useEffect)(()=>()=>{S.current&&clearTimeout(S.current)},[]);let N=(0,Bl.useCallback)(D=>{let B;if(D){let L=(0,sl.dateI18n)("Y-m-d",D),O;b?O=(0,sl.dateI18n)("H:i",(0,sl.getDate)(b)):O=(0,sl.dateI18n)("H:i",D),B=(0,sl.getDate)(`${L}T${O}`).toISOString(),R(B),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(B),x.current&&x.current instanceof HTMLElement&&x.current.focus())},0)},[R,b]),P=(0,Bl.useCallback)(D=>{if(D){let B=(0,sl.getDate)(D);R(B.toISOString());let L=ST(B.toISOString());L&&y(L)}else R(void 0)},[R]),{format:T}=t,M=T.weekStartsOn??(0,sl.getSettings)().l10n.startOfWeek,{timezone:{string:j}}=(0,sl.getSettings)(),F=u;return h?.required&&!n&&!o?F=`${u} (${(0,p5.__)("Required")})`:!h?.required&&n&&!o&&(F=`${u} (${(0,p5.__)("Optional")})`),(0,_h.jsx)(m5.BaseControl,{id:c,label:F,help:d,hideLabelFromVision:o,children:(0,_h.jsxs)(oe,{direction:"column",gap:"lg",children:[(0,_h.jsx)(EHe,{ref:w,required:!!h?.required,customValidity:wr(h,i),type:"datetime-local",label:(0,p5.__)("Date time"),hideLabelFromVision:!0,value:IU(b),onChange:P,disabled:g,min:C?IU(C):void 0,max:A?IU(A):void 0}),!l&&(0,_h.jsx)(THe,{style:{width:"100%"},selected:b&&ST(b)||void 0,onSelect:N,month:_,onMonthChange:y,timeZone:j||void 0,weekStartsOn:M,disabled:g||k})]})})}function wde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s,config:l}){return i===Ts||i===la?(0,_h.jsx)(f5,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,_h.jsx)(PHe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s,config:l})}var Zi=a(G(),1),_de=a(Pl(),1),lr=a(U(),1),Rn=a(z(),1),Ki=a(an(),1);var Br=a(E(),1),{DateCalendar:kHe,DateRangeCalendar:RHe}=St(Zi.privateApis),AHe=[{id:"today",label:(0,Rn.__)("Today"),getValue:()=>(0,Ki.getDate)(null)},{id:"yesterday",label:(0,Rn.__)("Yesterday"),getValue:()=>{let e=(0,Ki.getDate)(null);return mb(e,1)}},{id:"past-week",label:(0,Rn.__)("Past week"),getValue:()=>{let e=(0,Ki.getDate)(null);return mb(e,7)}},{id:"past-month",label:(0,Rn.__)("Past month"),getValue:()=>{let e=(0,Ki.getDate)(null);return r5(e,1)}}],IHe=[{id:"last-7-days",label:(0,Rn.__)("Last 7 days"),getValue:()=>{let e=(0,Ki.getDate)(null);return[mb(e,7),e]}},{id:"last-30-days",label:(0,Rn.__)("Last 30 days"),getValue:()=>{let e=(0,Ki.getDate)(null);return[mb(e,30),e]}},{id:"month-to-date",label:(0,Rn.__)("Month to date"),getValue:()=>{let e=(0,Ki.getDate)(null);return[mT(e),e]}},{id:"last-year",label:(0,Rn.__)("Last year"),getValue:()=>{let e=(0,Ki.getDate)(null);return[o5(e,1),e]}},{id:"year-to-date",label:(0,Rn.__)("Year to date"),getValue:()=>{let e=(0,Ki.getDate)(null);return[JO(e),e]}}],Sh=e=>{if(!e)return null;let t=(0,Ki.getDate)(e);return t&&Zf(t)?t:null},OU=e=>e?typeof e=="string"?e:yU(e,"yyyy-MM-dd"):"";function Sde({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:s}=e,[l,c]=(0,lr.useState)(void 0),u=(0,lr.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,lr.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,lr.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,lr.useEffect)(()=>{if(!o)return;let f=t?wr(s,t):void 0;f?c(f):u()},[o,s,t,u]),(0,lr.useEffect)(()=>{o&&l?.message&&(0,_de.speak)(l.message)},[o,l?.message]),(0,Br.jsxs)("div",{onBlur:f=>{o||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,l&&(0,Br.jsxs)("p",{className:J("components-validated-control__indicator",l.type==="invalid"?"is-invalid":void 0),children:[(0,Br.jsx)(Zi.Icon,{className:"components-validated-control__indicator-icon",icon:hf,size:16,fill:"currentColor"}),l.message]})]})}function OHe({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,lr.useState)(null),b=m.weekStartsOn??(0,Ki.getSettings)().l10n.startOfWeek,_=d({item:e}),y=typeof _=="string"?_:void 0,[w,S]=(0,lr.useState)(()=>Sh(y)||new Date),[x,C]=(0,lr.useState)(!1),A=(0,lr.useRef)(null),{minConstraint:k,maxConstraint:R,disabledMatchers:N}=_T(f,Sh),P=(0,lr.useCallback)(B=>r(u({item:e,value:B})),[e,r,u]),T=(0,lr.useCallback)(B=>{let L=B?yU(B,"yyyy-MM-dd"):void 0;P(L),v(null),C(!0)},[P]),M=(0,lr.useCallback)(B=>{let L=B.getValue(),O=OU(L);S(L),P(O),v(B.id),C(!0)},[P]),j=(0,lr.useCallback)(B=>{if(P(B),B){let L=Sh(B);L&&S(L)}v(null),C(!0)},[P]),{timezone:{string:F}}=(0,Ki.getSettings)(),D=l;return f?.required&&!n?D=`${l} (${(0,Rn.__)("Required")})`:!f?.required&&n&&(D=`${l} (${(0,Rn.__)("Optional")})`),(0,Br.jsx)(Sde,{field:t,validity:i,inputRefs:A,isTouched:x,setIsTouched:C,children:(0,Br.jsx)(Zi.BaseControl,{id:s,className:"dataviews-controls__date",label:D,help:c,hideLabelFromVision:o,children:(0,Br.jsxs)(oe,{direction:"column",gap:"lg",children:[(0,Br.jsxs)(oe,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[AHe.map(B=>{let L=g===B.id;return(0,Br.jsx)(Zi.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:L,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>M(B),children:B.label},B.id)}),(0,Br.jsx)(Zi.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!g,size:"small",disabled:!!g||h,accessibleWhenDisabled:!0,children:(0,Rn.__)("Custom")})]}),(0,Br.jsx)(Zi.__experimentalInputControl,{ref:A,type:"date",label:(0,Rn.__)("Date"),hideLabelFromVision:!0,value:y,onChange:j,required:!!t.isValid?.required,disabled:h,min:k,max:R}),(0,Br.jsx)(kHe,{style:{width:"100%"},selected:y&&Sh(y)||void 0,onSelect:T,month:w,onMonthChange:S,timeZone:F||void 0,weekStartsOn:b,disabled:h||N,disableNavigation:h})]})})})}function NHe({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,Ki.getSettings)().l10n.startOfWeek,{minConstraint:_,maxConstraint:y,disabledMatchers:w}=_T(f,Sh),S=(0,lr.useCallback)(V=>{r(d({item:e,value:V}))},[e,r,d]),[x,C]=(0,lr.useState)(null),A=(0,lr.useMemo)(()=>{if(!g)return{from:void 0,to:void 0};let[V,W]=g;return{from:Sh(V)||void 0,to:Sh(W)||void 0}},[g]),[k,R]=(0,lr.useState)(()=>A.from||new Date),[N,P]=(0,lr.useState)(!1),T=(0,lr.useRef)(null),M=(0,lr.useRef)(null),j=(0,lr.useCallback)((V,W)=>{V&&W?S([OU(V),OU(W)]):!V&&!W&&S(void 0)},[S]),F=(0,lr.useCallback)(V=>{j(V?.from,V?.to),C(null),P(!0)},[j]),D=(0,lr.useCallback)(V=>{let[W,q]=V.getValue();R(W),j(W,q),C(V.id),P(!0)},[j]),B=(0,lr.useCallback)((V,W)=>{let[q,Z]=g||[void 0,void 0];if(j(V==="from"?W:q,V==="to"?W:Z),W){let te=Sh(W);te&&R(te)}C(null),P(!0)},[g,j]),{timezone:L}=(0,Ki.getSettings)(),O=l;return t.isValid?.required&&!n?O=`${l} (${(0,Rn.__)("Required")})`:!t.isValid?.required&&n&&(O=`${l} (${(0,Rn.__)("Optional")})`),(0,Br.jsx)(Sde,{field:t,validity:i,inputRefs:[T,M],isTouched:N,setIsTouched:P,children:(0,Br.jsx)(Zi.BaseControl,{id:s,className:"dataviews-controls__date",label:O,help:c,hideLabelFromVision:o,children:(0,Br.jsxs)(oe,{direction:"column",gap:"lg",children:[(0,Br.jsxs)(oe,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[IHe.map(V=>{let W=x===V.id;return(0,Br.jsx)(Zi.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,Br.jsx)(Zi.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!x,size:"small",accessibleWhenDisabled:!0,disabled:!!x||h,children:(0,Rn.__)("Custom")})]}),(0,Br.jsxs)(oe,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,Br.jsx)(Zi.__experimentalInputControl,{ref:T,type:"date",label:(0,Rn.__)("From"),hideLabelFromVision:!0,value:g?.[0],onChange:V=>B("from",V),required:!!t.isValid?.required,disabled:h,min:_,max:y}),(0,Br.jsx)(Zi.__experimentalInputControl,{ref:M,type:"date",label:(0,Rn.__)("To"),hideLabelFromVision:!0,value:g?.[1],onChange:V=>B("to",V),required:!!t.isValid?.required,disabled:h,min:_,max:y})]}),(0,Br.jsx)(RHe,{style:{width:"100%"},selected:A,onSelect:F,month:k,onMonthChange:R,timeZone:L.string||void 0,weekStartsOn:b,disabled:h||w})]})})})}function xde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s}){return i===Ts||i===la?(0,Br.jsx)(f5,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===Cs?(0,Br.jsx)(NHe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s}):(0,Br.jsx)(OHe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s})}var h5=a(G(),1),Cde=a(U(),1);var NU=a(E(),1),{ValidatedSelectControl:MHe}=St(h5.privateApis);function g5({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,Cde.useCallback)(y=>r(d({item:e,value:y})),[e,r,d]),{elements:b,isLoading:_}=Yn({elements:t.elements,getElements:t.getElements});return _?(0,NU.jsx)(h5.Spinner,{}):(0,NU.jsx)(MHe,{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 MU=a(E(),1),FHe=10;function Tde(e){let{field:t}=e,{elements:r}=Yn({elements:t.elements,getElements:t.getElements});return r.length>=FHe?(0,MU.jsx)(d5,{...e}):(0,MU.jsx)(g5,{...e})}var b5=a(G(),1);var Ede=a(G(),1),Pde=a(U(),1);var kde=a(E(),1),{ValidatedInputControl:DHe}=St(Ede.privateApis);function ud({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,Pde.useCallback)(y=>r(h({item:e,value:y})),[e,h,r]);return(0,kde.jsx)(DHe,{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 v5=a(E(),1);function Rde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,v5.jsx)(ud,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,v5.jsx)(b5.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,v5.jsx)(b5.Icon,{icon:CB})})})}var w5=a(G(),1);var y5=a(E(),1);function Ade({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,y5.jsx)(ud,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,y5.jsx)(w5.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,y5.jsx)(w5.Icon,{icon:t0})})})}var S5=a(G(),1);var _5=a(E(),1);function Ide({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,_5.jsx)(ud,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,_5.jsx)(S5.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,_5.jsx)(S5.Icon,{icon:qB})})})}var ep=a(G(),1),xT=a(U(),1),x5=a(z(),1);var xh=a(E(),1),{ValidatedNumberControl:LHe}=St(ep.privateApis);function Ode(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function BHe({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,s=(0,xT.useCallback)(c=>t([Ode(c),i]),[t,i]),l=(0,xT.useCallback)(c=>t([n,Ode(c)]),[t,n]);return(0,xh.jsx)(ep.BaseControl,{help:(0,x5.__)("The max. value must be greater than the min. value."),children:(0,xh.jsxs)(ep.Flex,{direction:"row",gap:4,children:[(0,xh.jsx)(ep.__experimentalNumberControl,{label:(0,x5.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:s,hideLabelFromVision:r,step:o}),(0,xh.jsx)(ep.__experimentalNumberControl,{label:(0,x5.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:l,hideLabelFromVision:r,step:o})]})})}function C5({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,xT.useCallback)(y=>{r(m({item:e,value:["",void 0].includes(y)?void 0:Number(y)}))},[e,r,m]),_=(0,xT.useCallback)(y=>{r(m({item:e,value:y}))},[e,r,m]);if(i===Cs){let y=["",""];return Array.isArray(g)&&g.length===2&&g.every(w=>typeof w=="number"||w==="")&&(y=g),(0,xh.jsx)(BHe,{value:y,onChange:_,hideLabelFromVision:o,step:c})}return(0,xh.jsx)(LHe,{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 Nde=a(E(),1);function Mde(e){return(0,Nde.jsx)(C5,{...e})}var Fde=a(E(),1);function Dde(e){return(0,Fde.jsx)(C5,{...e})}var T5=a(G(),1),Lde=a(U(),1);var FU=a(E(),1),{ValidatedRadioControl:VHe}=St(T5.privateApis);function Bde({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}=Yn({elements:t.elements,getElements:t.getElements}),g=c({item:e}),v=(0,Lde.useCallback)(b=>r(u({item:e,value:b})),[e,r,u]);return h?(0,FU.jsx)(T5.Spinner,{}):(0,FU.jsx)(VHe,{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 DU=a(U(),1);var Vde=a(E(),1);function jde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:s}){let{prefix:l,suffix:c}=i||{};return(0,Vde.jsx)(ud,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s,prefix:l?(0,DU.createElement)(l):void 0,suffix:c?(0,DU.createElement)(c):void 0})}var zde=a(G(),1),Hde=a(U(),1);var Ude=a(E(),1),{ValidatedToggleControl:jHe}=St(zde.privateApis);function Wde({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,Hde.useCallback)(()=>{t(u({item:r,value:!c({item:r})}))},[t,u,r,c]);return(0,Ude.jsx)(jHe,{required:!!d.required,markWhenOptional:n,customValidity:wr(d,i),hidden:o,label:s,help:l,checked:c({item:r}),onChange:m,disabled:f})}var Gde=a(G(),1),Yde=a(U(),1);var qde=a(E(),1),{ValidatedTextareaControl:zHe}=St(Gde.privateApis);function Kde({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,Yde.useCallback)(b=>r(m({item:e,value:b})),[e,r,m]);return(0,qde.jsx)(zHe,{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 Th=a(G(),1),vb=a(ke(),1),Lo=a(U(),1),P5=a(Vc(),1);var HHe=[];function Xde({allowedFormats:e,disableFormats:t}){return t?HHe:e}var E5=a(Vc(),1),Qde=a(E(),1),Jde=a(_e(),1),UHe={};function WHe({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,E5.getActiveFormat)(r,s),u=c!==void 0,d=(0,E5.getActiveObject)(r),f=d!==void 0&&d.type===s;return(0,Qde.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:UHe},s)}function $de({formatTypes:e,...t}){return e.map(r=>(0,Jde.createElement)(WHe,{settings:r,...t,key:r.name}))}var Ch=a(E(),1),{ValidatedContentEditableControl:GHe,withIgnoreIMEEvents:YHe}=St(Th.privateApis),{useRichText:qHe,KeyboardShortcutContext:KHe,InputEventContext:ZHe,shortcutsListener:XHe,inputEventsListener:QHe}=St(P5.privateApis),JHe=[];function k5({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=JHe}){let[S,x]=(0,Lo.useState)({start:void 0,end:void 0}),[C,A]=(0,Lo.useState)(!1),k=(0,Lo.useRef)(void 0),R=(0,Lo.useRef)(new Set),N=(0,Lo.useRef)(new Set),P=(0,Lo.useRef)(null),[T,M]=(0,Lo.useState)(null),j=(0,vb.useRefEffect)(ye=>{M(ye.ownerDocument.body)},[]),F=(0,Lo.useRef)(),D=(0,Lo.useRef)(void 0);(0,Lo.useEffect)(()=>()=>{clearTimeout(F.current),D.current?.()},[]);function B(ye){let Se=ye.activeElement;return!!(Se&&(k.current?.contains(Se)||P.current?.contains(Se)))}function L(ye){D.current?.();function Se(){clearTimeout(F.current),F.current=setTimeout(()=>{B(ye)||(D.current?.(),A(!1))},0)}ye.addEventListener("focusout",Se),D.current=()=>{ye.removeEventListener("focusout",Se),D.current=void 0}}function O(){clearTimeout(F.current),D.current?.(),A(!0)}function V(ye){clearTimeout(F.current);let{ownerDocument:Se}=ye.currentTarget;F.current=setTimeout(()=>{if(B(Se)){L(Se);return}A(!1)},0)}let W=Xde({allowedFormats:h,disableFormats:g}),{value:q,onChange:Z,ref:Q,formatTypes:ce,getValue:te}=qHe({value:t,onChange:r,selectionStart:S.start,selectionEnd:S.end,onSelectionChange:(ye,Se)=>x({start:ye,end:Se}),__unstableIsSelected:C,preserveWhiteSpace:!!b,placeholder:o,__unstableDisableFormats:g,allowedFormats:W,withoutInteractiveFormatting:v,__unstableFormatTypeHandlerContext:(0,Lo.useMemo)(()=>({richTextIdentifier:n,blockClientId:i}),[n,i])});function de(){k.current?.focus()}let me=(0,Lo.useRef)({keyboardShortcuts:N,inputEvents:R}),ee=(0,Lo.useRef)({formatTypes:ce,getValue:te,onChange:Z});(0,Lo.useInsertionEffect)(()=>{ee.current={formatTypes:ce,getValue:te,onChange:Z}});let $=(0,vb.useRefEffect)(ye=>{if(u)return;let Se=YHe(Pe=>{if(Pe.key!=="Enter"||Pe.defaultPrevented||Pe.metaKey||Pe.ctrlKey||(Pe.preventDefault(),_))return;let{getValue:Me,onChange:X}=ee.current,fe=Me();X((0,P5.insert)(fe,`
`,fe.start??fe.text.length,fe.end??fe.text.length))});return ye.addEventListener("keydown",Se),()=>ye.removeEventListener("keydown",Se)},[_,u]),ue=(0,vb.useRefEffect)(ye=>{if(!C)return;let Se=XHe(me)(ye),Pe=QHe(me)(ye);function Me(X){if(X.inputType!=="insertText"&&X.type!=="compositionend")return;let{formatTypes:fe,getValue:Ye,onChange:Ze}=ee.current,st=Ye(),Rt=fe.reduce((ut,{__unstableInputRule:_t})=>_t?_t(ut):ut,st);Rt!==st&&Ze({...Rt,activeFormats:st.activeFormats})}return ye.addEventListener("input",Me),ye.addEventListener("compositionend",Me),()=>{Se(),Pe(),ye.removeEventListener("input",Me),ye.removeEventListener("compositionend",Me)}},[C]),ve=(0,Lo.useRef)(null),{ref:Ee,"aria-activedescendant":ie,"aria-autocomplete":ae,...pe}=(0,Th.__unstableUseAutocompleteProps)({completers:w,record:q,onChange:Z,onReplace:()=>{},contentRef:ve}),le={...pe,"aria-activedescendant":ie??void 0,"aria-autocomplete":ae},se=(0,vb.useRefEffect)(ye=>{y&&!u&&ye.focus()},[y,u]),Ae=(0,vb.useMergeRefs)([Q,k,ue,$,se,j,Ee]);return(0,Ch.jsxs)(Th.SlotFillProvider,{children:[(0,Ch.jsx)(GHe,{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:q.text,"aria-multiline":!_,...le,ref:Ae,onFocus:O,onBlur:V}),C&&!u&&(0,Ch.jsx)(KHe.Provider,{value:N,children:(0,Ch.jsx)(ZHe.Provider,{value:R,children:(0,Ch.jsx)($de,{value:q,onChange:Z,onFocus:de,formatTypes:ce,forwardedRef:k,isVisible:!0})})}),T&&(0,Lo.createPortal)((0,Ch.jsx)(Th.Popover.Slot,{ref:P}),T)]})}var tfe=a(E(),1);function rfe({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,tfe.jsx)(k5,{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 Ww=a(G(),1),ofe=a(U(),1);var R5=a(E(),1),{ValidatedToggleGroupControl:$He}=St(Ww.privateApis);function nfe({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,ofe.useCallback)(v=>r(l({item:e,value:v})),[e,r,l]),{elements:m,isLoading:h}=Yn({elements:t.elements,getElements:t.getElements});if(h)return(0,R5.jsx)(Ww.Spinner,{});if(m.length===0)return null;let g=m.find(v=>v.value===d);return(0,R5.jsx)($He,{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,R5.jsx)(Ww.__experimentalToggleGroupControlOption,{label:v.label,value:v.value,disabled:u},v.value))})}var A5=a(G(),1),I5=a(U(),1);var CT=a(E(),1),{ValidatedFormTokenField:eUe}=St(A5.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}=Yn({elements:t.elements,getElements:t.getElements}),b=(0,I5.useMemo)(()=>Array.isArray(m)?m.map(y=>g?.find(S=>S.value===y)||{value:y,label:y}):[],[m,g]),_=(0,I5.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,CT.jsx)(A5.Spinner,{}):(0,CT.jsx)(eUe,{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,CT.jsx)("span",{children:w?.label||y})}return(0,CT.jsx)("span",{children:y})}})}var ma=a(G(),1),LU=a(U(),1),sfe=a(z(),1);var tp=a(E(),1),{ValidatedInputControl:tUe}=St(ma.privateApis),rUe=({color:e,onColorChange:t,disabled:r})=>{let o=e&&Ao(e).isValid()?e:"#ffffff";return(0,tp.jsx)(ma.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:n})=>(0,tp.jsx)(ma.Button,{onClick:n,"aria-label":(0,sfe.__)("Open color picker"),size:"small",disabled:r,accessibleWhenDisabled:!0,icon:()=>(0,tp.jsx)(ma.ColorIndicator,{colorValue:o})}),renderContent:()=>(0,tp.jsx)(ma.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,tp.jsx)(ma.ColorPicker,{color:o,onChange:t,enableAlpha:!0})})})};function afe({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,LU.useCallback)(v=>{r(u({item:e,value:v}))},[e,r,u]),g=(0,LU.useCallback)(v=>{r(u({item:e,value:v||""}))},[e,r,u]);return(0,tp.jsx)(tUe,{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,tp.jsx)(ma.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,tp.jsx)(rUe,{color:m,onColorChange:h,disabled:f})})})}var N5=a(G(),1),M5=a(U(),1),BU=a(z(),1);var O5=a(E(),1);function lfe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[s,l]=(0,M5.useState)(!1),c=t.isDisabled({item:e,field:t}),u=(0,M5.useCallback)(()=>{l(d=>!d)},[]);return(0,O5.jsx)(ud,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,O5.jsx)(N5.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,O5.jsx)(N5.Button,{icon:s?c1:ov,onClick:u,size:"small",label:s?(0,BU.__)("Hide password"):(0,BU.__)("Show password"),disabled:c,accessibleWhenDisabled:!0})})})}function F5(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var ufe=a(E(),1),cfe={adaptiveSelect:Tde,array:ife,checkbox:gde,color:afe,combobox:d5,datetime:wde,date:xde,email:Rde,telephone:Ade,url:Ide,integer:Mde,number:Dde,password:lfe,radio:Bde,select:g5,text:jde,toggle:Wde,textarea:Kde,richtext:rfe,toggleGroup:nfe};function oUe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function nUe(e){let{control:t,...r}=e,o=D5(t);return o===null?null:function(i){return(0,ufe.jsx)(o,{...i,config:r})}}function dfe(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?D5(e.Edit):oUe(e.Edit)?nUe(e.Edit):F5(e)&&e.type!=="array"?D5("adaptiveSelect"):t===null?null:D5(t)}function D5(e){return Object.keys(cfe).includes(e)?cfe[e]:null}function iUe(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 ffe=iUe;var sUe=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},pfe=sUe;var aUe=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},mfe=aUe;var gfe=a(z(),1);function L5({item:e,field:t}){let{elements:r,isLoading:o}=Yn({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 hfe=a(E(),1);function Bo({item:e,field:t}){return t.hasElements?(0,hfe.jsx)(L5,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var dd=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function Vo(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function fd(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 pd(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 md(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 Vr(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 lUe({item:e,field:t}){return t.getValue({item:e})}var Rs=lUe;var cUe=/^[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 uUe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!cUe.test(r)?(0,gfe.__)("Value must be a valid email address."):null}var vfe={type:"email",render:Bo,Edit:"email",sort:dd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[oo,no],validOperators:[yo,wo,Gu,Yu,qu,oo,no,Ui,Wn],format:{},getValueFormatted:Rs,validate:{required:Vo,pattern:md,minLength:fd,maxLength:pd,elements:Vr,custom:uUe}};var bfe=a(z(),1);var Gw=(e,t,r)=>r==="asc"?e-t:t-e;function B5(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 V5(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 yfe={separatorThousand:","};function dUe({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=yfe: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 fUe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,bfe.__)("Value must be an integer."):null}var wfe={type:"integer",render:Bo,Edit:"integer",sort:Gw,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yo,wo,Zm,Xm,Qm,Jm,Cs],validOperators:[yo,wo,Zm,Xm,Qm,Jm,Cs,oo,no,Ui,Wn],format:yfe,getValueFormatted:dUe,validate:{required:Vo,min:B5,max:V5,elements:Vr,custom:fUe}};var _fe=a(z(),1);var Sfe={separatorThousand:",",separatorDecimal:".",decimals:2};function pUe({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=Sfe: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 mUe(e){return e===""||e===void 0||e===null}function hUe(e,t){let r=t.getValue({item:e});return!mUe(r)&&!Number.isFinite(r)?(0,_fe.__)("Value must be a number."):null}var xfe={type:"number",render:Bo,Edit:"number",sort:Gw,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yo,wo,Zm,Xm,Qm,Jm,Cs],validOperators:[yo,wo,Zm,Xm,Qm,Jm,Cs,oo,no,Ui,Wn],format:Sfe,getValueFormatted:pUe,validate:{required:Vo,min:B5,max:V5,elements:Vr,custom:hUe}};var Cfe={type:"text",render:Bo,Edit:"text",sort:dd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[oo,no],validOperators:[yo,wo,Gu,Yu,qu,oo,no,Ui,Wn],format:{},getValueFormatted:Rs,validate:{required:Vo,pattern:md,minLength:fd,maxLength:pd,elements:Vr}};var bb=a(an(),1);var Efe=a(an(),1);function Tfe(e){if(!e||!Zf(new Date(e)))return null;let t=(0,Efe.getDate)(e);return t&&Zf(t)?t:null}function Pfe(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=Tfe(o),l=Tfe(String(i));return!!s&&!!l&&(r==="min"?l.getTime()>=s.getTime():l.getTime()<=s.getTime())}function j5(e,t){return Pfe(e,t,"min")}function z5(e,t){return Pfe(e,t,"max")}var kfe={datetime:(0,bb.getSettings)().formats.datetime,weekStartsOn:(0,bb.getSettings)().l10n.startOfWeek};function gUe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=kfe:o=t.format,(0,bb.dateI18n)(o.datetime,(0,bb.getDate)(r))}var vUe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Rfe={type:"datetime",render:Bo,Edit:"datetime",sort:vUe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[oh,nh,$m,eh,th,rh,Ts,la],validOperators:[oh,nh,$m,eh,th,rh,Ts,la],format:kfe,getValueFormatted:gUe,validate:{required:Vo,elements:Vr,min:j5,max:z5}};var yb=a(an(),1);var Afe={date:(0,yb.getSettings)().formats.date,weekStartsOn:(0,yb.getSettings)().l10n.startOfWeek};function bUe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=Afe:o=t.format,(0,yb.dateI18n)(o.date,(0,yb.getDate)(r))}var yUe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Ife={type:"date",render:Bo,Edit:"date",sort:yUe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[oh,nh,$m,eh,th,rh,Ts,la,Cs],validOperators:[oh,nh,$m,eh,th,rh,Ts,la,Cs],format:Afe,getValueFormatted:bUe,validate:{required:Vo,elements:Vr,min:j5,max:z5}};var H5=a(z(),1);function Ofe(e,t){return t.getValue({item:e})===!0}function wUe({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,H5.__)("True"):r===!1?(0,H5.__)("False"):""}function _Ue(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,H5.__)("Value must be true, false, or undefined"):null}var SUe=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},Nfe={type:"boolean",render:Bo,Edit:"checkbox",sort:SUe,validate:{required:Ofe,elements:Vr,custom:_Ue},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yo,wo],validOperators:[yo,wo],format:{},getValueFormatted:wUe};var Mfe={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:Rs,validate:{}};var VU=a(z(),1);function Ffe(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function Dfe({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function xUe({item:e,field:t}){return Dfe({item:e,field:t})}function CUe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,VU.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,VU.__)("Every value must be a string.")}var TUe=(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)},Lfe={type:"array",render:xUe,Edit:"array",sort:TUe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[oo,no],validOperators:[oo,no,Ui,Wn],format:{},getValueFormatted:Dfe,validate:{required:Ffe,elements:Vr,custom:CUe}};function EUe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var Bfe={type:"password",render:Bo,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:EUe,validate:{required:Vo,pattern:md,minLength:fd,maxLength:pd,elements:Vr}};var Vfe={type:"telephone",render:Bo,Edit:"telephone",sort:dd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[oo,no],validOperators:[yo,wo,Gu,Yu,qu,oo,no,Ui,Wn],format:{},getValueFormatted:Rs,validate:{required:Vo,pattern:md,minLength:fd,maxLength:pd,elements:Vr}};var jfe=a(z(),1);var Yw=a(E(),1);function PUe({item:e,field:t}){if(t.hasElements)return(0,Yw.jsx)(L5,{item:e,field:t});let r=Rs({item:e,field:t});return!r||!Ao(r).isValid()?r:(0,Yw.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,Yw.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,Yw.jsx)("span",{children:r})]})}function kUe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Ao(r).isValid()?(0,jfe.__)("Value must be a valid color."):null}var RUe=(e,t,r)=>{let o=Ao(e),n=Ao(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},zfe={type:"color",render:PUe,Edit:"color",sort:RUe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[oo,no],validOperators:[yo,wo,oo,no],format:{},getValueFormatted:Rs,validate:{required:Vo,elements:Vr,custom:kUe}};var Hfe={type:"url",render:Bo,Edit:"url",sort:dd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[oo,no],validOperators:[yo,wo,Gu,Yu,qu,oo,no,Ui,Wn],format:{},getValueFormatted:Rs,validate:{required:Vo,pattern:md,minLength:fd,maxLength:pd,elements:Vr}};var AUe=(e,t,r)=>typeof e=="number"&&typeof t=="number"?Gw(e,t,r):dd(e,t,r),Ufe={render:Bo,Edit:null,sort:AUe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yo,wo],validOperators:zue(),format:{},getValueFormatted:Rs,validate:{required:Vo,elements:Vr}};function IUe(e){return e==="integer"||e==="number"}function OUe(e){return e==="date"||e==="datetime"}function Wfe(e,t,r){let o=t.validate[r];if(o&&(typeof e=="number"&&IUe(t.type)||typeof e=="string"&&OUe(t.type)))return{constraint:e,validate:o}}function Gfe(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=Wfe(r?.min,t,"min"),s=Wfe(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 Yfe(e){return e.validOperators.reduce((t,r)=>{let o=hb(r);return o?.filter&&(t[r]=o.filter),t},{})}function NUe(e,t){return{...t.format,...e.format}}var qfe=NUe;function MUe(e){let t=[vfe,wfe,xfe,Cfe,Rfe,Ife,Nfe,Mfe,Lfe,Bfe,Vfe,zfe,Hfe].find(r=>r?.type===e);return t||Ufe}function rp(e){return e.map(t=>{let r=MUe(t.type),o=t.getValue||pfe(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||mfe(t.id),elements:t.elements,getElements:t.getElements,hasElements:F5(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:dfe(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:Gfe(t,r),filterBy:ffe(t,r.defaultOperators,r.validOperators),filter:Yfe(r),format:qfe(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var vi=a(U(),1);function Kfe({view:e,data:t,getItemId:r,isLoading:o,paginationInfo:n,selection:i}){let s=e.infiniteScrollEnabled,[l,c]=(0,vi.useState)(!o);(0,vi.useEffect)(()=>{o||c(!0)},[o]);let u=(0,vi.useRef)(t),d=(0,vi.useRef)(n);(0,vi.useEffect)(()=>{o||(u.current=t,d.current=n)},[t,o,n]);let[f,m]=(0,vi.useState)([]),h=(0,vi.useRef)(new Map),g=(0,vi.useRef)([]),v=(0,vi.useRef)({search:void 0,filters:void 0,perPage:void 0}),b=(0,vi.useRef)(void 0),_=(0,vi.useRef)(void 0),y=(0,vi.useRef)(!1),w=(0,vi.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((B,L)=>{let O=F+L;return h.current.set(r(B),O),{...B,position:O}});return g.current=D,D}let A=g.current,k=new Set(t.map(r)),R=b.current,N=e.search?1:e.startPosition??1,P=t.map((F,D)=>{let B=r(F),L=e.infiniteScrollEnabled?N+D:void 0;return L!==void 0&&h.current.set(B,L),{...F,position:L}});if(P.length===0)return A;let T=A.filter(F=>!k.has(r(F))),M=R==="up"?[...P,...T]:[...T,...P];M.sort((F,D)=>{let B=F.position,L=D.position;return B-L});let j=M;if(f.length>0){let F=Math.min(...f),D=Math.max(...f),B=20,L=M.map(q=>q.position),O=Math.min(...L);!(Math.max(...L)<F-B||O>D+B)&&(j=M.filter(q=>{let Z=r(q);if(i?.includes(Z))return!0;let ce=q.position;return R==="up"?ce<=D+B:R==="down"?ce>=F-B:ce>=F-B&&ce<=D+B}))}return g.current=j,j},[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 As=a(U(),1),Xfe=a(ke(),1);function Zfe(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 Qfe({view:e,onChangeView:t,isLoading:r,paginationInfo:o,containerRef:n,setVisibleEntries:i}){let s=(0,As.useRef)(null),l=(0,As.useRef)(e),c=(0,As.useRef)(r),u=(0,As.useRef)(t),d=(0,As.useRef)(o.totalItems);(0,As.useLayoutEffect)(()=>{l.current=e,c.current=r,u.current=t,d.current=o.totalItems},[e,r,t,o.totalItems]);let f=(0,As.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,As.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,As.useRef)(null);return(0,As.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,As.useEffect)(()=>{if(!e.infiniteScrollEnabled||!n.current)return;let h=0,g=600,v=800,b=(0,Xfe.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 N=w.startPosition||1,P=w.perPage||10,T=Math.min(N+P,S);if(R==="down"&&C+k>=A-g&&T<S){let M=T;Zfe(x,s,"down"),u.current({...w,startPosition:M})}if(R==="up"&&C<=v&&N>1){let M=N-P,j=M<6?1:M;Zfe(x,s,"up"),u.current({...w,startPosition:j})}},50),_=n.current;return _.addEventListener("scroll",b),()=>{_.removeEventListener("scroll",b),b.cancel()}},[n,e.infiniteScrollEnabled]),{intersectionObserver:m.current}}var ha=a(U(),1),Jfe=a(ke(),1);var bi=a(E(),1),FUe=()=>!1,DUe=ph.filter(e=>e.isPicker),LUe=e=>e.id,BUe=[],VUe={pickerGrid:!0,pickerTable:!0};function jUe({search:e=!0,searchLabel:t=void 0}){let{view:r}=(0,ha.useContext)($e),o=r.infiniteScrollEnabled;return(0,bi.jsxs)(bi.Fragment,{children:[(0,bi.jsxs)(oe,{direction:"row",align:"top",justify:"space-between",className:J("dataviews__view-actions",{"dataviews__view-actions--infinite-scroll":o}),gap:"xs",children:[(0,bi.jsxs)(oe,{direction:"row",gap:"sm",justify:"start",className:"dataviews__search",children:[e&&(0,bi.jsx)(CU,{label:t}),(0,bi.jsx)(l5,{})]}),(0,bi.jsx)(oe,{direction:"row",gap:"xs",style:{flexShrink:0},children:(0,bi.jsx)(fde,{})})]}),(0,bi.jsx)(c5,{className:"dataviews-filters__container"}),(0,bi.jsx)(xU,{}),(0,bi.jsx)(NH,{})]})}function zUe({view:e,onChangeView:t,fields:r,search:o=!0,searchLabel:n=void 0,actions:i=BUe,data:s,getItemId:l=LUe,isLoading:c=!1,paginationInfo:u,defaultLayouts:d=VUe,selection:f,onChangeSelection:m,children:h,config:g={perPageSizes:[10,20,50,100]},itemListLabel:v,empty:b,onReset:_}){let{data:y,setVisibleEntries:w}=Kfe({view:e,data:s,getItemId:l,selection:f,paginationInfo:u}),S=(0,ha.useRef)(null),[x,C]=(0,ha.useState)(0),A=(0,Jfe.useResizeObserver)(L=>{C(L[0].borderBoxSize[0].inlineSize)},{box:"border-box"}),[k,R]=(0,ha.useState)(null);function N(L){let O=typeof L=="function"?L(f):L;m&&m(O)}let P=(0,ha.useMemo)(()=>rp(r),[r]),T=vT(P,e),M=(0,ha.useMemo)(()=>(T||[]).some(L=>L.isPrimary||L.isLocked),[T]),[j,F]=(0,ha.useState)(M),{intersectionObserver:D}=Qfe({view:e,onChangeView:t,isLoading:c,paginationInfo:u,containerRef:S,setVisibleEntries:w});(0,ha.useEffect)(()=>{M&&!j&&F(!0)},[M,j]);let B=(0,ha.useMemo)(()=>Object.fromEntries(Object.entries(d).filter(([L])=>DUe.some(O=>O.type===L)).map(([L,O])=>[L,O===!0?{}:O])),[d]);return B[e.type]?(0,bi.jsx)($e.Provider,{value:{view:e,onChangeView:t,fields:P,actions:i,data:y,isLoading:c,paginationInfo:u,isItemClickable:FUe,selection:f,onChangeSelection:N,openedFilter:k,setOpenedFilter:R,getItemId:l,containerWidth:x,containerRef:S,resizeObserverRef:A,defaultLayouts:B,filters:T,isShowingFilter:j,setIsShowingFilter:F,config:g,itemListLabel:v,empty:b,onReset:_,hasInitiallyLoaded:!0,intersectionObserver:D},children:(0,bi.jsx)("div",{className:"dataviews-picker-wrapper",children:h??(0,bi.jsx)(jUe,{search:o,searchLabel:n})})}):null}var jc=zUe;jc.BulkActionToolbar=Gae;jc.Footer=NH;jc.Filters=yT;jc.FiltersToggled=c5;jc.FiltersToggle=l5;jc.Layout=xU;jc.LayoutSwitcher=PU;jc.Pagination=IH;jc.Search=CU;jc.ViewConfig=kU;var TT=jc;var GU=a(U(),1);var $fe=a(U(),1),epe=a(E(),1),jU=(0,$fe.createContext)({fields:[]});jU.displayName="DataFormContext";function tpe({fields:e,children:t}){return(0,epe.jsx)(jU.Provider,{value:{fields:e},children:t})}var Vl=jU;var J5=a(U(),1);var W5=a(U(),1),PT=a(G(),1);var ET=a(z(),1),Xi={type:"regular",labelPosition:"top"},HUe=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 rpe(e){let t=Xi;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,ET.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,ET.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,ET.__)("Apply"),cancelLabel:(0,ET.__)("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:HUe(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 ope(e){let t=rpe(e?.layout),r=(e.fields??[]).map(o=>{if(typeof o=="string")return{id:o,layout:t};let n=o.layout?rpe(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:ope({fields:o.children,layout:Xi}).fields}}});return{layout:t,fields:r}}var U5=ope;var io=a(E(),1);function UUe({title:e}){return(0,io.jsx)(oe,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,io.jsx)(oe,{direction:"row",align:"center",children:(0,io.jsx)(PT.__experimentalHeading,{level:2,size:13,children:e})})})}function npe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,W5.useContext)(Vl),l=t.layout,c=(0,W5.useMemo)(()=>({layout:Xi,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,io.jsxs)(io.Fragment,{children:[!o&&t.label&&(0,io.jsx)(UUe,{title:t.label}),(0,io.jsx)(ga,{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,io.jsxs)(oe,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,io.jsx)("div",{className:J("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,io.jsx)(PT.BaseControl.VisualLabel,{children:d.label})}),(0,io.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,io.jsx)(d.render,{item:e,field:d}):(0,io.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,io.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,io.jsx)(io.Fragment,{children:(0,io.jsxs)(io.Fragment,{children:[!o&&u!=="none"&&(0,io.jsx)(PT.BaseControl.VisualLabel,{children:d.label}),(0,io.jsx)(d.render,{item:e,field:d})]})}):(0,io.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:u==="none"?!0:o,markWhenOptional:n,validity:i})})}var UU=a(i2(),1),wb=a(G(),1),zc=a(U(),1),K5=a(ke(),1);var G5=a(G(),1),qw=a(z(),1);var upe=a(ke(),1);var zU=a(U(),1);function WUe(e,t){return J("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var ipe=WUe;var spe=a(G(),1);var Eh=a(E(),1);function GUe(e,t,r){return e?(0,Eh.jsxs)(Ke.Root,{children:[(0,Eh.jsx)(Ke.Trigger,{render:(0,Eh.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,Eh.jsx)(spe.Icon,{icon:hf,size:16}),(0,Eh.jsxs)(Jt,{children:[t,": "]}),r]})}),(0,Eh.jsx)(Ke.Popup,{children:t})]}):r}var ape=GUe;function lpe(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=lpe(r);if(o)return o}}var cpe=lpe;var Is=a(E(),1);function kT({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=cpe(n),m=i&&!!f,h=ipe(u,m),g=ape(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,upe.useInstanceId)(kT,"dataforms-layouts-panel__field-control"),_=m?(0,qw.sprintf)((0,qw._x)("Edit %s (has errors)","field"),r||""):(0,qw.sprintf)((0,qw._x)("Edit %s","field"),r||""),y=(0,zU.useRef)(null),w=(0,zU.useRef)(null);return(0,Is.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,Is.jsx)("span",{className:h,children:g}),u==="none"&&m&&(0,Is.jsxs)(Ke.Root,{children:[(0,Is.jsx)(Ke.Trigger,{render:(0,Is.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",role:"img","aria-label":f,children:(0,Is.jsx)(G5.Icon,{icon:hf,size:16})})}),(0,Is.jsx)(Ke.Popup,{children:f})]}),(0,Is.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:o.length>1?(0,Is.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:o.map(C=>(0,Is.jsx)("span",{style:{width:"100%"},children:(0,Is.jsx)(C.render,{item:e,field:C})},C.id))}):o.map(C=>(0,Is.jsx)(C.render,{item:e,field:C},C.id))}),!s&&(0,Is.jsx)(G5.Button,{ref:w,className:"dataforms-layouts-panel__field-trigger-icon",label:_,icon:t1,size:"small","aria-expanded":l,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var dpe=a(i2(),1),HU=a(n2(),1),hd=a(U(),1),Os=a(z(),1);function fpe(e){return e?Object.values(e).every(t=>Object.entries(t).every(([r,o])=>r==="children"&&o&&typeof o=="object"?fpe(o):o.type!=="invalid"&&o.type!=="validating")):!0}function YUe(e,t){let r=U5(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]=rp([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]=rp([l]);return{id:s.id,children:[],field:c}}return r.fields.map(n).filter(s=>s!==null)}function Kw(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 ppe(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 qUe(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=>Kw(u,{elements:{type:"invalid",message:(0,Os.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>Kw(u,{elements:{type:"invalid",message:(0,Os.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>ppe(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,Os.__)("Unknown error when running elements validation asynchronously."),n(d=>Kw(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function KUe(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=>ppe(c,[...i,t.id],"custom"));return}if(typeof l=="string"){n(c=>Kw(c,{custom:{type:"invalid",message:l}},[...i,t.id]));return}n(c=>Kw(c,{custom:{type:"invalid",message:(0,Os.__)("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,Os.__)("Unknown error when running custom validation asynchronously."),n(u=>Kw(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function mpe(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,Os.__)("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,Os.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,Os.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,Os.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,Os.__)("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,Os.__)("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,dpe.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,Os.__)("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"&&(qUe(t.field.getElements(),t,r),n.elements={type:"validating",message:(0,Os.__)("Validating\u2026")}),o instanceof Promise&&(KUe(o,t,r),n.custom={type:"validating",message:(0,Os.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(l=>{i[l.id]=mpe(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 hpe(e,t){let r=e?.field?.getValue({item:t});if(e.children.length===0)return r;let o=e.children.map(n=>hpe(n,t));return o?{value:r,children:o}:r}function ZUe(e,t,r){let[o,n]=(0,hd.useState)(),i=(0,hd.useRef)({}),s=(0,hd.useRef)({}),l=(0,hd.useRef)({}),c=(0,hd.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=YUe(r,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let g=hpe(h,e);if(l.current.hasOwnProperty(h.id)&&(0,HU.default)(l.current[h.id],g)){m.push(h.id);return}l.current[h.id]=g;let v=mpe(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,HU.default)(h,g)?h:g})},[e,t,r]);return(0,hd.useEffect)(()=>{c()},[c]),{validity:o,isValid:fpe(o)}}var gpe=ZUe;var vpe=a(U(),1);function Ph(e,t){(0,vpe.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(o=>{o.reportValidity()})},[t,e])}var bpe=a(U(),1);function XUe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var Y5=(e,t)=>Array.isArray(e)&&e.length>0?XUe(e).map(o=>t.find(n=>n.id===o)).filter(o=>o!==void 0):[];var QUe=(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 JUe(e){let{fields:t}=(0,bpe.useContext)(Vl),r=e.layout,o=Y5(r.summary,t),n=QUe(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 q5=JUe;var Ns=a(E(),1);function $Ue({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,zc.useContext)(Vl),[d,f]=(0,zc.useState)({}),m=(0,zc.useMemo)(()=>(0,UU.default)(e,d,{arrayMerge:(x,C)=>C}),[e,d]),h=(0,zc.useMemo)(()=>({layout:Xi,fields:t.children?t.children:[{id:t.id,layout:Xi}]}),[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}=gpe(m,g,h),b=()=>{r(d),n()},_=x=>{f(C=>(0,UU.default)(C,x,{arrayMerge:(A,k)=>k}))},y=(0,K5.useFocusOnMount)("firstInputElement"),w=(0,zc.useRef)(null),S=(0,K5.useMergeRefs)([y,w]);return Ph(w,i),(0,Ns.jsxs)(wb.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:o,size:"medium",children:[(0,Ns.jsx)("div",{ref:S,children:(0,Ns.jsx)(ga,{data:m,form:h,onChange:_,validity:v,children:(x,C,A,k)=>(0,Ns.jsx)(x,{data:m,field:C,onChange:_,hideLabelFromVision:h.fields.length<2,markWhenOptional:k,validity:A},C.id)})}),(0,Ns.jsxs)(oe,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,Ns.jsx)(wb.__experimentalSpacer,{style:{flex:1}}),(0,Ns.jsx)(wb.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:c}),(0,Ns.jsx)(wb.Button,{variant:"primary",onClick:b,__next40pxDefaultSize:!0,children:l})]})]})}function eWe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,zc.useState)(!1),[s,l]=(0,zc.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=q5(t);if(!c)return null;let f=()=>{l(!1),i(!0)};return(0,Ns.jsxs)(Ns.Fragment,{children:[(0,Ns.jsx)(kT,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:o,touched:n,disabled:c.readOnly===!0,onClick:()=>l(!0),isOpen:s}),s&&(0,Ns.jsx)($Ue,{data:e,field:t,onChange:r,fieldLabel:u??"",onClose:f,touched:n})]})}var ype=eWe;var kh=a(G(),1),wpe=a(z(),1),op=a(U(),1);var _pe=a(ke(),1);var Qi=a(E(),1);function tWe({title:e,onClose:t}){return(0,Qi.jsx)(oe,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Qi.jsxs)(oe,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Qi.jsx)(kh.__experimentalHeading,{level:2,size:13,children:e}),(0,Qi.jsx)(kh.__experimentalSpacer,{style:{flex:1}}),t&&(0,Qi.jsx)(kh.Button,{label:(0,wpe.__)("Close"),icon:Ii,onClick:t,size:"small"})]})})}function rWe({touched:e,children:t}){let r=(0,op.useRef)(null);return Ph(r,e),(0,Qi.jsx)("div",{ref:r,children:t})}function oWe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,op.useState)(!1),[s,l]=(0,op.useState)(null),c=(0,op.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,_pe.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,op.useMemo)(()=>({layout:Xi,fields:t.children?t.children:[{id:t.id,layout:Xi}]}),[t]),m=(0,op.useMemo)(()=>{if(o!==void 0)return t.children?o?.children:{[t.id]:o}},[o,t]),{fieldDefinition:h,fieldLabel:g,summaryFields:v}=q5(t);return h?(0,Qi.jsx)("div",{ref:l,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Qi.jsx)(kh.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:_})=>(0,Qi.jsx)(kT,{data:e,field:t,fieldLabel:g,summaryFields:v,validity:o,touched:n,disabled:h.readOnly===!0,isOpen:b,onClick:_}),renderContent:({onClose:b})=>(0,Qi.jsx)(rWe,{touched:n,children:(0,Qi.jsxs)("div",{ref:u,...d,children:[(0,Qi.jsx)(tWe,{title:g,onClose:b}),(0,Qi.jsx)(ga,{data:e,form:f,onChange:r,validity:m,children:(_,y,w,S)=>(0,Qi.jsx)(_,{data:e,field:y,onChange:r,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:S,validity:w},y.id)})]})})})}):null}var Spe=oWe;var WU=a(E(),1);function xpe({data:e,field:t,onChange:r,validity:o}){return t.layout.openAs.type==="modal"?(0,WU.jsx)(ype,{data:e,field:t,onChange:r,validity:o}):(0,WU.jsx)(Spe,{data:e,field:t,onChange:r,validity:o})}var va=a(U(),1);var Z5=a(z(),1),Cpe=a(E(),1);function Tpe(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+=Tpe(o);return t}function X5({validity:e}){let t=Tpe(e);return t===0?null:(0,Cpe.jsx)(aC,{intent:"high",children:(0,Z5.sprintf)((0,Z5._n)("%d field needs attention","%d fields need attention",t),t)})}var jo=a(E(),1);function nWe(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 iWe({data:e,fields:t,label:r,layout:o,isOpen:n,touched:i,validity:s}){let c=Y5(o.summary,t).filter(f=>nWe(f,o.summary,n)),u=i&&o.isCollapsible,d=c.length>0&&o.withHeader;return(0,jo.jsxs)(oe,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,jo.jsx)(zu.Title,{children:r}),(u||d)&&(0,jo.jsxs)(Tv.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,jo.jsx)(X5,{validity:s}),d&&(0,jo.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:c.map(f=>(0,jo.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function sWe({data:e,field:t,form:r,onChange:o,hideLabelFromVision:n,markWhenOptional:i,validity:s,withHeader:l}){if(t.children)return(0,jo.jsxs)(jo.Fragment,{children:[t.description&&(0,jo.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,jo.jsx)(ga,{data:e,form:r,onChange:o,validity:s?.children})]});let c=_b("regular")?.component;return c?(0,jo.jsx)(c,{data:e,field:t,onChange:o,hideLabelFromVision:n||l,markWhenOptional:i,validity:s}):null}function Epe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,va.useContext)(Vl),l=t.layout,c=(0,va.useRef)(null),u=(0,va.useMemo)(()=>({layout:Xi,fields:t.children??[]}),[t]),{isOpened:d,isCollapsible:f}=l,[m,h]=(0,va.useState)(d),[g,v]=(0,va.useState)(!1);(0,va.useEffect)(()=>{h(d)},[d]);let b=(0,va.useCallback)(C=>{C||v(!0),h(C)},[]),_=(0,va.useCallback)(()=>{v(!0)},[]);Ph(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,jo.jsx)(sWe,{data:e,field:t,form:u,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,withHeader:w}),x=(0,jo.jsx)(iWe,{data:e,fields:s,label:y,layout:l,isOpen:f?!!m:!0,touched:g,validity:i});return w&&f?(0,jo.jsxs)(Tv.Root,{className:"dataforms-layouts-card__field",open:m,onOpenChange:b,children:[(0,jo.jsx)(Tv.Header,{children:x}),(0,jo.jsx)(Tv.Content,{ref:c,onBlur:_,children:S})]}):(0,jo.jsxs)(zu.Root,{className:"dataforms-layouts-card__field",children:[w&&(0,jo.jsx)(zu.Header,{children:x}),(0,jo.jsx)(zu.Content,{ref:c,onBlur:_,children:S})]})}var Ppe=a(G(),1);var qn=a(E(),1);function aWe({title:e}){return(0,qn.jsx)(oe,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,qn.jsx)(oe,{direction:"row",align:"center",children:(0,qn.jsx)(Ppe.__experimentalHeading,{level:2,size:13,children:e})})})}var lWe=({children:e})=>(0,qn.jsx)(qn.Fragment,{children:e});function kpe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:Xi,fields:t.children};return(0,qn.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!o&&t.label&&(0,qn.jsx)(aWe,{title:t.label}),(0,qn.jsx)(oe,{direction:"row",align:s.alignment,gap:"lg",children:(0,qn.jsx)(ga,{data:e,form:c,onChange:r,validity:i?.children,as:lWe,children:(u,d,f)=>(0,qn.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,qn.jsx)(u,{data:e,field:d,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:f})},d.id)})})]})}let l=_b("regular")?.component;return l?(0,qn.jsx)(qn.Fragment,{children:(0,qn.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,qn.jsx)(l,{data:e,field:t,onChange:r,markWhenOptional:n,validity:i})})}):null}var ba=a(U(),1),Rpe=a(z(),1);var np=a(E(),1);function Ape({data:e,field:t,onChange:r,validity:o}){let{fields:n}=(0,ba.useContext)(Vl),i=(0,ba.useRef)(null),s=(0,ba.useRef)(null),[l,c]=(0,ba.useState)(!1),[u,d]=(0,ba.useState)(!1),f=(0,ba.useMemo)(()=>({layout:Xi,fields:t.children??[]}),[t]);(0,ba.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",_)}},[]),Ph(s,u&&l);let m=(0,ba.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,np.jsx)(g.render,{item:e,field:g}):v=t.label||(0,Rpe.__)("More details"),(0,np.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,np.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,np.jsxs)(oe,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[v,l&&(0,np.jsx)(X5,{validity:o})]})}),(0,np.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,np.jsx)(ga,{data:e,form:f,onChange:r,validity:o?.children})})]})}var Sb=a(E(),1),cWe=[{type:"regular",component:npe,wrapper:({children:e})=>(0,Sb.jsx)(oe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:xpe,wrapper:({children:e})=>(0,Sb.jsx)(oe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:Epe,wrapper:({children:e})=>(0,Sb.jsx)(oe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:kpe,wrapper:({children:e,layout:t})=>(0,Sb.jsx)(oe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Sb.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Sb.jsx)(oe,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:Ape}];function _b(e){return cWe.find(t=>t.type===e)}var Q5=a(E(),1),uWe=({children:e})=>(0,Q5.jsx)(oe,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function ga({data:e,form:t,onChange:r,validity:o,children:n,as:i}){let{fields:s}=(0,J5.useContext)(Vl),l=(0,J5.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??_b(t.layout.type)?.wrapper??uWe;return(0,Q5.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=_b(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,Q5.jsx)(f,{data:e,field:d,onChange:r,markWhenOptional:l,validity:o?.[d.id]},d.id)})})}var YU=a(E(),1);function RT({data:e,form:t,fields:r,onChange:o,validity:n}){let i=(0,GU.useMemo)(()=>U5(t),[t]),s=(0,GU.useMemo)(()=>rp(r),[r]);return t.fields?(0,YU.jsx)(tpe,{fields:s,children:(0,YU.jsx)(ga,{data:e,form:i,onChange:o,validity:n})}):null}var Ope=a($0(),1),Npe=a(Ga(),1);function Ipe(e=""){return(0,Ope.default)(e.trim().toLowerCase())}var dWe=[];function qU(e,t,r){if(!e)return{data:dWe,paginationInfo:{totalItems:0,totalPages:0}};let o=rp(r),n=[...e];if(t.search){let u=Ipe(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=>Ipe(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===Wn&&(0,Npe.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 $5={};cae($5,{RichTextControl:k5});var eN=a(G(),1);var Mpe=a(z(),1);var ip=a(E(),1);function Fpe({form:e,header:t}){let{media:r,fields:o,onChange:n}=vw();if(!r||!n)return(0,ip.jsx)("div",{className:"media-editor-form media-editor-form--loading",children:(0,ip.jsx)(eN.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,ip.jsx)("div",{className:"media-editor-form",children:(0,ip.jsxs)(eN.__experimentalVStack,{spacing:4,children:[(0,ip.jsx)(Jt,{render:(0,ip.jsx)("h2",{}),children:(0,Mpe.__)("Media details")}),t,(0,ip.jsx)(RT,{data:r,fields:o,form:c,onChange:n})]})})}var Dpe=a(vf(),1),{lock:Lpe,unlock:qHt}=(0,Dpe.__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 tN=a(Y(),1);var Bpe={isOpen:!1,id:null,onUpdate:null,onClose:null};function Vpe(e=Bpe,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 Bpe}return e}var KU={};Wr(KU,{closeMediaEditorModal:()=>pWe,openMediaEditorModal:()=>fWe});function fWe({id:e,onUpdate:t,onClose:r}){return{type:"OPEN_MEDIA_EDITOR_MODAL",id:e,onUpdate:t??null,onClose:r??null}}function pWe(){return{type:"CLOSE_MEDIA_EDITOR_MODAL"}}var ZU={};Wr(ZU,{getId:()=>hWe,getOnClose:()=>vWe,getOnUpdate:()=>gWe,isOpen:()=>mWe});function mWe(e){return e.isOpen}function hWe(e){return e.id}function gWe(e){return e.onUpdate}function vWe(e){return e.onClose}var jpe="core/media-editor";var Zw=(0,tN.createReduxStore)(jpe,{reducer:Vpe,actions:KU,selectors:ZU});(0,tN.register)(Zw);var Uhe=a(G(),1),qT=a(Y(),1),YT=a(z(),1),Whe=a(ya(),1),Ghe=a(It(),1);var Ji=a(G(),1);var zhe=a(ke(),1),GT=a(Y(),1),fW=a(ne(),1),hn=a(U(),1),Xn=a(z(),1);var Gc=a(Oo(),1),DN=a(It(),1);var eW={};Wr(eW,{ActionItem:()=>zl,ComplementaryArea:()=>Ul,ComplementaryAreaMoreMenuItem:()=>Ih,FullscreenMode:()=>ame,InterfaceSkeleton:()=>Tb,PinnedItems:()=>Oh,store:()=>He});var Hl=a(G(),1),NT=a(Y(),1),dN=a(z(),1);var vd=a(U(),1),JU=a(Upe(),1),ome=a(Dt(),1),Nh=a(ke(),1),nme=a(Rh(),1);var Zpe=a(G(),1),iN=a(Y(),1),Xpe=a(Rh(),1);var nN=a(Y(),1);var XU={};Wr(XU,{closeModal:()=>PWe,disableComplementaryArea:()=>wWe,enableComplementaryArea:()=>yWe,openModal:()=>EWe,pinItem:()=>_We,setDefaultComplementaryArea:()=>bWe,setFeatureDefaults:()=>TWe,setFeatureValue:()=>CWe,toggleFeature:()=>xWe,unpinItem:()=>SWe});var oN=a(Ga(),1),jl=a(Dt(),1);var rN=a(Ga(),1);function gd(e){return["core/edit-post","core/edit-site"].includes(e)?((0,rN.default)(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function xb(e,t){return e==="core"&&t==="edit-site/template"?((0,rN.default)("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):e==="core"&&t==="edit-site/block-inspector"?((0,rN.default)("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}var bWe=(e,t)=>(e=gd(e),t=xb(e,t),{type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),yWe=(e,t)=>({registry:r,dispatch:o})=>{if(!t)return;e=gd(e),t=xb(e,t),r.select(jl.store).get(e,"isComplementaryAreaVisible")||r.dispatch(jl.store).set(e,"isComplementaryAreaVisible",!0),o({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},wWe=e=>({registry:t})=>{e=gd(e),t.select(jl.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(jl.store).set(e,"isComplementaryAreaVisible",!1)},_We=(e,t)=>({registry:r})=>{if(!t)return;e=gd(e),t=xb(e,t);let o=r.select(jl.store).get(e,"pinnedItems");o?.[t]!==!0&&r.dispatch(jl.store).set(e,"pinnedItems",{...o,[t]:!0})},SWe=(e,t)=>({registry:r})=>{if(!t)return;e=gd(e),t=xb(e,t);let o=r.select(jl.store).get(e,"pinnedItems");r.dispatch(jl.store).set(e,"pinnedItems",{...o,[t]:!1})};function xWe(e,t){return function({registry:r}){(0,oN.default)("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),r.dispatch(jl.store).toggle(e,t)}}function CWe(e,t,r){return function({registry:o}){(0,oN.default)("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),o.dispatch(jl.store).set(e,t,!!r)}}function TWe(e,t){return function({registry:r}){(0,oN.default)("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),r.dispatch(jl.store).setDefaults(e,t)}}function EWe(e){return{type:"OPEN_MODAL",name:e}}function PWe(){return{type:"CLOSE_MODAL"}}var QU={};Wr(QU,{getActiveComplementaryArea:()=>kWe,isComplementaryAreaLoading:()=>RWe,isFeatureActive:()=>IWe,isItemPinned:()=>AWe,isModalActive:()=>OWe});var AT=a(Y(),1),Gpe=a(Ga(),1),IT=a(Dt(),1);var kWe=(0,AT.createRegistrySelector)(e=>(t,r)=>{r=gd(r);let o=e(IT.store).get(r,"isComplementaryAreaVisible");if(o!==void 0)return o===!1?null:t?.complementaryAreas?.[r]}),RWe=(0,AT.createRegistrySelector)(e=>(t,r)=>{r=gd(r);let o=e(IT.store).get(r,"isComplementaryAreaVisible"),n=t?.complementaryAreas?.[r];return o&&n===void 0}),AWe=(0,AT.createRegistrySelector)(e=>(t,r,o)=>(r=gd(r),o=xb(r,o),e(IT.store).get(r,"pinnedItems")?.[o]??!0)),IWe=(0,AT.createRegistrySelector)(e=>(t,r,o)=>((0,Gpe.default)("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(IT.store).get(r,o)));function OWe(e,t){return e.activeModal===t}var Ype=a(Y(),1);function NWe(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 MWe(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}var qpe=(0,Ype.combineReducers)({complementaryAreas:NWe,activeModal:MWe});var Kpe="core/interface";var He=(0,nN.createReduxStore)(Kpe,{reducer:qpe,actions:XU,selectors:QU});(0,nN.register)(He);var Qpe=a(E(),1);function FWe(e){return["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(e)}function Xw({as:e=Zpe.Button,scope:t,identifier:r,icon:o,selectedIcon:n,name:i,shortcut:s,...l}){let c=e,u=(0,Xpe.usePluginContext)(),d=o||u.icon,f=r||`${u.name}/${i}`,m=(0,iN.useSelect)(v=>v(He).getActiveComplementaryArea(t)===f,[f,t]),{enableComplementaryArea:h,disableComplementaryArea:g}=(0,iN.useDispatch)(He);return(0,Qpe.jsx)(c,{icon:n&&m?n:d,"aria-controls":f.replace("/",":"),"aria-checked":FWe(l.role)?m:void 0,onClick:()=>{m?g(t):h(t,f)},shortcut:s,...l})}var sN=a(E(),1),DWe=({children:e,className:t,toggleButtonProps:r})=>{let o=(0,sN.jsx)(Xw,{icon:Ii,...r});return(0,sN.jsxs)("div",{className:J("components-panel__header","interface-complementary-area-header",t),tabIndex:-1,children:[e,o]})},Jpe=DWe;var tme=a(G(),1);var Ah=a(G(),1),aN=a(U(),1),OT=a(E(),1),$pe=()=>{};function LWe({name:e,as:t=Ah.MenuGroup,fillProps:r={},bubblesVirtually:o,...n}){return(0,OT.jsx)(Ah.Slot,{name:e,bubblesVirtually:o,fillProps:r,children:i=>{if(!aN.Children.toArray(i).length)return null;let s=[];aN.Children.forEach(i,({props:{__unstableExplicitMenuItem:c,__unstableTarget:u}})=>{u&&c&&s.push(u)});let l=aN.Children.map(i,c=>!c.props.__unstableExplicitMenuItem&&s.includes(c.props.__unstableTarget)?null:c);return(0,OT.jsx)(t,{...n,children:l})}})}function eme({name:e,as:t=Ah.Button,onClick:r,...o}){return(0,OT.jsx)(Ah.Fill,{name:e,children:({onClick:n})=>(0,OT.jsx)(t,{onClick:r||n?(...i)=>{(r||$pe)(...i),(n||$pe)(...i)}:void 0,...o})})}eme.Slot=LWe;var zl=eme;var lN=a(E(),1),BWe=({__unstableExplicitMenuItem:e,__unstableTarget:t,...r})=>(0,lN.jsx)(tme.MenuItem,{...r});function Ih({scope:e,target:t,__unstableExplicitMenuItem:r,...o}){return(0,lN.jsx)(Xw,{as:n=>(0,lN.jsx)(zl,{__unstableExplicitMenuItem:r,__unstableTarget:`${e}/${t}`,as:BWe,name:`${e}/plugin-more-menu`,...n}),role:"menuitemcheckbox",selectedIcon:Ro,name:t,scope:e,...o})}var uN=a(G(),1),cN=a(E(),1);function rme({scope:e,...t}){return(0,cN.jsx)(uN.Fill,{name:`PinnedItems/${e}`,...t})}function VWe({scope:e,className:t,...r}){return(0,cN.jsx)(uN.Slot,{name:`PinnedItems/${e}`,...r,children:o=>o?.length>0&&(0,cN.jsx)("div",{className:J(t,"interface-pinned-items"),children:o})})}rme.Slot=VWe;var Oh=rme;var pn=a(E(),1),jWe=.3;function zWe({scope:e,...t}){return(0,pn.jsx)(Hl.Slot,{name:`ComplementaryArea/${e}`,...t})}var ime=280,HWe={open:{width:ime},closed:{width:0},mobileOpen:{width:"100vw"}};function UWe({activeArea:e,isActive:t,scope:r,children:o,className:n,id:i}){let s=(0,Nh.useReducedMotion)(),l=(0,Nh.useViewportMatch)("medium","<"),c=(0,Nh.usePrevious)(e),u=(0,Nh.usePrevious)(t),[,d]=(0,vd.useState)({});(0,vd.useEffect)(()=>{d({})},[t]);let f={type:"tween",duration:s||l||c&&e&&e!==c?0:jWe,ease:[.6,0,.4,1]};return(0,pn.jsx)(Hl.Fill,{name:`ComplementaryArea/${r}`,children:(0,pn.jsx)(Hl.__unstableAnimatePresence,{initial:!1,children:(u||t)&&(0,pn.jsx)(Hl.__unstableMotion.div,{variants:HWe,initial:"closed",animate:l?"mobileOpen":"open",exit:"closed",transition:f,className:"interface-complementary-area__fill",children:(0,pn.jsx)("div",{id:i,className:n,style:{width:l?"100vw":ime},children:o})})})})}function WWe(e,t,r,o,n){let i=(0,vd.useRef)(!1),s=(0,vd.useRef)(!1),{enableComplementaryArea:l,disableComplementaryArea:c}=(0,NT.useDispatch)(He);(0,vd.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 sme({children:e,className:t,closeLabel:r=(0,dN.__)("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,nme.usePluginContext)(),v=s||g.icon,b=o||`${g.name}/${d}`,[_,y]=(0,vd.useState)(!1),{isLoading:w,isActive:S,isPinned:x,activeArea:C,isSmall:A,isLarge:k,showIconLabels:R}=(0,NT.useSelect)(F=>{let{getActiveComplementaryArea:D,isComplementaryAreaLoading:B,isItemPinned:L}=F(He),{get:O}=F(ome.store),V=D(u);return{isLoading:B(u),isActive:V===b,isPinned:L(u,b),activeArea:V,isSmall:F(JU.store).isViewportMatch("< medium"),isLarge:F(JU.store).isViewportMatch("large"),showIconLabels:O("core","showIconLabels")}},[b,u]),N=(0,Nh.useViewportMatch)("medium","<");WWe(u,b,C,S,A);let{enableComplementaryArea:P,disableComplementaryArea:T,pinItem:M,unpinItem:j}=(0,NT.useDispatch)(He);if((0,vd.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,pn.jsxs)(pn.Fragment,{children:[l&&(0,pn.jsx)(Oh,{scope:u,children:x&&(0,pn.jsx)(Xw,{scope:u,identifier:b,isPressed:S&&(!R||k),"aria-expanded":S,"aria-disabled":w,label:f,icon:R?Ro:v,showTooltip:!R,variant:R?"tertiary":void 0,size:"compact",shortcut:m})}),d&&l&&(0,pn.jsx)(Ih,{target:d,scope:u,icon:v,identifier:b,children:f}),(0,pn.jsxs)(UWe,{activeArea:C,isActive:S,className:J("interface-complementary-area",t),scope:u,id:b.replace("/",":"),children:[(0,pn.jsx)(Jpe,{className:i,closeLabel:r,onClose:()=>T(u),toggleButtonProps:{label:r,size:"compact",shortcut:m,scope:u,identifier:b},children:n||(0,pn.jsxs)(pn.Fragment,{children:[(0,pn.jsx)("h2",{className:"interface-complementary-area-header__title",children:f}),l&&!N&&(0,pn.jsx)(Hl.Button,{className:"interface-complementary-area__pin-unpin-item",icon:x?OV:AV,label:x?(0,dN.__)("Unpin from toolbar"):(0,dN.__)("Pin to toolbar"),onClick:()=>(x?j:M)(u,b),isPressed:x,"aria-expanded":x,size:"compact"})]})}),(0,pn.jsx)(Hl.Panel,{className:c,children:e})]})]})}sme.Slot=zWe;var Ul=sme;var $U=a(U(),1),GWe=({isActive:e})=>((0,$U.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,$U.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),ame=GWe;var lme=a(U(),1),cme=a(E(),1),ume=(0,lme.forwardRef)(({children:e,className:t,ariaLabel:r,as:o="div",...n},i)=>(0,cme.jsx)(o,{ref:i,className:J("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...n,children:e}));ume.displayName="NavigableRegion";var Mh=ume;var fN=a(U(),1),Cb=a(G(),1),Fh=a(z(),1),Qw=a(ke(),1),Ms=a(E(),1),fme=.25,dme={type:"tween",duration:fme,ease:[.6,0,.4,1]};function YWe(e){(0,fN.useEffect)(()=>{let t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}var qWe={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...dme,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...dme,delay:.8,delayChildren:.8}}};function KWe({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,Qw.useResizeObserver)(),h=(0,Qw.useViewportMatch)("medium","<"),v={type:"tween",duration:(0,Qw.useReducedMotion)()?0:fme,ease:[.6,0,.4,1]};YWe("interface-interface-skeleton__html-container");let _={...{header:(0,Fh._x)("Header","header landmark area"),body:(0,Fh.__)("Content"),secondarySidebar:(0,Fh.__)("Block Library"),sidebar:(0,Fh._x)("Settings","settings landmark area"),actions:(0,Fh.__)("Publish"),footer:(0,Fh.__)("Footer")},...c};return(0,Ms.jsxs)("div",{ref:d,className:J(u,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,Ms.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,Ms.jsx)(Cb.__unstableAnimatePresence,{initial:!1,children:!!r&&(0,Ms.jsx)(Mh,{as:Cb.__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:qWe,transition:v,children:r})}),e&&(0,Ms.jsx)("div",{className:"interface-interface-skeleton__header",children:o}),(0,Ms.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,Ms.jsx)(Cb.__unstableAnimatePresence,{initial:!1,children:!!i&&(0,Ms.jsx)(Mh,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:_.secondarySidebar,as:Cb.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:m.width},closed:{width:0}},transition:v,children:(0,Ms.jsxs)(Cb.__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,Ms.jsx)(Mh,{className:"interface-interface-skeleton__content",ariaLabel:_.body,children:s}),!!n&&(0,Ms.jsx)(Mh,{className:"interface-interface-skeleton__sidebar",ariaLabel:_.sidebar,children:n}),!!l&&(0,Ms.jsx)(Mh,{className:"interface-interface-skeleton__actions",ariaLabel:_.actions,children:l})]})]}),!!t&&(0,Ms.jsx)(Mh,{className:"interface-interface-skeleton__footer",ariaLabel:_.footer,children:t})]})}var Tb=(0,fN.forwardRef)(KWe);var xd=a(U(),1),_he=a(G(),1),She=a(z(),1);var bd=a(z(),1),sp=1,MT=.1,al=10,tW=16,mme=44,hme=.8,gme=8,pN=1,vme=.0025,FT=.01,mN=10,DT=45,ZWe={x:0,y:0,width:1,height:1},XWe={horizontal:!1,vertical:!1},pme={x:0,y:0},Jw={image:null,pan:{...pme},zoom:sp,rotation:0,basePan:{...pme},baseZoom:sp,baseRotation:0,flip:{...XWe},cropRect:{...ZWe}},LT=-1,BT=[{label:(0,bd.__)("Free"),value:0},{label:(0,bd.__)("Original"),value:LT},{label:(0,bd.__)("Square (1:1)"),value:1},{label:(0,bd.__)("Landscape (16:9)"),value:16/9},{label:(0,bd.__)("Portrait (9:16)"),value:9/16},{label:(0,bd.__)("Classic (4:3)"),value:4/3},{label:(0,bd.__)("Classic portrait (3:4)"),value:3/4},{label:(0,bd.__)("Photo (3:2)"),value:3/2},{label:(0,bd.__)("Photo portrait (2:3)"),value:2/3}];var yd=1e-6,wd=typeof Float32Array<"u"?Float32Array:Array,bme=Math.random;function rW(e){return e>=0?Math.round(e):e%.5===0?Math.floor(e):Math.round(e)}var XUt=Math.PI/180,QUt=180/Math.PI;var qr={};Wr(qr,{add:()=>pGe,clone:()=>JWe,copy:()=>$We,create:()=>QWe,determinant:()=>nGe,equals:()=>vGe,exactEquals:()=>gGe,frob:()=>fGe,fromRotation:()=>lGe,fromScaling:()=>cGe,fromTranslation:()=>uGe,fromValues:()=>tGe,identity:()=>eGe,invert:()=>oGe,mul:()=>bGe,multiply:()=>wme,multiplyScalar:()=>mGe,multiplyScalarAndAdd:()=>hGe,rotate:()=>iGe,scale:()=>sGe,set:()=>rGe,str:()=>dGe,sub:()=>yGe,subtract:()=>_me,translate:()=>aGe});function QWe(){var e=new wd(6);return wd!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function JWe(e){var t=new wd(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 $We(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 eGe(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function tGe(e,t,r,o,n,i){var s=new wd(6);return s[0]=e,s[1]=t,s[2]=r,s[3]=o,s[4]=n,s[5]=i,s}function rGe(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 oGe(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 nGe(e){return e[0]*e[3]-e[1]*e[2]}function wme(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 iGe(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 sGe(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 aGe(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 lGe(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 cGe(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 uGe(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 dGe(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function fGe(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 pGe(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 _me(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 mGe(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 hGe(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 gGe(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 vGe(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)<=yd*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(o-u)<=yd*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(n-d)<=yd*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-f)<=yd*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(s-m)<=yd*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(l-h)<=yd*Math.max(1,Math.abs(l),Math.abs(h))}var bGe=wme,yGe=_me;var Fs={};Wr(Fs,{add:()=>CGe,angle:()=>WGe,ceil:()=>TGe,clone:()=>wGe,copy:()=>SGe,create:()=>Sme,cross:()=>DGe,dist:()=>eYe,distance:()=>Eme,div:()=>$Ge,divide:()=>Tme,dot:()=>FGe,equals:()=>ZGe,exactEquals:()=>KGe,floor:()=>EGe,forEach:()=>oYe,fromValues:()=>_Ge,inverse:()=>NGe,len:()=>XGe,length:()=>kme,lerp:()=>LGe,max:()=>kGe,min:()=>PGe,mul:()=>JGe,multiply:()=>Cme,negate:()=>OGe,normalize:()=>MGe,random:()=>BGe,rotate:()=>UGe,round:()=>RGe,scale:()=>AGe,scaleAndAdd:()=>IGe,set:()=>xGe,signedAngle:()=>GGe,sqrDist:()=>tYe,sqrLen:()=>rYe,squaredDistance:()=>Pme,squaredLength:()=>Rme,str:()=>qGe,sub:()=>QGe,subtract:()=>xme,transformMat2:()=>VGe,transformMat2d:()=>jGe,transformMat3:()=>zGe,transformMat4:()=>HGe,zero:()=>YGe});function Sme(){var e=new wd(2);return wd!=Float32Array&&(e[0]=0,e[1]=0),e}function wGe(e){var t=new wd(2);return t[0]=e[0],t[1]=e[1],t}function _Ge(e,t){var r=new wd(2);return r[0]=e,r[1]=t,r}function SGe(e,t){return e[0]=t[0],e[1]=t[1],e}function xGe(e,t,r){return e[0]=t,e[1]=r,e}function CGe(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 Cme(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function Tme(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function TGe(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function EGe(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function PGe(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function kGe(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function RGe(e,t){return e[0]=rW(t[0]),e[1]=rW(t[1]),e}function AGe(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function IGe(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e}function Eme(e,t){var r=t[0]-e[0],o=t[1]-e[1];return Math.sqrt(r*r+o*o)}function Pme(e,t){var r=t[0]-e[0],o=t[1]-e[1];return r*r+o*o}function kme(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function Rme(e){var t=e[0],r=e[1];return t*t+r*r}function OGe(e,t){return e[0]=-t[0],e[1]=-t[1],e}function NGe(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function MGe(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 FGe(e,t){return e[0]*t[0]+e[1]*t[1]}function DGe(e,t,r){var o=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=o,e}function LGe(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 BGe(e,t){t=t===void 0?1:t;var r=bme()*2*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function VGe(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 jGe(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 zGe(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 HGe(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 UGe(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 WGe(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 GGe(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 YGe(e){return e[0]=0,e[1]=0,e}function qGe(e){return"vec2("+e[0]+", "+e[1]+")"}function KGe(e,t){return e[0]===t[0]&&e[1]===t[1]}function ZGe(e,t){var r=e[0],o=e[1],n=t[0],i=t[1];return Math.abs(r-n)<=yd*Math.max(1,Math.abs(r),Math.abs(n))&&Math.abs(o-i)<=yd*Math.max(1,Math.abs(o),Math.abs(i))}var XGe=kme,QGe=xme,JGe=Cme,$Ge=Tme,eYe=Eme,tYe=Pme,rYe=Rme,oYe=(function(){var e=Sme();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 $w(e){return e>=0?e%360:(360+e%360)%360}function Hc(e){return e*Math.PI/180}var hN=1e6;function Kn(e,t){return!Number.isFinite(e)||Math.abs(e)>hN?t:e}function gN(e){return Number.isFinite(e)&&Math.abs(e)<=hN}function mn(e){return Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>=Number.EPSILON&&e.height>=Number.EPSILON&&e.width<=hN&&e.height<=hN}function vN(e){let t=Kn(e.x,0),r=Kn(e.y,0),o=Kn(e.width,0),n=Kn(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 wa(e){let t=Kn(e.pan.x,0),r=Kn(e.pan.y,0),o=Kn(e.basePan.x,0),n=Kn(e.basePan.y,0),i=Kn(e.rotation,0),s=Kn(e.baseRotation,0),l=Kn(e.zoom,1),c=l>=Number.EPSILON?l:1,u=Kn(e.baseZoom,1),d=u>=Number.EPSILON?u:1,f=vN(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 nWt=qr.create(),iWt=Fs.create();function Zn(e,t,r){if(!gN(e)||!gN(t)||!gN(r)||e<=0||t<=0)return{width:0,height:0};let o=Hc(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 Ame(e,t,r){if(!mn(e)||!mn(t))return{elementSize:{width:0,height:0},visualSize:{width:0,height:0}};let o=Kn(r,0),n=Math.round(o/90)*90,i=Zn(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=Zn(l,c,n);return{elementSize:{width:l,height:c},visualSize:u}}function Ime(e,t,r,o,n){let i=e.width*r.width,s=e.height*r.height;if(!mn(t)||!mn(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 Dh(e,t,r){let o=qr.create();if(!mn(t)||!mn(r))return o;let n=wa(e),i=Math.round(n.rotation/90)*90,s=Zn(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}=Zn(c,u,i);return qr.translate(o,o,[t.width/2,t.height/2]),qr.translate(o,o,[n.pan.x*d,n.pan.y*f]),qr.scale(o,o,[n.flip.horizontal?-1:1,n.flip.vertical?-1:1]),qr.rotate(o,o,Hc(n.rotation)),qr.scale(o,o,[n.zoom,n.zoom]),qr.translate(o,o,[-c/2,-u/2]),qr.scale(o,o,[c,u]),o}function nYe(e,t){let r=t.map(l=>{let c=Fs.create();return Fs.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 VT(e){return nYe(e,[[0,0],[1,0],[1,1],[0,1]])}function Ome(e,t,r){let o=qr.create();if(!mn(t)||!mn(r))return o;let{rotation:n,flip:i,cropRect:s,zoom:l,pan:c}=wa(e),u=Math.round(n/90)*90,{width:d,height:f}=Zn(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 qr.scale(o,o,[g,v]),qr.translate(o,o,[y-b+r.width/2/g,w-_+r.height/2/v]),qr.scale(o,o,[i.horizontal?-1:1,i.vertical?-1:1]),qr.rotate(o,o,Hc(n)),qr.scale(o,o,[l,l]),qr.translate(o,o,[-t.width/2,-t.height/2]),o}var Nme=.92;function iYe(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 sYe(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=Zn(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=Ome(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 aYe(e,t="image/png",r=Nme){return new Promise((o,n)=>{e.toBlob(i=>{i?o(i):n(new Error("Canvas toBlob returned null."))},t,r)})}async function bN(e,t,r="image/png",o=Nme){let n=await iYe(e),i=sYe(n,t);return aYe(i,r,o)}var ap=1e-9;function yN(e,t){let r=Hc(e),o=Math.abs(Math.cos(r)),n=Math.abs(Math.sin(r)),i=Zn(t,1,e);return{visualW:i.width,visualH:i.height,absC:o,absS:n}}function Lme(e,t,r){let o=Math.max(t,Number.EPSILON),n=Math.round(e/90)*90,{visualW:i,visualH:s}=yN(n,o),{absC:l,absS:c}=yN(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 e_(e){if(!e.image)return sp;let t={width:e.image.naturalWidth,height:e.image.naturalHeight};if(!mn(t))return sp;let r=wa(e),o=t.width/t.height;return Math.max(MT,Lme(r.rotation,o,r.cropRect))}function Bme(e,t,r){if(!mn(t)||!mn(r))return{minX:0,minY:0,maxX:1,maxY:1};let o=wa(e),n=o.pan.x*r.width,i=o.pan.y*r.height,s=Hc(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,N=h*A+v*k+i,P=R/r.width+.5,T=N/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 Vme(e,t,r,o){let n=vN(e),i=Kn(t,1),s=i>=Number.EPSILON?i:1,l=Kn(r,0),c=Kn(o,1),u=Math.max(c,Number.EPSILON),d=Math.round(l/90)*90,{visualW:f,visualH:m}=yN(d,u),{absC:h,absS:g}=yN(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-ap)return n;let k=v*A,R=b*A,N=n.x+v/2,P=n.y+b/2,T=N-k/2,M=P-R/2;return T=Math.max(0,Math.min(T,1-k)),M=Math.max(0,Math.min(M,1-R)),{x:T,y:M,width:k,height:R}}var Mme={width:1e3,height:1e3},Fme=qr.create(),Dme=Fs.create();function Ds(e,t,r){let o=wa(e),n=vN(r),i=mn(t)?t.width/t.height:1,s=Math.max(MT,Lme(o.rotation,i,n)),l=Math.min(al,Math.max(o.zoom,s)),c={...o,zoom:l},u=Dh(c,Mme,t),d=Math.round(o.rotation/90)*90,f=Dh({...c,pan:{x:0,y:0},zoom:1,rotation:d},Mme,t),m=VT(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]];qr.invert(Fme,u);let g=1/0,v=-1/0,b=1/0,_=-1/0;for(let k of h){Fs.transformMat2d(Dme,k,Fme);let R=Dme;R[0]<g&&(g=R[0]),R[0]>v&&(v=R[0]),R[1]<b&&(b=R[1]),R[1]>_&&(_=R[1])}if(g>=-ap&&v<=1+ap&&b>=-ap&&_<=1+ap)return{pan:o.pan,zoom:l};let y=0,w=0;g<0&&v<=1+ap?y=-g:v>1&&g>=-ap?y=1-v:g<0&&v>1&&(y=(1-v-g)/2),b<0&&_<=1+ap?w=-b:_>1&&b>=-ap?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 lYe=1e-6;function Lh(e,t){return Math.abs(e-t)<lYe}function t_(e,t){let r=e.image,o=t.image;return r?.src===o?.src&&r?.naturalWidth===o?.naturalWidth&&r?.naturalHeight===o?.naturalHeight&&Lh(e.pan.x,t.pan.x)&&Lh(e.pan.y,t.pan.y)&&Lh(e.zoom,t.zoom)&&Lh(e.rotation,t.rotation)&&e.flip.horizontal===t.flip.horizontal&&e.flip.vertical===t.flip.vertical&&Lh(e.cropRect.x,t.cropRect.x)&&Lh(e.cropRect.y,t.cropRect.y)&&Lh(e.cropRect.width,t.cropRect.width)&&Lh(e.cropRect.height,t.cropRect.height)}function jme(e,t){return e.image?Math.min(al,Math.max(MT,t)):Math.min(al,Math.max(sp,t))}function cYe(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:$w(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 _a(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}=Ds(e,t,e.cropRect),i=Vme(e.cropRect,n,e.rotation,r),s=o;return i!==e.cropRect&&({pan:s}=Ds({...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 lp(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 Eb(e,t){switch(t.type){case"SET_IMAGE":return lp(_a({...e,image:t.payload}));case"SET_PAN":return lp(_a({...e,pan:t.payload}));case"SET_ZOOM":{let r=jme(e,t.payload);return lp(_a({...e,zoom:r}))}case"SET_ZOOM_AT_POINT":{let r=jme(e,t.payload.zoom);return lp(_a({...e,zoom:r,pan:t.payload.pan}))}case"SET_ROTATION":{let r=$w(t.payload),o=e.flip.horizontal!==e.flip.vertical,n=Hc(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 _a({...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=$w(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 lp(_a({...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 lp(_a({...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 lp(_a({...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?al/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 lp(_a({...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 Eb(e,cYe(e,t.payload));case"RESET":return lp(_a({...Jw,image:e.image,...t.payload}))}}function zme(e,t){let r=Math.min(al,Math.max(e_(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}=Ds({...e,zoom:r,pan:{x:l,y:c}},u,e.cropRect);return{type:"SET_ZOOM_AT_POINT",payload:{zoom:r,pan:d}}}function wN(e,t){return{setPan:r=>e({type:"SET_PAN",payload:r}),setZoom:r=>{let o=zme(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 Qe=a(U(),1),iW=a(z(),1);function Pb(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 Hme(e){return e<=0?tW:Math.max(tW,mme/e)}var oW={width:.05,height:.05};function _N(e,t,r,o,n,i=oW){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 nW(e,t,r,o,n,i,s=oW,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 N=g>0?m:m-y,P=v>0?h:h-w;return{x:N,y:P,width:y,height:w}}function Ume(e,t,r,o,n,i=oW){let s=e.startRect,l=s.width*o.width;if(s.height*o.height<=0||l<=0)return _N(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 nW(e,t,r,o,n,u,i);let f=_N(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 Kr=a(U(),1);var Wme=300,uYe=30,dYe=200;function cp(e){return e.image?{width:e.image.naturalWidth,height:e.image.naturalHeight}:{width:1,height:1}}function SN(e,t){let r=e.clientX-t.clientX,o=e.clientY-t.clientY;return Math.sqrt(r*r+o*o)}var Gme=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??sp}get maxZoom(){return this.options.maxZoom??al}get zoomSpeed(){return this.options.zoomSpeed??vme}get keyboardStep(){return this.options.keyboardStep??FT}getKeyboardStep(e){return e.shiftKey?this.keyboardStep*mN: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}=Ds({...d,pan:{x:c.startPanX+g,y:c.startPanY+v}},cp(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?.()},Wme);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}=Ds({...t,zoom:o,pan:{x:g,y:v}},cp(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=SN(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=SN(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=SN(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=SN(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}=Ds({...r,zoom:u,pan:{x,y:C}},cp(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}=Ds({...r,pan:{x:t.startPanX+s,y:t.startPanY+l}},cp(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<Wme&&l<uYe))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})},dYe),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}=Ds({...u,zoom:m,pan:{x:w,y:S}},cp(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}=Ds({...t,pan:{x:t.pan.x,y:t.pan.y+r}},cp(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowDown":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Ds({...t,pan:{x:t.pan.x,y:t.pan.y-r}},cp(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowLeft":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Ds({...t,pan:{x:t.pan.x+r,y:t.pan.y}},cp(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowRight":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Ds({...t,pan:{x:t.pan.x-r,y:t.pan.y}},cp(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 fYe=300;function pYe(e){switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":return!0;default:return!1}}function mYe(e){switch(e.key){case"+":case"=":case"-":case"_":return!0;default:return!1}}function Yme(e,t,r,o,n){let[i,s]=(0,Kr.useState)(!1),[l,c]=(0,Kr.useState)(!1),[u,d]=(0,Kr.useState)(!1),[f,m]=(0,Kr.useState)(!1),h=(0,Kr.useRef)(),g=(0,Kr.useRef)(!1),v=(0,Kr.useRef)(e);v.current=e;let b=(0,Kr.useRef)(r);b.current=r;let _=(0,Kr.useRef)(o);_.current=o;let y=(0,Kr.useRef)(n);y.current=n;let w=(0,Kr.useRef)(t);w.current=t;let S=(0,Kr.useRef)(null),x=(0,Kr.useCallback)(()=>{d(!0)},[]),C=(0,Kr.useCallback)(()=>{d(!1)},[]),A=(0,Kr.useCallback)(()=>{g.current||(g.current=!0,y.current?.onGestureStart?.()),clearTimeout(h.current),h.current=setTimeout(()=>{g.current=!1,m(!1),y.current?.onGestureEnd?.()},fYe)},[]);(0,Kr.useEffect)(()=>()=>{clearTimeout(h.current)},[]),(0,Kr.useEffect)(()=>{let T=new Gme({getState:()=>v.current,actions:{setPan:M=>w.current.setPan(M),setZoom:M=>w.current.setZoom(M),setZoomAtPoint:(M,j)=>w.current.setZoomAtPoint(M,j),snapRotate90:M=>w.current.snapRotate90(M),toggleFlip:M=>w.current.toggleFlip?.(M)},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:M=>{s(M.isDragging),c(M.isZooming)}});return S.current=T,()=>{T.destroy(),S.current=null}},[x,C]);let k=(0,Kr.useCallback)(T=>{let M=T.currentTarget;S.current?.handlePointerDown(T.nativeEvent,M)},[]),R=(0,Kr.useCallback)(T=>{let M=T.currentTarget,j=M.getBoundingClientRect();S.current?.handleTouchStart(T.nativeEvent,j,M.ownerDocument)},[]),N=(0,Kr.useCallback)(T=>{pYe(T.nativeEvent)?(m(!0),A()):mYe(T.nativeEvent)&&A(),S.current?.handleKeyDown(T.nativeEvent)},[A]),P=(0,Kr.useCallback)(T=>{S.current?.handleWheel(T)},[]);return{handlers:{onPointerDown:k,onTouchStart:R,onKeyDown:N},onWheelNative:P,isDragging:i,isZooming:l,isPlacementActive:u||f||l}}var Kme=a(U(),1);var hYe="matrix(1, 0, 0, 1, 0, 0)";function qme(e,t){if(!mn(t))return hYe;let r=wa(e),o=r.pan.x*t.width,n=r.pan.y*t.height,i=Hc(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 Zme(e,t){return(0,Kme.useMemo)(()=>qme(e,t),[e,t])}var $me=a(Pl(),1),up=a(U(),1),Ls=a(z(),1);function kb(e,t){let r=wa(e);if(!mn(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=Dh(r,o,t),i=qr.create();qr.invert(i,n);let s=Dh({...r,pan:{x:0,y:0},zoom:1},o,t),l=VT(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=Fs.create();Fs.transformMat2d(f,[u,d],i);let m=Math.round(r.rotation/90)*90,{width:h,height:g}=Zn(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 gYe(e,t,r){if(!mn(t)||r.width<=0||r.height<=0)return null;let o=wa(e),n={width:1e3,height:1e3},i=Dh({...o,pan:{x:0,y:0},zoom:1},n,t),s=VT(i);if(s.width<=0||s.height<=0)return null;let l=Fs.fromValues((r.x+r.width/2)/t.width,(r.y+r.height/2)/t.height),c=Fs.create(),u=Dh(o,n,t);Fs.transformMat2d(c,l,u);let d=Math.round(o.rotation/90)*90,{width:f,height:m}=Zn(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 vYe=1e-6;function bYe(e){let t=$w(e),r=Math.round(t/90)*90;return Math.abs(t-r)<vYe}function Xme(e,t,r,o){let n=wa(e);return bYe(n.rotation)?Jme(n,t,r,{left:o.includes("w"),top:o.includes("n"),right:o.includes("e"),bottom:o.includes("s")}):r}function Qme(e,t,r){return Jme(e,t,r,{left:!0,top:!0,right:!0,bottom:!0})}function Jme(e,t,r,o){if(!mn(t))return r;let n=wa({...e,cropRect:r}),i=kb(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=gYe(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 yYe=300;function wYe(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,Ls.__)("Flipped horizontally and vertically"):r?(0,Ls.__)("Flipped horizontally"):o?(0,Ls.__)("Flipped vertically"):(0,Ls.__)("Flip removed")}function _Ye(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,Ls.__)("Rotation 0 degrees"):void 0:n>0?(0,Ls.sprintf)((0,Ls.__)("Rotated %d degrees clockwise"),n):(0,Ls.sprintf)((0,Ls.__)("Rotated %d degrees counterclockwise"),Math.abs(n))}function SYe(e,t){if(!e.image)return;let r={width:e.image.naturalWidth,height:e.image.naturalHeight},o=kb(e,r);if(t?.image){let n=kb({...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,Ls.sprintf)((0,Ls.__)("Crop %1$d by %2$d pixels"),Math.round(o.width),Math.round(o.height))}function xYe(e,t){if(!(t&&Math.round(t.zoom*100)===Math.round(e.zoom*100)))return(0,Ls.sprintf)((0,Ls.__)("Zoom %d%%"),Math.round(e.zoom*100))}function CYe(e,t){let r=wYe(e,t);return r||[_Ye(e,t),xYe(e,t),SYe(e,t)].filter(n=>n!==void 0).join(", ")}function ehe(e){let t=(0,up.useRef)(),r=(0,up.useRef)(""),o=(0,up.useRef)(null),n=(0,up.useRef)(e);(0,up.useLayoutEffect)(()=>{n.current=e},[e]),(0,up.useEffect)(()=>(clearTimeout(t.current),t.current=setTimeout(()=>{let i=n.current,s=CYe(i,o.current);o.current=i,s!==r.current&&(r.current=s,(0,$me.speak)(s))},yYe),()=>{clearTimeout(t.current)}),[e.zoom,e.rotation,e.cropRect.width,e.cropRect.height,e.flip.horizontal,e.flip.vertical])}var An=a(U(),1),_d=a(z(),1);var xN={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0};var r_=a(E(),1),TYe=["nw","ne","se","sw"],EYe=["nw","n","ne","e","se","s","sw","w"];function PYe(e){switch(e){case"n":return(0,_d.__)("Resize from top edge");case"s":return(0,_d.__)("Resize from bottom edge");case"e":return(0,_d.__)("Resize from right edge");case"w":return(0,_d.__)("Resize from left edge");case"nw":return(0,_d.__)("Resize from top-left corner");case"ne":return(0,_d.__)("Resize from top-right corner");case"sw":return(0,_d.__)("Resize from bottom-left corner");case"se":return(0,_d.__)("Resize from bottom-right corner")}}var kYe=500;function the({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,An.useMemo)(()=>({minX:v,minY:b,maxX:_,maxY:y}),[v,b,_,y]),S=(0,An.useRef)(),x=(0,An.useRef)(!1),C=(0,An.useId)(),A=!!(s&&s>0),k=(0,An.useRef)(null);(0,An.useEffect)(()=>()=>{clearTimeout(S.current),x.current=!1,k.current?.cancel(!1)},[]),(0,An.useEffect)(()=>{c&&k.current?.cancel()},[c]);let R=(0,An.useRef)(null),N=(0,An.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,M=P+e.x*r.width,j=T+e.y*r.height,F=e.width*r.width,D=e.height*r.height,B=(0,An.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 te=Q.currentTarget;te.setPointerCapture(Q.pointerId);let de={handle:Z,startX:Q.clientX,startY:Q.clientY,startRect:{...e}},me=0,ee=Q.clientX,$=Q.clientY,ue=Q.shiftKey,ve=le=>{let se=le;ee=se.clientX,$=se.clientY,ue=se.shiftKey,!me&&(me=requestAnimationFrame(()=>{me=0;let Ae=R.current;if(!Ae)return;let ye;Ae.hasLockedRatio?ye=Ae.computeLockedRect(de,ee,$):ue?ye=Ae.computeShiftLockedRect(de,ee,$):(ye=Ae.computeFreeRect(de,ee,$),ye=Ae.snapCropRect?.(ye,de.handle)??ye),Ae.onCropChange(ye)}))},Ee=!1,ie=(le=!0,se=!0)=>{Ee||(Ee=!0,me&&(cancelAnimationFrame(me),me=0),te.removeEventListener("pointermove",ve),te.removeEventListener("pointerup",pe),te.removeEventListener("lostpointercapture",pe),k.current=null,le&&R.current?.onResizeEnd?.(),se&&te.focus({preventScroll:!0}))},ae=(le=!0)=>ie(le,!1),pe=()=>ie();te.addEventListener("pointermove",ve),te.addEventListener("pointerup",pe),te.addEventListener("lostpointercapture",pe),k.current={cancel:ae},n?.(Z),clearTimeout(S.current),x.current=!1},[e,c,n]),L=(0,An.useCallback)((Z,Q,ce)=>_N(Z,Q,ce,r,w,m),[r,w,m]),O=(0,An.useCallback)((Z,Q,ce,te)=>nW(Z,Q,ce,r,w,N,m,te),[r,w,N,m]),V=(0,An.useCallback)((Z,Q,ce)=>Ume(Z,Q,ce,r,w,m),[r,w,m]);R.current={hasLockedRatio:A,computeLockedRect:O,computeFreeRect:L,computeShiftLockedRect:V,onCropChange:o,onResizeEnd:i,snapCropRect:h};let W=(0,An.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 te=()=>{clearTimeout(S.current),S.current=setTimeout(()=>{x.current=!1,i?.()},kYe)},de=Q.shiftKey?mN:1,me=g?.width??FT,ee=g?.height??FT,$=me*de,ue=ee*de,ve=0,Ee=0;ce==="ArrowLeft"&&(ve=-$),ce==="ArrowRight"&&(ve=$),ce==="ArrowUp"&&(Ee=-ue),ce==="ArrowDown"&&(Ee=ue);let ie=ve!==0?"width":"height";if(A){let ae={handle:Z,startX:0,startY:0,startRect:{...e}},pe=ve*r.width,le=Ee*r.height;o(O(ae,pe,le,ie)),te()}else{let ae={handle:Z,startX:0,startY:0,startRect:{...e}},pe=ve*r.width,le=Ee*r.height,se=L(ae,pe,le);o(h?.(se,Z)??se),te()}},[e,A,r.width,r.height,O,L,o,n,i,f,g,h,c]);if(t.width===0||t.height===0)return null;let q=A?TYe:EYe;return(0,r_.jsxs)("div",{className:"wp-media-editor-image-editor__stencil","data-testid":"cropper-stencil",style:{left:M,top:j,width:F,height:D,transition:u},children:[l&&(0,r_.jsx)("div",{id:C,style:xN,children:(0,_d.__)("Use arrow keys to resize the crop area. Hold Shift for larger steps.")}),(0,r_.jsx)("div",{className:"wp-media-editor-image-editor__stencil-rect",style:{width:"100%",height:"100%",top:0,left:0}}),l&&q.map(Z=>(0,r_.jsx)("button",{type:"button",className:`wp-media-editor-image-editor__handle wp-media-editor-image-editor__handle--${Z}`,onPointerDown:Q=>B(Z,Q),onTouchStart:Q=>{Q.touches.length<2&&Q.stopPropagation()},onKeyDown:Q=>W(Z,Q),"aria-label":PYe(Z),"aria-describedby":C},Z))]})}var rhe=a(E(),1);function ohe({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,rhe.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 Rb=a(E(),1);function nhe({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,Rb.jsxs)("div",{className:"wp-media-editor-image-editor__grid","data-testid":"cropper-grid",style:{left:i,top:s,width:l,height:c},children:[(0,Rb.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d}}),(0,Rb.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d*2}}),(0,Rb.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u}}),(0,Rb.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u*2}})]})}var o_=a(U(),1),che=a(E(),1),CN=12,ihe={before:"-100%",center:"-50%",after:"0"},she={before:-1,center:0,after:1},RYe={before:"after",center:"center",after:"before"};function AYe(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 ahe(e,t,r){return e==="before"?t-CN-r:e==="after"?t+CN:t-r/2}function lhe(e,t,r,o){let n=c=>{let u=ahe(c,t,r);return u>=0&&u+r<=o};if(n(e))return e;let i=RYe[e];if(i!==e&&n(i))return i;if(e!=="center"&&n("center"))return"center";let s=c=>{let u=ahe(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 uhe({cropRect:e,containerSize:t,imageSize:r,activeHandle:o,outputWidth:n,outputHeight:i}){let s=(0,o_.useRef)(null),[l,c]=(0,o_.useState)(null);if((0,o_.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 _=AYe(o),y=l?{x:lhe(_.x,v,l.width,t.width),y:lhe(_.y,b,l.height,t.height)}:_;return(0,che.jsx)("div",{ref:s,className:"wp-media-editor-image-editor__dimensions-tooltip","data-testid":"cropper-dimensions-tooltip",style:{left:v+she[y.x]*CN,top:b+she[y.y]*CN,transform:`translate(${ihe[y.x]}, ${ihe[y.y]})`},"aria-hidden":"true",children:`W: ${Math.round(n)}px H: ${Math.round(i)}px`})}var TN=a(U(),1);var Bh=a(U(),1);var n_={zoom:1,pan:{x:0,y:0}};function dhe(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===n_.zoom&&e.pan.x===n_.pan.x&&e.pan.y===n_.pan.y?e:n_}}function fhe(){let[e,t]=(0,Bh.useReducer)(dhe,n_),r=(0,Bh.useCallback)(i=>{t({type:"SET_VIEWPORT_ZOOM",payload:i})},[]),o=(0,Bh.useCallback)(i=>{t({type:"SET_VIEWPORT_PAN",payload:i})},[]),n=(0,Bh.useCallback)(()=>{t({type:"RESET_VIEWPORT"})},[]);return(0,Bh.useMemo)(()=>({viewport:e,setViewportZoom:r,setViewportPan:o,resetViewport:n}),[e,r,o,n])}var phe=a(E(),1),mhe=(0,TN.createContext)(null);function hhe({children:e}){let t=fhe();return(0,phe.jsx)(mhe.Provider,{value:t,children:e})}function ghe(){let e=(0,TN.useContext)(mhe);if(!e)throw new Error("useViewport must be used within a ViewportProvider.");return e}var ll=a(E(),1),Wl=1e-6,IYe=1e-6,i_=200,OYe=i_+100,vhe=`transform ${i_}ms ease-out`,NYe=[`left ${i_}ms ease-out`,`top ${i_}ms ease-out`,`width ${i_}ms ease-out`,`height ${i_}ms ease-out`].join(", ");function MYe({src:e,controller:t,stencil:r=the,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:N}=ghe(),P=(0,Qe.useRef)(null),T=(0,Qe.useId)(),[M,j]=(0,Qe.useState)(f),[F,D]=(0,Qe.useState)(!1),[B,L]=(0,Qe.useState)({width:0,height:0});(0,Qe.useLayoutEffect)(()=>{f&&P.current?.focus({preventScroll:!0})},[f]);let O=(0,Qe.useCallback)(Te=>{let it=Te.target;it===Te.currentTarget&&j(!0),Te.relatedTarget!==null&&it.matches(":focus-visible")&&D(!0)},[]),V=(0,Qe.useCallback)(Te=>{Te.target===Te.currentTarget&&j(!1),Te.currentTarget.contains(Te.relatedTarget)||D(!1)},[]);(0,Qe.useEffect)(()=>{let Te=P.current;if(!Te)return;let it=new ResizeObserver(ht=>{for(let bt of ht){let{width:Pr,height:Ur}=bt.contentRect;L(eo=>eo.width===Pr&&eo.height===Ur?eo:{width:Pr,height:Ur})}});return it.observe(Te),()=>{it.disconnect()}},[]),(0,Qe.useEffect)(()=>{h?.(y)},[y,h]),ehe(y);let W=y.image?.naturalWidth??0,q=y.image?.naturalHeight??0,{elementSize:Z,visualSize:Q}=(0,Qe.useMemo)(()=>Ame(B,{width:W,height:q},y.rotation),[B,W,q,y.rotation]);(0,Qe.useEffect)(()=>{C(Q)},[Q,C]),(0,Qe.useEffect)(()=>{if(d||Q.width===0||Q.height===0||!u||u<=0)return;let Te=Pb(u,Q),it=y.cropRect;Math.abs(it.x-Te.x)<Wl&&Math.abs(it.y-Te.y)<Wl&&Math.abs(it.width-Te.width)<Wl&&Math.abs(it.height-Te.height)<Wl||A(Te)},[d,u,Q,A,y.cropRect]);let ce=(0,Qe.useRef)(u);(0,Qe.useEffect)(()=>{if(ce.current===u||(ce.current=u,!d||Q.width===0||Q.height===0||!u||u<=0))return;let Te=Pb(u,Q),it=y.cropRect;Math.abs(it.x-Te.x)<Wl&&Math.abs(it.y-Te.y)<Wl&&Math.abs(it.width-Te.width)<Wl&&Math.abs(it.height-Te.height)<Wl||A(Te)},[u,d,Q,A,y.cropRect]);let te=(0,Qe.useMemo)(()=>{if(!(!y.image||Z.width===0))return Bme(y,Z,Q)},[y,Z,Q]),de=l!==void 0?l:e_(y),[me,ee]=(0,Qe.useState)(!1),$=(0,Qe.useRef)(!1),ue=(0,Qe.useRef)(!1),[ve,Ee]=(0,Qe.useState)(!1),ie=(0,Qe.useRef)(!1),ae=(0,Qe.useCallback)(Te=>{ie.current=Te,Ee(Te)},[]),[pe,le]=(0,Qe.useState)(null),se=(0,Qe.useMemo)(()=>Ime(y.cropRect,B,Q,hme,gme),[y.cropRect,B,Q]),[Ae,ye]=(0,Qe.useState)(1),Se=me?Ae:se,Pe=(0,Qe.useMemo)(()=>({width:Q.width*Se,height:Q.height*Se}),[Q.width,Q.height,Se]),Me=W>0?Z.width/W*y.zoom*Se:0,X=(0,Qe.useMemo)(()=>{if(Me<pN||u&&u>0||W<=0||q<=0)return;let Te=Math.round(y.rotation/90)*90;if(Math.abs(y.rotation-Te)>=IYe)return;let it=Zn(W,q,Te);if(!(it.width<=0||it.height<=0))return{width:y.zoom/it.width,height:y.zoom/it.height}},[Me,u,W,q,y.rotation,y.zoom]),fe=(0,Qe.useMemo)(()=>{if(W<=0||q<=0)return;let Te=Math.round(y.rotation/90)*90,it=Zn(W,q,Te),ht=Hme(Me);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,Me]),Ye=(0,Qe.useCallback)((Te,it)=>Me<pN||W<=0||q<=0?Te:Xme(y,{width:W,height:q},Te,it),[Me,W,q,y]),Ze=(0,Qe.useRef)(!1);(0,Qe.useEffect)(()=>{let Te=d&&(!u||u<=0)&&Me>=pN&&W>0&&q>0,it=Ze.current;if(Ze.current=Te,!Te||it)return;let ht=Qme(y,{width:W,height:q},y.cropRect),bt=y.cropRect;Math.abs(bt.x-ht.x)<Wl&&Math.abs(bt.y-ht.y)<Wl&&Math.abs(bt.width-ht.width)<Wl&&Math.abs(bt.height-ht.height)<Wl||S(ht)},[u,Me,d,W,q,S,y]);let{handlers:st,onWheelNative:Rt,isDragging:ut,isZooming:_t,isPlacementActive:pr}=Yme(y,t,B,Pe,{minZoom:de,maxZoom:c,onGestureStart:g,onGestureEnd:v}),nt={...st,onPointerDownCapture:()=>{D(!1)},onTouchStartCapture:Te=>{Te.touches.length>1&&ae(!0)},onTouchMoveCapture:Te=>{Te.touches.length>1&&ae(!0)},onTouchEndCapture:Te=>{Te.touches.length===0&&ae(!1)},onTouchCancelCapture:Te=>{Te.touches.length===0&&ae(!1)},onKeyDownCapture:Te=>{["Shift","Control","Alt","Meta"].includes(Te.key)||D(!0)},onPointerDown:Te=>{if($.current||ie.current||Te.pointerType==="touch"&&Te.isPrimary===!1){Te.preventDefault();return}st.onPointerDown?.(Te),D(!1)}};(0,Qe.useEffect)(()=>{let Te=P.current;if(!Te)return;let it=ht=>{if($.current||ue.current){ht.preventDefault();return}Rt(ht)};return Te.addEventListener("wheel",it,{passive:!1}),()=>{Te.removeEventListener("wheel",it)}},[Rt]);let Ha=Zme(y,Q),Ua=(0,Qe.useCallback)(Te=>{let it=Te.currentTarget,ht={width:it.naturalWidth,height:it.naturalHeight};w({src:e,naturalWidth:ht.width,naturalHeight:ht.height}),m?.(ht)},[e,w,m]),Er=(0,Qe.useCallback)(Te=>{if(!ie.current&&(S(Te),$.current&&Pe.width>0&&Pe.height>0)){let it=(B.width-Pe.width)/2,ht=(B.height-Pe.height)/2,bt=Math.max(0,it+(Te.x+Te.width)*Pe.width-B.width),Pr=Math.max(0,-(it+Te.x*Pe.width)),Ur=Math.max(0,ht+(Te.y+Te.height)*Pe.height-B.height),eo=Math.max(0,-(ht+Te.y*Pe.height));R({x:-bt+Pr,y:-Ur+eo})}},[S,R,B,Pe]),[Ri,sn]=(0,Qe.useState)(!1),vt=(0,Qe.useRef)(),Ft=(0,Qe.useCallback)(()=>{clearTimeout(vt.current),ue.current=!1,sn(!1)},[]);(0,Qe.useEffect)(()=>()=>{clearTimeout(vt.current)},[]);let re=o==="interactive",Ce=re&&(pr||me||n),H=(0,Qe.useMemo)(()=>{if(!s||!pe||!y.image)return null;let Te=kb(y,{width:y.image.naturalWidth,height:y.image.naturalHeight});return{width:Te.width,height:Te.height}},[s,pe,y]),Ie=(0,Qe.useCallback)(()=>{D(!0),P.current?.focus({preventScroll:!0})},[]),Vt=(0,Qe.useCallback)(Te=>{ie.current||(ye(se),$.current=!0,ee(!0),le(Te??null),Ft(),N(),g?.())},[Ft,g,N,se]),Re=(0,Qe.useCallback)(()=>{let Te=ie.current;if($.current=!1,ee(!1),le(null),clearTimeout(vt.current),Te){Ft(),N();return}ue.current=!0,sn(!0),N(),x(),v?.(),vt.current=setTimeout(Ft,OYe)},[Ft,x,v,N]),Po=(0,Qe.useCallback)(Te=>{!ue.current||Te.propertyName!=="transform"||Ft()},[Ft]),Fe;Ri?Fe=vhe:_t&&(Fe="transform 150ms linear");let mr=Ri?NYe:void 0,he=(0,Qe.useMemo)(()=>{if(Z.width===0||Z.height===0)return{};let Te=(B.width-Z.width)/2,it=(B.height-Z.height)/2;return{width:Z.width,height:Z.height,maxWidth:Z.width,maxHeight:Z.height,left:Te,top:it,transform:`scale(${Se}) ${Ha}`,transition:Fe,imageRendering:Me>1?"pixelated":void 0}},[B,Z,Ha,Fe,Me,Se]),ge=Ri?vhe:void 0,Xs=me||Ri?"transform":void 0,Ut;k.pan.x!==0||k.pan.y!==0?Ut={transform:`translate(${k.pan.x}px, ${k.pan.y}px)`,transition:ge,willChange:Xs}:Ri&&(Ut={transform:"translate(0px, 0px)",transition:ge,willChange:Xs});let ze=(0,Qe.useCallback)(Te=>{typeof _=="function"?_(Te):_&&(_.current=Te)},[_]);return(0,ll.jsx)("div",{ref:ze,className:J("wp-media-editor-image-editor",ut&&"wp-media-editor-image-editor--dragging",b),children:(0,ll.jsxs)("div",{ref:P,className:J("wp-media-editor-image-editor__canvas",re&&"wp-media-editor-image-editor__canvas--grid-interactive",Ce&&"wp-media-editor-image-editor__canvas--show-grid",Ri&&"wp-media-editor-image-editor__canvas--settling",F&&"wp-media-editor-image-editor__canvas--focus-visible"),tabIndex:0,role:"group","aria-label":(0,iW.__)("Crop area"),"aria-describedby":M?T:void 0,onFocus:O,onBlur:V,...nt,children:[(0,ll.jsx)("div",{id:T,style:xN,children:(0,iW.__)("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,ll.jsxs)("div",{className:"wp-media-editor-image-editor__stage","data-testid":"cropper-stage",style:Ut,onTransitionEnd:Po,children:[(0,ll.jsx)("img",{className:"wp-media-editor-image-editor__image","data-testid":"cropper-image",src:e,alt:"",onLoad:Ua,style:he,draggable:!1}),i&&(0,ll.jsx)(ohe,{cropRect:y.cropRect,containerSize:B,imageSize:Pe,transition:mr}),(0,ll.jsx)(r,{cropRect:y.cropRect,containerSize:B,imageSize:Pe,onCropChange:Er,onResizeStart:Vt,onResizeEnd:Re,onEscape:Ie,aspectRatio:u,freeformCrop:d,isResizeDisabled:ve,stencilTransition:mr,cropBounds:te,minCropSize:fe,snapCropRect:Ye,keyboardResizeStep:X}),(o===!0||re)&&(0,ll.jsx)(nhe,{cropRect:y.cropRect,containerSize:B,imageSize:Pe}),pe&&H&&(0,ll.jsx)(uhe,{cropRect:y.cropRect,containerSize:B,imageSize:Pe,activeHandle:pe,outputWidth:H.width,outputHeight:H.height})]})]})})}var FYe=(0,Qe.forwardRef)(MYe),EN=(0,Qe.forwardRef)((e,t)=>(0,ll.jsx)(hhe,{children:(0,ll.jsx)(FYe,{...e,ref:t})}));var or=a(U(),1);var PN={aspectRatioValue:"0"};function kN(e,t){switch(t.type){case"CROPPER":{let r=Eb(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=Pb(o,n);return{cropper:Eb(e.cropper,{type:"SET_CROP_RECT",payload:l}),cropOptions:s}}case"RESET_CROP_OPTIONS":return e.cropOptions.aspectRatioValue===PN.aspectRatioValue?e:{...e,cropOptions:{...PN}};case"RESTORE_SNAPSHOT":return t.payload;case"VIEWPORT_ADJUST_CROP_RECT":{let r=Eb(e.cropper,{type:"SET_CROP_RECT",payload:t.payload});return r===e.cropper?e:{...e,cropper:r}}}}function jT(e,t){return e===t?!0:t_(e.cropper,t.cropper)&&e.cropOptions.aspectRatioValue===t.cropOptions.aspectRatioValue}function bhe(e,t){return{cropper:e,cropOptions:{...PN,...t}}}function s_(e,t){let r=parseFloat(e);if(!(r===0||Number.isNaN(r))){if(r===LT)return t&&t.naturalWidth>0&&t.naturalHeight>0?t.naturalWidth/t.naturalHeight:void 0;if(r>0)return r}}function LYe(e,t){return e?.src===t?.src&&e?.naturalWidth===t?.naturalWidth&&e?.naturalHeight===t?.naturalHeight}function sW(e){let[t,r]=(0,or.useReducer)(kN,null,()=>bhe(_a({...Jw,...e?.cropper}),e?.cropOptions)),[o,n]=(0,or.useState)(()=>t),i=(0,or.useRef)(t),s=(0,or.useRef)({width:0,height:0}),l=(0,or.useRef)([]),c=(0,or.useRef)([]),[u,d]=(0,or.useState)(!1),[f,m]=(0,or.useState)(!1),h=(0,or.useRef)(!1),g=(0,or.useRef)(null),v=(0,or.useCallback)(B=>{let L=l.current[l.current.length-1];L&&jT(L,B)||(l.current=[...l.current,B],c.current=[],d(!0),m(!1))},[]),b=(0,or.useCallback)((B,L=!0)=>{let O=i.current,V=kN(O,B);L&&(jT(O,V)||(h.current?g.current===null&&(g.current=O):v(O))),i.current=V,r(B)},[v]),_=(0,or.useCallback)(()=>{h.current||(h.current=!0,g.current=null)},[]),y=(0,or.useCallback)(()=>{let B=g.current;B&&!jT(B,i.current)&&v(B),g.current=null,h.current=!1},[v]),w=(0,or.useCallback)(B=>{b({type:"CROPPER",action:B})},[b]),S=(0,or.useMemo)(()=>wN(w,()=>i.current.cropper),[w]),x=(0,or.useCallback)(B=>{if(LYe(i.current.cropper.image,B))return;let L={type:"CROPPER",action:{type:"SET_IMAGE",payload:B}},O=kN(i.current,L);i.current=O,r(L),n(O),h.current=!1,g.current=null,l.current=[],c.current=[],d(!1),m(!1)},[]),C=(0,or.useCallback)(B=>{b({type:"CROPPER",action:{type:"RESET",payload:B}})},[b]),A=(0,or.useCallback)(B=>{let L=s_(B,i.current.cropper.image);b({type:"SET_ASPECT_RATIO_VALUE",payload:{presetKey:B,resolved:L,visualSize:s.current}})},[b]),k=(0,or.useCallback)(()=>{b({type:"RESET_CROP_OPTIONS"})},[b]),R=(0,or.useCallback)(()=>{y();let B=l.current[l.current.length-1];B&&(c.current=[i.current,...c.current],l.current=l.current.slice(0,-1),d(l.current.length>0),m(!0),i.current=B,r({type:"RESTORE_SNAPSHOT",payload:B}))},[y]),N=(0,or.useCallback)(()=>{y();let B=c.current[0];B&&(l.current=[...l.current,i.current],c.current=c.current.slice(1),d(!0),m(c.current.length>0),i.current=B,r({type:"RESTORE_SNAPSHOT",payload:B}))},[y]),P=(0,or.useCallback)(B=>{s.current=B},[]),T=(0,or.useCallback)(B=>{b({type:"VIEWPORT_ADJUST_CROP_RECT",payload:B},!1)},[b]),M=!jT(t,o),j=!t_(t.cropper,o.cropper),F=(0,or.useCallback)((B,L)=>t.cropper.image?bN(t.cropper.image.src,t.cropper,B,L):Promise.reject(new Error("No image loaded \u2014 call setImage first.")),[t.cropper]);return(0,or.useMemo)(()=>({...S,state:t.cropper,setImage:x,reset:C,isDirty:M,getCroppedImage:F,cropOptions:t.cropOptions,setAspectRatioValue:A,resetCropOptions:k,isCropperDirty:j,hasUndo:u,hasRedo:f,undo:R,redo:N,beginGesture:_,endGesture:y,setVisualSize:P,adjustCropRectForViewport:T}),[S,t.cropper,x,C,M,F,t.cropOptions,A,k,j,u,f,R,N,_,y,P,T])}var RN=a(U(),1);var yhe=a(E(),1),whe=(0,RN.createContext)(null);function aW({initialCropperState:e,initialCropOptions:t,children:r}){let o=sW({cropper:e,cropOptions:t});return(0,yhe.jsx)(whe.Provider,{value:o,children:r})}function Sa(){let e=(0,RN.useContext)(whe);if(!e)throw new Error("useMediaEditor must be used within a MediaEditorStateProvider.");return e}var Sd=a(E(),1);function xhe({focusOnMount:e,isPlacementActive:t=!1,onGestureStart:r,onGestureEnd:o}){let{media:n}=vw(),i=Sa(),{aspectRatioValue:s}=i.cropOptions,l=i.state.image,{beginGesture:c,endGesture:u,setImage:d}=i,[f,m]=(0,xd.useState)("loading"),h=(0,xd.useMemo)(()=>s_(s,l),[s,l]),g=(0,xd.useCallback)(()=>{c(),r?.()},[c,r]),v=(0,xd.useCallback)(()=>{u(),o?.()},[u,o]),b=n?.source_url,_=qv(n?.mime_type),y=Number(n?.media_details?.width),w=Number(n?.media_details?.height);(0,xd.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,xd.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,Sd.jsx)("div",{className:"media-editor-canvas",children:(0,Sd.jsx)("div",{className:"media-editor-canvas__error",role:"alert",children:(0,Sd.jsx)("p",{children:(0,She.__)("Failed to load image.")})})}):(0,Sd.jsxs)("div",{className:"media-editor-canvas",children:[f==="loading"&&(0,Sd.jsx)("div",{className:"media-editor-canvas__spinner",children:(0,Sd.jsx)(_he.Spinner,{})}),(0,Sd.jsx)("div",{className:J("media-editor-canvas__cropper",{"is-loaded":f==="loaded"}),children:(0,Sd.jsx)(EN,{src:b,controller:i,aspectRatio:h,freeformCrop:!0,focusOnMount:e&&f==="loaded",showGrid:"interactive",isPlacementActive:t,onGestureStart:g,onGestureEnd:v})})]})}var Rhe=a(z(),1);var Uc=a(U(),1);var zT="data-crop-control",BYe=300;function Che(e={}){let{commitOnKeyUp:t=!0}=e,{beginGesture:r,endGesture:o}=Sa(),n=(0,Uc.useRef)(),i=(0,Uc.useCallback)(()=>{clearTimeout(n.current)},[]),s=(0,Uc.useCallback)(()=>{i(),n.current=setTimeout(()=>{o()},BYe)},[i,o]);(0,Uc.useEffect)(()=>i,[i]);let l=(0,Uc.useCallback)(()=>{i(),r()},[r,i]),c=(0,Uc.useCallback)(()=>{i(),o()},[i,o]),u=(0,Uc.useCallback)(()=>{r(),t||s()},[r,t,s]),d=(0,Uc.useCallback)(()=>{if(t){o();return}s()},[t,o,s]);return{[zT]:!0,onPointerDownCapture:l,onPointerUp:c,onPointerCancel:c,onKeyDownCapture:u,onKeyUp:d}}var Ab=a(U(),1);var dp=a(U(),1);function VYe(e,t,r){return-e/t*r}function AN(e,t,r){return e<t?t:e>r?r:e}function jYe(e,t){return Math.round(e/t)*t}function The(e){let{value:t,onChange:r,min:o,max:n,step:i,pixelsPerStep:s,disabled:l,onPointerDownStart:c}=e,u=(0,dp.useRef)({value:t,startX:0,startValue:0,activeStep:i,dragging:!1,captureElement:null,capturePointerId:0,windowPointerUp:null});(0,dp.useEffect)(()=>{u.current.value=t},[t]);let d=(0,dp.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,dp.useEffect)(()=>d,[d]);let f=(0,dp.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,dp.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,_=VYe(b,s,g.activeStep),y=g.startValue+_,w=jYe(y,g.activeStep),S=AN(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 cl=a(E(),1),IN=32,zYe=11,Ehe=15,HYe=4,UYe=8,WYe=14;function GYe(e,t){return(0,Ab.useMemo)(()=>{let r=[];for(let o=Math.ceil(e);o<=Math.floor(t);o+=1){let n="minor",i=HYe;o%15===0?(n="major",i=WYe):o%5===0&&(n="mid",i=UYe),r.push({value:o,kind:n,height:i})}return r},[e,t])}function Phe(e){let t=Math.round(e*10)/10;return Number.isInteger(t)?t.toFixed(0):t.toFixed(1)}function khe(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,Ab.useRef)(null),h=(0,Ab.useId)(),g=d??h,v=The({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",M=P.key==="ArrowLeft"||P.key==="ArrowDown";if(!T&&!M||(P.preventDefault(),f))return;let j=T?1:-1,F=P.shiftKey?i/2:i,D=AN(t+j*F,o,n);D!==t&&r(D)},_=`${Phe(t)}${l}`,y=GYe(o,n),w=c/i,S=(0,Ab.useMemo)(()=>({transform:`translateX(calc(-50% + ${-t*w}px))`}),[t,w]),x=Math.round(t/Ehe)*Ehe,A=Math.abs(t-x)<.01?`${x}`:Phe(t),k=A.startsWith("-"),R=k?A.slice(1):A,N=y.filter(P=>P.kind==="major");return(0,cl.jsxs)("div",{className:J("rotation-ruler",u),role:"presentation","data-disabled":f||void 0,...v,children:[(0,cl.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(AN(P.target.valueAsNumber,o,n)),onKeyDown:b}),(0,cl.jsx)("div",{className:"rotation-ruler__strip","aria-hidden":"true",children:(0,cl.jsxs)("svg",{className:"rotation-ruler__ticks",style:S,width:(n-o)*w,height:IN,viewBox:`${o*w} 0 ${(n-o)*w} ${IN}`,preserveAspectRatio:"xMidYMid meet",children:[y.map(P=>(0,cl.jsx)("line",{x1:P.value*w,x2:P.value*w,y1:IN-P.height,y2:IN,className:`rotation-ruler__tick rotation-ruler__tick--${P.kind}`},P.value)),N.map(P=>(0,cl.jsxs)("text",{x:P.value*w,y:zYe,textAnchor:"middle",className:"rotation-ruler__label",children:[P.value,l]},P.value))]})}),(0,cl.jsx)("div",{className:"rotation-ruler__active-label","aria-hidden":"true",children:(0,cl.jsxs)("span",{className:"rotation-ruler__active-label-number",children:[k&&(0,cl.jsx)("span",{className:"rotation-ruler__active-label-sign",children:"-"}),R,(0,cl.jsx)("span",{className:"rotation-ruler__active-label-unit",children:l})]})}),(0,cl.jsx)("div",{className:"rotation-ruler__pointer","aria-hidden":"true"})]})}var lW=a(E(),1);function Ahe({onPlacementControlInteraction:e}){let{state:t,setRotation:r}=Sa(),o=Che({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(-DT+.01,Math.min(DT-.01,u));e?.(),r(n+f*s)};return(0,lW.jsx)("div",{role:"presentation",className:"media-editor-fine-rotation",...o,children:(0,lW.jsx)(khe,{label:(0,Rhe.__)("Fine rotation"),min:-DT,max:DT,value:l,onChange:c})})}var ul=a(G(),1),Bs=a(z(),1);var cW=a(U(),1);function YYe(e){return[...BT.filter(t=>t.value<=0),...e??BT.filter(t=>t.value>0)]}function ON({aspectRatioPresets:e}={}){let t=Sa(),{aspectRatioValue:r}=t.cropOptions,o=t.state.image,n=(0,cW.useMemo)(()=>YYe(e),[e]),i=(0,cW.useMemo)(()=>s_(r,o),[r,o]);return{aspectRatioValue:r,setAspectRatioValue:t.setAspectRatioValue,aspectRatioOptions:n,resolvedAspectRatio:i,resetCropOptions:t.resetCropOptions}}var cr=a(E(),1),qYe=1.2;function NN({withLabels:e=!1,showAspectRatioControl:t=!1,aspectRatioPresets:r,zoomFactor:o=qYe}){let{state:n,setFlip:i,snapRotate90:s,setZoom:l}=Sa(),{aspectRatioValue:c,setAspectRatioValue:u,aspectRatioOptions:d}=ON({aspectRatioPresets:r}),f=!e&&t,m=e_(n),h=y=>{l(Math.min(al,Math.max(m,n.zoom*y)))},g=(0,cr.jsxs)(cr.Fragment,{children:[(0,cr.jsx)(ul.Button,{size:"compact",icon:o1,label:(0,Bs.__)("Rotate 90\xB0 counter-clockwise"),showTooltip:!0,onClick:()=>s(-1)}),(0,cr.jsx)(ul.Button,{size:"compact",icon:n1,label:(0,Bs.__)("Rotate 90\xB0 clockwise"),showTooltip:!0,onClick:()=>s(1)})]}),v=(0,cr.jsxs)(cr.Fragment,{children:[(0,cr.jsx)(ul.Button,{size:"compact",icon:AB,label:(0,Bs.__)("Flip horizontal"),showTooltip:!0,isPressed:n.flip.horizontal,onClick:()=>i({horizontal:!n.flip.horizontal,vertical:n.flip.vertical})}),(0,cr.jsx)(ul.Button,{size:"compact",icon:OB,label:(0,Bs.__)("Flip vertical"),showTooltip:!0,isPressed:n.flip.vertical,onClick:()=>i({horizontal:n.flip.horizontal,vertical:!n.flip.vertical})})]}),b=(0,cr.jsxs)(cr.Fragment,{children:[(0,cr.jsx)(ul.Button,{size:"compact",icon:yc,label:(0,Bs.__)("Zoom in"),showTooltip:!0,disabled:n.zoom>=al,accessibleWhenDisabled:!0,onClick:()=>h(o)}),(0,cr.jsx)(ul.Button,{size:"compact",icon:GB,label:(0,Bs.__)("Zoom out"),showTooltip:!0,disabled:n.zoom<=m,accessibleWhenDisabled:!0,onClick:()=>h(1/o)})]}),_=f?(0,cr.jsx)(ul.DropdownMenu,{icon:D4,label:(0,Bs.__)("Aspect ratio"),popoverProps:{placement:"top"},toggleProps:{size:"compact"},children:({onClose:y})=>(0,cr.jsx)(ul.MenuGroup,{label:(0,Bs.__)("Aspect ratio"),children:d.map(w=>{let S=w.value.toString(),x=S===c;return(0,cr.jsx)(ul.MenuItem,{role:"menuitemradio",isSelected:x,icon:x?Ro:void 0,onClick:()=>{u(S),y()},children:w.label},S)})})}):null;return e?(0,cr.jsxs)("div",{className:"media-editor-image-controls is-stacked",children:[(0,cr.jsxs)("div",{className:"media-editor-image-controls__transforms",children:[(0,cr.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,Bs.__)("Rotate"),children:[(0,cr.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,Bs.__)("Rotate")}),(0,cr.jsx)("div",{className:"media-editor-image-controls__buttons",children:g})]}),(0,cr.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,Bs.__)("Flip"),children:[(0,cr.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,Bs.__)("Flip")}),(0,cr.jsx)("div",{className:"media-editor-image-controls__buttons",children:v})]})]}),(0,cr.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,Bs.__)("Zoom"),children:[(0,cr.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,Bs.__)("Zoom")}),(0,cr.jsx)("div",{className:"media-editor-image-controls__buttons",children:b})]})]}):(0,cr.jsxs)("div",{className:"media-editor-image-controls",children:[g,v,b,_]})}var Ihe=a(G(),1);var uW=a(z(),1);var Ib=a(E(),1);function Ohe({aspectRatioValue:e,onAspectRatioChange:t,aspectRatioOptions:r,showTransformControls:o=!1}){return(0,Ib.jsxs)(oe,{direction:"column",gap:"xl",[zT]:!0,children:[(0,Ib.jsx)(Jt,{render:(0,Ib.jsx)("h2",{}),children:(0,uW.__)("Crop options")}),o&&(0,Ib.jsx)(NN,{withLabels:!0}),(0,Ib.jsx)(Ihe.SelectControl,{label:(0,uW.__)("Aspect ratio"),value:e,onChange:t,options:r.map(n=>({label:n.label,value:n.value.toString()}))})]})}var Nhe=a(G(),1),Mhe=a(U(),1),Vs=a(z(),1),HT=a(Oo(),1),Wc=a(E(),1),KYe=[{description:(0,Vs.__)("Undo"),keyCombination:{modifier:"primary",character:"z"}},{description:(0,Vs.__)("Redo"),keyCombination:{modifier:"primaryShift",character:"z"}},{description:(0,Vs.__)("Pan"),keyCombination:{character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,Vs.__)("Arrow keys")}},{description:(0,Vs.__)("Zoom in"),keyCombination:{character:"+"}},{description:(0,Vs.__)("Zoom out"),keyCombination:{character:"-"}},{description:(0,Vs.__)("Rotate 90\xB0 clockwise"),keyCombination:{character:"R"}},{description:(0,Vs.__)("Rotate 90\xB0 counter-clockwise"),keyCombination:{modifier:"shift",character:"R"}},{description:(0,Vs.__)("Flip horizontal"),keyCombination:{character:"H"}},{description:(0,Vs.__)("Flip vertical"),keyCombination:{character:"V"}},{description:(0,Vs.__)("Pan or resize crop (large step)"),keyCombination:{modifier:"shift",character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,Vs.__)("Shift + Arrow keys")}}];function ZYe({keyCombination:e}){let{modifier:t,character:r,ariaLabel:o}=e,n;Array.isArray(r)?t?n=[...HT.displayShortcutList[t](r[0]).slice(0,-1),...r]:n=r:n=t?HT.displayShortcutList[t](r):[r];let i=Array.isArray(r)?r.join(""):r,s;return o?s=o:t?s=HT.shortcutAriaLabel[t](i):s=i,(0,Wc.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-term","aria-label":s,children:n.map((l,c)=>l==="+"&&t?(0,Wc.jsx)(Mhe.Fragment,{children:l},c):(0,Wc.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-key",children:l},c))})}function Fhe({onClose:e}){return(0,Wc.jsxs)(Nhe.Modal,{className:"media-editor-keyboard-shortcuts-modal",title:(0,Vs.__)("Keyboard shortcuts"),onRequestClose:e,children:[(0,Wc.jsx)("p",{className:"media-editor-keyboard-shortcuts-modal__note",children:(0,Vs.__)("These shortcuts work when the image editor has focus.")}),(0,Wc.jsx)("ul",{className:"media-editor-keyboard-shortcuts-modal__shortcut-list",role:"list",children:KYe.map(({description:t,keyCombination:r},o)=>(0,Wc.jsxs)("li",{className:"media-editor-keyboard-shortcuts-modal__shortcut",children:[(0,Wc.jsx)("span",{className:"media-editor-keyboard-shortcuts-modal__shortcut-description",children:t}),(0,Wc.jsx)(ZYe,{keyCombination:r})]},o))})]})}var Lhe=a(Fu(),1),UT=a(Y(),1),dW=a(ne(),1),FN=a(U(),1),Ob=a(z(),1),Bhe=a(It(),1);var MN=.1;function Dhe(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}=Zn(t.width,t.height,m),{width:v,height:b}=Zn(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,N=S+k,P=R/v*100,T=N/b*100,M=x/v*100,j=C/b*100;return P<=MN&&T<=MN&&M>=100-MN&&j>=100-MN||r.push({type:"crop",args:{left:P,top:T,width:M,height:j}}),r}var XYe=["title","caption","description","alt_text","post"],WT="media-editor";function QYe(e){return!e.isCropperDirty||!e.state.image?[]:Dhe(e.state,{width:e.state.image.naturalWidth,height:e.state.image.naturalHeight})}function JYe(e,t){let r={};for(let o of XYe)e&&o in e&&(r[o]=e[o]);return!("post"in r)&&t?.post!==void 0&&(r.post=t.post),r}function Vhe({cropper:e,id:t,isImage:r,media:o,onSaved:n}){let i=(0,UT.useRegistry)(),{clearEntityRecordEdits:s,receiveEntityRecords:l,saveEditedEntityRecord:c}=(0,UT.useDispatch)(dW.store),{createErrorNotice:u,removeAllNotices:d}=(0,UT.useDispatch)(Bhe.store),[f,m]=(0,FN.useState)(!1),h=(0,FN.useCallback)(async()=>{d("snackbar",WT),m(!0);try{let g,v=QYe(e),b=v.length>0&&o?{id:t,url:o.source_url}:void 0;if(v.length>0){let y=i.select(dW.store).getEntityRecordNonTransientEdits("postType","attachment",t),w=JYe(y,o);g=await(0,Lhe.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,Ob.__)("An unknown error occurred.");u(r?(0,Ob.sprintf)((0,Ob.__)("Could not save image. %s"),v):(0,Ob.sprintf)((0,Ob.__)("Could not save media. %s"),v),{type:"snackbar",context:WT})}finally{m(!1)}},[s,u,e,t,r,o,n,l,i,d,c]);return{isSaving:f,save:h}}var ct=a(E(),1),jhe={_embed:"author,wp:attached-to"},$Ye=300;function eqe({tabs:e}){return(0,ct.jsx)(Ul,{scope:"media-editor",identifier:"media-editor/details",title:(0,Xn.__)("Details"),icon:mf,isActiveByDefault:!0,className:"media-editor__sidebar",panelClassName:"media-editor__sidebar-panel",headerClassName:"media-editor__sidebar-header",closeLabel:(0,Xn.__)("Close media panel"),header:(0,ct.jsx)(Tn.List,{variant:"minimal",children:e.map(t=>(0,ct.jsx)(Tn.Tab,{value:t.id,children:t.title},t.id))}),children:e.map(t=>(0,ct.jsx)(Tn.Panel,{value:t.id,tabIndex:-1,children:t.panel},t.id))})}function tqe({isSaving:e,isImage:t,showCloseButton:r=!1,onCancel:o}){let[n,i]=(0,hn.useState)(!1);return(0,ct.jsxs)(Ji.Flex,{className:"media-editor__header-actions",justify:"flex-end",expanded:!1,gap:2,children:[t&&(0,ct.jsx)(Ji.Button,{size:"compact",icon:Zx,label:(0,Xn.__)("Keyboard shortcuts"),onClick:()=>i(!0)}),(0,ct.jsx)(Oh.Slot,{scope:"media-editor"}),r&&(0,ct.jsx)(Ji.Button,{size:"compact",icon:jx,label:(0,Xn.__)("Close"),onClick:o,disabled:e,accessibleWhenDisabled:!0}),n&&(0,ct.jsx)(Fhe,{onClose:()=>i(!1)})]})}function rqe({isUndoRedoDisabled:e=!1,onReset:t}){let{reset:r,isDirty:o,hasUndo:n,hasRedo:i,undo:s,redo:l,beginGesture:c,endGesture:u}=Sa(),d=()=>{e||s()},f=()=>{e||l()};return(0,ct.jsxs)(Ji.Flex,{className:"media-editor__history-actions",expanded:!1,gap:2,children:[(0,ct.jsx)(Ji.Button,{size:"compact",variant:"tertiary",disabled:!o,accessibleWhenDisabled:!0,onClick:()=>{c(),r(),t(),u()},children:(0,Xn.__)("Reset")}),(0,ct.jsx)(Ji.Button,{size:"compact",icon:iv,label:(0,Xn.__)("Undo"),showTooltip:!0,shortcut:Gc.displayShortcut.primary("z"),disabled:e||!n,accessibleWhenDisabled:!0,onClick:d}),(0,ct.jsx)(Ji.Button,{size:"compact",icon:rv,label:(0,Xn.__)("Redo"),showTooltip:!0,shortcut:(0,Gc.isAppleOS)()?Gc.displayShortcut.primaryShift("z"):Gc.displayShortcut.primary("y"),disabled:e||!i,accessibleWhenDisabled:!0,onClick:f})]})}function oqe({isSaving:e,hasMedia:t,hasChanges:r,onCancel:o,onSave:n}){let i=e||!t||!r;return(0,ct.jsxs)(Ji.Flex,{className:"media-editor__footer-actions",justify:"flex-end",expanded:!1,gap:2,children:[(0,ct.jsx)(Ji.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:o,disabled:e,accessibleWhenDisabled:!0,children:(0,Xn.__)("Cancel")}),(0,ct.jsx)(Ji.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:n,isBusy:e,disabled:i,accessibleWhenDisabled:!0,children:(0,Xn.__)("Save")})]})}function nqe({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=Sa(),f=(0,zhe.useViewportMatch)("small"),m=f?"wide":"narrow",{media:h,hasEdits:g}=(0,GT.useSelect)(se=>{let{getEditedEntityRecord:Ae,getEntityRecord:ye,hasEditsForEntityRecord:Se}=se(fW.store);return ye("postType","attachment",t,jhe),{media:Ae("postType","attachment",t),hasEdits:Se("postType","attachment",t)}},[t]),v=d.isCropperDirty||g,{clearEntityRecordEdits:b,editEntityRecord:_,invalidateResolution:y}=(0,GT.useDispatch)(fW.store),{removeAllNotices:w}=(0,GT.useDispatch)(DN.store),[S,x]=(0,hn.useState)(!1),[C,A]=(0,hn.useState)(!1),[k,R]=(0,hn.useState)(!1),N=(0,hn.useRef)(),P=(0,hn.useCallback)(()=>{A(!0),clearTimeout(N.current),N.current=setTimeout(()=>{A(!1)},$Ye)},[]),T=(0,hn.useCallback)(()=>{R(!0)},[]),M=(0,hn.useCallback)(()=>{R(!1)},[]),j=C||k;(0,hn.useEffect)(()=>()=>{clearTimeout(N.current)},[]),(0,hn.useEffect)(()=>{A(!1),R(!1)},[t]),(0,hn.useEffect)(()=>{y("getEntityRecord",["postType","attachment",t,jhe])},[t,y]);let F=qv(h?.mime_type).type,D=!!h&&F==="image",{aspectRatioValue:B,setAspectRatioValue:L,aspectRatioOptions:O,resetCropOptions:V}=ON({aspectRatioPresets:r}),{isSaving:W,save:q}=Vhe({cropper:d,id:t,isImage:D,media:h,onSaved:n}),Z=(0,hn.useMemo)(()=>{let se={id:"details",title:(0,Xn.__)("Details"),panel:(0,ct.jsx)(oe,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,ct.jsx)(Fpe,{})})};return D?[{id:"crop",title:(0,Xn.__)("Crop"),panel:(0,ct.jsx)(oe,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,ct.jsx)(Ohe,{aspectRatioValue:B,onAspectRatioChange:L,aspectRatioOptions:O,showTransformControls:f})})},se]:[se]},[D,B,L,O,f]),[Q,ce]=(0,hn.useState)(),te=Q??Z[0]?.id,de=se=>{_("postType","attachment",t,se)},me=()=>{w("snackbar",WT),b("postType","attachment",t),o?.()},ee=()=>{if(!W){if(v){x(!0);return}me()}},$=se=>{let Ae=Gc.isKeyboardEvent.primary(se,"z"),ye=Gc.isKeyboardEvent.primaryShift(se,"z")||!(0,Gc.isAppleOS)()&&Gc.isKeyboardEvent.primary(se,"y");if((Ae||ye)&&D){let Se=se.target;if(!((Se.tagName==="INPUT"||Se.tagName==="TEXTAREA"||Se.isContentEditable)&&!Se.closest(`[${zT}]`))){if(se.preventDefault(),j)return;ye?d.redo():d.undo()}}if(u){if(se.code!=="Escape"&&se.key!=="Escape")return;if(W){se.preventDefault();return}v&&(se.preventDefault(),x(!0))}},ue=(0,ct.jsx)(DN.SnackbarNotices,{className:s,context:WT}),ve=D?(0,ct.jsx)(Ahe,{onPlacementControlInteraction:P}):null,Ee=(0,ct.jsxs)(Gse,{value:h??void 0,onChange:de,settings:{fields:e},children:[h?(0,ct.jsxs)(Tn.Root,{className:"media-editor",value:te,onValueChange:se=>ce(se),children:[(0,ct.jsx)(eqe,{tabs:Z}),(0,ct.jsx)(Tb,{className:"media-editor__skeleton",labels:{body:D?(0,Xn.__)("Image editor"):(0,Xn.__)("Media preview"),sidebar:(0,Xn.__)("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)(xhe,{focusOnMount:!0,isPlacementActive:C,onGestureStart:T,onGestureEnd:M}):(0,ct.jsx)(Kse,{})}),D&&(0,ct.jsx)("div",{className:"media-editor__canvas-toolbar",children:ve})]}),sidebar:(0,ct.jsx)(Ul.Slot,{scope:"media-editor"})})]}):(0,ct.jsx)("div",{className:"media-editor",children:(0,ct.jsx)("div",{className:"media-editor__loading",children:(0,ct.jsx)(Ji.Spinner,{})})}),(0,ct.jsx)(Ji.__experimentalConfirmDialog,{isOpen:S,confirmButtonText:(0,Xn.__)("Discard"),cancelButtonText:(0,Xn.__)("Keep editing"),onCancel:()=>x(!1),onConfirm:()=>{x(!1),me()},children:(0,Xn.__)("Are you sure you want to discard your unsaved changes?")}),l?(0,hn.createPortal)(ue,l):ue]}),ie=D?(0,ct.jsx)(rqe,{isUndoRedoDisabled:j,onReset:V}):null,ae=D?(0,ct.jsx)(NN,{showAspectRatioControl:!0,aspectRatioPresets:r}):null,pe=(0,ct.jsx)(oqe,{isSaving:W,hasMedia:!!h,hasChanges:v,onCancel:ee,onSave:q}),le;return m==="wide"?le=(0,ct.jsxs)(ct.Fragment,{children:[ie,pe]}):le=(0,ct.jsxs)(ct.Fragment,{children:[ae,(0,ct.jsxs)("div",{className:"media-editor-modal__footer-row",children:[ie,pe]})]}),i({children:Ee,headerActions:(0,ct.jsx)(tqe,{isSaving:W,isImage:D,showCloseButton:c,onCancel:ee}),footerActions:le,footerLayout:m,onRequestClose:ee,onKeyDown:$,shouldCloseOnClickOutside:!v&&!W,isSaving:W,hasChanges:v,hasMedia:!!h})}function pW(e){return(0,ct.jsx)(aW,{children:(0,ct.jsx)(nqe,{...e})},e.id)}var Hhe=pW;var a_=a(E(),1);function Yhe({fields:e=[],aspectRatioPresets:t}){let{isModalOpen:r,id:o,onUpdate:n,onClose:i}=(0,qT.useSelect)(f=>{let{isOpen:m,getId:h,getOnUpdate:g,getOnClose:v}=f(Zw);return{isModalOpen:m(),id:h(),onUpdate:g(),onClose:v()}},[]),{closeMediaEditorModal:s}=(0,qT.useDispatch)(Zw),{createSuccessNotice:l}=(0,qT.useDispatch)(Ghe.store);if(!r||!o)return null;let c=typeof document>"u"?null:document.body,u=f=>{f.stopPropagation()},d=()=>{s(),i?.()};return(0,a_.jsx)(Hhe,{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,YT.__)("Image edited."),{type:"snackbar",actions:[{label:(0,YT.__)("Undo"),onClick:()=>{n({id:h.id,url:h.url})}}]})},renderFrame:({children:f,headerActions:m,footerActions:h,footerLayout:g,onRequestClose:v,onKeyDown:b,shouldCloseOnClickOutside:_})=>(0,a_.jsx)(Whe.ShortcutProvider,{className:"media-editor-modal__shortcut-scope",onKeyDown:u,children:(0,a_.jsxs)(Uhe.Modal,{className:"media-editor-modal",title:(0,YT.__)("Edit media"),size:"fill",isDismissible:!1,shouldCloseOnClickOutside:_,onKeyDown:b,onRequestClose:v,headerActions:m,children:[f,(0,a_.jsx)("div",{className:`media-editor-modal__footer is-${g}`,role:"region","aria-label":(0,YT.__)("Editor actions"),children:h})]})})})}var l_={};Lpe(l_,{store:Zw,MediaEditor:pW,MediaEditorModal:Yhe});var so=a(z(),1),Yc=a(Y(),1),LN=a(Lt(),1),jh=a(ne(),1),Vh=(e,t)=>`<a ${mW(e)}>${t}</a>`,mW=e=>`href="${e}" target="_blank" rel="noopener"`,iqe=(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},sqe=e=>{let{title:t,foreign_landing_url:r,creator:o,creator_url:n,license:i,license_version:s,license_url:l}=e,c=iqe(i,s),u=(0,LN.decodeEntities)(o),d;return u?d=t?(0,so.sprintf)((0,so._x)('"%1$s" by %2$s/ %3$s',"caption"),Vh(r,(0,LN.decodeEntities)(t)),n?Vh(n,u):u,l?Vh(`${l}?ref=openverse`,c):c):(0,so.sprintf)((0,so._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),mW(r),n?Vh(n,u):u,l?Vh(`${l}?ref=openverse`,c):c):d=t?(0,so.sprintf)((0,so._x)('"%1$s"/ %2$s',"caption"),Vh(r,(0,LN.decodeEntities)(t)),l?Vh(`${l}?ref=openverse`,c):c):(0,so.sprintf)((0,so._x)("<a %1$s>Work</a>/ %2$s","caption"),mW(r),l?Vh(`${l}?ref=openverse`,c):c),d.replace(/\s{2}/g," ")},hW=(e={})=>({...e,orderBy:e?.search?"relevance":"date"}),aqe=async(e={})=>{let t=hW(e),r=await(0,Yc.resolveSelect)(jh.store).getEntityRecords("postType","attachment",t),o=(0,Yc.select)(jh.store).getEntityRecordsTotalItems("postType","attachment",t),n=(0,Yc.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}},Zhe=(e,t={})=>({...t,media_type:"image",parent:e}),lqe=e=>{let t=typeof e=="number"?e:Number(e);return Number.isInteger(t)&&t>0?t:void 0},qhe=(e,t)=>(0,Yc.dispatch)(jh.store).saveEntityRecord("postType","attachment",{id:e,post:t},{throwOnError:!0}),cqe=e=>e?.media_type||e?.mime_type?.split("/")[0]||e?.type,uqe=e=>[...new Set((Array.isArray(e)?e:[e]).filter(t=>cqe(t)==="image").map(t=>t?.id).filter(Boolean))],dqe=(e,t={})=>{let{invalidateResolution:r}=(0,Yc.dispatch)(jh.store);r("getEntityRecords",["postType","attachment",hW(Zhe(e,t))])},fqe=(e,t)=>{let r=()=>(0,Yc.select)(jh.store).hasFinishedResolution("getEntityRecords",e),o=r();return(0,Yc.subscribe)(()=>{let n=r();o&&!n&&t(),o=n},jh.store)},BN=({getQuery:e,...t})=>({...t,async fetch(r={}){return aqe(e(r))},subscribe(r,o={}){return fqe(["postType","attachment",hW(e(o))],r)}}),pqe=(e,t)=>BN({name:"attached-images",labels:{name:(0,so.__)("Attached images"),search_items:(0,so.__)("Search attachments")},mediaType:"image",getQuery:r=>Zhe(e,r),postTypeLabel:t,emptyMessage:t?(0,so.sprintf)((0,so.__)("No images attached to this %s."),t):(0,so.__)("No images attached to this post."),async attach(r){let o=uqe(r);return await Promise.all(o.map(n=>qhe(n,e))),o.length},async detach(r){await qhe(r.id,0)},invalidate(r={}){dqe(e,r)}}),Khe=[BN({name:"images",labels:{name:(0,so.__)("Images"),search_items:(0,so.__)("Search images")},mediaType:"image",getQuery:e=>({...e,media_type:"image"})}),BN({name:"videos",labels:{name:(0,so.__)("Videos"),search_items:(0,so.__)("Search videos")},mediaType:"video",getQuery:e=>({...e,media_type:"video"})}),BN({name:"audio",labels:{name:(0,so.__)("Audio"),search_items:(0,so.__)("Search audio")},mediaType:"audio",getQuery:e=>({...e,media_type:"audio"})}),{name:"openverse",labels:{name:(0,so.__)("Openverse"),search_items:(0,so.__)("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:sqe(c),previewUrl:c.thumbnail}))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}];function Xhe(e,t){let r=lqe(e);return!r||!t?Khe:[pqe(r,t),...Khe]}var Qhe=a(Y(),1),Jhe=a(ne(),1);function $he(e){let{invalidateResolution:t}=(0,Qhe.dispatch)(Jhe.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(yf(),1);var{sideloadMedia:mqe}=K(ege.privateApis),tge=mqe;var rge=a(Fu(),1),oge=a(Y(),1),nge=a(yf(),1);var hqe=()=>{};function ige({url:e,onSuccess:t,onError:r=hqe}){let o=(0,oge.select)(I).getCurrentPost(),n=typeof o?.id=="number"?o.id:o?.wp_id;(0,rge.default)({path:"/wp/v2/media",method:"POST",data:{url:e,...n?{post:n}:{}}}).then(s=>{t?.((0,nge.transformAttachment)(s))}).catch(s=>{r(s?.message||s)})}var sge=a(Fu(),1),age=a(yf(),1);async function lge(e,t=[]){let r=await(0,sge.default)({path:`/wp/v2/media/${e}/finalize`,method:"POST",data:{sub_sizes:t}});return r?(0,age.transformAttachment)(r):void 0}var cge=a(Fu(),1);async function uge(e){await(0,cge.default)({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"})}var r0e=a(ne(),1),o0e=a(Y(),1),JW=a(U(),1);var R_=a(G(),1),OM=a(At(),1),Kye=a(Y(),1),Zye=a(be(),1),Xh=a(U(),1),qW=a(ke(),1);var gW=a(U(),1);var dge=a(U(),1),rn=(0,dge.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var fge=a(E(),1);function KT({children:e,value:t,baseValue:r,onChange:o,fontLibraryEnabled:n}){let i=(0,gW.useMemo)(()=>Oi(r,t),[r,t]),s=(0,gW.useMemo)(()=>({user:t,base:r,merged:i,onChange:o,fontLibraryEnabled:n}),[t,r,i,o,n]);return(0,fge.jsx)(rn.Provider,{value:s,children:e})}var So=a(G(),1),Lb=a(z(),1);var Dge=a(Y(),1),Lge=a(ne(),1);var pge=a(E(),1);function ZT({className:e,...t}){return(0,pge.jsx)(xn,{className:J(e,"global-styles-ui-icon-with-current-color"),...t})}var zh=a(G(),1);var Nb=a(E(),1);function gqe({icon:e,children:t,...r}){return(0,Nb.jsxs)(zh.__experimentalItem,{...r,children:[e&&(0,Nb.jsxs)(zh.__experimentalHStack,{justify:"flex-start",children:[(0,Nb.jsx)(ZT,{icon:e,size:24}),(0,Nb.jsx)(zh.FlexItem,{children:t})]}),!e&&t]})}function _o(e){return(0,Nb.jsx)(zh.Navigator.Button,{as:gqe,...e})}var Tge=a(G(),1);var Mb=a(z(),1),Ege=a(be(),1);var vW=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*vW(e.r)+.7152*vW(e.g)+.0722*vW(e.b)};function VN(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 Gl=a(U(),1),Sge=a(Y(),1),xge=a(ne(),1),wW=a(z(),1);var on=a(z(),1);var mge=a(vf(),1),{lock:Tqt,unlock:Tt}=(0,mge.__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:vqe}=Tt(Nu),hge={link:[{value:":link",label:(0,on.__)("Link")},{value:":any-link",label:(0,on.__)("Any Link")},{value:":visited",label:(0,on.__)("Visited")},{value:":hover",label:(0,on.__)("Hover")},{value:":focus",label:(0,on.__)("Focus")},{value:":focus-visible",label:(0,on.__)("Focus-visible")},{value:":active",label:(0,on.__)("Active")}],button:[{value:":link",label:(0,on.__)("Link")},{value:":any-link",label:(0,on.__)("Any Link")},{value:":visited",label:(0,on.__)("Visited")},{value:":hover",label:(0,on.__)("Hover")},{value:":focus",label:(0,on.__)("Focus")},{value:":focus-visible",label:(0,on.__)("Focus-visible")},{value:":active",label:(0,on.__)("Active")}]},gge={"core/button":[{value:":hover",label:(0,on.__)("Hover")},{value:":focus",label:(0,on.__)("Focus")},{value:":focus-visible",label:(0,on.__)("Focus-visible")},{value:":active",label:(0,on.__)("Active")}]},bqe=[{value:"@tablet",label:(0,on.__)("Tablet")},{value:"@mobile",label:(0,on.__)("Mobile")}];function bge(e){return gge[e]?gge[e]??[]:hge[e]?hge[e]:[]}function yge(e){let t=vqe(e);return bqe.filter(r=>(r.value!=="@tablet"||t.tablet!==void 0)&&(r.value!=="@mobile"||t.mobile!==void 0))}function yW(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"&&yW(e[r],t);return e}var jN=(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=jN(e[o],t);Object.keys(n).length&&(r[o]=n)}}),r};function XT(e,t){let r=jN(structuredClone(e),t);return av(r,e)}function vge(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 wge(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=vge(o,n),s=e?.styles?.elements?.heading?.typography?.fontFamily,l;return s?l=vge(o,e?.styles?.elements?.heading?.typography?.fontFamily):l=i,[i,l]}function _ge(e){return e?`is-style-${e}`:""}function zN(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}c2([VN]);function Ge(e,t,r="merged",o=!0,n){let{user:i,base:s,merged:l,onChange:c}=(0,Gl.useContext)(rn),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,Gl.useMemo)(()=>{let b=n0(h,m,t,o);return d?b?.[d]??{}:b},[h,m,t,o,d]),v=(0,Gl.useCallback)(b=>{let _=b;d&&(_={...n0(i,m,t,!1),[d]:b});let y=m1(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,Gl.useContext)(rn),l=i;r==="base"?l=n:r==="user"&&(l=o);let c=(0,Gl.useMemo)(()=>sv(l,e,t),[l,e,t]),u=(0,Gl.useCallback)(d=>{let f=u1(o,e,d,t);s(f)},[o,s,e,t]);return[c,u]}var yqe=[];function wqe({title:e,settings:t,styles:r}){return e===(0,wW.__)("Default")||Object.keys(t||{}).length>0||Object.keys(r||{}).length>0}function HN(e=[]){let{variationsFromTheme:t}=(0,Sge.useSelect)(o=>({variationsFromTheme:o(xge.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||yqe}),[]),{user:r}=(0,Gl.useContext)(rn);return(0,Gl.useMemo)(()=>{let o=structuredClone(r),n=yW(o,e);n.title=(0,wW.__)("Default");let i=t.filter(l=>XT(l,e)).map(l=>Oi(n,l)),s=[n,...i];return s?.length?s.filter(wqe):[]},[e,r,t])}function Cge(e){let[t,r]=Le("color.palette.theme",e),o=(0,Gl.useCallback)(()=>{if(!t||!t.length)return;let n=Math.floor(Math.random()*225),i=t.map(s=>{let{color:l}=s,c=Ao(l).rotate(n).toHex();return{...s,color:c}});r(i)},[t,r]);return window.__experimentalEnableColorRandomizer?[o]:[]}var qc=a(E(),1),{useHasDimensionsPanel:_qe,useHasTypographyPanel:Sqe,useHasColorPanel:xqe,useSettingsForBlockElement:Cqe,useHasBackgroundPanel:Tqe}=Tt(Ege.privateApis);function Eqe(){let[e]=Le(""),t=Cqe(e),r=Tqe(e),o=Sqe(t),n=xqe(t),i=!0,l=_qe(t);return(0,qc.jsx)(qc.Fragment,{children:(0,qc.jsxs)(Tge.__experimentalItemGroup,{children:[o&&(0,qc.jsx)(_o,{icon:jV,path:"/typography",children:(0,Mb.__)("Typography")}),n&&(0,qc.jsx)(_o,{icon:pB,path:"/colors",children:(0,Mb.__)("Colors")}),r&&(0,qc.jsx)(_o,{icon:j4,path:"/background","aria-label":(0,Mb.__)("Background styles"),children:(0,Mb.__)("Background")}),i&&(0,qc.jsx)(_o,{icon:a1,path:"/shadows",children:(0,Mb.__)("Shadows")}),l&&(0,qc.jsx)(_o,{icon:Ya,path:"/layout",children:(0,Mb.__)("Layout")})]})})}var Pge=Eqe;var Cd=a(G(),1);function c_(){let[e="black"]=Ge("color.text"),[t="white"]=Ge("color.background"),[r=e]=Ge("elements.h1.color.text"),[o=r]=Ge("elements.link.color.text"),[n=o]=Ge("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 Age=a(U(),1),Ige=a(G(),1),SW=a(z(),1);function Pqe(e,t){return t.length===0?null:(t.sort((r,o)=>Math.abs(e-r)-Math.abs(e-o)),t[0])}function kqe(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 kge(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 _W(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 Fb(e){let t={fontFamily:kge(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=kqe(r),n=Pqe(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 Rge(e){return{fontFamily:kge(e.fontFamily),fontStyle:e.fontStyle||"normal",fontWeight:e.fontWeight||"400"}}var QT=a(E(),1);function UN({fontSize:e,variation:t}){let{base:r}=(0,Age.useContext)(rn),o=r;t&&(o={...r,...t});let[n]=Ge("color.text"),[i,s]=wge(o),l=i?Fb(i):{},c=s?Fb(s):{};return n&&(l.color=n,c.color=n),e&&(l.fontSize=e,c.fontSize=e),(0,QT.jsxs)(Ige.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,QT.jsx)("span",{style:c,children:(0,SW._x)("A","Uppercase letter A")}),(0,QT.jsx)("span",{style:l,children:(0,SW._x)("a","Lowercase letter A")})]})}var Oge=a(G(),1);var Nge=a(E(),1);function Mge({normalizedColorSwatchSize:e,ratio:t}){let{highlightedColors:r}=c_(),o=e*t;return r.map(({slug:n,color:i},s)=>(0,Nge.jsx)(Oge.__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 Fge=a(G(),1),u_=a(ke(),1),Db=a(U(),1);var fp=a(E(),1),xW=248,CW=152,Rqe={leading:!0,trailing:!0};function Aqe({children:e,label:t,isFocused:r,withHoverView:o}){let[n="white"]=Ge("color.background"),[i]=Ge("color.gradient"),s=(0,u_.useReducedMotion)(),[l,c]=(0,Db.useState)(!1),[u,{width:d}]=(0,u_.useResizeObserver)(),[f,m]=(0,Db.useState)(d),[h,g]=(0,Db.useState)(),v=(0,u_.useThrottle)(m,250,Rqe);(0,Db.useLayoutEffect)(()=>{d&&v(d)},[d,v]),(0,Db.useLayoutEffect)(()=>{let w=f?f/xW:1,S=w-(h||0);(Math.abs(S)>.1||!h)&&g(w)},[f,h]);let b=d?d/xW:1,_=h||b,y=!!d;return(0,fp.jsxs)(fp.Fragment,{children:[(0,fp.jsx)("div",{style:{position:"relative"},children:u}),!y&&(0,fp.jsx)(Y9,{className:"global-styles-ui-preview__wrapper",style:{aspectRatio:xW/CW}}),y&&(0,fp.jsx)("div",{className:J("global-styles-ui-preview__wrapper",{"is-hoverable":o}),style:{height:CW*_},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:(0,fp.jsx)(Fge.__unstableMotion.div,{style:{height:CW*_,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 d_=Aqe;var xa=a(E(),1),Iqe={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Oqe={hover:{opacity:1},start:{opacity:.5}},Nqe={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function Mqe({label:e,isFocused:t,withHoverView:r,variation:o}){let[n]=Ge("typography.fontWeight"),[i="serif"]=Ge("typography.fontFamily"),[s=i]=Ge("elements.h1.typography.fontFamily"),[l=n]=Ge("elements.h1.typography.fontWeight"),[c="black"]=Ge("color.text"),[u=c]=Ge("elements.h1.color.text"),{paletteColors:d}=c_();return(0,xa.jsxs)(d_,{label:e,isFocused:t,withHoverView:r,children:[({ratio:f,key:m})=>(0,xa.jsx)(Cd.__unstableMotion.div,{variants:Iqe,style:{height:"100%",overflow:"hidden"},children:(0,xa.jsxs)(Cd.__experimentalHStack,{spacing:10*f,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,xa.jsx)(UN,{fontSize:65*f,variation:o}),(0,xa.jsx)(Cd.__experimentalVStack,{spacing:4*f,children:(0,xa.jsx)(Mge,{normalizedColorSwatchSize:32,ratio:f})})]})},m),({key:f})=>(0,xa.jsx)(Cd.__unstableMotion.div,{variants:r?Oqe:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,xa.jsx)(Cd.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:d.slice(0,4).map(({color:m},h)=>(0,xa.jsx)("div",{style:{height:"100%",background:m,flexGrow:1}},h))})},f),({ratio:f,key:m})=>(0,xa.jsx)(Cd.__unstableMotion.div,{variants:Nqe,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,xa.jsx)(Cd.__experimentalVStack,{spacing:3*f,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*f,boxSizing:"border-box"},children:e&&(0,xa.jsx)("div",{style:{fontSize:40*f,fontFamily:s,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},m)]})}var WN=Mqe;var zo=a(E(),1);function Fqe(){let e=(0,Dge.useSelect)(t=>{let{__experimentalGetCurrentThemeGlobalStylesVariations:r}=t(Lge.store);return!!r()?.length},[]);return(0,zo.jsxs)(So.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-root",isRounded:!1,children:[(0,zo.jsx)(So.CardBody,{children:(0,zo.jsxs)(So.__experimentalVStack,{spacing:4,children:[(0,zo.jsx)(So.Card,{className:"global-styles-ui-screen-root__active-style-tile",children:(0,zo.jsx)(So.CardMedia,{className:"global-styles-ui-screen-root__active-style-tile-preview",children:(0,zo.jsx)(WN,{})})}),e&&(0,zo.jsx)(So.__experimentalItemGroup,{children:(0,zo.jsx)(_o,{path:"/variations",children:(0,zo.jsxs)(So.__experimentalHStack,{justify:"space-between",children:[(0,zo.jsx)(So.FlexItem,{children:(0,Lb.__)("Browse styles")}),(0,zo.jsx)(ZT,{icon:(0,Lb.isRTL)()?kr:hr})]})})}),(0,zo.jsx)(Pge,{})]})}),(0,zo.jsx)(So.CardDivider,{}),(0,zo.jsxs)(So.CardBody,{children:[(0,zo.jsx)(So.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4,children:(0,Lb.__)("Customize the appearance of specific blocks for the whole site.")}),(0,zo.jsx)(So.__experimentalItemGroup,{children:(0,zo.jsx)(_o,{path:"/blocks",children:(0,zo.jsxs)(So.__experimentalHStack,{justify:"space-between",children:[(0,zo.jsx)(So.FlexItem,{children:(0,Lb.__)("Blocks")}),(0,zo.jsx)(ZT,{icon:(0,Lb.isRTL)()?kr:hr})]})})})]})]})}var Bge=Fqe;var EW=a(At(),1),Td=a(z(),1),Hh=a(G(),1),PW=a(Y(),1),Ed=a(U(),1),YN=a(be(),1),Wge=a(ke(),1),Gge=a(Pl(),1);var Vge=a(At(),1),jge=a(Y(),1),zge=a(G(),1);var TW=a(E(),1);function Dqe(e,t){return e?.filter(r=>r.source==="block"||t.includes(r.name))||[]}function JT(e){let t=(0,jge.useSelect)(n=>{let{getBlockStyles:i}=n(Vge.store);return i(e)},[e]),[r]=Ge("variations",e),o=Object.keys(r??{});return Dqe(t,o)}function Hge({name:e}){let t=JT(e);return(0,TW.jsx)(zge.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((r,o)=>r?.isDefault?null:(0,TW.jsx)(_o,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(r.name),children:r.label},o))})}var Qn=a(G(),1),GN=a(z(),1);var Uge=a(be(),1);var js=a(E(),1),{StateControl:Lqe,StateControlBadges:Bqe}=Tt(Uge.privateApis);function nr({title:e,description:t,onBack:r,viewportStates:o,pseudoStates:n,selectedViewport:i="default",selectedPseudoState:s="default",onChangeViewport:l,onChangePseudoState:c}){return(0,js.jsx)(Qn.__experimentalVStack,{spacing:0,children:(0,js.jsx)(Qn.__experimentalView,{children:(0,js.jsx)(Qn.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,js.jsxs)(Qn.__experimentalVStack,{spacing:2,children:[(0,js.jsxs)(Qn.__experimentalHStack,{spacing:2,alignment:"top",children:[(0,js.jsx)(Qn.Navigator.BackButton,{icon:(0,GN.isRTL)()?hr:kr,size:"small",label:(0,GN.__)("Back"),onClick:r}),(0,js.jsx)(Qn.__experimentalSpacer,{children:(0,js.jsxs)(Qn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,js.jsx)(Qn.__experimentalHeading,{className:"global-styles-ui-header",level:2,size:13,children:e}),(0,js.jsxs)(Qn.__experimentalVStack,{spacing:2,alignment:"right",children:[(0,js.jsx)(Lqe,{viewportStates:o,pseudoStates:n,viewportValue:i,pseudoStateValue:s,onChangeViewport:l,onChangePseudoState:c}),(0,js.jsx)(Bqe,{viewportStates:o,pseudoStates:n,viewportValue:i,pseudoStateValue:s})]})]})})]}),t&&(0,js.jsx)(Qn.__experimentalText,{className:"global-styles-ui-header__description",children:t})]})})})})}var zs=a(E(),1),{useHasDimensionsPanel:Vqe,useHasTypographyPanel:jqe,useHasBorderPanel:zqe,useSettingsForBlockElement:Hqe,useHasColorPanel:Uqe,useHasBackgroundPanel:Wqe}=Tt(YN.privateApis);function Gqe(){let e=(0,PW.useSelect)(n=>n(EW.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 Yqe(e){let[t]=Le("",e),r=Hqe(t,e),o=jqe(r),n=Uqe(r),i=Wqe(r),s=zqe(r),l=Vqe(r),c=s||l,u=!!JT(e)?.length;return o||n||i||c||u}function qqe({block:e}){return Yqe(e.name)?(0,zs.jsx)(_o,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,zs.jsxs)(Hh.__experimentalHStack,{justify:"flex-start",children:[(0,zs.jsx)(YN.BlockIcon,{icon:e.icon}),(0,zs.jsx)(Hh.FlexItem,{children:e.title})]})}):null}function Kqe({filterValue:e}){let t=Gqe(),r=(0,Wge.useDebounce)(Gge.speak,500),{isMatchingSearchTerm:o}=(0,PW.useSelect)(EW.store),n=e?t.filter(s=>o(s,e)):t,i=(0,Ed.useRef)(null);return(0,Ed.useEffect)(()=>{if(!e)return;let s=i.current?.childElementCount||0,l=(0,Td.sprintf)((0,Td._n)("%d result found.","%d results found.",s),s);r(l,"polite")},[e,r]),(0,zs.jsx)("div",{ref:i,className:"global-styles-ui-block-types-item-list",role:"list",children:n.length===0?(0,zs.jsx)(Hh.__experimentalText,{align:"center",as:"p",children:(0,Td.__)("No blocks found.")}):n.map(s=>(0,zs.jsx)(qqe,{block:s},"menu-itemblock-"+s.name))})}var Zqe=(0,Ed.memo)(Kqe);function Xqe(){let[e,t]=(0,Ed.useState)(""),r=(0,Ed.useDeferredValue)(e);return(0,zs.jsxs)(zs.Fragment,{children:[(0,zs.jsx)(nr,{title:(0,Td.__)("Blocks"),description:(0,Td.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,zs.jsx)(Hh.SearchControl,{className:"global-styles-ui-block-types-search",onChange:t,value:e,label:(0,Td.__)("Search"),placeholder:(0,Td.__)("Search")}),(0,zs.jsx)(Zqe,{filterValue:r})]})}var Yge=Xqe;var eve=a(At(),1),tve=a(be(),1),Kc=a(U(),1),rve=a(Y(),1),ove=a(ne(),1),Bb=a(G(),1),f_=a(z(),1);var Zge=a(be(),1),KN=a(At(),1),Xge=a(G(),1),kW=a(U(),1);var qN=a(E(),1),{getViewportBreakpoints:Qqe,getViewportBreakpointValueInPixels:qge}=Tt(Nu),Kge={default:783,"@tablet":600,"@mobile":480};function Jqe(e,t){let r=Qqe(t),o=qge(r.mobile);if(e==="@mobile"&&o)return o;let n=qge(r.tablet);if(e==="@tablet"&&n)return o?r.mobile==="480px"&&r.tablet==="782px"?Kge["@tablet"]:Math.round((o+n)/2):n;if(e==="default"){let i=n??o;if(i)return i+1}return Kge[e]}var $qe=({name:e,variation:t="",selectedViewport:r="default",selectedState:o="default",stateStyles:n,viewportSettings:i})=>{let s=(0,KN.getBlockType)(e)?.example,l=(0,kW.useMemo)(()=>{if(!s)return null;let _={...s,attributes:{...s.attributes,style:void 0,className:t?_ge(t):s.attributes?.className}};return(0,KN.getBlockFromExample)(e,_)},[e,s,t]),c=(0,kW.useMemo)(()=>o==="default"||!n?"":d8(n,e),[o,n,e]);if(!s)return null;let u=Jqe(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,qN.jsx)(Xge.__experimentalSpacer,{marginX:4,marginBottom:4,children:(0,qN.jsx)("div",{className:"global-styles-ui__block-preview-panel",style:{maxHeight:h,boxSizing:"initial"},children:(0,qN.jsx)(Zge.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}
							`}]})})})},Qge=$qe;var Jge=a(G(),1),$ge=a(E(),1);function Ho({children:e,level:t=2}){return(0,$ge.jsx)(Jge.__experimentalHeading,{className:"global-styles-ui-subtitle",level:t,children:e})}var gn=a(E(),1),eKe={backgroundSize:"cover",backgroundPosition:"50% 50%"};function $T(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 tKe(e){return e&&((0,Bb.__experimentalHasSplitBorders)(e)?{top:$T(e.top),right:$T(e.right),bottom:$T(e.bottom),left:$T(e.left)}:$T(e))}var{useHasDimensionsPanel:rKe,useHasTypographyPanel:oKe,useHasBorderPanel:nKe,useSettingsForBlockElement:iKe,useHasColorPanel:sKe,useHasFiltersPanel:aKe,useHasImageSettingsPanel:lKe,useHasBackgroundPanel:cKe,BackgroundPanel:uKe,BorderPanel:dKe,ColorPanel:fKe,TypographyPanel:pKe,DimensionsPanel:mKe,FiltersPanel:hKe,ImageSettingsPanel:gKe,AdvancedPanel:vKe}=Tt(tve.privateApis);function bKe({name:e,variation:t}){let{user:r,merged:o,onChange:n}=(0,Kc.useContext)(rn),i=[];t&&(i=["variations",t].concat(i));let s=i.join("."),[l,c]=(0,Kc.useState)("default"),[u,d]=(0,Kc.useState)("default"),f=o.settings?.viewport,m=(0,Kc.useMemo)(()=>yge(f),[f]),h=l==="default"||m.some($=>$.value===l)?l:"default",g=(0,Kc.useMemo)(()=>bge(e),[e]),v=[h,u].filter($=>$!=="default").join("."),b=v.length>0,[_,y]=Ge(s,e,"user",!1,b?v:void 0),[w]=Ge(s,e,"merged",!1,b?v:void 0),[S]=Le("",e,"user"),[x,C]=Le("",e),A=iKe(x,e),k=(0,eve.getBlockType)(e),R=!1;A?.spacing?.blockGap&&k?.supports?.spacing?.blockGap&&(k?.supports?.spacing?.__experimentalSkipSerialization===!0||k?.supports?.spacing?.__experimentalSkipSerialization?.some?.($=>$==="blockGap"))&&(R=!0);let N=!1;A?.dimensions?.aspectRatio&&e==="core/group"&&(N=!0);let P=(0,Kc.useMemo)(()=>{let $=structuredClone(A);return R&&($.spacing.blockGap=!1),N&&($.dimensions.aspectRatio=!1),$},[A,R,N]),T=JT(e),M=cKe(P),j=oKe(P),F=sKe(P),D=nKe(P),B=rKe(P),O=aKe(P)&&h==="default",V=lKe(e,S,P),W=!!T?.length&&!t,{canEditCSS:q}=(0,rve.useSelect)($=>{let{getEntityRecord:ue,__experimentalGetCurrentGlobalStylesId:ve}=$(ove.store),Ee=ve();return{canEditCSS:!!(Ee?ue("root","globalStyles",Ee):void 0)?._links?.["wp:action-edit-css"]}},[]),Z=t?T.find($=>$.name===t):null,Q=(0,Kc.useMemo)(()=>({...w,layout:P.layout}),[w,P.layout]),ce=(0,Kc.useMemo)(()=>({..._,layout:S.layout}),[_,S.layout]),te=$=>{let ue={...$};delete ue.layout,y(ue),$.layout!==S.layout&&C({...S,layout:$.layout})},de=$=>{C($===void 0?{...x,lightbox:void 0}:{...x,lightbox:{...x.lightbox,...$}})},me=$=>{let{settings:ue,...ve}=$;if(ue?.typography){let Ee=[s,v].filter(Boolean).join("."),ie=m1(r,Ee,ve,e);ie=u1(ie,"typography",{...S.typography,...ue.typography},e),n(ie)}else y(ve)},ee=$=>{if(!$?.border){y($);return}let{radius:ue,...ve}=$.border,Ee=tKe(ve),ie=(0,Bb.__experimentalHasSplitBorders)(Ee)?{color:null,style:null,width:null,...Ee}:{top:Ee,right:Ee,bottom:Ee,left:Ee};y({...$,border:{...ie,radius:ue}})};return(0,gn.jsxs)(gn.Fragment,{children:[(0,gn.jsx)(nr,{title:t?Z?.label:k?.title,viewportStates:m,pseudoStates:g,selectedViewport:h,selectedPseudoState:u,onChangeViewport:c,onChangePseudoState:d}),(0,gn.jsx)(Qge,{name:e,variation:t,selectedViewport:h,selectedState:b?v:"default",stateStyles:b?w:void 0,viewportSettings:f}),W&&(0,gn.jsx)("div",{className:"global-styles-ui-screen-variations",children:(0,gn.jsxs)(Bb.__experimentalVStack,{spacing:3,children:[(0,gn.jsx)(Ho,{children:(0,f_.__)("Style Variations")}),(0,gn.jsx)(Hge,{name:e})]})}),j&&(0,gn.jsx)(pKe,{inheritedValue:w,value:_,onChange:me,settings:P,isGlobalStyles:!b}),M&&(0,gn.jsx)(uKe,{inheritedValue:w,value:_,onChange:y,settings:P,defaultValues:eKe}),O&&(0,gn.jsx)(hKe,{inheritedValue:Q,value:ce,onChange:y,settings:P,includeLayoutControls:!0}),B&&(0,gn.jsx)(mKe,{inheritedValue:Q,value:ce,onChange:te,settings:P,includeLayoutControls:!0}),D&&(0,gn.jsx)(dKe,{inheritedValue:w,value:_,onChange:ee,settings:P}),F&&(0,gn.jsx)(fKe,{inheritedValue:w,value:_,onChange:y,settings:P}),V&&!b&&(0,gn.jsx)(gKe,{onChange:de,value:S,inheritedValue:P}),q&&(0,gn.jsx)(Bb.PanelBody,{title:(0,f_.__)("Advanced"),initialOpen:!1,children:(0,gn.jsx)(vKe,{value:_,onChange:y,inheritedValue:w,help:(0,f_.sprintf)((0,f_.__)("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."),k?.title)})})]})}var RW=bKe;var wM=a(z(),1),vbe=a(G(),1),bbe=a(U(),1);var nve=a(G(),1);var ive=a(E(),1);function Uh({children:e,className:t}){return(0,ive.jsx)(nve.__experimentalSpacer,{className:J("global-styles-ui-screen-body",t),padding:4,children:e})}var Wh=a(z(),1),pp=a(G(),1);var Ca=a(E(),1);function eE({parentMenu:e,element:t,label:r}){let o=t==="text"||!t?"":`elements.${t}.`,n=t==="link"?{textDecoration:"underline"}:{},[i]=Ge(o+"typography.fontFamily"),[s]=Ge(o+"typography.fontStyle"),[l]=Ge(o+"typography.fontWeight"),[c]=Ge(o+"color.background"),[u]=Ge("color.background"),[d]=Ge(o+"color.gradient"),[f]=Ge(o+"color.text");return(0,Ca.jsx)(_o,{path:e+"/typography/"+t,children:(0,Ca.jsxs)(pp.__experimentalHStack,{justify:"flex-start",children:[(0,Ca.jsx)(pp.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,Wh.__)("Aa")}),(0,Ca.jsx)(pp.FlexItem,{children:r})]})})}function yKe(){return(0,Ca.jsxs)(pp.__experimentalVStack,{spacing:3,children:[(0,Ca.jsx)(Ho,{level:3,children:(0,Wh.__)("Elements")}),(0,Ca.jsxs)(pp.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,Ca.jsx)(eE,{parentMenu:"",element:"text",label:(0,Wh.__)("Text")}),(0,Ca.jsx)(eE,{parentMenu:"",element:"link",label:(0,Wh.__)("Links")}),(0,Ca.jsx)(eE,{parentMenu:"",element:"heading",label:(0,Wh.__)("Headings")}),(0,Ca.jsx)(eE,{parentMenu:"",element:"caption",label:(0,Wh.__)("Captions")}),(0,Ca.jsx)(eE,{parentMenu:"",element:"button",label:(0,Wh.__)("Buttons")})]})]})}var sve=yKe;var QN=a(G(),1);var ave=a(G(),1);var ZN=a(E(),1),wKe=({variation:e,isFocused:t,withHoverView:r})=>(0,ZN.jsx)(d_,{label:e.title,isFocused:t,withHoverView:r,children:({ratio:o,key:n})=>(0,ZN.jsx)(ave.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,ZN.jsx)(UN,{variation:e,fontSize:85*o})},n)}),lve=wKe;var Vb=a(U(),1),cve=a(Oo(),1),XN=a(z(),1);var Gh=a(E(),1);function p_({variation:e,children:t,isPill:r=!1,properties:o,showTooltip:n=!1}){let[i,s]=(0,Vb.useState)(!1),{base:l,user:c,onChange:u}=(0,Vb.useContext)(rn),d=(0,Vb.useMemo)(()=>{let b=Oi(l,e);return o&&(b=jN(b,o)),{user:e,base:l,merged:b,onChange:()=>{}}},[e,l,o]),f=()=>u(e),m=b=>{b.keyCode===cve.ENTER&&(b.preventDefault(),f())},h=(0,Vb.useMemo)(()=>av(c,e),[c,e]),g=e?.title;e?.description&&(g=(0,XN.sprintf)((0,XN._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));let v=(0,Gh.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,Gh.jsx)("div",{className:J("global-styles-ui-variations_item-preview",{"is-pill":r}),children:t(i)})});return(0,Gh.jsx)(rn.Provider,{value:d,children:n?(0,Gh.jsxs)(Ke.Root,{children:[(0,Gh.jsx)(Ke.Trigger,{render:v}),(0,Gh.jsx)(Ke.Popup,{children:e?.title})]}):v})}var jb=a(E(),1),uve=["typography"];function m_({title:e,gap:t=2}){let r=HN(uve);return r?.length<=1?null:(0,jb.jsxs)(QN.__experimentalVStack,{spacing:3,children:[e&&(0,jb.jsx)(Ho,{level:3,children:e}),(0,jb.jsx)(QN.__experimentalGrid,{columns:3,gap:t,className:"global-styles-ui-style-variations-container",children:r.map((o,n)=>(0,jb.jsx)(p_,{variation:o,properties:uve,showTooltip:!0,children:()=>(0,jb.jsx)(lve,{variation:o})},n))})]})}var Gb=a(z(),1),Xc=a(G(),1);var mbe=a(U(),1);var hp=a(U(),1),Kh=a(Y(),1),qh=a(ne(),1),NW=a(z(),1);var AW=a(Fu(),1),dve=a(ne(),1),fve="/wp/v2/font-families";function pve(e){let{receiveEntityRecords:t}=e.dispatch(dve.store);t("postType","wp_font_family",[],void 0,!0)}async function mve(e,t){let o=await(0,AW.default)({path:fve,method:"POST",body:e});return pve(t),{id:o.id,...o.font_family_settings,fontFace:[]}}async function hve(e,t,r){let o={path:`${fve}/${e}/font-faces`,method:"POST",body:t},n=await(0,AW.default)(o);return pve(r),{id:n.id,...n.font_face_settings}}var bve=a(G(),1);var Yl=a(z(),1),IW=["otf","ttf","woff","woff2"],gve={100:(0,Yl._x)("Thin","font weight"),200:(0,Yl._x)("Extra-light","font weight"),300:(0,Yl._x)("Light","font weight"),400:(0,Yl._x)("Normal","font weight"),500:(0,Yl._x)("Medium","font weight"),600:(0,Yl._x)("Semi-bold","font weight"),700:(0,Yl._x)("Bold","font weight"),800:(0,Yl._x)("Extra-bold","font weight"),900:(0,Yl._x)("Black","font weight")},vve={normal:(0,Yl._x)("Normal","font style"),italic:(0,Yl._x)("Italic","font style")};var{File:yve}=window,{kebabCase:_Ke}=Tt(bve.privateApis);function mp(e,t={}){return!e.name&&(e.fontFamily||e.slug)&&(e.name=e.fontFamily||e.slug),{...e,...t}}function SKe(e){return typeof e!="string"?!1:e!==decodeURIComponent(e)}function JN(e){let t=gve[e.fontWeight??""]||e.fontWeight,r=e.fontStyle==="normal"?"":vve[e.fontStyle??""]||e.fontStyle;return`${t} ${r}`}function xKe(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 wve(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=xKe(s.fontFace,n);r.set(o.slug,{...i,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function Yh(e,t,r="all"){let o;if(typeof t=="string")o=`url(${t})`;else if(t instanceof yve)o=await t.arrayBuffer();else return;let i=await new window.FontFace(_W(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 tE(e,t="all"){let r=o=>{o.forEach(n=>{n.family===_W(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 h_(e){if(!e)return;let t;if(Array.isArray(e)?t=e[0]:t=e,!t.startsWith("file:."))return SKe(t)||(t=encodeURI(t)),t}function _ve(e){let t=new FormData,{fontFace:r,category:o,...n}=e,i={...n,slug:_Ke(e.slug)};return t.append("font_family_settings",JSON.stringify(i)),t}function Sve(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 xve(e,t,r){let o=[];for(let i of t)try{let s=await hve(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 Cve(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 yve([o],n,{type:o.type})})));return t.length===1?t[0]:t}function OW(e,t){return t.findIndex(r=>r.fontWeight===e.fontWeight&&r.fontStyle===e.fontStyle)!==-1}function Tve(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 $N(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 Eve=a(E(),1),yi=(0,hp.createContext)({});yi.displayName="FontLibraryContext";function CKe({children:e}){let t=(0,Kh.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,Kh.useDispatch)(qh.store),{globalStylesId:n}=(0,Kh.useSelect)(O=>{let{__experimentalGetCurrentGlobalStylesId:V}=O(qh.store);return{globalStylesId:V()}},[]),i=(0,qh.useEntityRecord)("root","globalStyles",n),[s,l]=(0,hp.useState)(!1),{records:c=[],isResolving:u}=(0,qh.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=Tve(V??{},["settings","typography","fontFamilies"],O);await r("root","globalStyles",W)},[g,v]=(0,hp.useState)(""),[b,_]=(0,hp.useState)(void 0),y=f?.theme?f.theme.map(O=>mp(O,{source:"theme"})).sort((O,V)=>O.name.localeCompare(V.name)):[],w=f?.custom?f.custom.map(O=>mp(O,{source:"custom"})).sort((O,V)=>O.name.localeCompare(V.name)):[],S=d?d.map(O=>mp(O,{source:"custom"})).sort((O,V)=>O.name.localeCompare(V.name)):[];(0,hp.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,hp.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??"")),N=(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,Kh.resolveSelect)(qh.store).getEntityRecords("postType","wp_font_family",{slug:Z.slug,per_page:1,_embed:!0}),te=ce&&ce.length>0?ce[0]:null,de=te?{id:te.id,...te.font_family_settings,fontFace:(te?._embedded?.font_faces??[]).map(ue=>ue.font_face_settings)||[]}:null;de||(Q=!0,de=await mve(_ve(Z),t));let me=de.fontFace&&Z.fontFace?de.fontFace.filter(ue=>ue&&Z.fontFace&&OW(ue,Z.fontFace)):[];de.fontFace&&Z.fontFace&&(Z.fontFace=Z.fontFace.filter(ue=>!OW(ue,de.fontFace)));let ee=[],$=[];if(Z?.fontFace?.length??!1){let ue=await xve(de.id,Sve(Z),t);ee=ue?.successes,$=ue?.errors}(ee?.length>0||me?.length>0)&&(de.fontFace=[...ee],V.push(de)),de&&!Z?.fontFace?.length&&V.push(de),Q&&(Z?.fontFace?.length??0)>0&&ee?.length===0&&await o("postType","wp_font_family",de.id,{force:!0}),W=W.concat($)}let q=W.reduce((Z,Q)=>Z.includes(Q.message)?Z:[...Z,Q.message],[]);if(V.length>0){let Z=j(V);await h(Z)}if(q.length>0){let Z=new Error((0,NW.__)("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,NW.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",O.id,{force:!0});let V=M(O);return await h(V),{deleted:!0}}catch(V){throw console.error("There was an error uninstalling the font family:",V),V}}let M=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=>{tE(Z,"all")}),q},j=O=>{let V=F(O),W={...f,custom:wve(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=h_(W?.src??"");q&&Yh(W,q,"all")})})},B=(O,V)=>{let W=f?.[O.source??""]??[],q=$N(O,V,W);m({...f,[O.source??""]:q});let Z=R(O.slug,V?.fontStyle??"",V?.fontWeight??"",O.source??"custom");if(V&&Z)tE(V,"all");else{let Q=h_(V?.src??"");V&&Q&&Yh(V,Q,"all")}},L=async O=>{if(!O.src)return;let V=h_(O.src);!V||C.has(V)||(Yh(O,V,"document"),C.add(V))};return(0,Eve.jsx)(yi.Provider,{value:{libraryFontSelected:b,handleSetLibraryFontSelected:x,fontFamilies:f??{},baseCustomFonts:S,isFontActivated:R,getFontFacesActivated:N,loadFontFaceAsset:L,installFonts:P,uninstallFontFamily:T,toggleActivateFont:B,getAvailableFontsOutline:A,modalTabOpen:g,setModalTabOpen:v,saveFontFamilies:h,isResolvingLibrary:u,isInstalling:s},children:e})}var eM=CKe;var y_=a(z(),1),vM=a(G(),1),bM=a(ne(),1),cbe=a(Y(),1);var Pt=a(G(),1),oE=a(ne(),1),MW=a(Y(),1),Rd=a(U(),1),ao=a(z(),1);var v_=a(z(),1),rM=a(U(),1),ql=a(G(),1);var Pve=a(G(),1),Pd=a(U(),1);var tM=a(E(),1);function TKe(e){if(e.preview)return e.preview;if(e.src)return Array.isArray(e.src)?e.src[0]:e.src}function EKe(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 PKe({font:e,text:t}){let r=(0,Pd.useRef)(null),o=EKe(e),n=Fb(e);t=t||("name"in e?e.name:"");let i=e.preview,[s,l]=(0,Pd.useState)(!1),[c,u]=(0,Pd.useState)(!1),{loadFontFaceAsset:d}=(0,Pd.useContext)(yi),f=i??TKe(o),m=f&&f.match(/\.(png|jpg|jpeg|gif|svg)$/i),h=Rge(o),g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...n,...h};return(0,Pd.useEffect)(()=>{let v=new window.IntersectionObserver(([b])=>{l(b.isIntersecting)},{});return r.current&&v.observe(r.current),()=>v.disconnect()},[r]),(0,Pd.useEffect)(()=>{(async()=>s&&(!m&&o.src&&await d(o),u(!0)))()},[o,s,d,m]),(0,tM.jsx)("div",{ref:r,children:m?(0,tM.jsx)("img",{src:f,loading:"lazy",alt:t,className:"font-library__font-variant_demo-image"}):(0,tM.jsx)(Pve.__experimentalText,{style:g,className:"font-library__font-variant_demo-text",children:t})})}var g_=PKe;var kd=a(E(),1);function kKe({font:e,onClick:t,variantsText:r,navigatorPath:o,shouldFocus:n}){let i=e.fontFace?.length||1,s={cursor:t?"pointer":"default"},l=(0,ql.useNavigator)(),c=(0,rM.useRef)(null);return(0,rM.useEffect)(()=>{n&&c.current?.focus()},[n]),(0,kd.jsx)(ql.Button,{ref:c,__next40pxDefaultSize:!0,onClick:()=>{t(),o&&l.goTo(o)},style:s,className:"font-library__font-card",children:(0,kd.jsxs)(ql.Flex,{justify:"space-between",wrap:!1,children:[(0,kd.jsx)(g_,{font:e}),(0,kd.jsxs)(ql.Flex,{justify:"flex-end",children:[(0,kd.jsx)(ql.FlexItem,{children:(0,kd.jsx)(ql.__experimentalText,{className:"font-library__font-card__count",children:r||(0,v_.sprintf)((0,v_._n)("%d variant","%d variants",i),i)})}),(0,kd.jsx)(ql.FlexItem,{children:(0,kd.jsx)(xn,{icon:(0,v_.isRTL)()?kr:hr})})]})]})})}var rE=kKe;var oM=a(U(),1),nM=a(G(),1);var zb=a(E(),1);function RKe({face:e,font:t}){let{isFontActivated:r,toggleActivateFont:o}=(0,oM.useContext)(yi),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+" "+JN(e),l=(0,oM.useId)();return(0,zb.jsx)("div",{className:"font-library__font-card",children:(0,zb.jsxs)(nM.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,zb.jsx)(nM.CheckboxControl,{checked:n,onChange:i,id:l}),(0,zb.jsx)("label",{htmlFor:l,children:(0,zb.jsx)(g_,{font:e,text:s,onClick:i})})]})})}var kve=RKe;function Rve(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 iM(e){return e.sort((t,r)=>t.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&t.fontStyle!=="normal"?1:t.fontStyle===r.fontStyle?Rve(t.fontWeight?.toString()??"normal")-Rve(r.fontWeight?.toString()??"normal"):!t.fontStyle||!r.fontStyle?t.fontStyle?-1:1:t.fontStyle.localeCompare(r.fontStyle))}var mt=a(E(),1);function Ave(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 AKe(){let{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:n,isInstalling:i,saveFontFamilies:s,getFontFacesActivated:l}=(0,Rd.useContext)(yi),[c,u]=Le("typography.fontFamilies"),[d,f]=(0,Rd.useState)(void 0),[m,h]=(0,Rd.useState)(!1),[g,v]=(0,Rd.useState)(null),[b]=Le("typography.fontFamilies",void 0,"base"),_=(0,MW.useSelect)(q=>{let{__experimentalGetCurrentGlobalStylesId:Z}=q(oE.store);return Z()},[]),y=(0,oE.useEntityRecord)("root","globalStyles",_),w=y?.edits?.settings?.typography?.fontFamilies,S=y?.record?.settings?.typography?.fontFamilies,x=(0,Rd.useMemo)(()=>w===void 0?!1:Ave(w)!==Ave(S),[w,S]),C=c?.theme?c.theme.map(q=>mp(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=>mp(q,{source:"theme"})).sort((q,Z)=>q.name.localeCompare(Z.name))):[],R=t?.source==="custom"&&t?.id,N=(0,MW.useSelect)(q=>{let{canUser:Z}=q(oE.store);return R&&Z("delete",{kind:"postType",name:"wp_font_family",id:R})},[R]),P=!!t&&t?.source!=="theme"&&N,T=()=>{h(!0)},M=async()=>{v(null);try{await s(c),v({type:"success",message:(0,ao.__)("Font family updated successfully.")})}catch(q){v({type:"error",message:(0,ao.sprintf)((0,ao.__)("There was an error updating the font family. %s"),q.message)})}},j=q=>q?!q.fontFace||!q.fontFace.length?[{fontFamily:q.fontFamily,fontStyle:"normal",fontWeight:"400"}]:iM(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,ao.sprintf)((0,ao.__)("%1$d of %2$d active"),Q,Z)};(0,Rd.useEffect)(()=>{r(t)},[]);let D=t?l(t.slug,t.source).length:0,B=t?.fontFace?.length??(t?.fontFamily?1:0),L=D>0&&D!==B,O=D===B,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)tE(Q,"all");else{let ce=h_(Q?.src??"");ce&&Yh(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)(Pt.ProgressBar,{})}),!n&&(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsxs)(Pt.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,mt.jsx)(Pt.Navigator.Screen,{path:"/",children:(0,mt.jsxs)(Pt.__experimentalVStack,{spacing:"8",children:[g&&(0,mt.jsx)(Pt.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),!W&&(0,mt.jsx)(Pt.__experimentalText,{as:"p",children:(0,ao.__)("No fonts installed.")}),k.length>0&&(0,mt.jsxs)(Pt.__experimentalVStack,{children:[(0,mt.jsx)("h2",{className:"font-library__fonts-title",children:(0,ao._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)(rE,{font:q,navigatorPath:"/fontFamily",variantsText:F(q),shouldFocus:q.slug===d,onClick:()=>{v(null),r(q)}})},q.slug))})]}),e.length>0&&(0,mt.jsxs)(Pt.__experimentalVStack,{children:[(0,mt.jsx)("h2",{className:"font-library__fonts-title",children:(0,ao._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)(rE,{font:q,navigatorPath:"/fontFamily",variantsText:F(q),shouldFocus:q.slug===d,onClick:()=>{v(null),r(q)}})},q.slug))})]})]})}),(0,mt.jsxs)(Pt.Navigator.Screen,{path:"/fontFamily",children:[t&&(0,mt.jsx)(IKe,{font:t,isOpen:m,setIsOpen:h,setNotice:v,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,mt.jsxs)(Pt.Flex,{justify:"flex-start",children:[(0,mt.jsx)(Pt.Navigator.BackButton,{icon:(0,ao.isRTL)()?hr:kr,size:"small",onClick:()=>{f(t?.slug),r(void 0),v(null)},label:(0,ao.__)("Back")}),(0,mt.jsx)(Pt.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:t?.name})]}),g&&(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsx)(Pt.__experimentalSpacer,{margin:1}),(0,mt.jsx)(Pt.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),(0,mt.jsx)(Pt.__experimentalSpacer,{margin:1})]}),(0,mt.jsx)(Pt.__experimentalSpacer,{margin:4}),(0,mt.jsx)(Pt.__experimentalText,{children:(0,ao.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,mt.jsx)(Pt.__experimentalSpacer,{margin:4}),(0,mt.jsxs)(Pt.__experimentalVStack,{spacing:0,children:[(0,mt.jsx)(Pt.CheckboxControl,{className:"font-library__select-all",label:(0,ao.__)("Select all"),checked:O,onChange:V,indeterminate:L}),(0,mt.jsx)(Pt.__experimentalSpacer,{margin:8}),(0,mt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t&&j(t).map((q,Z)=>(0,mt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,mt.jsx)(kve,{font:t,face:q},`face${Z}`)},`face${Z}`))})]})]})]}),(0,mt.jsxs)(Pt.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[i&&(0,mt.jsx)(Pt.ProgressBar,{}),P&&(0,mt.jsx)(Pt.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:T,children:(0,ao.__)("Delete")}),(0,mt.jsx)(Pt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:M,disabled:!x,accessibleWhenDisabled:!0,children:(0,ao.__)("Update")})]})]})]})}function IKe({font:e,isOpen:t,setIsOpen:r,setNotice:o,uninstallFontFamily:n,handleSetLibraryFontSelected:i}){let s=(0,Pt.useNavigator)(),l=async()=>{o(null),r(!1);try{await n(e),s.goBack(),i(void 0),o({type:"success",message:(0,ao.__)("Font family uninstalled successfully.")})}catch(u){o({type:"error",message:(0,ao.__)("There was an error uninstalling the font family.")+u.message})}},c=()=>{r(!1)};return(0,mt.jsx)(Pt.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,ao.__)("Cancel"),confirmButtonText:(0,ao.__)("Delete"),onCancel:c,onConfirm:l,size:"medium",children:e&&(0,ao.sprintf)((0,ao.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var sM=AKe;var In=a(U(),1),dt=a(G(),1),Bve=a(ke(),1),Zr=a(z(),1);var Vve=a(ne(),1);function Ive(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 Ove(e){return e.reduce((t,r)=>({...t,[r.slug]:(r?.fontFace||[]).reduce((o,n)=>({...o,[`${n.fontStyle}-${n.fontWeight}`]:!0}),{})}),{})}function Nve(e,t,r){return t?!!r[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!r[e]}var nE=a(z(),1),Hs=a(G(),1),Kl=a(E(),1);function OKe(){let e=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,Kl.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,Kl.jsx)(Hs.Card,{children:(0,Kl.jsxs)(Hs.CardBody,{children:[(0,Kl.jsx)(Hs.__experimentalHeading,{level:2,children:(0,nE.__)("Connect to Google Fonts")}),(0,Kl.jsx)(Hs.__experimentalSpacer,{margin:6}),(0,Kl.jsx)(Hs.__experimentalText,{as:"p",children:(0,nE.__)("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,Kl.jsx)(Hs.__experimentalSpacer,{margin:3}),(0,Kl.jsx)(Hs.__experimentalText,{as:"p",children:(0,nE.__)("You can alternatively upload files directly on the Upload tab.")}),(0,Kl.jsx)(Hs.__experimentalSpacer,{margin:6}),(0,Kl.jsx)(Hs.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,nE.__)("Allow access to Google Fonts")})]})})})}var Mve=OKe;var Fve=a(U(),1),aM=a(G(),1);var Hb=a(E(),1);function NKe({face:e,font:t,handleToggleVariant:r,selected:o}){let n=()=>{if(t?.fontFace){r(t,e);return}r(t)},i=t.name+" "+JN(e),s=(0,Fve.useId)();return(0,Hb.jsx)("div",{className:"font-library__font-card",children:(0,Hb.jsxs)(aM.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Hb.jsx)(aM.CheckboxControl,{checked:o,onChange:n,id:s}),(0,Hb.jsx)("label",{htmlFor:s,children:(0,Hb.jsx)(g_,{font:e,text:i,onClick:n})})]})})}var Dve=NKe;var et=a(E(),1),MKe={slug:"all",name:(0,Zr._x)("All","font categories")},Lve="wp-font-library-google-fonts-permission",FKe=500;function DKe({slug:e}){let t=e==="google-fonts",r=()=>window.localStorage.getItem(Lve)==="true",[o,n]=(0,In.useState)(null),[i,s]=(0,In.useState)(void 0),[l,c]=(0,In.useState)(null),[u,d]=(0,In.useState)([]),[f,m]=(0,In.useState)(1),[h,g]=(0,In.useState)({}),[v,b]=(0,In.useState)(t&&!r()),{installFonts:_,isInstalling:y}=(0,In.useContext)(yi),{record:w,isResolving:S}=(0,Vve.useEntityRecord)("root","fontCollection",e);(0,In.useEffect)(()=>{let ee=()=>{b(t&&!r())};return ee(),window.addEventListener("storage",ee),()=>window.removeEventListener("storage",ee)},[e,t]);let x=()=>{window.localStorage.setItem(Lve,"false"),window.dispatchEvent(new Event("storage"))};(0,In.useEffect)(()=>{n(null)},[e]),(0,In.useEffect)(()=>{d([])},[o]);let C=(0,In.useMemo)(()=>w?.font_families??[],[w]),A=w?.categories??[],k=[MKe,...A],R=(0,In.useMemo)(()=>Ive(C,h),[C,h]),N=Math.max(window.innerHeight,FKe),P=Math.floor((N-417)/61),T=Math.ceil(R.length/P),M=(f-1)*P,j=f*P,F=R.slice(M,j),D=ee=>{g({...h,category:ee}),m(1)},L=(0,Bve.debounce)(ee=>{g({...h,search:ee}),m(1)},300),O=(ee,$)=>{let ue=$N(ee,$,u);d(ue)},V=Ove(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 ee=[];!Q&&o&&ee.push(o),d(ee)},te=async()=>{c(null);let ee=u[0];try{ee?.fontFace&&await Promise.all(ee.fontFace.map(async $=>{$.src&&($.file=await Cve($.src))}))}catch{c({type:"error",message:(0,Zr.__)("Error installing the fonts, could not be downloaded.")});return}try{await _([ee]),c({type:"success",message:(0,Zr.__)("Fonts were installed successfully.")})}catch($){c({type:"error",message:$.message})}W()},de=ee=>ee?!ee.fontFace||!ee.fontFace.length?[{fontFamily:ee.fontFamily,fontStyle:"normal",fontWeight:"400"}]:iM(ee.fontFace):[];if(v)return(0,et.jsx)(Mve,{});let me=e==="google-fonts"&&!v&&!o;return(0,et.jsxs)("div",{className:"font-library__tabpanel-layout",children:[S&&(0,et.jsx)("div",{className:"font-library__loading",children:(0,et.jsx)(dt.ProgressBar,{})}),!S&&w&&(0,et.jsxs)(et.Fragment,{children:[(0,et.jsxs)(dt.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,et.jsxs)(dt.Navigator.Screen,{path:"/",children:[(0,et.jsxs)(dt.__experimentalHStack,{justify:"space-between",children:[(0,et.jsxs)(dt.__experimentalVStack,{children:[(0,et.jsx)(dt.__experimentalHeading,{level:2,size:13,children:w.name}),(0,et.jsx)(dt.__experimentalText,{children:w.description})]}),me&&(0,et.jsx)(dt.DropdownMenu,{icon:go,label:(0,Zr.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,Zr.__)("Revoke access to Google Fonts"),onClick:x}]})]}),(0,et.jsx)(dt.__experimentalSpacer,{margin:4}),(0,et.jsxs)(dt.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,et.jsx)(dt.SearchControl,{value:h.search,placeholder:(0,Zr.__)("Font name\u2026"),label:(0,Zr.__)("Search"),onChange:L,hideLabelFromVision:!1}),(0,et.jsx)(dt.SelectControl,{label:(0,Zr.__)("Category"),value:h.category,onChange:D,children:k&&k.map(ee=>(0,et.jsx)("option",{value:ee.slug,children:ee.name},ee.slug))})]}),(0,et.jsx)(dt.__experimentalSpacer,{margin:4}),!!w?.font_families?.length&&!R.length&&(0,et.jsx)(dt.__experimentalText,{children:(0,Zr.__)("No fonts found. Try with a different search term.")}),(0,et.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,et.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:F.map(ee=>(0,et.jsx)("li",{className:"font-library__fonts-list-item",children:(0,et.jsx)(rE,{font:ee.font_family_settings,navigatorPath:"/fontFamily",shouldFocus:ee.font_family_settings.slug===i,onClick:()=>{n(ee.font_family_settings)}})},ee.font_family_settings.slug))})})]}),(0,et.jsxs)(dt.Navigator.Screen,{path:"/fontFamily",children:[(0,et.jsxs)(dt.Flex,{justify:"flex-start",children:[(0,et.jsx)(dt.Navigator.BackButton,{icon:(0,Zr.isRTL)()?hr:kr,size:"small",onClick:()=>{s(o?.slug),n(null),c(null)},label:(0,Zr.__)("Back")}),(0,et.jsx)(dt.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),l&&(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(dt.__experimentalSpacer,{margin:1}),(0,et.jsx)(dt.Notice,{status:l.type,onRemove:()=>c(null),children:l.message}),(0,et.jsx)(dt.__experimentalSpacer,{margin:1})]}),(0,et.jsx)(dt.__experimentalSpacer,{margin:4}),(0,et.jsx)(dt.__experimentalText,{children:(0,Zr.__)("Select font variants to install.")}),(0,et.jsx)(dt.__experimentalSpacer,{margin:4}),(0,et.jsx)(dt.CheckboxControl,{className:"font-library__select-all",label:(0,Zr.__)("Select all"),checked:Q,onChange:ce,indeterminate:Z}),(0,et.jsx)(dt.__experimentalVStack,{spacing:0,children:(0,et.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&de(o).map((ee,$)=>(0,et.jsx)("li",{className:"font-library__fonts-list-item",children:(0,et.jsx)(Dve,{font:o,face:ee,handleToggleVariant:O,selected:Nve(o.slug,o.fontFace?ee:null,V)})},`face${$}`))})}),(0,et.jsx)(dt.__experimentalSpacer,{margin:16})]})]}),o&&(0,et.jsx)(dt.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,et.jsx)(dt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:te,isBusy:y,disabled:u.length===0||y,accessibleWhenDisabled:!0,children:(0,Zr.__)("Install")})}),!o&&(0,et.jsxs)(dt.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,et.jsx)(dt.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,In.createInterpolateElement)((0,Zr.sprintf)((0,Zr._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",T),{div:(0,et.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,et.jsx)(dt.SelectControl,{"aria-label":(0,Zr.__)("Current page"),value:f.toString(),options:[...Array(T)].map((ee,$)=>({label:($+1).toString(),value:($+1).toString()})),onChange:ee=>m(parseInt(ee)),size:"small",variant:"minimal"})})}),(0,et.jsxs)(dt.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,et.jsx)(dt.Button,{onClick:()=>m(f-1),disabled:f===1,accessibleWhenDisabled:!0,label:(0,Zr.__)("Previous page"),icon:(0,Zr.isRTL)()?xl:Cl,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,et.jsx)(dt.Button,{onClick:()=>m(f+1),disabled:f===T,accessibleWhenDisabled:!0,label:(0,Zr.__)("Next page"),icon:(0,Zr.isRTL)()?Cl:xl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var lM=DKe;var b_=a(z(),1),$i=a(G(),1),sE=a(U(),1);var cM=(e=>typeof $s<"u"?$s:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof $s<"u"?$s:t)[r]}):e)(function(e){if(typeof $s<"u")return $s.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),jve=(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,N=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]),M=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),j=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function F(ie){var ae;return ie.readBits(1)===0?16:(ae=ie.readBits(3),ae>0?17+ae:(ae=ie.readBits(3),ae>0?8+ae:17))}function D(ie){if(ie.readBits(1)){var ae=ie.readBits(3);return ae===0?1:ie.readBits(ae)+(1<<ae)}return 0}function B(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function L(ie){var ae=new B,pe,le,se;if(ae.input_end=ie.readBits(1),ae.input_end&&ie.readBits(1))return ae;if(pe=ie.readBits(2)+4,pe===7){if(ae.is_metadata=!0,ie.readBits(1)!==0)throw new Error("Invalid reserved bit");if(le=ie.readBits(2),le===0)return ae;for(se=0;se<le;se++){var Ae=ie.readBits(8);if(se+1===le&&le>1&&Ae===0)throw new Error("Invalid size byte");ae.meta_block_length|=Ae<<se*8}}else for(se=0;se<pe;++se){var ye=ie.readBits(4);if(se+1===pe&&pe>4&&ye===0)throw new Error("Invalid size nibble");ae.meta_block_length|=ye<<se*4}return++ae.meta_block_length,!ae.input_end&&!ae.is_metadata&&(ae.is_uncompressed=ie.readBits(1)),ae}function O(ie,ae,pe){var le=ae,se;return pe.fillBitWindow(),ae+=pe.val_>>>pe.bit_pos_&A,se=ie[ae].bits-C,se>0&&(pe.bit_pos_+=C,ae+=ie[ae].value,ae+=pe.val_>>>pe.bit_pos_&(1<<se)-1),pe.bit_pos_+=ie[ae].bits,ie[ae].value}function V(ie,ae,pe,le){for(var se=0,Ae=v,ye=0,Se=0,Pe=32768,Me=[],X=0;X<32;X++)Me.push(new d(0,0));for(f(Me,0,5,ie,R);se<ae&&Pe>0;){var fe=0,Ye;if(le.readMoreInput(),le.fillBitWindow(),fe+=le.val_>>>le.bit_pos_&31,le.bit_pos_+=Me[fe].bits,Ye=Me[fe].value&255,Ye<b)ye=0,pe[se++]=Ye,Ye!==0&&(Ae=Ye,Pe-=32768>>Ye);else{var Ze=Ye-14,st,Rt,ut=0;if(Ye===b&&(ut=Ae),Se!==ut&&(ye=0,Se=ut),st=ye,ye>0&&(ye-=2,ye<<=Ze),ye+=le.readBits(Ze)+3,Rt=ye-st,se+Rt>ae)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var _t=0;_t<Rt;_t++)pe[se+_t]=Se;se+=Rt,Se!==0&&(Pe-=Rt<<15-Se)}}if(Pe!==0)throw new Error("[ReadHuffmanCodeLengths] space = "+Pe);for(;se<ae;se++)pe[se]=0}function W(ie,ae,pe,le){var se=0,Ae,ye=new Uint8Array(ie);if(le.readMoreInput(),Ae=le.readBits(2),Ae===1){for(var Se,Pe=ie-1,Me=0,X=new Int32Array(4),fe=le.readBits(2)+1;Pe;)Pe>>=1,++Me;for(Se=0;Se<fe;++Se)X[Se]=le.readBits(Me)%ie,ye[X[Se]]=2;switch(ye[X[0]]=1,fe){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");ye[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");le.readBits(1)?(ye[X[2]]=3,ye[X[3]]=3):ye[X[0]]=2;break}}else{var Se,Ye=new Uint8Array(R),Ze=32,st=0,Rt=[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(Se=Ae;Se<R&&Ze>0;++Se){var ut=N[Se],_t=0,pr;le.fillBitWindow(),_t+=le.val_>>>le.bit_pos_&15,le.bit_pos_+=Rt[_t].bits,pr=Rt[_t].value,Ye[ut]=pr,pr!==0&&(Ze-=32>>pr,++st)}if(!(st===1||Ze===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");V(Ye,ie,ye,le)}if(se=f(ae,pe,C,ye,ie),se===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return se}function q(ie,ae,pe){var le,se;return le=O(ie,ae,pe),se=h.kBlockLengthPrefixCode[le].nbits,h.kBlockLengthPrefixCode[le].offset+pe.readBits(se)}function Z(ie,ae,pe){var le;return ie<P?(pe+=T[ie],pe&=3,le=ae[pe]+M[ie]):le=ie-P+1,le}function Q(ie,ae){for(var pe=ie[ae],le=ae;le;--le)ie[le]=ie[le-1];ie[0]=pe}function ce(ie,ae){var pe=new Uint8Array(256),le;for(le=0;le<256;++le)pe[le]=le;for(le=0;le<ae;++le){var se=ie[le];ie[le]=pe[se],se&&Q(pe,se)}}function te(ie,ae){this.alphabet_size=ie,this.num_htrees=ae,this.codes=new Array(ae+ae*j[ie+31>>>5]),this.htrees=new Uint32Array(ae)}te.prototype.decode=function(ie){var ae,pe,le=0;for(ae=0;ae<this.num_htrees;++ae)this.htrees[ae]=le,pe=W(this.alphabet_size,this.codes,le,ie),le+=pe};function de(ie,ae){var pe={num_htrees:null,context_map:null},le,se=0,Ae,ye;ae.readMoreInput();var Se=pe.num_htrees=D(ae)+1,Pe=pe.context_map=new Uint8Array(ie);if(Se<=1)return pe;for(le=ae.readBits(1),le&&(se=ae.readBits(4)+1),Ae=[],ye=0;ye<k;ye++)Ae[ye]=new d(0,0);for(W(Se+se,Ae,0,ae),ye=0;ye<ie;){var Me;if(ae.readMoreInput(),Me=O(Ae,0,ae),Me===0)Pe[ye]=0,++ye;else if(Me<=se)for(var X=1+(1<<Me)+ae.readBits(Me);--X;){if(ye>=ie)throw new Error("[DecodeContextMap] i >= context_map_size");Pe[ye]=0,++ye}else Pe[ye]=Me-se,++ye}return ae.readBits(1)&&ce(Pe,ie),pe}function me(ie,ae,pe,le,se,Ae,ye){var Se=pe*2,Pe=pe,Me=O(ae,pe*k,ye),X;Me===0?X=se[Se+(Ae[Pe]&1)]:Me===1?X=se[Se+(Ae[Pe]-1&1)]+1:X=Me-2,X>=ie&&(X-=ie),le[pe]=X,se[Se+(Ae[Pe]&1)]=X,++Ae[Pe]}function ee(ie,ae,pe,le,se,Ae){var ye=se+1,Se=pe&se,Pe=Ae.pos_&c.IBUF_MASK,Me;if(ae<8||Ae.bit_pos_+(ae<<3)<Ae.bit_end_pos_){for(;ae-- >0;)Ae.readMoreInput(),le[Se++]=Ae.readBits(8),Se===ye&&(ie.write(le,ye),Se=0);return}if(Ae.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;Ae.bit_pos_<32;)le[Se]=Ae.val_>>>Ae.bit_pos_,Ae.bit_pos_+=8,++Se,--ae;if(Me=Ae.bit_end_pos_-Ae.bit_pos_>>3,Pe+Me>c.IBUF_MASK){for(var X=c.IBUF_MASK+1-Pe,fe=0;fe<X;fe++)le[Se+fe]=Ae.buf_[Pe+fe];Me-=X,Se+=X,ae-=X,Pe=0}for(var fe=0;fe<Me;fe++)le[Se+fe]=Ae.buf_[Pe+fe];if(Se+=Me,ae-=Me,Se>=ye){ie.write(le,ye),Se-=ye;for(var fe=0;fe<Se;fe++)le[fe]=le[ye+fe]}for(;Se+ae>=ye;){if(Me=ye-Se,Ae.input_.read(le,Se,Me)<Me)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");ie.write(le,ye),ae-=Me,Se=0}if(Ae.input_.read(le,Se,ae)<ae)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");Ae.reset()}function $(ie){var ae=ie.bit_pos_+7&-8,pe=ie.readBits(ae-ie.bit_pos_);return pe==0}function ue(ie){var ae=new s(ie),pe=new c(ae);F(pe);var le=L(pe);return le.meta_block_length}i.BrotliDecompressedSize=ue;function ve(ie,ae){var pe=new s(ie);ae==null&&(ae=ue(ie));var le=new Uint8Array(ae),se=new l(le);return Ee(pe,se),se.pos<se.buffer.length&&(se.buffer=se.buffer.subarray(0,se.pos)),se.buffer}i.BrotliDecompressBuffer=ve;function Ee(ie,ae){var pe,le=0,se=0,Ae=0,ye,Se=0,Pe,Me,X,fe,Ye=[16,15,11,4],Ze=0,st=0,Rt=0,ut=[new te(0,0),new te(0,0),new te(0,0)],_t,pr,nt,Ha=128+c.READ_SIZE;nt=new c(ie),Ae=F(nt),ye=(1<<Ae)-16,Pe=1<<Ae,Me=Pe-1,X=new Uint8Array(Pe+Ha+u.maxDictionaryWordLength),fe=Pe,_t=[],pr=[];for(var Ua=0;Ua<3*k;Ua++)_t[Ua]=new d(0,0),pr[Ua]=new d(0,0);for(;!se;){var Er=0,Ri,sn=[1<<28,1<<28,1<<28],vt=[0],Ft=[1,1,1],re=[0,1,0,1,0,1],Ce=[0],H,Ie,Vt,Re,Po=null,Fe=null,mr,he=null,ge,Xs=0,Ut=null,ze=0,Te=0,it=null,ht=0,bt=0,Pr=0,Ur,eo;for(pe=0;pe<3;++pe)ut[pe].codes=null,ut[pe].htrees=null;nt.readMoreInput();var df=L(nt);if(Er=df.meta_block_length,le+Er>ae.buffer.length){var Jg=new Uint8Array(le+Er);Jg.set(ae.buffer),ae.buffer=Jg}if(se=df.input_end,Ri=df.is_uncompressed,df.is_metadata){for($(nt);Er>0;--Er)nt.readMoreInput(),nt.readBits(8);continue}if(Er!==0){if(Ri){nt.bit_pos_=nt.bit_pos_+7&-8,ee(ae,Er,le,X,Me,nt),le+=Er;continue}for(pe=0;pe<3;++pe)Ft[pe]=D(nt)+1,Ft[pe]>=2&&(W(Ft[pe]+2,_t,pe*k,nt),W(w,pr,pe*k,nt),sn[pe]=q(pr,pe*k,nt),Ce[pe]=1);for(nt.readMoreInput(),H=nt.readBits(2),Ie=P+(nt.readBits(4)<<H),Vt=(1<<H)-1,Re=Ie+(48<<H),Fe=new Uint8Array(Ft[0]),pe=0;pe<Ft[0];++pe)nt.readMoreInput(),Fe[pe]=nt.readBits(2)<<1;var mo=de(Ft[0]<<S,nt);mr=mo.num_htrees,Po=mo.context_map;var us=de(Ft[2]<<x,nt);for(ge=us.num_htrees,he=us.context_map,ut[0]=new te(_,mr),ut[1]=new te(y,Ft[1]),ut[2]=new te(Re,ge),pe=0;pe<3;++pe)ut[pe].decode(nt);for(Ut=0,it=0,Ur=Fe[vt[0]],bt=m.lookupOffsets[Ur],Pr=m.lookupOffsets[Ur+1],eo=ut[1].htrees[0];Er>0;){var ko,ds,Qs,Jy,v4,Js,Wa,ff,Dx,$y,Lx;for(nt.readMoreInput(),sn[1]===0&&(me(Ft[1],_t,1,vt,re,Ce,nt),sn[1]=q(pr,k,nt),eo=ut[1].htrees[vt[1]]),--sn[1],ko=O(ut[1].codes,eo,nt),ds=ko>>6,ds>=2?(ds-=2,Wa=-1):Wa=0,Qs=h.kInsertRangeLut[ds]+(ko>>3&7),Jy=h.kCopyRangeLut[ds]+(ko&7),v4=h.kInsertLengthPrefixCode[Qs].offset+nt.readBits(h.kInsertLengthPrefixCode[Qs].nbits),Js=h.kCopyLengthPrefixCode[Jy].offset+nt.readBits(h.kCopyLengthPrefixCode[Jy].nbits),st=X[le-1&Me],Rt=X[le-2&Me],$y=0;$y<v4;++$y)nt.readMoreInput(),sn[0]===0&&(me(Ft[0],_t,0,vt,re,Ce,nt),sn[0]=q(pr,0,nt),Xs=vt[0]<<S,Ut=Xs,Ur=Fe[vt[0]],bt=m.lookupOffsets[Ur],Pr=m.lookupOffsets[Ur+1]),Dx=m.lookup[bt+st]|m.lookup[Pr+Rt],ze=Po[Ut+Dx],--sn[0],Rt=st,st=O(ut[0].codes,ut[0].htrees[ze],nt),X[le&Me]=st,(le&Me)===Me&&ae.write(X,Pe),++le;if(Er-=v4,Er<=0)break;if(Wa<0){var Dx;if(nt.readMoreInput(),sn[2]===0&&(me(Ft[2],_t,2,vt,re,Ce,nt),sn[2]=q(pr,2*k,nt),Te=vt[2]<<x,it=Te),--sn[2],Dx=(Js>4?3:Js-2)&255,ht=he[it+Dx],Wa=O(ut[2].codes,ut[2].htrees[ht],nt),Wa>=Ie){var b4,kK,Bx;Wa-=Ie,kK=Wa&Vt,Wa>>=H,b4=(Wa>>1)+1,Bx=(2+(Wa&1)<<b4)-4,Wa=Ie+(Bx+nt.readBits(b4)<<H)+kK}}if(ff=Z(Wa,Ye,Ze),ff<0)throw new Error("[BrotliDecompress] invalid distance");if(le<ye&&Se!==ye?Se=le:Se=ye,Lx=le&Me,ff>Se)if(Js>=u.minDictionaryWordLength&&Js<=u.maxDictionaryWordLength){var Bx=u.offsetsByLength[Js],RK=ff-Se-1,AK=u.sizeBitsByLength[Js],c5e=(1<<AK)-1,u5e=RK&c5e,IK=RK>>AK;if(Bx+=u5e*Js,IK<g.kNumTransforms){var y4=g.transformDictionaryWord(X,Lx,Bx,Js,IK);if(Lx+=y4,le+=y4,Er-=y4,Lx>=fe){ae.write(X,Pe);for(var ck=0;ck<Lx-fe;ck++)X[ck]=X[fe+ck]}}else throw new Error("Invalid backward reference. pos: "+le+" distance: "+ff+" len: "+Js+" bytes left: "+Er)}else throw new Error("Invalid backward reference. pos: "+le+" distance: "+ff+" len: "+Js+" bytes left: "+Er);else{if(Wa>0&&(Ye[Ze&3]=ff,++Ze),Js>Er)throw new Error("Invalid backward reference. pos: "+le+" distance: "+ff+" len: "+Js+" bytes left: "+Er);for($y=0;$y<Js;++$y)X[le&Me]=X[le-ff&Me],(le&Me)===Me&&ae.write(X,Pe),++le,--Er}st=X[le-1&Me],Rt=X[le-2&Me]}le&=1073741823}}ae.write(X,le&Me)}i.BrotliDecompress=Ee,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="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"},{}],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,N,P,T=new Int32Array(l+1),M=new Int32Array(l+1);for(P=new Int32Array(v),w=0;w<v;w++)T[g[w]]++;for(M[1]=0,y=1;y<l;y++)M[y+1]=M[y]+T[y];for(w=0;w<v;w++)g[w]!==0&&(P[M[g[w]]++]=w);if(k=h,R=1<<k,N=R,M[l]===1){for(S=0;S<N;++S)f[m+S]=new s(0,P[0]&65535);return N}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=N-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,N+=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 N}},{}],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,N=A>0?C-4:C,P=0;P<N;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,N=x-C;R<N;R+=k)A.push(_(w,R,R+k>N?N: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,N=19,P=20;function T(F,D,B){this.prefix=new Uint8Array(F.length),this.transform=D,this.suffix=new Uint8Array(B.length);for(var L=0;L<F.length;L++)this.prefix[L]=F.charCodeAt(L);for(var L=0;L<B.length;L++)this.suffix[L]=B.charCodeAt(L)}var M=[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=M,i.kNumTransforms=M.length;function j(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,B,L,O){var V=M[O].prefix,W=M[O].suffix,q=M[O].transform,Z=q<w?0:q-(w-1),Q=0,ce=D,te;Z>L&&(Z=L);for(var de=0;de<V.length;)F[D++]=V[de++];for(B+=Z,L-=Z,q<=b&&(L-=q),Q=0;Q<L;Q++)F[D++]=s.dictionary[B+Q];if(te=D-L,q===_)j(F,te);else if(q===y)for(;L>0;){var me=j(F,te);te+=me,L-=me}for(var ee=0;ee<W.length;)F[D++]=W[ee++];return D-ce}},{"./dictionary":6}],12:[function(o,n,i){n.exports=o("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)})();var uM=(e=>typeof $s<"u"?$s:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof $s<"u"?$s:t)[r]}):e)(function(e){if(typeof $s<"u")return $s.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),zve=(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 uM=="function"&&uM;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 uM=="function"&&uM,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,N,P,T,M,j,F,D,B,L,O;f=u.state,m=u.next_in,L=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,N=(1<<f.lenbits)-1,P=(1<<f.distbits)-1;e:do{A<15&&(C+=L[m++]<<A,A+=8,C+=L[m++]<<A,A+=8),T=k[C&N];t:for(;;){if(M=T>>>24,C>>>=M,A-=M,M=T>>>16&255,M===0)O[g++]=T&65535;else if(M&16){j=T&65535,M&=15,M&&(A<M&&(C+=L[m++]<<A,A+=8),j+=C&(1<<M)-1,C>>>=M,A-=M),A<15&&(C+=L[m++]<<A,A+=8,C+=L[m++]<<A,A+=8),T=R[C&P];r:for(;;){if(M=T>>>24,C>>>=M,A-=M,M=T>>>16&255,M&16){if(F=T&65535,M&=15,A<M&&(C+=L[m++]<<A,A+=8,A<M&&(C+=L[m++]<<A,A+=8)),F+=C&(1<<M)-1,F>_){u.msg="invalid distance too far back",f.mode=s;break e}if(C>>>=M,A-=M,M=g-v,F>M){if(M=F-M,M>w&&f.sane){u.msg="invalid distance too far back",f.mode=s;break e}if(D=0,B=x,S===0){if(D+=y-M,M<j){j-=M;do O[g++]=x[D++];while(--M);D=g-F,B=O}}else if(S<M){if(D+=y+S-M,M-=S,M<j){j-=M;do O[g++]=x[D++];while(--M);if(D=0,S<j){M=S,j-=M;do O[g++]=x[D++];while(--M);D=g-F,B=O}}}else if(D+=S-M,M<j){j-=M;do O[g++]=x[D++];while(--M);D=g-F,B=O}for(;j>2;)O[g++]=B[D++],O[g++]=B[D++],O[g++]=B[D++],j-=3;j&&(O[g++]=B[D++],j>1&&(O[g++]=B[D++]))}else{D=g-F;do O[g++]=O[D++],O[g++]=O[D++],O[g++]=O[D++],j-=3;while(j>2);j&&(O[g++]=O[D++],j>1&&(O[g++]=O[D++]))}}else if((M&64)===0){T=R[(T&65535)+(C&(1<<M)-1)];continue r}else{u.msg="invalid distance code",f.mode=s;break e}break}}else if((M&64)===0){T=k[(T&65535)+(C&(1<<M)-1)];continue t}else if(M&32){f.mode=l;break e}else{u.msg="invalid literal/length code",f.mode=s;break e}break}}while(m<h&&g<b);j=A>>3,m-=j,A-=j<<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,N=2,P=3,T=4,M=5,j=6,F=7,D=8,B=9,L=10,O=11,V=12,W=13,q=14,Z=15,Q=16,ce=17,te=18,de=19,me=20,ee=21,$=22,ue=23,ve=24,Ee=25,ie=26,ae=27,pe=28,le=29,se=30,Ae=31,ye=32,Se=852,Pe=592,Me=15,X=Me;function fe(re){return(re>>>24&255)+(re>>>8&65280)+((re&65280)<<8)+((re&255)<<24)}function Ye(){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 Ze(re){var Ce;return!re||!re.state?S:(Ce=re.state,re.total_in=re.total_out=Ce.total=0,re.msg="",Ce.wrap&&(re.adler=Ce.wrap&1),Ce.mode=R,Ce.last=0,Ce.havedict=0,Ce.dmax=32768,Ce.head=null,Ce.hold=0,Ce.bits=0,Ce.lencode=Ce.lendyn=new s.Buf32(Se),Ce.distcode=Ce.distdyn=new s.Buf32(Pe),Ce.sane=1,Ce.back=-1,_)}function st(re){var Ce;return!re||!re.state?S:(Ce=re.state,Ce.wsize=0,Ce.whave=0,Ce.wnext=0,Ze(re))}function Rt(re,Ce){var H,Ie;return!re||!re.state||(Ie=re.state,Ce<0?(H=0,Ce=-Ce):(H=(Ce>>4)+1,Ce<48&&(Ce&=15)),Ce&&(Ce<8||Ce>15))?S:(Ie.window!==null&&Ie.wbits!==Ce&&(Ie.window=null),Ie.wrap=H,Ie.wbits=Ce,st(re))}function ut(re,Ce){var H,Ie;return re?(Ie=new Ye,re.state=Ie,Ie.window=null,H=Rt(re,Ce),H!==_&&(re.state=null),H):S}function _t(re){return ut(re,X)}var pr=!0,nt,Ha;function Ua(re){if(pr){var Ce;for(nt=new s.Buf32(512),Ha=new s.Buf32(32),Ce=0;Ce<144;)re.lens[Ce++]=8;for(;Ce<256;)re.lens[Ce++]=9;for(;Ce<280;)re.lens[Ce++]=7;for(;Ce<288;)re.lens[Ce++]=8;for(d(m,re.lens,0,288,nt,0,re.work,{bits:9}),Ce=0;Ce<32;)re.lens[Ce++]=5;d(h,re.lens,0,32,Ha,0,re.work,{bits:5}),pr=!1}re.lencode=nt,re.lenbits=9,re.distcode=Ha,re.distbits=5}function Er(re,Ce,H,Ie){var Vt,Re=re.state;return Re.window===null&&(Re.wsize=1<<Re.wbits,Re.wnext=0,Re.whave=0,Re.window=new s.Buf8(Re.wsize)),Ie>=Re.wsize?(s.arraySet(Re.window,Ce,H-Re.wsize,Re.wsize,0),Re.wnext=0,Re.whave=Re.wsize):(Vt=Re.wsize-Re.wnext,Vt>Ie&&(Vt=Ie),s.arraySet(Re.window,Ce,H-Ie,Vt,Re.wnext),Ie-=Vt,Ie?(s.arraySet(Re.window,Ce,H-Ie,Ie,0),Re.wnext=Ie,Re.whave=Re.wsize):(Re.wnext+=Vt,Re.wnext===Re.wsize&&(Re.wnext=0),Re.whave<Re.wsize&&(Re.whave+=Vt))),0}function Ri(re,Ce){var H,Ie,Vt,Re,Po,Fe,mr,he,ge,Xs,Ut,ze,Te,it,ht=0,bt,Pr,Ur,eo,df,Jg,mo,us,ko=new s.Buf8(4),ds,Qs,Jy=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!re||!re.state||!re.output||!re.input&&re.avail_in!==0)return S;H=re.state,H.mode===V&&(H.mode=W),Po=re.next_out,Vt=re.output,mr=re.avail_out,Re=re.next_in,Ie=re.input,Fe=re.avail_in,he=H.hold,ge=H.bits,Xs=Fe,Ut=mr,us=_;e:for(;;)switch(H.mode){case R:if(H.wrap===0){H.mode=W;break}for(;ge<16;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}if(H.wrap&2&&he===35615){H.check=0,ko[0]=he&255,ko[1]=he>>>8&255,H.check=c(H.check,ko,2,0),he=0,ge=0,H.mode=N;break}if(H.flags=0,H.head&&(H.head.done=!1),!(H.wrap&1)||(((he&255)<<8)+(he>>8))%31){re.msg="incorrect header check",H.mode=se;break}if((he&15)!==k){re.msg="unknown compression method",H.mode=se;break}if(he>>>=4,ge-=4,mo=(he&15)+8,H.wbits===0)H.wbits=mo;else if(mo>H.wbits){re.msg="invalid window size",H.mode=se;break}H.dmax=1<<mo,re.adler=H.check=1,H.mode=he&512?L:V,he=0,ge=0;break;case N:for(;ge<16;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}if(H.flags=he,(H.flags&255)!==k){re.msg="unknown compression method",H.mode=se;break}if(H.flags&57344){re.msg="unknown header flags set",H.mode=se;break}H.head&&(H.head.text=he>>8&1),H.flags&512&&(ko[0]=he&255,ko[1]=he>>>8&255,H.check=c(H.check,ko,2,0)),he=0,ge=0,H.mode=P;case P:for(;ge<32;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}H.head&&(H.head.time=he),H.flags&512&&(ko[0]=he&255,ko[1]=he>>>8&255,ko[2]=he>>>16&255,ko[3]=he>>>24&255,H.check=c(H.check,ko,4,0)),he=0,ge=0,H.mode=T;case T:for(;ge<16;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}H.head&&(H.head.xflags=he&255,H.head.os=he>>8),H.flags&512&&(ko[0]=he&255,ko[1]=he>>>8&255,H.check=c(H.check,ko,2,0)),he=0,ge=0,H.mode=M;case M:if(H.flags&1024){for(;ge<16;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}H.length=he,H.head&&(H.head.extra_len=he),H.flags&512&&(ko[0]=he&255,ko[1]=he>>>8&255,H.check=c(H.check,ko,2,0)),he=0,ge=0}else H.head&&(H.head.extra=null);H.mode=j;case j:if(H.flags&1024&&(ze=H.length,ze>Fe&&(ze=Fe),ze&&(H.head&&(mo=H.head.extra_len-H.length,H.head.extra||(H.head.extra=new Array(H.head.extra_len)),s.arraySet(H.head.extra,Ie,Re,ze,mo)),H.flags&512&&(H.check=c(H.check,Ie,ze,Re)),Fe-=ze,Re+=ze,H.length-=ze),H.length))break e;H.length=0,H.mode=F;case F:if(H.flags&2048){if(Fe===0)break e;ze=0;do mo=Ie[Re+ze++],H.head&&mo&&H.length<65536&&(H.head.name+=String.fromCharCode(mo));while(mo&&ze<Fe);if(H.flags&512&&(H.check=c(H.check,Ie,ze,Re)),Fe-=ze,Re+=ze,mo)break e}else H.head&&(H.head.name=null);H.length=0,H.mode=D;case D:if(H.flags&4096){if(Fe===0)break e;ze=0;do mo=Ie[Re+ze++],H.head&&mo&&H.length<65536&&(H.head.comment+=String.fromCharCode(mo));while(mo&&ze<Fe);if(H.flags&512&&(H.check=c(H.check,Ie,ze,Re)),Fe-=ze,Re+=ze,mo)break e}else H.head&&(H.head.comment=null);H.mode=B;case B:if(H.flags&512){for(;ge<16;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}if(he!==(H.check&65535)){re.msg="header crc mismatch",H.mode=se;break}he=0,ge=0}H.head&&(H.head.hcrc=H.flags>>9&1,H.head.done=!0),re.adler=H.check=0,H.mode=V;break;case L:for(;ge<32;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}re.adler=H.check=fe(he),he=0,ge=0,H.mode=O;case O:if(H.havedict===0)return re.next_out=Po,re.avail_out=mr,re.next_in=Re,re.avail_in=Fe,H.hold=he,H.bits=ge,w;re.adler=H.check=1,H.mode=V;case V:if(Ce===v||Ce===b)break e;case W:if(H.last){he>>>=ge&7,ge-=ge&7,H.mode=ae;break}for(;ge<3;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}switch(H.last=he&1,he>>>=1,ge-=1,he&3){case 0:H.mode=q;break;case 1:if(Ua(H),H.mode=me,Ce===b){he>>>=2,ge-=2;break e}break;case 2:H.mode=ce;break;case 3:re.msg="invalid block type",H.mode=se}he>>>=2,ge-=2;break;case q:for(he>>>=ge&7,ge-=ge&7;ge<32;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}if((he&65535)!==(he>>>16^65535)){re.msg="invalid stored block lengths",H.mode=se;break}if(H.length=he&65535,he=0,ge=0,H.mode=Z,Ce===b)break e;case Z:H.mode=Q;case Q:if(ze=H.length,ze){if(ze>Fe&&(ze=Fe),ze>mr&&(ze=mr),ze===0)break e;s.arraySet(Vt,Ie,Re,ze,Po),Fe-=ze,Re+=ze,mr-=ze,Po+=ze,H.length-=ze;break}H.mode=V;break;case ce:for(;ge<14;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}if(H.nlen=(he&31)+257,he>>>=5,ge-=5,H.ndist=(he&31)+1,he>>>=5,ge-=5,H.ncode=(he&15)+4,he>>>=4,ge-=4,H.nlen>286||H.ndist>30){re.msg="too many length or distance symbols",H.mode=se;break}H.have=0,H.mode=te;case te:for(;H.have<H.ncode;){for(;ge<3;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}H.lens[Jy[H.have++]]=he&7,he>>>=3,ge-=3}for(;H.have<19;)H.lens[Jy[H.have++]]=0;if(H.lencode=H.lendyn,H.lenbits=7,ds={bits:H.lenbits},us=d(f,H.lens,0,19,H.lencode,0,H.work,ds),H.lenbits=ds.bits,us){re.msg="invalid code lengths set",H.mode=se;break}H.have=0,H.mode=de;case de:for(;H.have<H.nlen+H.ndist;){for(;ht=H.lencode[he&(1<<H.lenbits)-1],bt=ht>>>24,Pr=ht>>>16&255,Ur=ht&65535,!(bt<=ge);){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}if(Ur<16)he>>>=bt,ge-=bt,H.lens[H.have++]=Ur;else{if(Ur===16){for(Qs=bt+2;ge<Qs;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}if(he>>>=bt,ge-=bt,H.have===0){re.msg="invalid bit length repeat",H.mode=se;break}mo=H.lens[H.have-1],ze=3+(he&3),he>>>=2,ge-=2}else if(Ur===17){for(Qs=bt+3;ge<Qs;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}he>>>=bt,ge-=bt,mo=0,ze=3+(he&7),he>>>=3,ge-=3}else{for(Qs=bt+7;ge<Qs;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}he>>>=bt,ge-=bt,mo=0,ze=11+(he&127),he>>>=7,ge-=7}if(H.have+ze>H.nlen+H.ndist){re.msg="invalid bit length repeat",H.mode=se;break}for(;ze--;)H.lens[H.have++]=mo}}if(H.mode===se)break;if(H.lens[256]===0){re.msg="invalid code -- missing end-of-block",H.mode=se;break}if(H.lenbits=9,ds={bits:H.lenbits},us=d(m,H.lens,0,H.nlen,H.lencode,0,H.work,ds),H.lenbits=ds.bits,us){re.msg="invalid literal/lengths set",H.mode=se;break}if(H.distbits=6,H.distcode=H.distdyn,ds={bits:H.distbits},us=d(h,H.lens,H.nlen,H.ndist,H.distcode,0,H.work,ds),H.distbits=ds.bits,us){re.msg="invalid distances set",H.mode=se;break}if(H.mode=me,Ce===b)break e;case me:H.mode=ee;case ee:if(Fe>=6&&mr>=258){re.next_out=Po,re.avail_out=mr,re.next_in=Re,re.avail_in=Fe,H.hold=he,H.bits=ge,u(re,Ut),Po=re.next_out,Vt=re.output,mr=re.avail_out,Re=re.next_in,Ie=re.input,Fe=re.avail_in,he=H.hold,ge=H.bits,H.mode===V&&(H.back=-1);break}for(H.back=0;ht=H.lencode[he&(1<<H.lenbits)-1],bt=ht>>>24,Pr=ht>>>16&255,Ur=ht&65535,!(bt<=ge);){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}if(Pr&&(Pr&240)===0){for(eo=bt,df=Pr,Jg=Ur;ht=H.lencode[Jg+((he&(1<<eo+df)-1)>>eo)],bt=ht>>>24,Pr=ht>>>16&255,Ur=ht&65535,!(eo+bt<=ge);){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}he>>>=eo,ge-=eo,H.back+=eo}if(he>>>=bt,ge-=bt,H.back+=bt,H.length=Ur,Pr===0){H.mode=ie;break}if(Pr&32){H.back=-1,H.mode=V;break}if(Pr&64){re.msg="invalid literal/length code",H.mode=se;break}H.extra=Pr&15,H.mode=$;case $:if(H.extra){for(Qs=H.extra;ge<Qs;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}H.length+=he&(1<<H.extra)-1,he>>>=H.extra,ge-=H.extra,H.back+=H.extra}H.was=H.length,H.mode=ue;case ue:for(;ht=H.distcode[he&(1<<H.distbits)-1],bt=ht>>>24,Pr=ht>>>16&255,Ur=ht&65535,!(bt<=ge);){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}if((Pr&240)===0){for(eo=bt,df=Pr,Jg=Ur;ht=H.distcode[Jg+((he&(1<<eo+df)-1)>>eo)],bt=ht>>>24,Pr=ht>>>16&255,Ur=ht&65535,!(eo+bt<=ge);){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}he>>>=eo,ge-=eo,H.back+=eo}if(he>>>=bt,ge-=bt,H.back+=bt,Pr&64){re.msg="invalid distance code",H.mode=se;break}H.offset=Ur,H.extra=Pr&15,H.mode=ve;case ve:if(H.extra){for(Qs=H.extra;ge<Qs;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}H.offset+=he&(1<<H.extra)-1,he>>>=H.extra,ge-=H.extra,H.back+=H.extra}if(H.offset>H.dmax){re.msg="invalid distance too far back",H.mode=se;break}H.mode=Ee;case Ee:if(mr===0)break e;if(ze=Ut-mr,H.offset>ze){if(ze=H.offset-ze,ze>H.whave&&H.sane){re.msg="invalid distance too far back",H.mode=se;break}ze>H.wnext?(ze-=H.wnext,Te=H.wsize-ze):Te=H.wnext-ze,ze>H.length&&(ze=H.length),it=H.window}else it=Vt,Te=Po-H.offset,ze=H.length;ze>mr&&(ze=mr),mr-=ze,H.length-=ze;do Vt[Po++]=it[Te++];while(--ze);H.length===0&&(H.mode=ee);break;case ie:if(mr===0)break e;Vt[Po++]=H.length,mr--,H.mode=ee;break;case ae:if(H.wrap){for(;ge<32;){if(Fe===0)break e;Fe--,he|=Ie[Re++]<<ge,ge+=8}if(Ut-=mr,re.total_out+=Ut,H.total+=Ut,Ut&&(re.adler=H.check=H.flags?c(H.check,Vt,Ut,Po-Ut):l(H.check,Vt,Ut,Po-Ut)),Ut=mr,(H.flags?he:fe(he))!==H.check){re.msg="incorrect data check",H.mode=se;break}he=0,ge=0}H.mode=pe;case pe:if(H.wrap&&H.flags){for(;ge<32;){if(Fe===0)break e;Fe--,he+=Ie[Re++]<<ge,ge+=8}if(he!==(H.total&4294967295)){re.msg="incorrect length check",H.mode=se;break}he=0,ge=0}H.mode=le;case le:us=y;break e;case se:us=x;break e;case Ae:return C;case ye:default:return S}return re.next_out=Po,re.avail_out=mr,re.next_in=Re,re.avail_in=Fe,H.hold=he,H.bits=ge,(H.wsize||Ut!==re.avail_out&&H.mode<se&&(H.mode<ae||Ce!==g))&&Er(re,re.output,re.next_out,Ut-re.avail_out)?(H.mode=Ae,C):(Xs-=re.avail_in,Ut-=re.avail_out,re.total_in+=Xs,re.total_out+=Ut,H.total+=Ut,H.wrap&&Ut&&(re.adler=H.check=H.flags?c(H.check,Vt,Ut,re.next_out-Ut):l(H.check,Vt,Ut,re.next_out-Ut)),re.data_type=H.bits+(H.last?64:0)+(H.mode===V?128:0)+(H.mode===me||H.mode===Z?256:0),(Xs===0&&Ut===0||Ce===g)&&us===_&&(us=A),us)}function sn(re){if(!re||!re.state)return S;var Ce=re.state;return Ce.window&&(Ce.window=null),re.state=null,_}function vt(re,Ce){var H;return!re||!re.state||(H=re.state,(H.wrap&2)===0)?S:(H.head=Ce,Ce.done=!1,_)}function Ft(re,Ce){var H=Ce.length,Ie,Vt,Re;return!re||!re.state||(Ie=re.state,Ie.wrap!==0&&Ie.mode!==O)?S:Ie.mode===O&&(Vt=1,Vt=l(Vt,Ce,H,0),Vt!==Ie.check)?x:(Re=Er(re,Ce,H,H),Re?(Ie.mode=Ae,C):(Ie.havedict=1,_))}i.inflateReset=st,i.inflateReset2=Rt,i.inflateResetKeep=Ze,i.inflateInit=_t,i.inflateInit2=ut,i.inflate=Ri,i.inflateEnd=sn,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 N=R.bits,P=0,T=0,M=0,j=0,F=0,D=0,B=0,L=0,O=0,V=0,W,q,Z,Q,ce,te=null,de=0,me,ee=new s.Buf16(l+1),$=new s.Buf16(l+1),ue=null,ve=0,Ee,ie,ae;for(P=0;P<=l;P++)ee[P]=0;for(T=0;T<x;T++)ee[w[S+T]]++;for(F=N,j=l;j>=1&&ee[j]===0;j--);if(F>j&&(F=j),j===0)return C[A++]=1<<24|64<<16|0,C[A++]=1<<24|64<<16|0,R.bits=1,0;for(M=1;M<j&&ee[M]===0;M++);for(F<M&&(F=M),L=1,P=1;P<=l;P++)if(L<<=1,L-=ee[P],L<0)return-1;if(L>0&&(y===d||j!==1))return-1;for($[1]=0,P=1;P<l;P++)$[P+1]=$[P]+ee[P];for(T=0;T<x;T++)w[S+T]!==0&&(k[$[w[S+T]]++]=T);if(y===d?(te=ue=k,me=19):y===f?(te=h,de-=257,ue=g,ve-=257,me=256):(te=v,ue=b,me=-1),V=0,T=0,P=M,ce=A,D=F,B=0,Z=-1,O=1<<F,Q=O-1,y===f&&O>c||y===m&&O>u)return 1;for(;;){Ee=P-B,k[T]<me?(ie=0,ae=k[T]):k[T]>me?(ie=ue[ve+k[T]],ae=te[de+k[T]]):(ie=96,ae=0),W=1<<P-B,q=1<<D,M=q;do q-=W,C[ce+(V>>B)+q]=Ee<<24|ie<<16|ae|0;while(q!==0);for(W=1<<P-1;V&W;)W>>=1;if(W!==0?(V&=W-1,V+=W):V=0,T++,--ee[P]===0){if(P===j)break;P=w[S+k[T]]}if(P>F&&(V&Q)!==Z){for(B===0&&(B=F),ce+=M,D=P-B,L=1<<D;D+B<j&&(L-=ee[D+B],!(L<=0));)D++,L<<=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-B<<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,N,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,N=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(N)):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 cXt=globalThis.fetch,dM=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]`}},LKe=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)}},BKe=new Date("1904-01-01T00:00:00+0000").getTime();function VKe(e){return Array.from(e).map(t=>String.fromCharCode(t)).join("")}var jKe=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 VKe([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(BKe+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}},xo=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 xo{constructor(e,t,r){let{parser:o,start:n}=super(new jKe(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 zKe=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 HKe(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)})}},HKe=class{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}},Hve=zve.inflate||void 0,Uve=void 0,UKe=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 WKe(o)),GKe(this,t,r)}},WKe=class{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}};function GKe(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(Hve)l=Hve(new Uint8Array(s));else if(Uve)l=Uve(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 Wve=jve,Gve=void 0,YKe=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 qKe(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(Wve)i=Wve(new Uint8Array(s));else if(Gve)i=new Uint8Array(Gve(s));else{let l="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(l),new Error(l)}KKe(this,i,r)}},qKe=class{constructor(e){this.flags=e.uint8;let t=this.tagNumber=this.flags&63;t===63?this.tag=e.tag:this.tag=ZKe(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 KKe(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 ZKe(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 Jve={},$ve=!1;Promise.all([Promise.resolve().then(function(){return xZe}),Promise.resolve().then(function(){return TZe}),Promise.resolve().then(function(){return PZe}),Promise.resolve().then(function(){return AZe}),Promise.resolve().then(function(){return OZe}),Promise.resolve().then(function(){return LZe}),Promise.resolve().then(function(){return VZe}),Promise.resolve().then(function(){return zZe}),Promise.resolve().then(function(){return QZe}),Promise.resolve().then(function(){return lXe}),Promise.resolve().then(function(){return ZXe}),Promise.resolve().then(function(){return QXe}),Promise.resolve().then(function(){return tQe}),Promise.resolve().then(function(){return iQe}),Promise.resolve().then(function(){return aQe}),Promise.resolve().then(function(){return cQe}),Promise.resolve().then(function(){return fQe}),Promise.resolve().then(function(){return mQe}),Promise.resolve().then(function(){return gQe}),Promise.resolve().then(function(){return bQe}),Promise.resolve().then(function(){return wQe}),Promise.resolve().then(function(){return SQe}),Promise.resolve().then(function(){return TQe}),Promise.resolve().then(function(){return kQe}),Promise.resolve().then(function(){return RQe}),Promise.resolve().then(function(){return IQe}),Promise.resolve().then(function(){return NQe}),Promise.resolve().then(function(){return FQe}),Promise.resolve().then(function(){return LQe}),Promise.resolve().then(function(){return jQe}),Promise.resolve().then(function(){return YQe}),Promise.resolve().then(function(){return XQe}),Promise.resolve().then(function(){return $Qe}),Promise.resolve().then(function(){return oJe}),Promise.resolve().then(function(){return iJe}),Promise.resolve().then(function(){return aJe}),Promise.resolve().then(function(){return uJe}),Promise.resolve().then(function(){return fJe}),Promise.resolve().then(function(){return vJe}),Promise.resolve().then(function(){return yJe}),Promise.resolve().then(function(){return SJe})]).then(e=>{e.forEach(t=>{let r=Object.keys(t)[0];Jve[r]=t[r]}),$ve=!0});function XKe(e,t,r){let o=t.tag.replace(/[^\w\d]/g,""),n=Jve[o];return n?new n(t,r,e):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function QKe(){let e=0;function t(r,o){if(!$ve)return e>10?o(new Error("loading took too long")):(e++,setTimeout(()=>t(r),250));r(XKe)}return new Promise((r,o)=>t(r))}function JKe(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 $Ke(e,t,r={}){if(!globalThis.document)return;let o=JKe(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 eZe=[0,1,0,0],tZe=[79,84,84,79],rZe=[119,79,70,70],oZe=[119,79,70,50];function fM(e,t){if(e.length===t.length){for(let r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function nZe(e){let t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];if(fM(t,eZe)||fM(t,tZe))return"SFNT";if(fM(t,rZe))return"WOFF";if(fM(t,oZe))return"WOFF2"}function iZe(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}var mM=class extends LKe{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 $Ke(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>iZe(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new dM("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=nZe(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 dM("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return QKe().then(t=>(e==="SFNT"&&(this.opentype=new zKe(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new UKe(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new YKe(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 dM("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 dM("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=mM;var gp=class extends xo{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},sZe=class extends gp{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}]}},aZe=class extends gp{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 lZe(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}))}},lZe=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}},cZe=class extends gp{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}))}},uZe=class extends gp{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}]}},dZe=class extends gp{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 fZe(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}))}},fZe=class{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}},pZe=class extends gp{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}]}},mZe=class extends gp{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 hZe(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}))}},hZe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}},gZe=class extends gp{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 vZe(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}))}},vZe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}},bZe=class extends gp{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 yZe(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)}},yZe=class{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}};function wZe(e,t,r){let o=e.uint16;return o===0?new sZe(e,t,r):o===2?new aZe(e,t,r):o===4?new cZe(e,t,r):o===6?new uZe(e,t,r):o===8?new dZe(e,t,r):o===10?new pZe(e,t,r):o===12?new mZe(e,t,r):o===13?new gZe(e,t,r):o===14?new bZe(e,t,r):{}}var _Ze=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 SZe(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})}},SZe=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,wZe(e,r,o)))}},xZe=Object.freeze({__proto__:null,cmap:_Ze}),CZe=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})}},TZe=Object.freeze({__proto__:null,head:CZe}),EZe=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()}},PZe=Object.freeze({__proto__:null,hhea:EZe}),kZe=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 RZe(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)))}}},RZe=class{constructor(e,t){this.advanceWidth=e,this.lsb=t}},AZe=Object.freeze({__proto__:null,hmtx:kZe}),IZe=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()}},OZe=Object.freeze({__proto__:null,maxp:IZe}),NZe=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 FZe(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new MZe(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}},MZe=class{constructor(e,t){this.length=e,this.offset=t}},FZe=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,DZe(e,this)))}};function DZe(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 LZe=Object.freeze({__proto__:null,name:NZe}),BZe=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()}},VZe=Object.freeze({__proto__:null,OS2:BZe}),jZe=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]<Yve.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 Yve[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(""))}},Yve=[".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"],zZe=Object.freeze({__proto__:null,post:jZe}),HZe=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 FW({offset:e.offset+this.horizAxisOffset},t)),je(this,"vertAxis",()=>new FW({offset:e.offset+this.vertAxisOffset},t)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,je(this,"itemVarStore",()=>new FW({offset:e.offset+this.itemVarStoreOffset},t)))}},FW=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 UZe({offset:e.offset+this.baseTagListOffset},t)),je(this,"baseScriptList",()=>new WZe({offset:e.offset+this.baseScriptListOffset},t))}},UZe=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)}},WZe=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 GZe(this.start,r))))}},GZe=class{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,je(this,"baseScriptTable",()=>(t.currentPosition=e+this.baseScriptOffset,new YZe(t)))}},YZe=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 qZe(this.start,e)),je(this,"baseValues",()=>(e.currentPosition=this.start+this.baseValuesOffset,new KZe(e))),je(this,"defaultMinMax",()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new ebe(e)))}},qZe=class{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,je(this,"minMax",()=>(t.currentPosition=e+this.minMaxOffset,new ebe(t)))}},KZe=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 XZe(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 ZZe(e))))}},ZZe=class{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}},XZe=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)}},QZe=Object.freeze({__proto__:null,BASE:HZe}),qve=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 JZe(e)))}},JZe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}},iE=class extends xo{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 $Ze(e)))}},$Ze=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}},eXe=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)}},tXe=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 qve(r)}),this.attachListOffset=r.Offset16,je(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new rXe(r)}),this.ligCaretListOffset=r.Offset16,je(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new nXe(r)}),this.markAttachClassDefOffset=r.Offset16,je(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new qve(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,je(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new aXe(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,je(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new eXe(r)}))}},rXe=class extends xo{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 oXe(this.parser)}},oXe=class{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map(t=>e.uint16)}},nXe=class extends xo{constructor(e){super(e),this.coverageOffset=e.Offset16,je(this,"coverage",()=>(e.currentPosition=this.start+this.coverageOffset,new iE(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 iXe(this.parser)}},iXe=class extends xo{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 sXe(this.parser)}},sXe=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)}},aXe=class extends xo{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 iE(this.parser)}},lXe=Object.freeze({__proto__:null,GDEF:tXe}),Kve=class extends xo{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(t=>new cXe(e))}},cXe=class{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}},uXe=class extends xo{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(t=>new dXe(e))}},dXe=class{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}},Zve=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)}},Xve=class extends xo{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map(t=>new fXe(e))}},fXe=class{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}},pXe=class extends xo{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 hXe(e);if(t.startsWith("cc"))return new mXe(e);if(t.startsWith("ss"))return new gXe(e)}}},mXe=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)}},hXe=class{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}},gXe=class{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}};function tbe(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}var Ub=class extends xo{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 iE(e)}},LW=class{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},vXe=class extends Ub{constructor(e){super(e),this.deltaGlyphID=e.int16}},bXe=class extends Ub{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 yXe(t)}},yXe=class{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},wXe=class extends Ub{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 _Xe(t)}},_Xe=class{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},SXe=class extends Ub{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 xXe(t)}},xXe=class extends xo{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 CXe(t)}},CXe=class{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(t=>e.uint16)}},TXe=class extends Ub{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&&(tbe(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 LW(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 EXe(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 PXe(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 iE(t)}},EXe=class extends xo{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 rbe(t)}},rbe=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 LW(e))}},PXe=class extends xo{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 kXe(t)}},kXe=class extends rbe{constructor(e){super(e)}},RXe=class extends Ub{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&&(tbe(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 obe(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 AXe(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 OXe(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 iE(t)}},AXe=class extends xo{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 IXe(t)}},IXe=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 LW(e))}},OXe=class extends xo{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 NXe(t)}},NXe=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 obe(e))}},obe=class extends xo{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},MXe=class extends xo{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}},FXe=class extends Ub{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)}},DXe={buildSubtable:function(e,t){let r=new[void 0,vXe,bXe,wXe,SXe,TXe,RXe,MXe,FXe][e](t);return r.type=e,r}},vp=class extends xo{constructor(e){super(e)}},LXe=class extends vp{constructor(e){super(e),console.log("lookup type 1")}},BXe=class extends vp{constructor(e){super(e),console.log("lookup type 2")}},VXe=class extends vp{constructor(e){super(e),console.log("lookup type 3")}},jXe=class extends vp{constructor(e){super(e),console.log("lookup type 4")}},zXe=class extends vp{constructor(e){super(e),console.log("lookup type 5")}},HXe=class extends vp{constructor(e){super(e),console.log("lookup type 6")}},UXe=class extends vp{constructor(e){super(e),console.log("lookup type 7")}},WXe=class extends vp{constructor(e){super(e),console.log("lookup type 8")}},GXe=class extends vp{constructor(e){super(e),console.log("lookup type 9")}},YXe={buildSubtable:function(e,t){let r=new[void 0,LXe,BXe,VXe,jXe,zXe,HXe,UXe,WXe,GXe][e](t);return r.type=e,r}},Qve=class extends xo{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map(t=>e.Offset16)}},qXe=class extends xo{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"?DXe:YXe;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}},nbe=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?Kve.EMPTY:(o.currentPosition=n+this.scriptListOffset,new Kve(o))),je(this,"featureList",()=>i?Xve.EMPTY:(o.currentPosition=n+this.featureListOffset,new Xve(o))),je(this,"lookupList",()=>i?Qve.EMPTY:(o.currentPosition=n+this.lookupListOffset,new Qve(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 uXe(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 Zve(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 Zve(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 pXe(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 qXe(this.parser,t)}},KXe=class extends nbe{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}},ZXe=Object.freeze({__proto__:null,GSUB:KXe}),XXe=class extends nbe{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}},QXe=Object.freeze({__proto__:null,GPOS:XXe}),JXe=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 $Xe(r)}},$Xe=class extends xo{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map(t=>new eQe(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)}},eQe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}},tQe=Object.freeze({__proto__:null,SVG:JXe}),rQe=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 oQe(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 nQe(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)}},oQe=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}},nQe=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)}},iQe=Object.freeze({__proto__:null,fvar:rQe}),sQe=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))}},aQe=Object.freeze({__proto__:null,cvt:sQe}),lQe=class extends yt{constructor(e,t){let{p:r}=super(e,t);je(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},cQe=Object.freeze({__proto__:null,fpgm:lQe}),uQe=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 dQe(r)))}},dQe=class{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}},fQe=Object.freeze({__proto__:null,gasp:uQe}),pQe=class extends yt{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}},mQe=Object.freeze({__proto__:null,glyf:pQe}),hQe=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}}},gQe=Object.freeze({__proto__:null,loca:hQe}),vQe=class extends yt{constructor(e,t){let{p:r}=super(e,t);je(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},bQe=Object.freeze({__proto__:null,prep:vQe}),yQe=class extends yt{constructor(e,t){let{p:r}=super(e,t);je(this,"data",()=>r.readBytes())}},wQe=Object.freeze({__proto__:null,CFF:yQe}),_Qe=class extends yt{constructor(e,t){let{p:r}=super(e,t);je(this,"data",()=>r.readBytes())}},SQe=Object.freeze({__proto__:null,CFF2:_Qe}),xQe=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 CQe(r)))}},CQe=class{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}},TQe=Object.freeze({__proto__:null,VORG:xQe}),EQe=class{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new pM(e),this.vert=new pM(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}},PQe=class{constructor(e){this.hori=new pM(e),this.vert=new pM(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}},pM=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 EQe(o)))}},kQe=Object.freeze({__proto__:null,EBLC:ibe}),sbe=class extends yt{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},RQe=Object.freeze({__proto__:null,EBDT:sbe}),AQe=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 PQe(r)))}},IQe=Object.freeze({__proto__:null,EBSC:AQe}),OQe=class extends ibe{constructor(e,t){super(e,t,"CBLC")}},NQe=Object.freeze({__proto__:null,CBLC:OQe}),MQe=class extends sbe{constructor(e,t){super(e,t,"CBDT")}},FQe=Object.freeze({__proto__:null,CBDT:MQe}),DQe=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))}},LQe=Object.freeze({__proto__:null,sbix:DQe}),BQe=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 DW(this.parser),o=r.gID,n=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=n;let i=new DW(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 DW(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 VQe(p))}},DW=class{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}},VQe=class{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}},jQe=Object.freeze({__proto__:null,COLR:BQe}),zQe=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 HQe(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 UQe(r,o))),je(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new WQe(r,o))),je(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new GQe(r,o))))}},HQe=class{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}},UQe=class{constructor(e,t){this.paletteTypes=[...new Array(t)].map(r=>e.uint32)}},WQe=class{constructor(e,t){this.paletteLabels=[...new Array(t)].map(r=>e.uint16)}},GQe=class{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map(r=>e.uint16)}},YQe=Object.freeze({__proto__:null,CPAL:zQe}),qQe=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 KQe(r))}getData(e){let t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new ZQe(this.parser)}},KQe=class{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}},ZQe=class{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}},XQe=Object.freeze({__proto__:null,DSIG:qQe}),QQe=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 JQe(o,n))}},JQe=class{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}},$Qe=Object.freeze({__proto__:null,hdmx:QQe}),eJe=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 tJe(r);n.push(s),o+=s}return n})}},tJe=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 rJe(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]}},rJe=class{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}},oJe=Object.freeze({__proto__:null,kern:eJe}),nJe=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)}},iJe=Object.freeze({__proto__:null,LTSH:nJe}),sJe=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.")}},aJe=Object.freeze({__proto__:null,MERG:sJe}),lJe=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 cJe(this.tableStart,r))}},cJe=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)}},uJe=Object.freeze({__proto__:null,meta:lJe}),dJe=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.")}},fJe=Object.freeze({__proto__:null,PCLT:dJe}),pJe=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 mJe(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new hJe(r))}},mJe=class{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}},hJe=class{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map(t=>new gJe(e))}},gJe=class{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}},vJe=Object.freeze({__proto__:null,VDMX:pJe}),bJe=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()}},yJe=Object.freeze({__proto__:null,vhea:bJe}),wJe=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 _Je(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)))}}},_Je=class{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}},SJe=Object.freeze({__proto__:null,vmtx:wJe});var abe=a(G(),1);var{kebabCase:xJe}=Tt(abe.privateApis);function lbe(e){let t=e.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:xJe(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(t)}var Ta=a(E(),1);function CJe(){let{installFonts:e}=(0,sE.useContext)(yi),[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 IW.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,b_.__)("Sorry, you are not allowed to upload this file type."):(0,b_.__)("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 Yh(b,b.file,"all"),b}));m(g)};async function u(h){let g=new mM("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 mM("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=lbe(h);try{await e(g),n({type:"success",message:(0,b_.__)("Fonts were installed successfully.")})}catch(v){let b=v;n({type:"error",message:b.message,errors:b?.installationErrors})}r(!1)};return(0,Ta.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,Ta.jsx)($i.DropZone,{onFilesDrop:i}),(0,Ta.jsxs)($i.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,Ta.jsxs)($i.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>n(null),children:[o.message,o.errors&&(0,Ta.jsx)("ul",{children:o.errors.map((h,g)=>(0,Ta.jsx)("li",{children:h},g))})]}),t&&(0,Ta.jsx)($i.FlexItem,{children:(0,Ta.jsx)("div",{className:"font-library__upload-area",children:(0,Ta.jsx)($i.ProgressBar,{})})}),!t&&(0,Ta.jsx)($i.FormFileUpload,{accept:IW.map(h=>`.${h}`).join(","),multiple:!0,onChange:s,render:({openFileDialog:h})=>(0,Ta.jsx)($i.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,b_.__)("Upload font")})}),(0,Ta.jsx)($i.__experimentalText,{className:"font-library__upload-area__text",children:(0,b_.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var hM=CJe;var Zc=a(E(),1),{Tabs:gM}=Tt(vM.privateApis),TJe={id:"installed-fonts",title:(0,y_._x)("Library","Font library")},EJe={id:"upload-fonts",title:(0,y_._x)("Upload","noun")},PJe=e=>e.map(({slug:t,name:r})=>({id:t,title:e.length===1&&t==="google-fonts"?(0,y_.__)("Install Fonts"):r}));function kJe({onRequestClose:e,defaultTabId:t="installed-fonts"}){let{records:r=[]}=(0,bM.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),o=(0,cbe.useSelect)(i=>i(bM.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]),n=[TJe];return o&&(n.push(EJe),n.push(...PJe(r||[]))),(0,Zc.jsx)(vM.Modal,{title:(0,y_.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,Zc.jsxs)(gM,{defaultTabId:t,children:[(0,Zc.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,Zc.jsx)(gM.TabList,{children:n.map(({id:i,title:s})=>(0,Zc.jsx)(gM.Tab,{tabId:i,children:s},i))})}),n.map(({id:i})=>{let s;switch(i){case"upload-fonts":s=(0,Zc.jsx)(hM,{});break;case"installed-fonts":s=(0,Zc.jsx)(sM,{});break;default:s=(0,Zc.jsx)(lM,{slug:i})}return(0,Zc.jsx)(gM.TabPanel,{tabId:i,focusable:!1,className:"font-library-modal__tab-panel",children:s},i)})]})})}var ube=kJe;var yM=a(z(),1),Wb=a(G(),1),dbe=a(U(),1);var w_=a(E(),1);function RJe({font:e}){let{handleSetLibraryFontSelected:t,setModalTabOpen:r}=(0,dbe.useContext)(yi),o=e?.fontFace?.length||1,n=()=>{t?.(e),r?.("installed-fonts")},i=Fb(e);return(0,w_.jsx)(Wb.__experimentalItem,{onClick:n,children:(0,w_.jsxs)(Wb.__experimentalHStack,{justify:"space-between",children:[(0,w_.jsx)(Wb.FlexItem,{style:i,children:e.name}),(0,w_.jsx)(Wb.FlexItem,{className:"global-styles-ui-screen-typography__font-variants-count",children:(0,yM.sprintf)((0,yM._n)("%d variant","%d variants",o),o)})]})})}var fbe=RJe;var vn=a(E(),1);function pbe(e,t){return e?e.map(r=>mp(r,{source:t})):[]}function AJe(){let{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:r}=(0,mbe.useContext)(yi),[o]=Le("typography.fontFamilies"),[n]=Le("typography.fontFamilies",void 0,"base"),i=pbe(o?.theme,"theme"),s=pbe(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,vn.jsxs)(vn.Fragment,{children:[!!t&&(0,vn.jsx)(ube,{onRequestClose:()=>r?.(""),defaultTabId:t}),(0,vn.jsxs)(Xc.__experimentalVStack,{spacing:2,children:[(0,vn.jsxs)(Xc.__experimentalHStack,{justify:"space-between",children:[(0,vn.jsx)(Ho,{level:3,children:(0,Gb.__)("Fonts")}),(0,vn.jsx)(Xc.Button,{onClick:()=>r?.("installed-fonts"),label:(0,Gb.__)("Manage fonts"),icon:SV,size:"small"})]}),l.length>0&&(0,vn.jsx)(vn.Fragment,{children:(0,vn.jsx)(Xc.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:l.map(d=>(0,vn.jsx)(fbe,{font:d},d.slug))})}),!c&&(0,vn.jsxs)(vn.Fragment,{children:[(0,vn.jsx)(Xc.__experimentalText,{as:"p",children:u?(0,Gb.__)("No fonts activated."):(0,Gb.__)("No fonts installed.")}),(0,vn.jsx)(Xc.Button,{className:"global-styles-ui-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{r?.(u?"installed-fonts":"upload-fonts")},children:u?(0,Gb.__)("Manage fonts"):(0,Gb.__)("Add fonts")})]})]})]})}function hbe({...e}){return(0,vn.jsx)(eM,{children:(0,vn.jsx)(AJe,{...e})})}var aE=a(z(),1),bp=a(G(),1);var Ad=a(E(),1);function IJe(){return(0,Ad.jsxs)(bp.__experimentalVStack,{spacing:2,children:[(0,Ad.jsx)(bp.__experimentalHStack,{justify:"space-between",children:(0,Ad.jsx)(Ho,{level:3,children:(0,aE.__)("Font Sizes")})}),(0,Ad.jsx)(bp.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,Ad.jsx)(_o,{path:"/typography/font-sizes",children:(0,Ad.jsxs)(bp.__experimentalHStack,{direction:"row",children:[(0,Ad.jsx)(bp.FlexItem,{children:(0,aE.__)("Font size presets")}),(0,Ad.jsx)(xn,{icon:(0,aE.isRTL)()?kr:hr})]})})})]})}var gbe=IJe;var Zl=a(E(),1);function OJe(){let{fontLibraryEnabled:e}=(0,bbe.useContext)(rn);return(0,Zl.jsxs)(Zl.Fragment,{children:[(0,Zl.jsx)(nr,{title:(0,wM.__)("Typography"),description:(0,wM.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,Zl.jsx)(Uh,{children:(0,Zl.jsxs)(vbe.__experimentalVStack,{spacing:7,children:[(0,Zl.jsx)(m_,{title:(0,wM.__)("Typesets")}),e&&(0,Zl.jsx)(hbe,{}),(0,Zl.jsx)(sve,{}),(0,Zl.jsx)(gbe,{})]})})]})}var ybe=OJe;var Ar=a(z(),1),dl=a(G(),1),Ebe=a(U(),1);var wbe=a(be(),1);var _be=a(E(),1),{useSettingsForBlockElement:NJe,TypographyPanel:MJe}=Tt(wbe.privateApis);function Sbe({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]=Ge(o,"","user",!1),[i,s]=Ge(o,"","merged",!1),[l]=Le(""),u=NJe(l,void 0,e==="heading"?t:e);return(0,_be.jsx)(MJe,{inheritedValue:i,value:n,onChange:s,settings:u})}var xbe=a(E(),1);function Cbe({name:e,element:t,headingLevel:r}){let o="";t==="heading"?o=`elements.${r}.`:t&&t!=="text"&&(o=`elements.${t}.`);let[n]=Ge(o+"typography.fontFamily",e),[i]=Ge(o+"color.gradient",e),[s]=Ge(o+"color.background",e),[l]=Ge("color.background"),[c]=Ge(o+"color.text",e),[u]=Ge(o+"typography.fontSize",e),[d]=Ge(o+"typography.fontStyle",e),[f]=Ge(o+"typography.fontWeight",e),[m]=Ge(o+"typography.letterSpacing",e);return(0,xbe.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 Jn=a(E(),1),Tbe={text:{description:(0,Ar.__)("Manage the fonts used on the site."),title:(0,Ar.__)("Text")},link:{description:(0,Ar.__)("Manage the fonts and typography used on the links."),title:(0,Ar.__)("Links")},heading:{description:(0,Ar.__)("Manage the fonts and typography used on headings."),title:(0,Ar.__)("Headings")},caption:{description:(0,Ar.__)("Manage the fonts and typography used on captions."),title:(0,Ar.__)("Captions")},button:{description:(0,Ar.__)("Manage the fonts and typography used on buttons."),title:(0,Ar.__)("Buttons")}};function FJe({element:e}){let[t,r]=(0,Ebe.useState)("heading");return(0,Jn.jsxs)(Jn.Fragment,{children:[(0,Jn.jsx)(nr,{title:Tbe[e].title,description:Tbe[e].description}),(0,Jn.jsx)(dl.__experimentalSpacer,{marginX:4,children:(0,Jn.jsx)(Cbe,{element:e,headingLevel:t})}),e==="heading"&&(0,Jn.jsx)(dl.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,Jn.jsxs)(dl.__experimentalToggleGroupControl,{label:(0,Ar.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:o=>r(o),isBlock:!0,children:[(0,Jn.jsx)(dl.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,Ar.__)("All headings"),label:(0,Ar._x)("All","heading levels")}),(0,Jn.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,Ar.__)("Heading 1"),label:(0,Ar.__)("H1")}),(0,Jn.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,Ar.__)("Heading 2"),label:(0,Ar.__)("H2")}),(0,Jn.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,Ar.__)("Heading 3"),label:(0,Ar.__)("H3")}),(0,Jn.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,Ar.__)("Heading 4"),label:(0,Ar.__)("H4")}),(0,Jn.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,Ar.__)("Heading 5"),label:(0,Ar.__)("H5")}),(0,Jn.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,Ar.__)("Heading 6"),label:(0,Ar.__)("H6")})]})}),(0,Jn.jsx)(Sbe,{element:e,headingLevel:t})]})}var __=FJe;var BW=a(z(),1),Obe=a(G(),1),Nbe=a(be(),1);var fl=a(G(),1),S_=a(z(),1);var Abe=a(U(),1);var Pbe=a(G(),1),kbe=a(E(),1);function DJe({className:e,children:t,...r}){return(0,kbe.jsx)(Pbe.Flex,{className:J("global-styles-ui__color-indicator-wrapper",e),...r,children:t})}var Rbe=DJe;var es=a(E(),1),_M=[];function LJe({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||_M,s=r||_M,l=o||_M,c=n??!0,u=(0,Abe.useMemo)(()=>[...i,...s,...l&&c?l:_M],[i,s,l,c]),d=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,es.jsxs)(fl.__experimentalVStack,{spacing:3,children:[(0,es.jsx)(Ho,{level:3,children:(0,S_.__)("Palette")}),(0,es.jsx)(fl.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,es.jsx)(_o,{path:d,children:(0,es.jsxs)(fl.__experimentalHStack,{direction:"row",children:[u.length>0?(0,es.jsxs)(es.Fragment,{children:[(0,es.jsx)(fl.__experimentalZStack,{isLayered:!1,offset:-8,children:u.slice(0,5).map(({color:f},m)=>(0,es.jsx)(Rbe,{children:(0,es.jsx)(fl.ColorIndicator,{colorValue:f})},`${f}-${m}`))}),(0,es.jsx)(fl.FlexItem,{isBlock:!0,children:(0,S_.__)("Edit palette")})]}):(0,es.jsx)(fl.FlexItem,{children:(0,S_.__)("Add colors")}),(0,es.jsx)(xn,{icon:(0,S_.isRTL)()?kr:hr})]})})})]})}var Ibe=LJe;var Id=a(E(),1),{useSettingsForBlockElement:BJe,ColorPanel:VJe}=Tt(Nbe.privateApis);function jJe(){let[e,t]=Ge("",void 0,"user",!1),[r]=Ge("",void 0,"merged",!1),[o]=Le(""),n=BJe(o);return(0,Id.jsxs)(Id.Fragment,{children:[(0,Id.jsx)(nr,{title:(0,BW.__)("Colors"),description:(0,BW.__)("Palette colors and the application of those colors on site elements.")}),(0,Id.jsx)(Uh,{children:(0,Id.jsx)(Obe.__experimentalVStack,{spacing:7,children:(0,Id.jsx)(Ibe,{})})}),(0,Id.jsx)(VJe,{inheritedValue:r,value:e,onChange:t,settings:n})]})}var Mbe=jJe;var uE=a(z(),1);var Vbe=a(ke(),1),wp=a(G(),1),C_=a(z(),1);var xM=a(G(),1);var SM=a(G(),1);var Fbe=a(E(),1);function Dbe(){let{paletteColors:e}=c_();return e.slice(0,4).map(({slug:t,color:r},o)=>(0,Fbe.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${t}-${o}`))}var lE=a(E(),1),zJe={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},HJe=({label:e,isFocused:t,withHoverView:r})=>(0,lE.jsx)(d_,{label:e,isFocused:t,withHoverView:r,children:({key:o})=>(0,lE.jsx)(SM.__unstableMotion.div,{variants:zJe,style:{height:"100%",overflow:"hidden"},children:(0,lE.jsx)(SM.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,lE.jsx)(Dbe,{})})},o)}),Lbe=HJe;var Yb=a(E(),1),Bbe=["color"];function x_({title:e,gap:t=2}){let r=HN(Bbe);return r?.length<=1?null:(0,Yb.jsxs)(xM.__experimentalVStack,{spacing:3,children:[e&&(0,Yb.jsx)(Ho,{level:3,children:e}),(0,Yb.jsx)(xM.__experimentalGrid,{gap:t,children:r.map((o,n)=>(0,Yb.jsx)(p_,{variation:o,isPill:!0,properties:Bbe,showTooltip:!0,children:()=>(0,Yb.jsx)(Lbe,{})},n))})]})}var yp=a(E(),1),UJe={placement:"bottom-start",offset:8};function jbe({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,Vbe.useViewportMatch)("small","<")?UJe:void 0,[m]=Cge(e);return(0,yp.jsxs)(wp.__experimentalVStack,{className:"global-styles-ui-color-palette-panel",spacing:8,children:[(0,yp.jsxs)(wp.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,yp.jsx)(wp.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,colors:t,onChange:r,paletteLabel:(0,C_.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:f}),window.__experimentalEnableColorRandomizer&&t?.length>0&&m&&(0,yp.jsx)(wp.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:TV,onClick:m,children:(0,C_.__)("Randomize colors")})]}),!!n&&!!n.length&&!!u&&(0,yp.jsx)(wp.__experimentalPaletteEdit,{canReset:n!==s,canOnlyChangeValues:!0,colors:n,onChange:i,paletteLabel:(0,C_.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:f}),(0,yp.jsx)(wp.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,C_.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:f}),(0,yp.jsx)(x_,{title:(0,C_.__)("Palettes")})]})}var zbe=a(ke(),1),Nd=a(G(),1),cE=a(z(),1);var Od=a(E(),1),WJe={placement:"bottom-start",offset:8},GJe=()=>{};function Hbe({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,zbe.useViewportMatch)("small","<")?WJe:void 0;return(0,Od.jsxs)(Nd.__experimentalVStack,{className:"global-styles-ui-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,Od.jsx)(Nd.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,gradients:t,onChange:r,paletteLabel:(0,cE.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:b}),!!n&&!!n.length&&!!u&&(0,Od.jsx)(Nd.__experimentalPaletteEdit,{canReset:n!==s,canOnlyChangeValues:!0,gradients:n,onChange:i,paletteLabel:(0,cE.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:b}),(0,Od.jsx)(Nd.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,cE.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:b}),!!g&&!!g.length&&(0,Od.jsxs)("div",{children:[(0,Od.jsx)(Ho,{level:3,children:(0,cE.__)("Duotone")}),(0,Od.jsx)(Nd.__experimentalSpacer,{margin:3}),(0,Od.jsx)(Nd.DuotonePicker,{duotonePalette:g,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:GJe,colorPalette:[]})]})]})}var Us=a(E(),1);function YJe({name:e}){return(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(nr,{title:(0,uE.__)("Edit palette"),description:(0,uE.__)("The combination of colors used across the site and in color pickers.")}),(0,Us.jsxs)(Tn.Root,{defaultValue:"color",children:[(0,Us.jsx)("div",{className:"global-styles-ui-color-palette__tablist-container",children:(0,Us.jsxs)(Tn.List,{className:"global-styles-ui-color-palette__tablist",children:[(0,Us.jsx)(Tn.Tab,{value:"color",children:(0,uE.__)("Color")}),(0,Us.jsx)(Tn.Tab,{value:"gradient",children:(0,uE.__)("Gradient")})]})}),(0,Us.jsx)(Tn.Panel,{value:"color",tabIndex:-1,children:(0,Us.jsx)(jbe,{name:e})}),(0,Us.jsx)(Tn.Panel,{value:"gradient",tabIndex:-1,children:(0,Us.jsx)(Hbe,{name:e})})]})]})}var Ube=YJe;var VW=a(z(),1),qbe=a(be(),1),Kbe=a(G(),1);var Wbe=a(be(),1);var Gbe=a(E(),1),qJe={backgroundSize:"auto"},{BackgroundPanel:KJe}=Tt(Wbe.privateApis);function Ybe(){let[e]=Ge("",void 0,"user",!1),[t,r]=Ge("",void 0,"merged",!1),[o]=Le("");return(0,Gbe.jsx)(KJe,{inheritedValue:t,value:e,onChange:r,settings:o,defaultValues:qJe})}var Zh=a(E(),1),{useHasBackgroundPanel:ZJe}=Tt(qbe.privateApis);function XJe(){let[e]=Le(""),t=ZJe(e);return(0,Zh.jsxs)(Zh.Fragment,{children:[(0,Zh.jsx)(nr,{title:(0,VW.__)("Background"),description:(0,Zh.jsx)(Kbe.__experimentalText,{children:(0,VW.__)("Set styles for the site's background.")})}),t&&(0,Zh.jsx)(Ybe,{})]})}var Zbe=XJe;var rs=a(G(),1),ts=a(z(),1);var eye=a(U(),1);var Xbe=a(G(),1),Qbe=a(z(),1),Jbe=a(E(),1);function QJe({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},s=()=>{o()};return(0,Jbe.jsx)(Xbe.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,Qbe.__)("Cancel"),confirmButtonText:t,onCancel:s,onConfirm:i,size:"medium",children:e})}var $be=QJe;var _r=a(E(),1),{Menu:dE}=Tt(rs.privateApis),zW="6px 6px 9px rgba(0, 0, 0, 0.2)";function tye(){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)($be,{text:(0,ts.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,ts.__)("Remove"),isOpen:l,toggleOpen:u,onConfirm:s}),(0,_r.jsx)(nr,{title:(0,ts.__)("Shadows"),description:(0,ts.__)("Manage and create shadow styles for use across the site.")}),(0,_r.jsx)(Uh,{children:(0,_r.jsxs)(rs.__experimentalVStack,{className:"global-styles-ui__shadows-panel",spacing:7,children:[t&&(0,_r.jsx)(jW,{label:(0,ts.__)("Default"),shadows:e||[],category:"default"}),r&&r.length>0&&(0,_r.jsx)(jW,{label:(0,ts.__)("Theme"),shadows:r||[],category:"theme"}),(0,_r.jsx)(jW,{label:(0,ts.__)("Custom"),shadows:o||[],category:"custom",canCreate:!0,onCreate:i,onReset:u})]})})]})}function jW({label:e,shadows:t,category:r,canCreate:o,onCreate:n,onReset:i}){let s=()=>{let l=zN(t,"shadow-");n?.({name:(0,ts.sprintf)((0,ts.__)("Shadow %d"),l),shadow:zW,slug:`shadow-${l}`})};return(0,_r.jsxs)(rs.__experimentalVStack,{spacing:2,children:[(0,_r.jsxs)(rs.__experimentalHStack,{justify:"space-between",children:[(0,_r.jsx)(Ho,{level:3,children:e}),(0,_r.jsxs)(rs.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:[o&&(0,_r.jsx)(rs.Button,{size:"small",icon:yc,label:(0,ts.__)("Add shadow"),onClick:()=>{s()}}),!!t?.length&&r==="custom"&&(0,_r.jsxs)(dE,{children:[(0,_r.jsx)(dE.TriggerButton,{render:(0,_r.jsx)(rs.Button,{size:"small",icon:go,label:(0,ts.__)("Shadow options")})}),(0,_r.jsx)(dE.Popover,{children:(0,_r.jsx)(dE.Item,{onClick:i,children:(0,_r.jsx)(dE.ItemLabel,{children:(0,ts.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,_r.jsx)(rs.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(l=>(0,_r.jsx)(JJe,{shadow:l,category:r},l.slug))})]})}function JJe({shadow:e,category:t}){return(0,_r.jsx)(_o,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,_r.jsxs)(rs.__experimentalHStack,{children:[(0,_r.jsx)(rs.FlexItem,{children:e.name}),(0,_r.jsx)(xn,{icon:(0,ts.isRTL)()?kr:hr})]})})}var rt=a(G(),1),jr=a(z(),1);var pl=a(U(),1);function rye(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map(r=>r.trim())}function oye(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 nye(e){let t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}var Ue=a(E(),1),{Menu:fE}=Tt(rt.privateApis),$Je=[{label:(0,jr.__)("Rename"),action:"rename"},{label:(0,jr.__)("Delete"),action:"delete"}],e$e=[{label:(0,jr.__)("Reset"),action:"reset"}];function iye(){let{goBack:e,params:t}=(0,rt.useNavigator)(),{category:r,slug:o}=t,[n,i]=Le(`shadow.presets.${r}`);(0,pl.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,pl.useState)(()=>(n||[]).find(S=>S.slug===o)),u=(0,pl.useMemo)(()=>(s||[]).find(S=>S.slug===o),[s,o]),[d,f]=(0,pl.useState)(!1),[m,h]=(0,pl.useState)(!1),[g,v]=(0,pl.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,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsxs)(rt.__experimentalHStack,{justify:"space-between",children:[(0,Ue.jsx)(nr,{title:l.name}),(0,Ue.jsx)(rt.FlexItem,{children:(0,Ue.jsx)(rt.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,Ue.jsxs)(fE,{children:[(0,Ue.jsx)(fE.TriggerButton,{render:(0,Ue.jsx)(rt.Button,{size:"small",icon:go,label:(0,jr.__)("Menu")})}),(0,Ue.jsx)(fE.Popover,{children:(r==="custom"?$Je:e$e).map(S=>(0,Ue.jsx)(fE.Item,{onClick:()=>_(S.action),disabled:S.action==="reset"&&l.shadow===u?.shadow,children:(0,Ue.jsx)(fE.ItemLabel,{children:S.label})},S.action))})]})})})]}),(0,Ue.jsxs)(Uh,{children:[(0,Ue.jsx)(t$e,{shadow:l.shadow}),(0,Ue.jsx)(r$e,{shadow:l.shadow,onChange:b})]}),d&&(0,Ue.jsx)(rt.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{y(),f(!1)},onCancel:()=>{f(!1)},confirmButtonText:(0,jr.__)("Delete"),size:"medium",children:(0,jr.sprintf)((0,jr.__)('Are you sure you want to delete "%s" shadow preset?'),l.name)}),m&&(0,Ue.jsx)(rt.Modal,{title:(0,jr.__)("Rename"),onRequestClose:()=>h(!1),size:"small",children:(0,Ue.jsxs)("form",{onSubmit:S=>{S.preventDefault(),w(g),h(!1)},children:[(0,Ue.jsx)(rt.__experimentalInputControl,{autoComplete:"off",label:(0,jr.__)("Name"),placeholder:(0,jr.__)("Shadow name"),value:g??"",onChange:v}),(0,Ue.jsx)(rt.__experimentalSpacer,{marginBottom:6}),(0,Ue.jsxs)(rt.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Ue.jsx)(rt.FlexItem,{children:(0,Ue.jsx)(rt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>h(!1),children:(0,jr.__)("Cancel")})}),(0,Ue.jsx)(rt.FlexItem,{children:(0,Ue.jsx)(rt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,jr.__)("Save")})})]})]})})]}):(0,Ue.jsx)(nr,{title:""})}function t$e({shadow:e}){return(0,Ue.jsx)(rt.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,Ue.jsx)(rt.__experimentalHStack,{alignment:"center",justify:"center",className:"global-styles-ui__shadow-preview-panel",children:(0,Ue.jsx)("div",{className:"global-styles-ui__shadow-preview-block",style:{boxShadow:e}})})})}function r$e({shadow:e,onChange:t}){let r=(0,pl.useRef)(null),o=(0,pl.useMemo)(()=>rye(e),[e]),n=(l,c)=>{let u=[...o];u[l]=c,t(u.join(", "))},i=()=>{t([...o,zW].join(", "))},s=l=>{t(o.filter((c,u)=>u!==l).join(", ")),r.current?.focus()};return(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsx)(rt.__experimentalVStack,{spacing:2,children:(0,Ue.jsxs)(rt.__experimentalHStack,{justify:"space-between",children:[(0,Ue.jsx)(Ho,{level:3,children:(0,jr.__)("Shadows")}),(0,Ue.jsx)(rt.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:(0,Ue.jsx)(rt.Button,{size:"small",icon:yc,label:(0,jr.__)("Add shadow"),onClick:()=>{i()},ref:r})})]})}),(0,Ue.jsx)(rt.__experimentalSpacer,{}),(0,Ue.jsx)(rt.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:o.map((l,c)=>(0,Ue.jsx)(o$e,{shadow:l,onChange:u=>n(c,u),canRemove:o.length>1,onRemove:()=>s(c)},c))})]})}function o$e({shadow:e,onChange:t,canRemove:r,onRemove:o}){let n={placement:"left-start",offset:36,shift:!0},i=(0,pl.useMemo)(()=>oye(e),[e]),s=l=>{t(nye(l))};return(0,Ue.jsx)(rt.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,jr.__)("Remove shadow")};return(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsx)(rt.Button,{__next40pxDefaultSize:!0,icon:a1,...u,children:i.inset?(0,jr.__)("Inner shadow"):(0,jr.__)("Drop shadow")}),r&&(0,Ue.jsx)(rt.Button,{size:"small",icon:hV,...d})]})},renderContent:()=>(0,Ue.jsx)(rt.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"global-styles-ui__shadow-editor__dropdown-content",children:(0,Ue.jsx)(n$e,{shadowObj:i,onChange:s})})})}function n$e({shadowObj:e,onChange:t}){let n=(i,s)=>{let l={...e,[i]:s};t(l)};return(0,Ue.jsxs)(rt.__experimentalVStack,{spacing:4,className:"global-styles-ui__shadow-editor-panel",children:[(0,Ue.jsx)(rt.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:i=>n("color",i)}),(0,Ue.jsxs)(rt.__experimentalToggleGroupControl,{label:(0,jr.__)("Shadow Type"),value:e.inset?"inset":"outset",isBlock:!0,onChange:i=>n("inset",i==="inset"),hideLabelFromVision:!0,children:[(0,Ue.jsx)(rt.__experimentalToggleGroupControlOption,{value:"outset",label:(0,jr.__)("Outset")}),(0,Ue.jsx)(rt.__experimentalToggleGroupControlOption,{value:"inset",label:(0,jr.__)("Inset")})]}),(0,Ue.jsxs)(rt.__experimentalGrid,{columns:2,gap:4,children:[(0,Ue.jsx)(CM,{label:(0,jr.__)("X Position"),value:e.x,onChange:i=>n("x",i)}),(0,Ue.jsx)(CM,{label:(0,jr.__)("Y Position"),value:e.y,onChange:i=>n("y",i)}),(0,Ue.jsx)(CM,{label:(0,jr.__)("Blur"),value:e.blur,onChange:i=>n("blur",i)}),(0,Ue.jsx)(CM,{label:(0,jr.__)("Spread"),value:e.spread,onChange:i=>n("spread",i)})]})]})}function CM({label:e,value:t,onChange:r}){return(0,Ue.jsx)(rt.__experimentalUnitControl,{label:e,value:t,onChange:n=>{let s=n!==void 0&&!isNaN(parseFloat(n))?n:"0px";r(s)}})}var HW=a(E(),1);function sye(){return(0,HW.jsx)(tye,{})}function aye(){return(0,HW.jsx)(iye,{})}var dye=a(z(),1),fye=a(be(),1);var lye=a(be(),1),UW=a(U(),1);var cye=a(E(),1),{useSettingsForBlockElement:i$e,DimensionsPanel:s$e}=Tt(lye.privateApis),a$e={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,minWidth:!0,width:!0,childLayout:!1};function uye(){let[e]=Ge("",void 0,"user",!1),[t,r]=Ge("",void 0,"merged",!1),[o]=Le("",void 0,"user"),[n,i]=Le(""),s=i$e(n),l=(0,UW.useMemo)(()=>({...t,layout:s.layout}),[t,s.layout]),c=(0,UW.useMemo)(()=>({...e,layout:o.layout}),[e,o.layout]);return(0,cye.jsx)(s$e,{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:a$e})}var qb=a(E(),1),{useHasDimensionsPanel:l$e,useSettingsForBlockElement:c$e}=Tt(fye.privateApis);function u$e(){let[e]=Le(""),t=c$e(e),r=l$e(t);return(0,qb.jsxs)(qb.Fragment,{children:[(0,qb.jsx)(nr,{title:(0,dye.__)("Layout")}),r&&(0,qb.jsx)(uye,{})]})}var pye=u$e;var kM=a(G(),1),GW=a(z(),1);var WW=a(z(),1),bye=a(G(),1);var mye=a(ne(),1),hye=a(Y(),1),EM=a(U(),1),gye=a(G(),1),vye=a(z(),1);var TM=a(E(),1);function d$e({gap:e=2}){let{user:t}=(0,EM.useContext)(rn),r=t?.styles,n=(0,hye.useSelect)(s=>{let l=s(mye.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(s=>!XT(s,["color"])&&!XT(s,["typography","spacing"])),i=(0,EM.useMemo)(()=>[...[{title:(0,vye.__)("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,TM.jsx)(gye.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:e,children:i.map((s,l)=>(0,TM.jsx)(p_,{variation:s,children:c=>(0,TM.jsx)(WN,{label:s?.title,withHoverView:!0,isFocused:c,variation:s})},l))})}var PM=d$e;var T_=a(E(),1);function yye(){return(0,T_.jsxs)(bye.__experimentalVStack,{spacing:10,className:"global-styles-ui-variation-container",children:[(0,T_.jsx)(PM,{gap:3}),(0,T_.jsx)(x_,{title:(0,WW.__)("Color Variations"),gap:3}),(0,T_.jsx)(m_,{title:(0,WW.__)("Typography"),gap:3})]})}var _p=a(E(),1);function f$e(){return(0,_p.jsxs)(_p.Fragment,{children:[(0,_p.jsx)(nr,{title:(0,GW.__)("Browse styles"),description:(0,GW.__)("Choose a variation to change the look of the site.")}),(0,_p.jsx)(kM.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-style-variations",children:(0,_p.jsx)(kM.CardBody,{children:(0,_p.jsx)(yye,{})})})]})}var wye=f$e;var pE=a(z(),1),_ye=a(G(),1),Sye=a(be(),1);var Xl=a(E(),1),{AdvancedPanel:p$e}=Tt(Sye.privateApis);function m$e(){let[e]=Ge("",void 0,"user",!1),[t,r]=Ge("",void 0,"merged",!1);return(0,Xl.jsxs)(Xl.Fragment,{children:[(0,Xl.jsx)(nr,{title:(0,pE.__)("Additional CSS"),description:(0,Xl.jsxs)(Xl.Fragment,{children:[(0,pE.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,Xl.jsx)("br",{}),(0,Xl.jsx)(_ye.ExternalLink,{href:(0,pE.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"global-styles-ui-screen-css-help-link",children:(0,pE.__)("Learn more about CSS")})]})}),(0,Xl.jsx)("div",{className:"global-styles-ui-screen-css",children:(0,Xl.jsx)(p$e,{value:e,onChange:r,inheritedValue:t})})]})}var xye=m$e;var Sp=a(z(),1),E_=a(G(),1),Xb=a(U(),1);var Cye=a(Y(),1),Tye=a(ne(),1),mE=a(U(),1);var h$e={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},g$e={per_page:100,page:1},RM=[];function Kb({query:e}={}){let{user:t}=(0,mE.useContext)(rn),r=(0,mE.useMemo)(()=>({...g$e,...e}),[e]),{authors:o,currentUser:n,isDirty:i,revisions:s,isLoadingGlobalStylesRevisions:l,revisionsCount:c}=(0,Cye.useSelect)(u=>{let{__experimentalGetDirtyEntityRecords:d,getCurrentUser:f,getUsers:m,getRevisions:h,__experimentalGetCurrentGlobalStylesId:g,getEntityRecord:v,isResolving:b}=u(Tye.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)||RM,k=m(h$e)||RM,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,mE.useMemo)(()=>{if(!o.length||l)return{revisions:RM,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 wi=a(z(),1),Zb=a(G(),1),Md=a(an(),1),Eye=a(ne(),1),Pye=a(Y(),1);var AM=a(Oo(),1);var $n=a(E(),1),{Badge:v$e}=Tt(Zb.privateApis),b$e=3600*1e3*24;function y$e({revision:e,previousRevision:t}){let r=g1(e,t,{maxResults:7});return r.length?(0,$n.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"global-styles-ui-screen-revisions__changes",children:r.map(o=>(0,$n.jsx)("li",{children:o},o))}):null}function w$e(e,t,r,o){return e==="parent"?(0,wi.__)("Reset the styles to the theme defaults"):e==="unsaved"?(0,wi.sprintf)((0,wi.__)("Unsaved changes by %s"),t):o?(0,wi.sprintf)((0,wi.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,r):(0,wi.sprintf)((0,wi.__)("Changes saved by %1$s on %2$s"),t,r)}function _$e({userRevisions:e,selectedRevisionId:t,onChange:r,canApplyRevision:o,onApplyRevision:n}){let{currentThemeName:i,currentUser:s}=(0,Pye.useSelect)(u=>{let{getCurrentTheme:d,getCurrentUser:f}=u(Eye.store),m=d();return{currentThemeName:m?.name?.rendered||m?.stylesheet,currentUser:f()}},[]),l=(0,Md.getDate)(null).getTime(),{datetimeAbbreviated:c}=(0,Md.getSettings)().formats;return(0,$n.jsx)(Zb.Composite,{orientation:"vertical",className:"global-styles-ui-screen-revisions__revisions-list","aria-label":(0,wi.__)("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,wi.__)("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,Md.getDate)(C??null),k=C&&l-A.getTime()>b$e?(0,Md.dateI18n)(c,A):(0,Md.humanTimeDiff)(C??A,void 0),R=w$e(f,b,(0,Md.dateI18n)(c,A),S);return(0,$n.jsxs)(Zb.Composite.Item,{className:"global-styles-ui-screen-revisions__revision-item","aria-current":w,role:"option",onKeyDown:N=>{let{keyCode:P}=N;(P===AM.ENTER||P===AM.SPACE)&&r(u)},onClick:N=>{N.preventDefault(),r(u)},"aria-selected":w,"aria-label":R,render:(0,$n.jsx)("div",{}),children:[(0,$n.jsx)("span",{className:"global-styles-ui-screen-revisions__revision-item-wrapper",children:x?(0,$n.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[(0,wi.__)("Default styles"),(0,$n.jsx)("span",{className:"global-styles-ui-screen-revisions__meta",children:i})]}):(0,$n.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[g?(0,$n.jsx)("span",{className:"global-styles-ui-screen-revisions__date",children:(0,wi.__)("(Unsaved)")}):(0,$n.jsx)("time",{className:"global-styles-ui-screen-revisions__date",dateTime:C,children:k}),(0,$n.jsxs)("span",{className:"global-styles-ui-screen-revisions__meta",children:[(0,$n.jsx)("img",{alt:b,src:_}),b]}),w&&(0,$n.jsx)(y$e,{revision:u,previousRevision:d<e.length?e[d+1]:void 0})]})}),w&&(S?(0,$n.jsx)(v$e,{className:"global-styles-ui-screen-revisions__active-badge",intent:"info",children:(0,wi.__)("Active")}):(0,$n.jsx)(Zb.Button,{size:"compact",variant:"primary",className:"global-styles-ui-screen-revisions__apply-button",onClick:n,"aria-label":(0,wi.__)("Apply the selected revision to your site."),children:x?(0,wi.__)("Reset to defaults"):(0,wi.__)("Apply")}))]},f)})})}var kye=_$e;var Ql=a(G(),1),ei=a(z(),1);var Qc=a(E(),1);function Rye({currentPage:e,numPages:t,changePage:r,totalItems:o,className:n,disabled:i=!1,buttonVariant:s="tertiary",label:l=(0,ei.__)("Pagination")}){return(0,Qc.jsxs)(Ql.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:J("global-styles-ui-pagination",n),children:[(0,Qc.jsx)(Ql.__experimentalText,{variant:"muted",className:"global-styles-ui-pagination__total",children:(0,ei.sprintf)((0,ei._n)("%d item","%d items",o),o)}),(0,Qc.jsxs)(Ql.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Qc.jsx)(Ql.Button,{variant:s,onClick:()=>r(1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,ei.__)("First page"),icon:(0,ei.isRTL)()?xl:Cl,size:"compact"}),(0,Qc.jsx)(Ql.Button,{variant:s,onClick:()=>r(e-1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,ei.__)("Previous page"),icon:(0,ei.isRTL)()?hr:kr,size:"compact"})]}),(0,Qc.jsx)(Ql.__experimentalText,{variant:"muted",children:(0,ei.sprintf)((0,ei._x)("%1$d of %2$d","paging"),e,t)}),(0,Qc.jsxs)(Ql.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Qc.jsx)(Ql.Button,{variant:s,onClick:()=>r(e+1),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,ei.__)("Next page"),icon:(0,ei.isRTL)()?kr:hr,size:"compact"}),(0,Qc.jsx)(Ql.Button,{variant:s,onClick:()=>r(t),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,ei.__)("Last page"),icon:(0,ei.isRTL)()?Cl:xl,size:"compact"})]})]})}var Jc=a(E(),1),Aye=10;function S$e({onClose:e}={}){let{user:t,onChange:r}=(0,Xb.useContext)(rn),{params:o,goTo:n}=(0,E_.useNavigator)(),{revisionId:i}=o,[s,l]=(0,Xb.useState)(1),{revisions:c,isLoading:u,hasUnsavedChanges:d,revisionsCount:f}=Kb({query:{per_page:Aye,page:s}}),m=Math.ceil(f/Aye),[h,g]=(0,Xb.useState)(!1),v=(0,Xb.useMemo)(()=>i&&c.find(k=>String(k.id)===String(i))||t,[i,c,t]),b=av(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,Jc.jsxs)(Jc.Fragment,{children:[(0,Jc.jsx)(nr,{title:f?(0,Sp.sprintf)((0,Sp.__)("Revisions (%d)"),f):(0,Sp.__)("Revisions"),description:(0,Sp.__)(`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,Jc.jsx)(E_.Spinner,{className:"global-styles-ui-screen-revisions__loading"}),(0,Jc.jsx)(kye,{onChange:w,selectedRevisionId:S,userRevisions:c,canApplyRevision:x,onApplyRevision:()=>d?g(!0):y(v)}),m>1&&(0,Jc.jsx)("div",{className:"global-styles-ui-screen-revisions__footer",children:(0,Jc.jsx)(Rye,{className:"global-styles-ui-screen-revisions__pagination",currentPage:s,numPages:m,changePage:l,totalItems:f,disabled:u,label:(0,Sp.__)("Global Styles pagination")})}),h&&(0,Jc.jsx)(E_.__experimentalConfirmDialog,{isOpen:h,confirmButtonText:(0,Sp.__)("Apply"),onConfirm:()=>y(v),onCancel:()=>g(!1),size:"medium",children:(0,Sp.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})}var Iye=S$e;var On=a(z(),1),Uo=a(G(),1);var Dye=a(U(),1);var Oye=a(G(),1),Nye=a(z(),1),Mye=a(E(),1);function x$e({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},s=()=>{o()};return(0,Mye.jsx)(Oye.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,Nye.__)("Cancel"),confirmButtonText:t,onCancel:s,onConfirm:i,size:"medium",children:e})}var Fye=x$e;var ir=a(E(),1),{Menu:hE}=Tt(Uo.privateApis);function YW({label:e,origin:t,sizes:r,handleAddFontSize:o,handleResetFontSizes:n}){let[i,s]=(0,Dye.useState)(!1),l=()=>s(!i),c=t==="custom"?(0,On.__)("Are you sure you want to remove all custom font size presets?"):(0,On.__)("Are you sure you want to reset all font size presets to their default values?");return(0,ir.jsxs)(ir.Fragment,{children:[n&&i&&(0,ir.jsx)(Fye,{text:c,confirmButtonText:t==="custom"?(0,On.__)("Remove"):(0,On.__)("Reset"),isOpen:i,toggleOpen:l,onConfirm:n}),(0,ir.jsxs)(Uo.__experimentalVStack,{spacing:4,children:[(0,ir.jsxs)(Uo.__experimentalHStack,{children:[(0,ir.jsx)(Ho,{level:3,children:e}),(0,ir.jsxs)(Uo.FlexItem,{className:"global-styles-ui__typography-panel__options-container",children:[t==="custom"&&(0,ir.jsx)(Uo.Button,{label:(0,On.__)("Add font size"),icon:yc,size:"small",onClick:o}),!!n&&(0,ir.jsxs)(hE,{children:[(0,ir.jsx)(hE.TriggerButton,{render:(0,ir.jsx)(Uo.Button,{size:"small",icon:go,label:(0,On.__)("Font size presets options")})}),(0,ir.jsx)(hE.Popover,{children:(0,ir.jsx)(hE.Item,{onClick:l,children:(0,ir.jsx)(hE.ItemLabel,{children:t==="custom"?(0,On.__)("Remove font size presets"):(0,On.__)("Reset font size presets")})})})]})]})]}),!!r.length&&(0,ir.jsx)(Uo.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:r.map(u=>(0,ir.jsx)(_o,{path:`/typography/font-sizes/${t}/${u.slug}`,children:(0,ir.jsxs)(Uo.__experimentalHStack,{children:[(0,ir.jsx)(Uo.FlexItem,{className:"global-styles-ui-font-size__item",children:u.name}),(0,ir.jsx)(Uo.FlexItem,{display:"flex",children:(0,ir.jsx)(xn,{icon:(0,On.isRTL)()?kr:hr})})]})},u.slug))})]})]})}function C$e(){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=zN(s,"custom-"),m={name:(0,On.sprintf)((0,On.__)("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,ir.jsxs)(Uo.__experimentalVStack,{spacing:2,children:[(0,ir.jsx)(nr,{title:(0,On.__)("Font size presets"),description:(0,On.__)("Create and edit the presets used for font sizes across the site.")}),(0,ir.jsx)(Uo.__experimentalView,{children:(0,ir.jsx)(Uo.__experimentalSpacer,{paddingX:4,children:(0,ir.jsxs)(Uo.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,ir.jsx)(YW,{label:(0,On.__)("Theme"),origin:"theme",sizes:e,handleAddFontSize:u,handleResetFontSizes:d(e,r)?void 0:()=>t(r)}),c&&!!o?.length&&(0,ir.jsx)(YW,{label:(0,On.__)("Default"),origin:"default",sizes:o,handleAddFontSize:u,handleResetFontSizes:d(o,i)?void 0:()=>n(i)}),(0,ir.jsx)(YW,{label:(0,On.__)("Custom"),origin:"custom",sizes:s,handleAddFontSize:u,handleResetFontSizes:s.length>0?()=>l([]):void 0})]})})})]})}var Lye=C$e;var Ea=a(z(),1),Wo=a(G(),1);var gE=a(U(),1);var Bye=a(be(),1),Vye=a(z(),1);var jye=a(E(),1);function T$e({fontSize:e}){let[t]=Ge("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,Bye.getComputedFluidTypographyValue)(r);return(0,jye.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontSize:o,fontFamily:t?.fontFamily??"serif"},children:(0,Vye.__)("Aa")})}var zye=T$e;var Hye=a(G(),1),P_=a(z(),1),Uye=a(E(),1);function E$e({fontSize:e,isOpen:t,toggleOpen:r,handleRemoveFontSize:o}){let n=async()=>{r(),o(e)},i=()=>{r()};return(0,Uye.jsx)(Hye.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,P_.__)("Cancel"),confirmButtonText:(0,P_.__)("Delete"),onCancel:i,onConfirm:n,size:"medium",children:e&&(0,P_.sprintf)((0,P_.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})}var Wye=E$e;var $c=a(G(),1),k_=a(z(),1),Gye=a(U(),1),xp=a(E(),1);function P$e({fontSize:e,toggleOpen:t,handleRename:r}){let[o,n]=(0,Gye.useState)(e.name),i=()=>{o&&o.trim()&&r(o),t()};return(0,xp.jsx)($c.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,k_.__)("Rename"),size:"small",children:(0,xp.jsx)("form",{onSubmit:s=>{s.preventDefault(),i(),t()},children:(0,xp.jsxs)($c.__experimentalVStack,{spacing:"3",children:[(0,xp.jsx)($c.__experimentalInputControl,{autoComplete:"off",value:o,onChange:n,label:(0,k_.__)("Name"),placeholder:(0,k_.__)("Font size preset name")}),(0,xp.jsxs)($c.__experimentalHStack,{justify:"right",children:[(0,xp.jsx)($c.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,k_.__)("Cancel")}),(0,xp.jsx)($c.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,k_.__)("Save")})]})]})})})}var Yye=P$e;var Nn=a(G(),1),Cp=a(E(),1),k$e=["px","em","rem","vw","vh"];function IM(e){let{baseControlProps:t}=(0,Nn.useBaseControlProps)(e),{value:r,onChange:o,fallbackValue:n,disabled:i,label:s}=e,l=(0,Nn.__experimentalUseCustomUnits)({availableUnits:k$e}),[c,u="px"]=(0,Nn.__experimentalParseQuantityAndUnitFromRawValue)(r,l),d=!!u&&["em","rem","vw","vh"].includes(u);return(0,Cp.jsx)(Nn.BaseControl,{...t,children:(0,Cp.jsxs)(Nn.Flex,{children:[(0,Cp.jsx)(Nn.FlexItem,{isBlock:!0,children:(0,Cp.jsx)(Nn.__experimentalUnitControl,{label:s,hideLabelFromVision:!0,value:r,onChange:h=>{o?.(h)},units:l,min:0,disabled:i})}),(0,Cp.jsx)(Nn.FlexItem,{isBlock:!0,children:(0,Cp.jsx)(Nn.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,Cp.jsx)(Nn.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 er=a(E(),1),{Menu:Qb}=Tt(Wo.privateApis);function R$e(){let[e,t]=(0,gE.useState)(!1),[r,o]=(0,gE.useState)(!1),{params:{origin:n,slug:i},goBack:s}=(0,Wo.useNavigator)(),[l,c]=Le("typography.fontSizes"),[u]=Le("typography.fluid"),d=l?.[n]??[],f=d.find(k=>k.slug===i);if((0,gE.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 N=d.map(P=>P.slug===i?{...P,[k]:R}:P);c({...l,[n]:N})},x=()=>{let k=d.filter(R=>R.slug!==i);c({...l,[n]:k})},C=()=>{t(!e)},A=()=>{o(!r)};return(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(Wye,{fontSize:f,isOpen:e,toggleOpen:C,handleRemoveFontSize:x}),r&&(0,er.jsx)(Yye,{fontSize:f,toggleOpen:A,handleRename:g}),(0,er.jsxs)(Wo.__experimentalVStack,{spacing:4,children:[(0,er.jsxs)(Wo.__experimentalHStack,{justify:"space-between",alignment:"flex-start",children:[(0,er.jsx)(nr,{title:f.name,description:(0,Ea.sprintf)((0,Ea.__)("Manage the font size %s."),f.name)}),n==="custom"&&(0,er.jsx)(Wo.FlexItem,{children:(0,er.jsx)(Wo.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,er.jsxs)(Qb,{children:[(0,er.jsx)(Qb.TriggerButton,{render:(0,er.jsx)(Wo.Button,{size:"small",icon:go,label:(0,Ea.__)("Font size options")})}),(0,er.jsxs)(Qb.Popover,{children:[(0,er.jsx)(Qb.Item,{onClick:A,children:(0,er.jsx)(Qb.ItemLabel,{children:(0,Ea.__)("Rename")})}),(0,er.jsx)(Qb.Item,{onClick:C,children:(0,er.jsx)(Qb.ItemLabel,{children:(0,Ea.__)("Delete")})})]})]})})})]}),(0,er.jsx)(Wo.__experimentalView,{children:(0,er.jsx)(Wo.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,er.jsxs)(Wo.__experimentalVStack,{spacing:4,children:[(0,er.jsx)(Wo.FlexItem,{children:(0,er.jsx)(zye,{fontSize:f})}),(0,er.jsx)(IM,{label:(0,Ea.__)("Size"),value:!h&&f.size?String(f.size):"",onChange:v,disabled:h}),(0,er.jsx)(Wo.ToggleControl,{label:(0,Ea.__)("Fluid typography"),help:(0,Ea.__)("Scale the font size dynamically to fit the screen or viewport."),checked:m,onChange:b}),m&&(0,er.jsx)(Wo.ToggleControl,{label:(0,Ea.__)("Custom fluid values"),help:(0,Ea.__)("Set custom min and max values for the fluid font size."),checked:h,onChange:_}),h&&(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(IM,{label:(0,Ea.__)("Minimum"),value:typeof f?.fluid=="object"?f.fluid?.min:void 0,onChange:y}),(0,er.jsx)(IM,{label:(0,Ea.__)("Maximum"),value:typeof f?.fluid=="object"?f.fluid?.max:void 0,onChange:w})]})]})})})]})]})}var qye=R$e;var Je=a(E(),1);function A$e({parentMenu:e,blockStyles:t,blockName:r}){return(0,Je.jsx)(Je.Fragment,{children:t.map((o,n)=>(0,Je.jsx)(R_.Navigator.Screen,{path:e+"/variations/"+o.name,children:(0,Je.jsx)(RW,{name:r,variation:o.name})},n))})}function I$e({name:e,parentMenu:t=""}){let r=(0,Kye.useSelect)(o=>{if(!e)return[];let{getBlockStyles:n}=o(OM.store);return n(e)},[e]);return r?.length?(0,Je.jsx)(A$e,{parentMenu:t,blockStyles:r,blockName:e||""}):null}function KW({value:e,baseValue:t,onChange:r,path:o,onPathChange:n,fontLibraryEnabled:i=!1,serverCSS:s,serverSettings:l}){let c=(0,OM.getBlockTypes)(),u=(0,Xh.useMemo)(()=>Oi(t,e),[t,e]),[d,f]=lv(u,[],{styleOptions:{variationStyles:!0}}),m=(0,Xh.useMemo)(()=>[...s??[],...d??[]],[s,d]),h=(0,Xh.useMemo)(()=>({...l,__experimentalFeatures:f,styles:m}),[f,l,m]);return(0,Je.jsx)(KT,{value:e,baseValue:t,onChange:r,fontLibraryEnabled:i,children:(0,Je.jsx)(Zye.BlockEditorProvider,{settings:h,children:(0,Je.jsxs)(R_.Navigator,{className:"global-styles-ui-sidebar__navigator-provider",initialPath:o||"/",children:[(o||n)&&(0,Je.jsx)(O$e,{path:o,onPathChange:n}),(0,Je.jsx)(bn,{path:"/",children:(0,Je.jsx)(Bge,{})}),(0,Je.jsx)(bn,{path:"/colors",children:(0,Je.jsx)(Mbe,{})}),(0,Je.jsx)(bn,{path:"/typography",children:(0,Je.jsx)(ybe,{})}),(0,Je.jsx)(bn,{path:"/typography/font-sizes",children:(0,Je.jsx)(Lye,{})}),(0,Je.jsx)(bn,{path:"/typography/font-sizes/:origin/:slug",children:(0,Je.jsx)(qye,{})}),(0,Je.jsx)(bn,{path:"/layout",children:(0,Je.jsx)(pye,{})}),(0,Je.jsx)(bn,{path:"/colors/palette",children:(0,Je.jsx)(Ube,{})}),(0,Je.jsx)(bn,{path:"/variations",children:(0,Je.jsx)(wye,{})}),(0,Je.jsx)(bn,{path:"/css",children:(0,Je.jsx)(xye,{})}),(0,Je.jsx)(bn,{path:"/revisions/:revisionId?",children:(0,Je.jsx)(Iye,{})}),(0,Je.jsx)(bn,{path:"/shadows",children:(0,Je.jsx)(sye,{})}),(0,Je.jsx)(bn,{path:"/shadows/edit/:category/:slug",children:(0,Je.jsx)(aye,{})}),(0,Je.jsx)(bn,{path:"/background",children:(0,Je.jsx)(Zbe,{})}),(0,Je.jsx)(bn,{path:"/typography/text",children:(0,Je.jsx)(__,{element:"text"})}),(0,Je.jsx)(bn,{path:"/typography/link",children:(0,Je.jsx)(__,{element:"link"})}),(0,Je.jsx)(bn,{path:"/typography/heading",children:(0,Je.jsx)(__,{element:"heading"})}),(0,Je.jsx)(bn,{path:"/typography/caption",children:(0,Je.jsx)(__,{element:"caption"})}),(0,Je.jsx)(bn,{path:"/typography/button",children:(0,Je.jsx)(__,{element:"button"})}),(0,Je.jsx)(bn,{path:"/blocks",children:(0,Je.jsx)(Yge,{})}),c.map(g=>(0,Je.jsxs)(Xh.Fragment,{children:[(0,Je.jsx)(bn,{path:"/blocks/"+encodeURIComponent(g.name),children:(0,Je.jsx)(RW,{name:g.name})}),(0,Je.jsx)(I$e,{name:g.name,parentMenu:"/blocks/"+encodeURIComponent(g.name)})]},g.name))]})})})}function bn({path:e,children:t}){return(0,Je.jsx)(R_.Navigator.Screen,{className:"global-styles-ui-sidebar__navigator-screen",path:e,children:t})}function O$e({path:e,onPathChange:t}){let r=(0,R_.useNavigator)(),{path:o}=r.location,n=(0,qW.usePrevious)(e),i=(0,qW.usePrevious)(o);return(0,Xh.useEffect)(()=>{e&&e!==o&&(e!==n?r.goTo(e):o!==i&&t&&t(o??"/"))},[t,e,i,n,o,r]),null}var ZW=a(E(),1);function A_(e){return function({value:r,baseValue:o,onChange:n,...i}){return(0,ZW.jsx)(KT,{value:r,baseValue:o,onChange:n,children:(0,ZW.jsx)(e,{...i})})}}var N$e=A_(PM);var M$e=A_(x_);var F$e=A_(m_);var D$e=a(E(),1);var n0e=a(yf(),1);var Xye=a(Y(),1),Qye=a(U(),1),Jye=a(be(),1),$ye=a(ke(),1);function e0e({path:e,onPathChange:t}){let{selectedBlockName:r,selectedBlockClientId:o}=(0,Xye.useSelect)(s=>{let{getSelectedBlockClientId:l,getBlockName:c}=s(Jye.store),u=l();return{selectedBlockName:c(u),selectedBlockClientId:u}},[]),n=!0,i=(0,$ye.usePrevious)(o);return(0,Qye.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 Jb=a(U(),1);var I_=a(ne(),1),O_=a(Y(),1),t0e=a(be(),1);var{cleanEmptyObject:XW}=K(t0e.privateApis);function L$e(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,O_.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(I_.store),g=u(I_.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,O_.useSelect)(I_.store),{editEntityRecord:s}=(0,O_.useDispatch)(I_.store),l=(0,Jb.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,Jb.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:XW(h.styles)||{},settings:XW(h.settings)||{},_links:XW(h._links)||{}},d)},[e,s,i]);return[t,l,c]}function B$e(){let e=(0,O_.useSelect)(t=>t(I_.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function lo(){let[e,t,r]=L$e(),[o,n]=B$e();return{merged:(0,Jb.useMemo)(()=>!e||!o?{}:Oi(n||{},t),[e,o,n,t]),base:n||{},user:t,setUser:r,isReady:e&&o}}function Qh(e,t){let{merged:r}=lo();return(0,Jb.useMemo)(()=>n0(r,e,t),[r,e,t])}function QW(e,t){let{merged:r}=lo();return(0,Jb.useMemo)(()=>sv(r,e,t),[r,e,t])}var $b=a(E(),1);function V$e(e){let t=e?.styles,r=e?.__unstableResolvedAssets,o=e?.colors,n=e?.gradients,i=e?.__experimentalDiscussionSettings,s=e?.fontLibraryEnabled??!0,l=(0,o0e.useSelect)(d=>{let{canUser:f}=d(r0e.store);return f("create",{kind:"postType",name:"attachment"})?n0e.uploadMedia:void 0},[]),c=(0,JW.useMemo)(()=>t?t.filter(d=>!d.isGlobalStyles):[],[t]),u=(0,JW.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 NM({path:e,onPathChange:t,settings:r}){let{user:o,base:n,setUser:i,isReady:s}=lo(),{serverCSS:l,serverSettings:c,fontLibraryEnabled:u}=V$e(r);return s?(0,$b.jsxs)($b.Fragment,{children:[(0,$b.jsx)(KW,{value:o,baseValue:n||{},onChange:i,path:e,onPathChange:t,fontLibraryEnabled:u,serverCSS:l,serverSettings:c}),(0,$b.jsx)(e0e,{path:e,onPathChange:t})]}):null}var{store:j$e}=K(l_),i0e={};function z$e(e){let{RECEIVE_INTERMEDIATE_RESULTS:t}=K(Pa.privateApis),{getEntityRecords:r}=e(Pa.store);return r("postType","wp_block",{per_page:-1,[t]:!0})}function H$e(e){return e(Pa.store).getUserPatternCategories()}var U$e=["__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:W$e,globalStylesLinksDataKey:G$e,selectBlockPatternsKey:Y$e,reusableBlocksSelectKey:q$e,userPatternCategoriesSelectKey:K$e,sectionRootClientIdKey:Z$e,mediaEditKey:X$e,getMediaSelectKey:Q$e,isIsolatedEditorKey:J$e,deviceTypeKey:$$e,isNavigationOverlayContextKey:eet,isNavigationPostEditorKey:tet,mediaUploadOnSuccessKey:ret,mediaSideloadFromUrlKey:oet,openMediaEditorModalKey:net}=K(MM.privateApis);function iet(e,t,r,o){let n=(0,l0e.useViewportMatch)("medium"),{allImageSizes:i,bigImageSizeThreshold:s,allowRightClickOverrides:l,blockTypes:c,focusMode:u,hasFixedToolbar:d,isDistractionFree:f,keepCaretInsideBlock:m,hasUploadPermissions:h,hiddenBlockTypes:g,canUseUnfilteredHTML:v,userCanCreatePages:b,pageOnFront:_,pageForPosts:y,restBlockPatternCategories:w,sectionRootClientId:S,deviceType:x,isNavigationOverlayContext:C,isRevisionsMode:A,viewablePostTypeLabel:k,currentPostId:R}=(0,ey.useSelect)(te=>{let{canUser:de,getRawEntityRecord:me,getEntityRecord:ee,getBlockPatternCategories:$,getPostType:ue}=te(Pa.store),{get:ve}=te(a0e.store),{getBlockTypes:Ee}=te(c0e.store),{getCurrentPostId:ie,getCurrentPostType:ae}=te(I),{getDeviceType:pe,isRevisionsMode:le}=K(te(I)),{getBlocksByName:se,getBlockAttributes:Ae}=te(MM.store),ye=de("read",{kind:"root",name:"site"})?ee("root","site"):void 0,Se=ee("root","__unstableBase"),Pe=ae(),Me=Pe?ue(Pe):void 0;function X(){return o==="template-locked"?se("core/post-content")?.[0]??"":se("core/group").find(fe=>Ae(fe)?.tagName==="main")??""}return{allImageSizes:Se?.image_sizes,bigImageSizeThreshold:Se?.image_size_threshold,allowRightClickOverrides:ve("core","allowRightClickOverrides"),blockTypes:Ee(),canUseUnfilteredHTML:me("postType",t,r)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:ve("core","focusMode"),hasFixedToolbar:ve("core","fixedToolbar")||!n,hiddenBlockTypes:ve("core","hiddenBlockTypes"),isDistractionFree:ve("core","distractionFree"),keepCaretInsideBlock:ve("core","keepCaretInsideBlock"),hasUploadPermissions:de("create",{kind:"postType",name:"attachment"})??!0,userCanCreatePages:de("create",{kind:"postType",name:"page"}),pageOnFront:ye?.page_on_front,pageForPosts:ye?.page_for_posts,viewablePostTypeLabel:Me?.viewable?Me?.labels?.singular_name:void 0,currentPostId:ie(),restBlockPatternCategories:$(),sectionRootClientId:X(),deviceType:pe(),isNavigationOverlayContext:t==="wp_template_part"&&r?ee("postType","wp_template_part",r)?.area==="navigation-overlay":!1,isRevisionsMode:le()}},[t,r,n,o]),{merged:N}=lo(),P=N.styles??i0e,T=N._links??i0e,M=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,j=e.__experimentalAdditionalBlockPatternCategories??e.__experimentalBlockPatternCategories,F=(0,Jh.useMemo)(()=>[...M||[]].filter(({postTypes:te})=>!te||Array.isArray(te)&&te.includes(t)),[M,t]),D=(0,Jh.useMemo)(()=>[...j||[],...w||[]].filter((te,de,me)=>de===me.findIndex(ee=>te.name===ee.name)),[j,w]),{undo:B,setIsInserterOpened:L}=(0,ey.useDispatch)(I),{editMediaEntity:O}=K((0,ey.useDispatch)(Pa.store)),{saveEntityRecord:V}=(0,ey.useDispatch)(Pa.store),{openMediaEditorModal:W}=(0,ey.useDispatch)(j$e),q=(0,Jh.useCallback)(te=>b?V("postType","page",te):Promise.reject({message:(0,s0e.__)("You do not have permission to create Pages.")}),[V,b]),Z=(0,Jh.useMemo)(()=>g&&g.length>0?(e.allowedBlockTypes===!0?c.map(({name:de})=>de):e.allowedBlockTypes||[]).filter(de=>!g.includes(de)):e.allowedBlockTypes,[e.allowedBlockTypes,g,c]),Q=e.focusMode===!1,ce=(0,Jh.useMemo)(()=>Xhe(R,k),[R,k]);return(0,Jh.useMemo)(()=>{let te={...Object.fromEntries(Object.entries(e).filter(([de])=>U$e.includes(de))),[W$e]:P,[G$e]:T,allImageSizes:i,bigImageSizeThreshold:s,allowedBlockTypes:Z,allowRightClickOverrides:l,focusMode:u&&!Q,hasFixedToolbar:d,isDistractionFree:f,keepCaretInsideBlock:m,[Q$e]:(de,me)=>de(Pa.store).getEntityRecord("postType","attachment",me),[X$e]:h?O:void 0,[net]:({id:de,onUpdate:me,onClose:ee})=>W({id:de,onUpdate:me,onClose:ee}),mediaUpload:h?_2:void 0,[ret]:h?$he:void 0,mediaSideload:h?tge:void 0,[oet]:h?ige:void 0,mediaFinalize:h?lge:void 0,mediaDelete:h?uge:void 0,__experimentalBlockPatterns:F,[Y$e]:de=>{let{hasFinishedResolution:me,getBlockPatternsForPostType:ee}=K(de(Pa.store)),$=ee(t);return me("getBlockPatterns")?$:void 0},[q$e]:z$e,[K$e]:H$e,__experimentalBlockPatternCategories:D,__experimentalFetchLinkSuggestions:(de,me)=>(0,Pa.__experimentalFetchLinkSuggestions)(de,me,e),inserterMediaCategories:ce,__experimentalFetchRichUrlData:Pa.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:v,__experimentalUndo:B,outlineMode:!f&&t==="wp_template",__experimentalCreatePageEntity:q,__experimentalUserCanCreatePages:b,pageOnFront:_,pageForPosts:y,__experimentalPreferPatternsOnRoot:t==="wp_template",templateLock:t==="wp_navigation"?"insert":e.templateLock,template:t==="wp_navigation"?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:L,[Z$e]:S,editorTool:o==="post-only"&&t!=="wp_template"?"edit":void 0,[J$e]:["wp_template_part","wp_block","wp_navigation"].includes(t),[tet]:t==="wp_navigation",disableContentOnlyForTemplateParts:o==="template-locked"||e.disableContentOnlyForTemplateParts,...x?{[$$e]:x}:{},[eet]:C};return A&&(te.isPreviewMode=!0),te},[A,Z,l,u,Q,d,f,m,e,h,F,D,ce,v,B,q,b,_,y,t,L,S,P,T,o,O,W,x,i,s,C])}var u0e=iet;var vE=a(Y(),1),N_=a(be(),1),DM=a(U(),1);var d0e=a(U(),1),f0e=a(Bn(),1),set=["core/post-title","core/post-featured-image","core/post-content"];function FM(){return(0,d0e.useMemo)(()=>[...(0,f0e.applyFilters)("editor.postContentBlockTypes",set)],[])}function p0e(){let e=FM(),{contentOnlyIds:t,templateParts:r}=(0,vE.useSelect)(i=>{let{getPostBlocksByName:s}=K(i(I)),{getBlocksByName:l}=i(N_.store);return{contentOnlyIds:s(e),templateParts:l("core/template-part")}},[e]),o=(0,vE.useSelect)(i=>{let{getBlockOrder:s}=i(N_.store);return r.flatMap(l=>s(l))},[r]),n=(0,vE.useRegistry)();return(0,DM.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(N_.store);return l(),i("","disabled"),()=>{l(),s("")}},[n]),(0,DM.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(N_.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,DM.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(N_.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 m0e=a(U(),1),LM=a(Y(),1),$W=a(be(),1);function h0e(){let e=(0,LM.useRegistry)(),t=(0,LM.useSelect)(r=>r($W.store).getBlockOrder()?.[0],[]);(0,m0e.useEffect)(()=>{if(!t)return;let{setBlockEditingMode:r,unsetBlockEditingMode:o,__unstableMarkNextChangeAsNotPersistent:n}=e.dispatch($W.store);return n(),r(t,"contentOnly"),()=>{n(),o(t)}},[e,t])}var v0e=a(U(),1),M_=a(Bn(),1),g0e=["wp_block","wp_template","wp_template_part"];function b0e(e,t){(0,v0e.useEffect)(()=>((0,M_.addFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter",(r,o)=>!g0e.includes(e)&&o.name==="core/template-part"&&t==="post-only"?!1:r),(0,M_.addFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter",(r,o,n,{getBlockParentsByBlockName:i})=>!g0e.includes(e)&&o.name==="core/post-content"?i(n,"core/query").length>0:r),()=>{(0,M_.removeFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter"),(0,M_.removeFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter")}),[e,t])}var I0e=a(Y(),1),UM=a(U(),1),WM=a(At(),1);var Jl=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 eG=class extends Jl{},aet=new eG;function tG(e,t,r){return aet.diff(e,t,r)}function rG(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 oG(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 BM(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 VM(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 F_(e,t){return BM(e,t,"")}function bE(e,t){return VM(e,t,"")}function nG(e,t){return t.slice(0,cet(e,t))}function cet(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 iG(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 jM(e,t){if(t)return D_(e,t)[1];let r;for(r=e.length-1;r>=0&&e[r].match(/\s/);r--);return e.substring(r+1)}function ty(e,t){if(t)return D_(e,t)[0];let r=e.match(/^\s*/);return r?r[0]:""}function D_(e,t){if(!t)return[ty(e),jM(e)];if(t.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');let r=iG(e,t),o=r[0],n=r[r.length-1],i=/\s/.test(o)?o:"",s=/\s/.test(n)?n:"";return[i,s]}var zM="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}",uet=new RegExp(`[${zM}]+|\\s+|[^${zM}]`,"ug"),sG=class extends Jl{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=iG(t,s)}else o=t.match(uet)||[];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)&&y0e(o,i,n,s,r.intlSegmenter),o=s,n=null,i=null)}),(n||i)&&y0e(o,i,n,null,r.intlSegmenter),t}},det=new sG;function y0e(e,t,r,o,n){if(t&&r){let[i,s]=D_(t.value,n),[l,c]=D_(r.value,n);if(e){let u=rG(i,l);e.value=VM(e.value,l,u),t.value=F_(t.value,u),r.value=F_(r.value,u)}if(o){let u=oG(s,c);o.value=BM(o.value,c,u),t.value=bE(t.value,u),r.value=bE(r.value,u)}}else if(r){if(e){let i=ty(r.value,n);r.value=r.value.substring(i.length)}if(o){let i=ty(o.value,n);o.value=o.value.substring(i.length)}}else if(e&&o){let i=ty(o.value,n),[s,l]=D_(t.value,n),c=rG(i,s);t.value=F_(t.value,c);let u=oG(F_(i,c),l);t.value=bE(t.value,u),o.value=BM(o.value,i,u),e.value=VM(e.value,i,i.slice(0,i.length-u.length))}else if(o){let i=ty(o.value,n),s=jM(t.value,n),l=nG(s,i);t.value=bE(t.value,l)}else if(e){let i=jM(e.value,n),s=ty(t.value,n),l=nG(i,s);t.value=F_(t.value,l)}}var aG=class extends Jl{tokenize(t){let r=new RegExp(`(\\r?\\n)|[${zM}]+|[^\\S\\n\\r]+|[^${zM}]`,"ug");return t.match(r)||[]}},w0e=new aG;function L_(e,t,r){return w0e.diff(e,t,r)}var lG=class extends Jl{constructor(){super(...arguments),this.tokenize=pet}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)}},fet=new lG;function _0e(e,t,r){return fet.diff(e,t,r)}function pet(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 cG=class extends Jl{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}},S0e=new cG;function yE(e,t,r){return S0e.diff(e,t,r)}var uG=a(C0e(),1),HM=a(At(),1),Mn=a(Vc(),1),os=a(z(),1);var{parseRawBlock:P0e}=K(HM.privateApis);function T0e(e){return e.blockName===null&&(!e.innerHTML||!e.innerHTML.trim())}function E0e(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function met(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 het(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 _=met(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 k0e(e,t){e=e.filter(u=>!T0e(u)),t=t.filter(u=>!T0e(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=yE(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=k0e(f.innerBlocks||[],m.innerBlocks||[]);s.push({...f,innerBlocks:h})}return het(s)}function get(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 vet(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,os.sprintf)((0,os._n)("%d format added","%d formats added",s),s)};if(l>0&&s===0&&c===0)return{type:"removed",description:(0,os.sprintf)((0,os._n)("%d format removed","%d formats removed",l),l)};let u=[];return s>0&&u.push((0,os.sprintf)((0,os._n)("%d format added","%d formats added",s),s)),l>0&&u.push((0,os.sprintf)((0,os._n)("%d format removed","%d formats removed",l),l)),c>0&&u.push((0,os.sprintf)((0,os._n)("%d format changed","%d formats changed",c),c)),{type:"changed",description:u.join(", ")||(0,os.__)("Formatting changed")}}function bet(e,t){let r=e.toPlainText(),o=t.toPlainText(),n=L_(o,r),i=(0,Mn.create)({text:""}),s=0,l=0;for(let c of n)if(c.removed){let u=(0,Mn.slice)(t,l,l+c.value.length),d=(0,Mn.applyFormat)(u,{type:"revision/diff-removed",attributes:{title:(0,os.__)("Removed")}},0,c.value.length);i=(0,Mn.concat)(i,d),l+=c.value.length}else if(c.added){let u=(0,Mn.slice)(e,s,s+c.value.length),d=(0,Mn.applyFormat)(u,{type:"revision/diff-added",attributes:{title:(0,os.__)("Added")}},0,c.value.length);i=(0,Mn.concat)(i,d),s+=c.value.length}else{let u=e.formats||[],d=t.formats||[],f=c.value.length,m=v=>get(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,Mn.slice)(e,s+h,s+v);if(g){let{type:y,description:w}=vet(u,d,s+h,l+h),S={added:"revision/diff-format-added",removed:"revision/diff-format-removed",changed:"revision/diff-format-changed"}[y],x=(0,Mn.applyFormat)(_,{type:S,attributes:{title:w}},0,v-h);i=(0,Mn.concat)(i,x)}else i=(0,Mn.concat)(i,_);h=v,g=b}}s+=c.value.length,l+=c.value.length}return new Mn.RichTextData(i)}function yet(e,t,r){let o=(0,HM.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 Mn.RichTextData&&c instanceof Mn.RichTextData&&(e.attributes[i]=bet(l,c))}else{let l=E0e(e.attributes[i]),c=E0e(t.attributes[i]);l!==c&&(n[i]=L_(c,l))}Object.keys(n).length>0&&(r.changedAttributes=n)}function R0e(e,t){if(t.__revisionDiffStatus){if(t.__revisionDiffStatus.status==="modified"&&t.__previousRawBlock){let r=P0e(t.__previousRawBlock);r&&yet(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&&R0e(o,n)}}function A0e(e,t){let r=(0,uG.parse)(e||""),o=(0,uG.parse)(t||"");return k0e(r,o).map(i=>{let s=P0e(i);return s&&R0e(s,i),s}).filter(Boolean)}function dG(e,t){if(!t?.length||!e?.length)return e;let r=e.map(c=>c.name),o=t.map(c=>c.name),n=yE(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:dG(d.innerBlocks,f.innerBlocks)})}return l}function O0e(){let{isInRevisionsMode:e,showDiff:t,revision:r,previousRevision:o,postType:n}=(0,I0e.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,UM.useRef)([]);return(0,UM.useMemo)(()=>{if(!e)return i.current=[],null;if(!r)return[];let l=r?.content?.raw??"",c;if(t){let d=o?.content?.raw||"";c=A0e(l,d)}else c=(0,WM.parse)(l);n==="wp_navigation"&&(c=[(0,WM.createBlock)("core/navigation",{templateLock:!1},c)]);let u=dG(c,i.current);return i.current=u,u},[e,r,r?.content?.raw,o?.content?.raw,n,t])}var ti=a(Y(),1),kt=a(z(),1);var B_=a(fG(),1),hG=a(Dt(),1),H0e=a(It(),1),SE=a(be(),1),V_=a(ne(),1);var GM=a(Lt(),1);var wE=a(Y(),1),M0e=a(kl(),1),F0e=a(ne(),1);var D0e=a(E(),1),{RenamePatternModal:wet}=K(M0e.privateApis),pG="editor/pattern-rename";function L0e(){let e=(0,wE.useSelect)(n=>n(He).isModalActive(pG)),{record:t,postType:r}=(0,wE.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:s}=n(I),{getEditedEntityRecord:l}=n(F0e.store),c=i();return{record:l("postType",c,s()),postType:c}},[e]),{closeModal:o}=(0,wE.useDispatch)(He);return!e||r!==Au?null:(0,D0e.jsx)(wet,{onClose:o,pattern:t})}var _E=a(Y(),1),B0e=a(kl(),1),V0e=a(ne(),1);var j0e=a(E(),1),{DuplicatePatternModal:_et}=K(B0e.privateApis),mG="editor/pattern-duplicate";function z0e(){let e=(0,_E.useSelect)(n=>n(He).isModalActive(mG)),{record:t,postType:r}=(0,_E.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:s}=n(I),{getEditedEntityRecord:l}=n(V0e.store),c=i();return{record:l("postType",c,s()),postType:c}},[e]),{closeModal:o}=(0,_E.useDispatch)(He);return!e||r!==Au?null:(0,j0e.jsx)(_et,{onClose:o,onSuccess:()=>o(),pattern:t})}function U0e({disableContentOnlyForPatternsAndTemplateParts:e,stopEditingContentOnlySection:t,updateEditorSettings:r}){return{name:"core/toggle-pattern-editing",label:e?(0,kt.__)("Disable editing all patterns"):(0,kt.__)("Enable editing all patterns"),icon:r0,category:"command",callback:({close:o})=>{let n=!e;t(),r({disableContentOnlyForUnsyncedPatterns:n,disableContentOnlyForTemplateParts:n}),o()}}}function xet(e,t){return!!t?.metadata?.patternName||e==="core/template-part"}var Cet=()=>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,ti.useSelect)(F=>{let{get:D}=F(hG.store),{isListViewOpened:B,getCurrentPostType:L,getEditorSettings:O}=F(I),{getSettings:V}=F(SE.store),{getPostType:W}=F(V_.store);return{editorMode:D("core","editorMode")??"visual",isListViewOpen:B(),showBlockBreadcrumbs:D("core","showBlockBreadcrumbs"),isDistractionFree:D("core","distractionFree"),isFocusMode:D("core","focusMode"),isPreviewMode:V().isPreviewMode,isViewable:W(L())?.viewable??!1,isCodeEditingEnabled:O().codeEditingEnabled,isRichEditingEnabled:O().richEditingEnabled,isPublishSidebarEnabled:F(I).isPublishSidebarEnabled(),disableContentOnlyForUnsyncedPatterns:!!O().disableContentOnlyForUnsyncedPatterns,disableContentOnlyForTemplateParts:!!O().disableContentOnlyForTemplateParts}},[]),{getActiveComplementaryArea:h}=(0,ti.useSelect)(He),{toggle:g}=(0,ti.useDispatch)(hG.store),{createInfoNotice:v}=(0,ti.useDispatch)(H0e.store),{__unstableSaveForPreview:b,setIsListViewOpened:_,switchEditorMode:y,toggleDistractionFree:w,toggleSpotlightMode:S,toggleTopToolbar:x,updateEditorSettings:C}=(0,ti.useDispatch)(I),{stopEditingContentOnlySection:A}=K((0,ti.useDispatch)(SE.store)),{openModal:k,enableComplementaryArea:R,disableComplementaryArea:N}=(0,ti.useDispatch)(He),{getCurrentPostId:P}=(0,ti.useSelect)(I),T=c&&u;if(s)return{commands:[],isLoading:!1};let M=[],j=f&&m;return M.push({name:"core/open-shortcut-help",label:(0,kt.__)("Keyboard shortcuts"),icon:Zx,category:"view",callback:({close:F})=>{F(),k("editor/keyboard-shortcut-help")}}),M.push({name:"core/toggle-distraction-free",label:n?(0,kt.__)("Exit Distraction free"):(0,kt.__)("Enter Distraction free"),category:"command",callback:({close:F})=>{w(),F()}}),M.push({name:"core/open-preferences",label:(0,kt.__)("Editor preferences"),category:"view",callback:({close:F})=>{F(),k("editor/preferences")}}),M.push({name:"core/toggle-spotlight-mode",label:i?(0,kt.__)("Exit Spotlight mode"):(0,kt.__)("Enter Spotlight mode"),category:"command",callback:({close:F})=>{S(),F()}}),M.push({name:"core/toggle-list-view",label:r?(0,kt.__)("Close List View"):(0,kt.__)("Open List View"),icon:Xx,category:"command",callback:({close:F})=>{_(!r),F(),v(r?(0,kt.__)("List View off."):(0,kt.__)("List View on."),{id:"core/editor/toggle-list-view/notice",type:"snackbar"})}}),M.push({name:"core/toggle-top-toolbar",label:(0,kt.__)("Top toolbar"),category:"command",callback:({close:F})=>{x(),F()}}),M.push(U0e({disableContentOnlyForPatternsAndTemplateParts:j,stopEditingContentOnlySection:A,updateEditorSettings:C})),T&&M.push({name:"core/toggle-code-editor",label:t==="visual"?(0,kt.__)("Open code editor"):(0,kt.__)("Exit code editor"),icon:cB,category:"command",callback:({close:F})=>{y(t==="visual"?"text":"visual"),F()}}),M.push({name:"core/toggle-breadcrumbs",label:o?(0,kt.__)("Hide block breadcrumbs"):(0,kt.__)("Show block breadcrumbs"),category:"command",callback:({close:F})=>{g("core","showBlockBreadcrumbs"),F(),v(o?(0,kt.__)("Breadcrumbs hidden."):(0,kt.__)("Breadcrumbs visible."),{id:"core/editor/toggle-breadcrumbs/notice",type:"snackbar"})}}),M.push({name:"core/open-settings-sidebar",label:(0,kt.__)("Show or hide the Settings panel"),icon:(0,kt.isRTL)()?ev:mf,category:"command",callback:({close:F})=>{let D=h("core");F(),D==="edit-post/document"?N("core"):R("core","edit-post/document")}}),M.push({name:"core/open-block-inspector",label:(0,kt.__)("Show or hide the Block settings panel"),icon:U4,category:"command",callback:({close:F})=>{let D=h("core");F(),D==="edit-post/block"?N("core"):R("core","edit-post/block")}}),M.push({name:"core/toggle-publish-sidebar",label:d?(0,kt.__)("Disable pre-publish checks"):(0,kt.__)("Enable pre-publish checks"),icon:Wx,category:"command",callback:({close:F})=>{F(),g("core","isPublishSidebarEnabled"),v(d?(0,kt.__)("Pre-publish checks disabled."):(0,kt.__)("Pre-publish checks enabled."),{id:"core/editor/publish-sidebar/notice",type:"snackbar"})}}),l&&M.push({name:"core/preview-link",label:(0,kt.__)("Preview in a new tab"),icon:fs,category:"view",callback:async({close:F})=>{F();let D=P(),B=await b();window.open(B,`wp-preview-${D}`)}}),{commands:M,isLoading:!1}},Tet=()=>function({search:t}){let{disableContentOnlyForPatternsAndTemplateParts:r,hasPatternOrTemplatePartSelection:o,isPreviewMode:n}=(0,ti.useSelect)(l=>{let{getBlockAttributes:c,getBlockName:u,getBlockParents:d,getSelectedBlockClientId:f,getSelectedBlockClientIds:m,getSettings:h}=l(SE.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=>xet(u(w),c(w))),isPreviewMode:h().isPreviewMode}},[]),{updateEditorSettings:i}=(0,ti.useDispatch)(I),{stopEditingContentOnlySection:s}=K((0,ti.useDispatch)(SE.store));return t||!o&&!r||n?{isLoading:!1,commands:[]}:{isLoading:!1,commands:[U0e({disableContentOnlyForPatternsAndTemplateParts:r,stopEditingContentOnlySection:s,updateEditorSettings:i})]}},Eet=()=>function(){let{postType:t}=(0,ti.useSelect)(n=>{let{getCurrentPostType:i}=n(I);return{postType:i()}},[]),{openModal:r}=(0,ti.useDispatch)(He),o=[];return t===Au&&(o.push({name:"core/rename-pattern",label:(0,kt.__)("Rename pattern"),icon:t1,category:"edit",callback:({close:n})=>{r(pG),n()}}),o.push({name:"core/duplicate-pattern",label:(0,kt.__)("Duplicate pattern"),icon:r0,category:"command",callback:({close:n})=>{r(mG),n()}})),{isLoading:!1,commands:o}},Pet=()=>function(){let{onNavigateToEntityRecord:t,goBack:r,templateId:o,isPreviewMode:n,canEditTemplate:i}=(0,ti.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(V_.store).canUser("update",{kind:"postType",name:"wp_template",id:g})}},[]),{editedRecord:s,hasResolved:l}=(0,V_.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,kt.sprintf)((0,kt.__)("Edit template: %s"),(0,GM.decodeEntities)(s.title)),icon:Ya,category:"edit",callback:({close:u})=>{t({postId:o,postType:"wp_template"}),u()}}),r&&c.push({name:"core/switch-to-previous-entity",label:(0,kt.__)("Go back"),icon:am,category:"view",callback:({close:u})=>{r(),u()}}),{isLoading:!1,commands:c}},ket=()=>function(){let{postType:t,postId:r}=(0,ti.useSelect)(l=>{let{getCurrentPostId:c,getCurrentPostType:u}=l(I);return{postType:u(),postId:c()}},[]),{editedRecord:o,hasResolved:n}=(0,V_.useEntityRecord)("postType",t,r),{revertTemplate:i}=K((0,ti.useDispatch)(I));if(!n||![Ai,xr].includes(t))return{isLoading:!0,commands:[]};let s=[];if(w2(o)){let l=o.type===xr?(0,kt.sprintf)((0,kt.__)("Reset template: %s"),(0,GM.decodeEntities)(o.title)):(0,kt.sprintf)((0,kt.__)("Reset template part: %s"),(0,GM.decodeEntities)(o.title));s.push({name:"core/reset-template",label:l,icon:(0,kt.isRTL)()?n1:o1,category:"command",callback:({close:c})=>{i(o),c()}})}return{isLoading:!n,commands:s}};function W0e(){(0,B_.useCommandLoader)({name:"core/editor/edit-ui",hook:Cet()}),(0,B_.useCommandLoader)({name:"core/editor/contextual-commands",hook:Eet(),context:"entity-edit"}),(0,B_.useCommandLoader)({name:"core/editor/pattern-editing-contextual-commands",hook:Tet(),context:"block-selection-edit"}),(0,B_.useCommandLoader)({name:"core/editor/page-content-focus",hook:Pet(),context:"entity-edit"}),(0,B_.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:ket()})}var YM=a(Y(),1),G0e=a(U(),1),Y0e=a(E1(),1);var j_="upload-in-progress";function q0e(){let e=(0,YM.useSelect)(i=>i(Y0e.store).isUploading(),[]),{lockPostSaving:t,unlockPostSaving:r,lockPostAutosaving:o,unlockPostAutosaving:n}=(0,YM.useDispatch)(I);(0,G0e.useEffect)(()=>(e?(t(j_),o(j_)):(r(j_),n(j_)),()=>{r(j_),n(j_)}),[e,t,r,o,n])}var K0e=a(U(),1),Z0e=a(Y(),1),gG=a(E1(),1);function X0e(){let e=window.__clientSideMediaProcessing,t=(0,Z0e.useRegistry)();(0,K0e.useEffect)(()=>{if(!e)return;let r=()=>{K(t.dispatch(gG.store)).pauseQueue()},o=()=>{K(t.dispatch(gG.store)).resumeQueue()};return window.addEventListener("offline",r),window.addEventListener("online",o),()=>{window.removeEventListener("offline",r),window.removeEventListener("online",o)}},[e,t])}var ry=a(z(),1),Q0e=a(be(),1),J0e=a(Y(),1),$0e=a(U(),1);var ewe=a(E(),1),{BlockRemovalWarningModal:Ret}=K(Q0e.privateApis),Aet=["core/post-content","core/post-template","core/query"],Iet=[{postTypes:["wp_template","wp_template_part"],callback(e){if(e.filter(({name:o})=>o==="core/post-content").length)return{description:(0,ry.__)("This block displays the content of posts and pages using this template."),warning:(0,ry.__)("If you delete it, posts or pages using this template will not display any content."),subtext:(0,ry.__)("Visitors will see blank pages."),requireConfirmation:!0};if(e.filter(({name:o})=>Aet.includes(o)).length)return(0,ry._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,ry._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 twe(){let e=(0,J0e.useSelect)(r=>r(I).getCurrentPostType(),[]),t=(0,$0e.useMemo)(()=>Iet.filter(r=>r.postTypes.includes(e)),[e]);return t?(0,ewe.jsx)(Ret,{rules:t}):null}var $h=a(G(),1),vG=a(z(),1),oy=a(U(),1),qM=a(be(),1),Dd=a(Y(),1),bG=a(ne(),1),rwe=a(At(),1),yG=a(Dt(),1);var Fd=a(E(),1);function Oet(){let{blockPatternsWithPostContentBlockType:e,postType:t}=(0,Dd.useSelect)(r=>{let{getPatternsByBlockTypes:o,getBlocksByName:n}=r(qM.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,oy.useMemo)(()=>e?.length?e.filter(r=>t==="page"&&!r.postTypes||Array.isArray(r.postTypes)&&r.postTypes.includes(t)):[],[t,e])}function Net({blockPatterns:e,onChoosePattern:t}){let{editEntityRecord:r}=(0,Dd.useDispatch)(bG.store),{postType:o,postId:n}=(0,Dd.useSelect)(i=>{let{getCurrentPostType:s,getCurrentPostId:l}=i(I);return{postType:s(),postId:l()}},[]);return(0,Fd.jsx)(qM.__experimentalBlockPatternsList,{blockPatterns:e,onClickPattern:(i,s)=>{r("postType",o,n,{blocks:s,content:({blocks:l=[]})=>(0,rwe.__unstableSerializeAndClean)(l)}),t()}})}function Met({onClose:e}){let[t,r]=(0,oy.useState)(!0),{set:o}=(0,Dd.useDispatch)(yG.store),n=Oet();if(!(n.length>0))return null;function s(){e(),o("core","enableChoosePatternModal",t)}return(0,Fd.jsxs)($h.Modal,{className:"editor-start-page-options__modal",title:(0,vG.__)("Choose a pattern"),isFullScreen:!0,onRequestClose:s,children:[(0,Fd.jsx)("div",{className:"editor-start-page-options__modal-content",children:(0,Fd.jsx)(Net,{blockPatterns:n,onChoosePattern:s})}),(0,Fd.jsx)($h.Flex,{className:"editor-start-page-options__modal__actions",justify:"flex-start",expanded:!1,children:(0,Fd.jsx)($h.FlexItem,{children:(0,Fd.jsx)($h.CheckboxControl,{checked:t,label:(0,vG.__)("Always show starter patterns for new pages"),onChange:l=>{r(l)}})})})]})}function owe(){let[e,t]=(0,oy.useState)(!1),{isEditedPostEmpty:r}=(0,Dd.useSelect)(I),{getEntityRecordNonTransientEdits:o}=(0,Dd.useSelect)(bG.store),{isModalActive:n}=(0,Dd.useSelect)(He),{enabled:i,postType:s,postId:l}=(0,Dd.useSelect)(c=>{let{getCurrentPostId:u,getCurrentPostType:d}=c(I),f=c(yG.store).get("core","enableChoosePatternModal"),m=d();return{postType:m,postId:u(),enabled:f&&Sl!==m&&xr!==m&&Ai!==m}},[]);return(0,oy.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,Fd.jsx)(Met,{onClose:()=>t(!1)}):null}var fwe=a(G(),1),Ld=a(z(),1),QM=a(ya(),1),xE=a(Y(),1);var $l=a(z(),1),nwe=[{keyCombination:{modifier:"primary",character:"b"},description:(0,$l.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,$l.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,$l.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,$l.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,$l.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,$l.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,$l.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,$l.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,$l.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,$l.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,$l.__)("Add non breaking space.")}];var swe=a(U(),1),KM=a(Oo(),1),ec=a(E(),1);function iwe({keyCombination:e,forceAriaLabel:t}){let r=e.modifier?KM.displayShortcutList[e.modifier](e.character):e.character,o=e.modifier?KM.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,ec.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,ec.jsx)(swe.Fragment,{children:n},i):(0,ec.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key",children:n},i))})}function Fet({description:e,keyCombination:t,aliases:r=[],ariaLabel:o}){return(0,ec.jsxs)(ec.Fragment,{children:[(0,ec.jsx)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-description",children:e}),(0,ec.jsxs)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-term",children:[(0,ec.jsx)(iwe,{keyCombination:t,forceAriaLabel:o}),r.map((n,i)=>(0,ec.jsx)(iwe,{keyCombination:n,forceAriaLabel:o},i))]})]})}var ZM=Fet;var awe=a(Y(),1),lwe=a(ya(),1);var cwe=a(E(),1);function Det({name:e}){let{keyCombination:t,description:r,aliases:o}=(0,awe.useSelect)(n=>{let{getShortcutKeyCombination:i,getShortcutDescription:s,getShortcutAliases:l}=n(lwe.store);return{keyCombination:i(e),aliases:l(e),description:s(e)}},[e]);return t?(0,cwe.jsx)(ZM,{keyCombination:t,description:r,aliases:o}):null}var uwe=Det;var _i=a(E(),1),dwe="editor/keyboard-shortcut-help",Let=({shortcuts:e})=>(0,_i.jsx)("ul",{className:"editor-keyboard-shortcut-help-modal__shortcut-list",role:"list",children:e.map((t,r)=>(0,_i.jsx)("li",{className:"editor-keyboard-shortcut-help-modal__shortcut",children:typeof t=="string"?(0,_i.jsx)(uwe,{name:t}):(0,_i.jsx)(ZM,{...t})},r))}),wG=({title:e,shortcuts:t,className:r})=>(0,_i.jsxs)("section",{className:J("editor-keyboard-shortcut-help-modal__section",r),children:[!!e&&(0,_i.jsx)("h2",{className:"editor-keyboard-shortcut-help-modal__section-title",children:e}),(0,_i.jsx)(Let,{shortcuts:t})]}),XM=({title:e,categoryName:t,additionalShortcuts:r=[]})=>{let o=(0,xE.useSelect)(n=>n(QM.store).getCategoryShortcuts(t),[t]);return(0,_i.jsx)(wG,{title:e,shortcuts:o.concat(r)})};function Bet(){let e=(0,xE.useSelect)(n=>n(He).isModalActive(dwe),[]),{openModal:t,closeModal:r}=(0,xE.useDispatch)(He),o=()=>{e?r():t(dwe)};return(0,QM.useShortcut)("core/editor/keyboard-shortcuts",o),e?(0,_i.jsxs)(fwe.Modal,{className:"editor-keyboard-shortcut-help-modal",title:(0,Ld.__)("Keyboard shortcuts"),closeButtonLabel:(0,Ld.__)("Close"),onRequestClose:o,children:[(0,_i.jsx)(wG,{className:"editor-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/editor/keyboard-shortcuts"]}),(0,_i.jsx)(XM,{title:(0,Ld.__)("Global shortcuts"),categoryName:"global"}),(0,_i.jsx)(XM,{title:(0,Ld.__)("Selection shortcuts"),categoryName:"selection"}),(0,_i.jsx)(XM,{title:(0,Ld.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,Ld.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,Ld.__)("Forward-slash")}]}),(0,_i.jsx)(wG,{title:(0,Ld.__)("Text formatting"),shortcuts:nwe}),(0,_i.jsx)(XM,{title:(0,Ld.__)("List View shortcuts"),categoryName:"list-view"})]}):null}var pwe=Bet;var eg=a(G(),1),CE=a(z(),1),z_=a(U(),1),mwe=a(be(),1),TE=a(Y(),1),_G=a(At(),1),ny=a(ne(),1);var Bd=a(E(),1);function Vet(e,t=!1){return(0,TE.useSelect)(r=>{let{getEntityRecord:o,getDefaultTemplateId:n}=r(ny.store),i=n({slug:e,is_custom:t,ignore_empty:!0});return i?o("postType",xr,i)?.content?.raw:void 0},[e,t])}function jet(e){let{slug:t,patterns:r}=(0,TE.useSelect)(i=>{let{getCurrentPostType:s,getCurrentPostId:l}=i(I),{getEntityRecord:c,getBlockPatterns:u}=i(ny.store),d=l(),f=s();return{slug:c("postType",f,d).slug,patterns:u()}},[]),o=(0,TE.useSelect)(i=>i(ny.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,z_.useMemo)(()=>[{name:"fallback",blocks:(0,_G.parse)(e),title:(0,CE.__)("Fallback content")},...r.filter(i=>Array.isArray(i.templateTypes)&&i.templateTypes.some(s=>t.startsWith(s))).map(i=>({...i,blocks:(0,_G.parse)(i.content).map(s=>n(s))}))],[e,t,r])}function zet({fallbackContent:e,onChoosePattern:t,postType:r}){let[,,o]=(0,ny.useEntityBlockEditor)("postType",r),n=jet(e);return(0,Bd.jsx)(mwe.__experimentalBlockPatternsList,{blockPatterns:n,onClickPattern:(i,s)=>{o(s,{selection:void 0}),t()}})}function Het({slug:e,isCustom:t,onClose:r,postType:o}){let n=Vet(e,t);return n?(0,Bd.jsxs)(eg.Modal,{className:"editor-start-template-options__modal",title:(0,CE.__)("Choose a pattern"),closeLabel:(0,CE.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:r,isFullScreen:!0,children:[(0,Bd.jsx)("div",{className:"editor-start-template-options__modal-content",children:(0,Bd.jsx)(zet,{fallbackContent:n,slug:e,isCustom:t,postType:o,onChoosePattern:()=>{r()}})}),(0,Bd.jsx)(eg.Flex,{className:"editor-start-template-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,Bd.jsx)(eg.FlexItem,{children:(0,Bd.jsx)(eg.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,CE.__)("Skip")})})})]}):null}function hwe(){let[e,t]=(0,z_.useState)(!1),{shouldOpenModal:r,slug:o,isCustom:n,postType:i,postId:s}=(0,TE.useSelect)(l=>{let{getCurrentPostType:c,getCurrentPostId:u}=l(I),d=c(),f=u(),{getEditedEntityRecord:m,getEntityRecordNonTransientEdits:h}=l(ny.store),g=m("postType",d,f);return{shouldOpenModal:!(Object.keys(h("postType",d,f)??{}).length>0)&&g.content===""&&xr===d,slug:g.slug,isCustom:g.is_custom,postType:d,postId:f}},[]);return(0,z_.useEffect)(()=>{t(!1)},[i,s]),!r||e?null:(0,Bd.jsx)(Het,{slug:o,isCustom:n,postType:i,onClose:()=>t(!0)})}var tg=a(ya(),1),rg=a(Y(),1);var gwe=a(be(),1);function H_(){let e=(0,rg.useSelect)(b=>{let{richEditingEnabled:_,codeEditingEnabled:y}=b(I).getEditorSettings();return!_||!y},[]),{getBlockSelectionStart:t}=(0,rg.useSelect)(gwe.store),{getActiveComplementaryArea:r}=(0,rg.useSelect)(He),{enableComplementaryArea:o,disableComplementaryArea:n}=(0,rg.useDispatch)(He),{redo:i,undo:s,savePost:l,setIsListViewOpened:c,switchEditorMode:u,toggleDistractionFree:d}=(0,rg.useDispatch)(I),{isEditedPostDirty:f,isPostSavingLocked:m,isListViewOpened:h,getEditorMode:g,isSavingNonPostEntityChanges:v}=(0,rg.useSelect)(I);return(0,tg.useShortcut)("core/editor/toggle-mode",()=>{u(g()==="visual"?"text":"visual")},{isDisabled:e}),(0,tg.useShortcut)("core/editor/toggle-distraction-free",()=>{d()}),(0,tg.useShortcut)("core/editor/undo",b=>{s(),b.preventDefault()}),(0,tg.useShortcut)("core/editor/redo",b=>{i(),b.preventDefault()}),(0,tg.useShortcut)("core/editor/save",b=>{b.preventDefault(),!(m()||v())&&f()&&l()}),(0,tg.useShortcut)("core/editor/toggle-list-view",b=>{h()||(b.preventDefault(),c(!0))}),(0,tg.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 Pwe=a(Y(),1),e3=a(be(),1);var EE=a(Y(),1),JM=a(be(),1),vwe=a(ne(),1),$M=a(G(),1),Vd=a(z(),1),bwe=a(Lt(),1),ywe=a(U(),1),iy=a(E(),1);function wwe({clientId:e,onClose:t}){let[r,o]=(0,ywe.useState)(!1),{getBlocks:n}=(0,EE.useSelect)(JM.store),{replaceBlocks:i}=(0,EE.useDispatch)(JM.store),{canRemove:s,templatePartTitle:l}=(0,EE.useSelect)(d=>{let{canRemoveBlock:f,getBlock:m}=d(JM.store),{getEntityRecord:h,getCurrentTheme:g}=d(vwe.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,bwe.decodeEntities)(S.title.rendered):null}},[e]);if(!s)return null;let c=l?(0,Vd.sprintf)((0,Vd.__)("Detach %s?"),l):(0,Vd.__)("Detach template part?"),u=l?(0,Vd.sprintf)((0,Vd.__)("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,Vd.__)("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,iy.jsxs)(iy.Fragment,{children:[(0,iy.jsx)($M.MenuItem,{onClick:()=>o(!0),children:(0,Vd.__)("Detach")}),(0,iy.jsx)($M.__experimentalConfirmDialog,{isOpen:r,onConfirm:()=>{i(e,n(e)),t()},onCancel:()=>o(!1),confirmButtonText:(0,Vd.__)("Detach"),size:"medium",title:c,__experimentalHideHeader:!1,children:u})]})}var PE=a(Y(),1),SG=a(be(),1),_we=a(G(),1),Swe=a(At(),1),xG=a(z(),1),xwe=a(U(),1),Cwe=a(It(),1);var Twe=a(ne(),1);var sy=a(E(),1);function Ewe({clientIds:e,blocks:t}){let[r,o]=(0,xwe.useState)(!1),{replaceBlocks:n}=(0,PE.useDispatch)(SG.store),{createSuccessNotice:i}=(0,PE.useDispatch)(Cwe.store),{isBlockBasedTheme:s,canCreate:l}=(0,PE.useSelect)(u=>({isBlockBasedTheme:u(Twe.store).getCurrentTheme()?.is_block_theme,canCreate:u(SG.store).canInsertBlockType("core/template-part")}),[]);if(!s||!l)return null;let c=async u=>{n(e,(0,Swe.createBlock)("core/template-part",{slug:u.slug,theme:u.theme})),i((0,xG.__)("Template part created."),{type:"snackbar"})};return(0,sy.jsxs)(sy.Fragment,{children:[(0,sy.jsx)(_we.MenuItem,{icon:nv,onClick:()=>{o(!0)},"aria-expanded":r,"aria-haspopup":"dialog",children:(0,xG.__)("Create template part")}),r&&(0,sy.jsx)(pw,{closeModal:()=>{o(!1)},blocks:t,onCreate:c})]})}var kE=a(E(),1);function kwe(){return(0,kE.jsx)(e3.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>(0,kE.jsx)(Uet,{clientIds:e,onClose:t})})}function Uet({clientIds:e,onClose:t}){let{blocks:r}=(0,Pwe.useSelect)(o=>{let{getBlocksByClientId:n}=o(e3.store);return{blocks:n(e)}},[e]);return r.length===1&&r[0]?.name==="core/template-part"?(0,kE.jsx)(wwe,{clientId:e[0],onClose:t}):(0,kE.jsx)(Ewe,{clientIds:e,blocks:r})}var Awe=a(be(),1),Iwe=a(Y(),1),Owe=a(U(),1);var Rwe=a(U(),1),t3=a(Y(),1);function Wet({postType:e}){let{registerPostTypeSchema:t}=K((0,t3.useDispatch)(I));(0,Rwe.useEffect)(()=>{t(e)},[t,e]);let{fields:r}=(0,t3.useSelect)(o=>{let{getEntityFields:n}=K(o(I));return{fields:n("postType",e)}},[e]);return r}var U_=Wet;var CG=a(E(),1),{MediaEditorModal:Get,store:Yet}=K(l_);function qet(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 Ket({name:e,ratio:t}={}){let r=qet(t);return!e||!Number.isFinite(r)||r<=0?null:{label:e,value:r}}function Nwe(){return(0,Iwe.useSelect)(t=>t(Yet).isOpen(),[])?(0,CG.jsx)(Zet,{}):null}function Zet(){let e=U_({postType:"attachment"}),[t,r,o]=(0,Awe.useSettings)("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),n=(0,Owe.useMemo)(()=>{if(!(Array.isArray(t)||Array.isArray(r)||typeof o=="boolean"))return;let l=[...o&&Array.isArray(t)?t:[],...Array.isArray(r)?r:[]].map(Ket).filter(Boolean);if(l.length||o===!1)return l},[t,r,o]);return(0,CG.jsx)(Get,{fields:e,aspectRatioPresets:n})}var Go=a(E(),1),{ExperimentalBlockEditorProvider:Xet}=K(W_.privateApis),{PatternsMenuItems:Qet}=K(Fwe.privateApis),RE=()=>{},Jet=["wp_block","wp_navigation","wp_template_part"];function $et(e,t,r){let o=O0e(),n=r==="template-locked"?"template":"post",[i,s,l]=(0,Tp.useEntityBlockEditor)("postType",e.type,{id:e.id}),[c,u,d]=(0,Tp.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),f=(0,ml.useMemo)(()=>{if(e.type==="wp_navigation")return[(0,Dwe.createBlock)("core/navigation",{ref:e.id,templateLock:!1})]},[e.type,e.id]),m=(0,ml.useMemo)(()=>f||(n==="template"?c:i),[f,n,c,i]);return o!==null?[o,RE,RE]:!!t&&r==="template-locked"||e.type==="wp_navigation"?[m,RE,RE]:[m,n==="post"?s:u,n==="post"?l:d]}var EG=Hse(({post:e,settings:t,recovery:r,initialEdits:o,children:n,BlockEditorProviderComponent:i=Xet,__unstableTemplate:s})=>{let l=!!s,{editorSettings:c,selection:u,isReady:d,mode:f,defaultMode:m,postTypeEntities:h,isInRevisionsMode:g,currentRevisionId:v}=(0,og.useSelect)(W=>{let{getEditorSettings:q,getRenderingMode:Z,__unstableIsEditorReady:Q,getDefaultRenderingMode:ce,isRevisionsMode:te,getCurrentRevisionId:de}=K(W(I)),{getEntitiesConfig:me,getEntityRecordEdits:ee}=W(Tp.store),$=Z(),ue=ce(e.type),ve=ue==="template-locked"?l:ue!==void 0,Ee=ue!==void 0,ie=ee("postType",e.type,e.id);return{editorSettings:q(),isReady:Q(),mode:Ee?$:void 0,defaultMode:ve?ue:void 0,selection:ie?.selection,postTypeEntities:e.type==="wp_template"?me("postType"):null,isInRevisionsMode:te(),currentRevisionId:de()}},[e.type,e.id,l]),b=l&&f!=="post-only",_=b?s:e,y=(0,ml.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(!Jet.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=u0e(c,S,w,f),[C,A,k]=$et(e,s,f),{updatePostLock:R,setupEditor:N,updateEditorSettings:P,setCurrentTemplateId:T,setEditedPost:M,setRenderingMode:j,setCurrentRevisionId:F}=K((0,og.useDispatch)(I)),{editEntityRecord:D}=(0,og.useDispatch)(Tp.store),B=(0,og.useRegistry)(),L=(0,ml.useCallback)(W=>{D("postType",e.type,e.id,{selection:W},{undoIgnore:!0})},[D,e.type,e.id]),{createWarningNotice:O,removeNotice:V}=(0,og.useDispatch)(Mwe.store);return(0,ml.useLayoutEffect)(()=>{if(!r&&(R(t.postLock),B.select(I).__unstableIsEditorReady()||N(e,o,t.template),t.autosave)){let W=Number((0,Lwe.getQueryArg)(t.autosave.editLink,"revision"));O((0,TG.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,TG.__)("View the autosave"),...W?{onClick:()=>{let{disableVisualRevisions:q}=B.select(I).getEditorSettings();if(q){window.location.href=t.autosave.editLink;return}F(W)}}:{url:t.autosave.editLink}}]})}},[]),(0,ml.useEffect)(()=>(M(e.type,e.id),typeof window<"u"&&window.__experimentalTemplateActivate&&V("template-activate-notice"),()=>M(null,null)),[e.type,e.id,M,V]),(0,ml.useLayoutEffect)(()=>{P(t)},[t,P]),(0,ml.useEffect)(()=>{T(s?.id)},[s?.id,T]),(0,ml.useEffect)(()=>{m&&j(m)},[m,j]),b0e(e.type,f),W0e(),q0e(),X0e(),!d||!f?null:(0,Go.jsx)(Tp.EntityProvider,{kind:"root",type:"site",children:(0,Go.jsx)(Tp.EntityProvider,{kind:"postType",type:e.type,id:e.id,revisionId:v??void 0,children:(0,Go.jsx)(W_.BlockContextProvider,{value:y,children:(0,Go.jsxs)(i,{value:C,onChange:k,onInput:A,selection:g?void 0:u,onChangeSelection:g?RE:L,settings:x,useSubRegistry:!1,children:[n,!t.isPreviewMode&&(0,Go.jsxs)(Go.Fragment,{children:[(0,Go.jsx)(Qet,{}),(0,Go.jsx)(kwe,{}),f==="template-locked"&&(0,Go.jsx)(p0e,{}),S==="wp_navigation"&&(0,Go.jsx)(h0e,{}),(0,Go.jsx)(H_,{}),(0,Go.jsx)(pwe,{}),(0,Go.jsx)(twe,{}),(0,Go.jsx)(owe,{}),(0,Go.jsx)(hwe,{}),(0,Go.jsx)(L0e,{}),(0,Go.jsx)(z0e,{}),(0,Go.jsx)(Nwe,{})]})]})})})})});function PG(e){return(0,Go.jsx)(EG,{...e,BlockEditorProviderComponent:W_.BlockEditorProvider,children:e.children})}var Bwe=PG;var ng=a(E(),1);function ett({template:e,post:t}){let[r="white"]=Qh("color.background"),[o]=(0,AE.useEntityBlockEditor)("postType",t.type,{id:t.id}),[n]=(0,AE.useEntityBlockEditor)("postType",e?.type,{id:e?.id}),i=e&&n?n:o,s=!i?.length;return(0,ng.jsxs)("div",{className:"editor-fields-content-preview",style:{backgroundColor:r},children:[s&&(0,ng.jsx)("span",{className:"editor-fields-content-preview__empty",children:(0,Vwe.__)("Empty content")}),!s&&(0,ng.jsx)(kG.BlockPreview.Async,{children:(0,ng.jsx)(kG.BlockPreview,{blocks:i})})]})}function zwe({item:e}){let{settings:t,template:r}=(0,jwe.useSelect)(o=>{let{canUser:n,getPostType:i,getTemplateId:s,getEntityRecord:l}=K(o(AE.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,ng.jsx)(PG,{post:e,settings:t,__unstableTemplate:r,children:(0,ng.jsx)(ett,{template:r,post:e})})}var ttt={type:"media",id:"content-preview",label:(0,Hwe.__)("Content preview"),render:zwe,enableSorting:!1},Uwe=ttt;function rtt(e){let t=e?.editor;return Array.isArray(t)?!!t[0]?.notes:!1}function ott(e,t,r){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:r}}function ntt(e,t,r){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:r}}function itt(e,t,r){return{type:"REGISTER_ENTITY_FIELD",kind:e,name:t,config:r}}function stt(e,t,r){return{type:"UNREGISTER_ENTITY_FIELD",kind:e,name:t,fieldId:r}}function att(e,t){return{type:"SET_IS_READY",kind:e,name:t}}var ltt=[dH,cH,mH,vH,hH,gH,lH,k2,nH,uH,pH],ctt=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(r3.store).getPostType(e),n=await t.resolveSelect(r3.store).canUser("create",{kind:"postType",name:e}),i=await t.resolveSelect(r3.store).getCurrentTheme(),{disablePostFormats:s}=t.select(I).getEditorSettings(),l=!["wp_block","wp_template_part"].includes(o.slug)&&n&&Bz;o.slug!=="wp_template"&&(l=void 0),o.slug==="wp_template"&&!window?.__experimentalTemplateActivate&&(l=void 0);let c=[o.viewable?Nz:void 0,o.supports?.revisions?qz:void 0,l,o.slug==="wp_template_part"&&n&&i?.is_block_theme?oH:void 0,n&&o.slug==="wp_block"?Hz:void 0,o.supports?.title?jz:void 0,o.supports?.["page-attributes"]?Fz:void 0,o.slug==="wp_block"?Yz:void 0,Xz,zz,tH,Jz,Zz].filter(Boolean),u;if(e===Sl)u=ltt;else{let d=o.slug,f=sm.includes(d),m=d==="wp_block";if(u=[o.supports?.thumbnail&&i?.theme_supports?.["post-thumbnails"]&&Kj,!f&&o.supports?.author&&BC,d==="wp_template"&&hz,d==="wp_template_part"&&gz,!f&&iz,!f&&uz,!f&&dz,fz,!f&&T8,!f&&o.supports?.excerpt&&wz,m&&o.supports?.excerpt&&ij,o.supports?.["page-attributes"]&&oz,o.supports?.comments&&sz,o.supports?.trackbacks&&lz,(o.supports?.comments||o.supports?.trackbacks)&&cz,!f&&$j,o.supports?.["post-formats"]&&!s&&Cz,(!f||m)&&o.supports?.editor&&Tz,!f&&nz,d==="post"&&Pz,d==="wp_template"&&xz,d==="wp_template"&&Sz,d==="wp_template"&&Oz,d==="wp_template"&&Rz,d==="wp_template"&&Az,o.supports?.editor&&o.viewable&&Uwe,rtt(o.supports)&&vz,m&&sj].filter(Boolean),o.supports?.title){let h;e==="page"?h=A8:e==="wp_template"?h=I1:["wp_block","wp_template_part"].includes(e)?h=pC:h=k2,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,Wwe.doAction)("core.registerPostTypeSchema",e)};function utt(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}var dtt=e=>async({select:t,dispatch:r,registry:o})=>{let n=await o.dispatch(ri.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(ri.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(ns.store).createSuccessNotice((0,Gt.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,Gt.__)("Go back"),onClick:()=>r.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},ftt=e=>({registry:t})=>{let o=(t.select(ay.store).get("core","hiddenBlockTypes")??[]).filter(n=>!(Array.isArray(e)?e:[e]).includes(n));t.dispatch(ay.store).set("core","hiddenBlockTypes",o)},ptt=e=>({registry:t})=>{let r=t.select(ay.store).get("core","hiddenBlockTypes")??[],o=new Set([...r,...Array.isArray(e)?e:[e]]);t.dispatch(ay.store).set("core","hiddenBlockTypes",[...o])},mtt=({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(ri.store).getEntityRecord("root","__unstableBase")?.home;i.dispatch(ns.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(ri.store).editEntityRecord(m,h,g,{status:"publish"}),f.push(i.dispatch(ri.store).saveEditedEntityRecord(m,h,g)))}),d.length&&f.push(i.dispatch(ri.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,d)),i.dispatch(o3.store).__unstableMarkLastChangeAsPersistent(),Promise.all(f).then(async m=>(e&&await e(),m)).then(m=>{m.some(h=>typeof h>"u")?i.dispatch(ns.store).createErrorNotice((0,Gt.__)("Saving failed.")):i.dispatch(ns.store).createSuccessNotice(n||(0,Gt.__)("Site updated."),{type:"snackbar",id:l,actions:[{label:(0,Gt.__)("View site"),url:c,openInNewTab:!0}]})}).catch(m=>i.dispatch(ns.store).createErrorNotice(`${(0,Gt.__)("Saving failed.")} ${m}`))},htt=(e,{allowUndo:t=!0}={})=>async({registry:r})=>{let o="edit-site-template-reverted";if(r.dispatch(ns.store).removeNotice(o),!w2(e)){r.dispatch(ns.store).createErrorNotice((0,Gt.__)("This template is not revertable."),{type:"snackbar"});return}try{let n=r.select(ri.store).getEntityConfig("postType",e.type);if(!n){r.dispatch(ns.store).createErrorNotice((0,Gt.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let i=(0,Gwe.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),s=await(0,Ywe.default)({path:i});if(!s){r.dispatch(ns.store).createErrorNotice((0,Gt.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let l=({blocks:d=[]})=>(0,n3.__unstableSerializeAndClean)(d),c=r.select(ri.store).getEditedEntityRecord("postType",e.type,e.id);r.dispatch(ri.store).editEntityRecord("postType",e.type,e.id,{content:l,blocks:c.blocks,source:"custom"},{undoIgnore:!0});let u=(0,n3.parse)(s?.content?.raw);if(r.dispatch(ri.store).editEntityRecord("postType",e.type,s.id,{content:l,blocks:u,source:"theme"}),t){let d=()=>{r.dispatch(ri.store).editEntityRecord("postType",e.type,c.id,{content:l,blocks:c.blocks,source:"custom"})};r.dispatch(ns.store).createSuccessNotice((0,Gt.__)("Template reset."),{type:"snackbar",id:o,actions:[{label:(0,Gt.__)("Undo"),onClick:d}]})}}catch(n){let i=n.message&&n.code!=="unknown_error"?n.message:(0,Gt.__)("Template revert failed. Please reload.");r.dispatch(ns.store).createErrorNotice(i,{type:"snackbar"})}},gtt=e=>async({registry:t})=>{let r=e.every(n=>n?.has_theme_file),o=await Promise.allSettled(e.map(n=>t.dispatch(ri.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,Gt.sprintf)((0,Gt.__)('"%s" reset.'),(0,RG.decodeEntities)(i)):(0,Gt.sprintf)((0,Gt._x)('"%s" deleted.',"template part"),(0,RG.decodeEntities)(i))}else n=r?(0,Gt.__)("Items reset."):(0,Gt.__)("Items deleted.");t.dispatch(ns.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,Gt.__)("An error occurred while reverting the item."):(0,Gt.__)("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,Gt.__)("An error occurred while deleting the items."):i.size===1?n=r?(0,Gt.sprintf)((0,Gt.__)("An error occurred while reverting the items: %s"),[...i][0]):(0,Gt.sprintf)((0,Gt.__)("An error occurred while deleting the items: %s"),[...i][0]):n=r?(0,Gt.sprintf)((0,Gt.__)("Some errors occurred while reverting the items: %s"),[...i].join(",")):(0,Gt.sprintf)((0,Gt.__)("Some errors occurred while deleting the items: %s"),[...i].join(","))}t.dispatch(ns.store).createErrorNotice(n,{type:"snackbar"})}},vtt=e=>({select:t,registry:r})=>{let o=t.getCurrentPostType(),n=r.select(ri.store).getCurrentTheme()?.stylesheet,i=r.select(ay.store).get("core","renderingModes")?.[n]??{};if(i[o]===e)return;let s={[n]:{...i,[o]:e}};r.dispatch(ay.store).set("core","renderingModes",s)};function btt(e){return{type:"SET_STYLES_PATH",path:e}}function ytt(e){return{type:"SET_SHOW_STYLEBOOK",show:e}}function wtt(){return{type:"RESET_STYLES_NAVIGATION"}}function AG(e){return({dispatch:t,registry:r})=>{t({type:"SET_CANVAS_WIDTH",width:e});let o=K(r.select(o3.store));if(o.isResponsiveEditing()){let n=o.getSettings().__experimentalFeatures?.viewport,i=h2(e,n);K(r.dispatch(o3.store)).setStyleStateViewport(m2[i]??"default")}}}function _tt(e){return{type:"SET_CURRENT_REVISION_ID",revisionId:e}}var Stt=e=>async({dispatch:t,select:r,registry:o})=>{let n=r.getCurrentPostType(),i=r.getCurrentPostId(),l=o.select(ri.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(ri.store).getRevisions("postType",n,i,cv(l,e));o.batch(()=>{t({type:"SET_REVISION_PAGE",page:e}),c?.length&&t.setCurrentRevisionId(c[0][l])})};function xtt(e){return{type:"SET_SHOW_REVISION_DIFF",showDiff:e}}var Ctt=e=>async({select:t,dispatch:r,registry:o})=>{let n=t.getCurrentPostType(),i=t.getCurrentPostId(),l=o.select(ri.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(ri.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(ns.store).removeNotice("autosave-exists"),o.dispatch(ns.store).createSuccessNotice((0,Gt.sprintf)((0,Gt.__)("Restored to revision from %s."),(0,i3.dateI18n)((0,i3.getSettings)().formats.datetime,c.date)),{type:"snackbar",id:"editor-revision-restored"}))};function Ttt(e,t={focus:!1}){return{type:"SELECT_NOTE",noteId:e,options:t}}var Ett=(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,G_.parse)(i);s=(0,G_.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 Ptt(){return(0,ig.default)("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function ktt(){return(0,ig.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 Rtt(){return(0,ig.default)("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Att(e){return(0,ig.default)("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),Kwe(e.type,e.id)}function Kwe(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}var Itt=(e,t)=>({select:r,registry:o})=>{let{id:n,type:i}=r.getCurrentPost();o.dispatch(Ws.store).editEntityRecord("postType",i,n,e,t)},Ott=(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(Ws.store).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:n};r({type:"REQUEST_POST_UPDATE_START",options:e});let l=!1;try{s=await(0,Y_.applyFiltersAsync)("editor.preSavePost",s,e)}catch(c){l=c}if(!l)try{await o.dispatch(Ws.store).saveEntityRecord("postType",i.type,s,e)}catch(c){l=c.message&&c.code!=="unknown_error"?c.message:(0,yn.__)("An error occurred while updating.")}if(l||(l=o.select(Ws.store).getLastEntitySaveError("postType",i.type,i.id)),!l)try{await(0,Y_.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(c){l=c}if(!l)try{await(0,Y_.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))&&Ntt({select:t,dispatch:r,registry:o}),l){let c=aX({post:i,edits:s,error:l});c.length&&o.dispatch(eu.store).createErrorNotice(...c)}else{let c=t.getCurrentPost(),u=sX({previousPost:i,post:c,postType:await o.resolveSelect(Ws.store).getPostType(c.type),options:e});u.length&&o.dispatch(eu.store).createSuccessNotice(...u),e.isAutosave||o.dispatch(Ep.store).__unstableMarkLastChangeAsPersistent()}};async function Ntt({select:e,registry:t}){if(e.getEditorSettings().onNavigateToPreviousEntityRecord)return;let{id:o,slug:n}=e.getCurrentPost();if((await t.select(Ws.store).getEntityRecord("root","site")).active_templates[n]===o)return;let l=(await t.resolveSelect(Ws.store).getCurrentTheme())?.default_template_types.find(c=>c.slug===n);await t.dispatch(eu.store).createNotice("info",(0,yn.sprintf)((0,yn.__)('Do you want to activate this "%s" template?'),l?.title??n),{id:"template-activate-notice",actions:[{label:(0,yn.__)("Activate"),onClick:async()=>{await t.dispatch(eu.store).createNotice("info",(0,yn.__)("Activating template\u2026"),{id:"template-activate-notice"});try{let c=await t.select(Ws.store).getEntityRecord("root","site");await t.dispatch(Ws.store).saveEntityRecord("root","site",{active_templates:{...c.active_templates,[n]:o}},{throwOnError:!0}),await t.dispatch(eu.store).createSuccessNotice((0,yn.__)("Template activated."),{id:"template-activate-notice"})}catch(c){throw await t.dispatch(eu.store).createErrorNotice((0,yn.__)("Template activation failed."),{id:"template-activate-notice"}),c}}}]})}function Mtt(){return(0,ig.default)("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}var Ftt=()=>async({select:e,dispatch:t,registry:r})=>{let o=e.getCurrentPostType(),n=await r.resolveSelect(Ws.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,qwe.default)({path:`/${s}/${i}/${l.id}`,method:"DELETE"}),await t.savePost()}catch(l){r.dispatch(eu.store).createErrorNotice(...lX({error:l}))}t({type:"REQUEST_POST_DELETE_FINISH"})},Dtt=({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");iX(n.id,i,s,l,c)}else await o.savePost({isAutosave:!0,...t})},Ltt=({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()),Btt=()=>({registry:e})=>{e.dispatch(Ws.store).redo()},Vtt=()=>({registry:e})=>{e.dispatch(Ws.store).undo()};function jtt(){return(0,ig.default)("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function ztt(e){return{type:"UPDATE_POST_LOCK",lock:e}}var Htt=()=>({registry:e})=>{e.dispatch(nn.store).set("core","isPublishSidebarEnabled",!0)},Utt=()=>({registry:e})=>{e.dispatch(nn.store).set("core","isPublishSidebarEnabled",!1)};function Wtt(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Gtt(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Ytt(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function qtt(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}var Ktt=(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(Ws.store).getEditedEntityRecord("postType",u,c).blocks===l.blocks){n.dispatch(Ws.store).__unstableCreateUndoLevel("postType",u,c);return}l.content=({blocks:f=[]})=>(0,G_.__unstableSerializeAndClean)(f)}o.editPost(l)};function Ztt(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var Xtt=e=>({dispatch:t,registry:r,select:o})=>{o.__unstableIsEditorReady()&&!o.getEditorSettings().isPreviewMode&&r.dispatch(Ep.store).clearSelectedBlock(),t({type:"SET_RENDERING_MODE",mode:e})};function Qtt(e){return({dispatch:t,registry:r})=>{let o=K(r.select(Ep.store)).getSettings().__experimentalFeatures?.viewport,n=p2(e,o);t(AG(n))}}var Jtt=e=>({registry:t})=>{let r=t.select(nn.store).get("core","inactivePanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(nn.store).set("core","inactivePanels",n)},$tt=e=>({registry:t})=>{let r=t.select(nn.store).get("core","openPanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(nn.store).set("core","openPanels",n)};function ert(e){return{type:"REMOVE_PANEL",panelName:e}}var trt=e=>({dispatch:t,registry:r})=>{typeof e=="object"&&e.hasOwnProperty("rootClientId")&&e.hasOwnProperty("insertionIndex")&&K(r.dispatch(Ep.store)).setInsertionPoint({rootClientId:e.rootClientId,index:e.insertionIndex}),t({type:"SET_IS_INSERTER_OPENED",value:e})};function rrt(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}var ort=({createNotice:e=!0}={})=>({dispatch:t,registry:r})=>{let o=r.select(nn.store).get("core","distractionFree");o&&r.dispatch(nn.store).set("core","fixedToolbar",!1),o||r.batch(()=>{r.dispatch(nn.store).set("core","fixedToolbar",!0),t.setIsInserterOpened(!1),t.setIsListViewOpened(!1),K(r.dispatch(Ep.store)).resetZoomLevel()}),r.batch(()=>{r.dispatch(nn.store).set("core","distractionFree",!o),e&&r.dispatch(eu.store).createInfoNotice(o?(0,yn.__)("Distraction free mode deactivated."):(0,yn.__)("Distraction free mode activated."),{id:"core/editor/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,yn.__)("Undo"),onClick:()=>{r.batch(()=>{r.dispatch(nn.store).set("core","fixedToolbar",o),r.dispatch(nn.store).toggle("core","distractionFree")})}}]})})},nrt=()=>({registry:e})=>{e.dispatch(nn.store).toggle("core","focusMode");let t=e.select(nn.store).get("core","focusMode");e.dispatch(eu.store).createInfoNotice(t?(0,yn.__)("Spotlight mode activated."):(0,yn.__)("Spotlight mode deactivated."),{id:"core/editor/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,yn.__)("Undo"),onClick:()=>{e.dispatch(nn.store).toggle("core","focusMode")}}]})},irt=()=>({registry:e})=>{e.dispatch(nn.store).toggle("core","fixedToolbar");let t=e.select(nn.store).get("core","fixedToolbar");e.dispatch(eu.store).createInfoNotice(t?(0,yn.__)("Top toolbar activated."):(0,yn.__)("Top toolbar deactivated."),{id:"core/editor/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,yn.__)("Undo"),onClick:()=>{e.dispatch(nn.store).toggle("core","fixedToolbar")}}]})},srt=e=>({dispatch:t,registry:r})=>{r.dispatch(nn.store).set("core","editorMode",e),e!=="visual"&&(r.dispatch(Ep.store).clearSelectedBlock(),K(r.dispatch(Ep.store)).resetZoomLevel()),e==="visual"?(0,OG.speak)((0,yn.__)("Visual editor selected"),"assertive"):e==="text"&&(r.select(nn.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,OG.speak)((0,yn.__)("Code editor selected"),"assertive"))};function art(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function lrt(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function crt(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}var sr=e=>(...t)=>({registry:r})=>{(0,ig.default)("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),r.dispatch(Ep.store)[e](...t)},urt=sr("resetBlocks"),drt=sr("receiveBlocks"),frt=sr("updateBlock"),prt=sr("updateBlockAttributes"),mrt=sr("selectBlock"),hrt=sr("startMultiSelect"),grt=sr("stopMultiSelect"),vrt=sr("multiSelect"),brt=sr("clearSelectedBlock"),yrt=sr("toggleSelection"),wrt=sr("replaceBlocks"),_rt=sr("replaceBlock"),Srt=sr("moveBlocksDown"),xrt=sr("moveBlocksUp"),Crt=sr("moveBlockToPosition"),Trt=sr("insertBlock"),Ert=sr("insertBlocks"),Prt=sr("showInsertionPoint"),krt=sr("hideInsertionPoint"),Rrt=sr("setTemplateValidity"),Art=sr("synchronizeTemplate"),Irt=sr("mergeBlocks"),Ort=sr("removeBlocks"),Nrt=sr("removeBlock"),Mrt=sr("toggleBlockMode"),Frt=sr("startTyping"),Drt=sr("stopTyping"),Lrt=sr("enterFormattedText"),Brt=sr("exitFormattedText"),Vrt=sr("insertDefaultBlock"),jrt=sr("updateBlockListSettings");var HC={reducer:WK,selectors:h8,actions:NG},I=(0,s3.createReduxStore)(QK,{...HC});(0,s3.register)(I);K(I).registerPrivateActions(IG);K(I).registerPrivateSelectors(C8);var e_e=a(E(),1),zrt=e=>(0,Jwe.createHigherOrderComponent)(t=>({attributes:r,setAttributes:o,...n})=>{let i=(0,Zwe.useSelect)(u=>u(I).getCurrentPostType(),[]),[s,l]=(0,Xwe.useEntityProp)("postType",i,"meta"),c=(0,Qwe.useMemo)(()=>({...r,...Object.fromEntries(Object.entries(e).map(([u,d])=>[u,s[d]]))}),[r,s]);return(0,e_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 Hrt(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=zrt(t)(e.edit)),e}(0,$we.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",Hrt);var lPe=a(Bn(),1);var t_e=a(Fu(),1),r_e=a(ho(),1);var o_e=a(Lt(),1),ly=a(E(),1),Urt=10,a3={name:"links",className:"editor-autocompleters__link",triggerPrefix:"[[",isDebounced:!0,async options(e){return(await(0,t_e.default)({path:(0,r_e.addQueryArgs)("/wp/v2/search",{per_page:Urt,search:e,type:"post"})})).filter(r=>r.title!=="")},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,ly.jsxs)(ly.Fragment,{children:[(0,ly.jsx)(xn,{icon:e.subtype==="page"?am:uV}),(0,o_e.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,ly.jsx)("a",{href:e.url,children:e.title})}};var n_e=a(U(),1),i_e=a(Y(),1),s_e=a(ne(),1),Pp=a(E(),1);function MG(e){let t=e.avatar_urls&&e.avatar_urls[24]?(0,Pp.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,Pp.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,Pp.jsxs)(Pp.Fragment,{children:[t,(0,Pp.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,Pp.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}var l3={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){let t=(0,i_e.useSelect)(o=>{let{getUsers:n}=o(s_e.store);return n({context:"view",search:encodeURIComponent(e)})},[e]);return[(0,n_e.useMemo)(()=>t?t.map(o=>({key:`user-${o.slug}`,value:o,label:MG(o)})):[],[t])]},getOptionCompletion(e){return`@${e.slug}`}};var K_=a(U(),1),q_=a(Y(),1),a_e=a(ne(),1);function Wrt(e,t){let r=(0,K_.useRef)(e);(0,K_.useEffect)(()=>{r.current=e},[e]),(0,K_.useEffect)(()=>{if(!t)return;let o=setInterval(()=>r.current(),t*1e3);return()=>clearInterval(o)},[t])}function c3({interval:e,autosave:t}){let{autosave:r}=(0,q_.useDispatch)(I),o=t??r,{getReferenceByDistinctEdits:n}=(0,q_.useSelect)(a_e.store),{isEditedPostDirty:i,isEditedPostAutosaveable:s,isAutosavingPost:l}=(0,q_.useSelect)(I),c=(0,q_.useSelect)(d=>e!==void 0?e:d(I).getEditorSettings().autosaveInterval,[e]),u=(0,K_.useRef)();return Wrt(()=>{if(!s())return;let d=n();d!==u.current&&i()&&!l()&&(u.current=d,o())},c),null}var dg=a(z(),1),FE=a(Y(),1),ou=a(G(),1),DE=a(be(),1);var W_e=a(ne(),1),G_e=a(fG(),1),C3=a(U(),1),Y_e=a(ke(),1),q_e=a(Lt(),1),K_e=a(sg(),1);var FG=a(z(),1),c_e=a(Y(),1),u_e=a(ne(),1);function u3(e){let{isFrontPage:t,isPostsPage:r}=(0,c_e.useSelect)(o=>{let{canUser:n,getEditedEntityRecord:i}=o(u_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,FG.__)("Homepage"):r?(0,FG.__)("Posts Page"):!1}var L_e=a(G(),1),B_e=a(Oo(),1),S3=a(z(),1),ME=a(Y(),1);var x3=a(ke(),1),V_e=a(Dt(),1);var OE=a(U(),1);var uy=a(G(),1),tu=a(z(),1),Fn=a(be(),1),dy=a(Y(),1);var Hr=a(U(),1),v3=a(Oo(),1),w_e=a(yf(),1),__e=a(ne(),1);var zr=a(z(),1),Z_=[{slug:"theme-colors",title:(0,zr.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,zr.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,zr.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,zr.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,zr.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,zr.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,zr.__)("Default Gradients"),origin:"default",type:"gradients"}],d3=[{slug:"site-identity",title:(0,zr.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,zr.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,zr.__)("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,zr.__)("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"]}],DG=[{slug:"overview",title:(0,zr.__)("Overview"),blocks:[]},{slug:"text",title:(0,zr.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,zr.__)("Colors"),blocks:[]},{slug:"theme",title:(0,zr.__)("Theme"),subcategories:d3},{slug:"media",title:(0,zr.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,zr.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,zr.__)("Embeds"),include:[]}],Grt=[...d3,{slug:"media",title:(0,zr.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,zr.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,zr.__)("Embeds"),include:[]}],d_e=[{slug:"overview",title:(0,zr.__)("Overview"),blocks:[]},{slug:"text",title:(0,zr.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,zr.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,zr.__)("All Blocks"),blocks:[],subcategories:Grt}],Yrt=`
	.is-root-container {
		display: flow-root;
	}
`,f_e=`
	body {
		position: relative;
		padding: 32px !important;
	}

	${Yrt}

	.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 p_e=a(At(),1);function IE(e,t){if(!e?.slug||!t?.length)return;let r=e?.subcategories??[];if(r.length)return r.reduce((s,l)=>{let c=IE(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 LG(){let e=[...d3,...DG].map(({slug:o})=>o),r=(0,p_e.getCategories)().filter(({slug:o})=>!e.includes(o));return[...DG,...r]}var jd=a(z(),1),Si=a(At(),1);var m_e=a(G(),1),f3=a(be(),1),BG=a(E(),1),qrt=({colors:e,type:t,templateColumns:r="1fr 1fr",itemHeight:o="52px"})=>e?(0,BG.jsx)(m_e.__experimentalGrid,{templateColumns:r,rowGap:8,columnGap:16,children:e.map(n=>{let i=t==="gradients"?(0,f3.__experimentalGetGradientClass)(n.slug):(0,f3.getColorClassName)("background-color",n.slug),s=J("editor-style-book__color-example",i);return(0,BG.jsx)("div",{className:s,style:{height:o}},n.slug)})}):null,VG=qrt;var jG=a(G(),1),cy=a(E(),1),Krt=({duotones:e})=>e?(0,cy.jsx)(jG.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map(t=>(0,cy.jsxs)(jG.__experimentalGrid,{className:"editor-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,cy.jsx)("div",{children:(0,cy.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,cy.jsx)("div",{className:"editor-style-book__color-example",style:{backgroundColor:r}},r))]},t.slug))}):null,h_e=Krt;var p3=a(E(),1);function Zrt(e){if(!e)return[];let t=[];return Z_.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,p3.jsx)(h_e,{duotones:n[r.type]}),t.push(i)):(i.content=(0,p3.jsx)(VG,{colors:n[r.type],type:r.type}),t.push(i))}}),t}function Xrt(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,jd.__)("Colors"),category:"overview",content:(0,p3.jsx)(VG,{colors:r.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(i)}let o=[];if((0,Si.getBlockType)("core/heading")){let i=(0,Si.createBlock)("core/heading",{content:(0,jd.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(\u2026)},.-<>?!*&:/A@HELFO\u2122\xA9"),level:1});o.push(i)}if((0,Si.getBlockType)("core/paragraph")){let i=(0,Si.createBlock)("core/paragraph",{content:(0,jd.__)("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,Si.createBlock)("core/paragraph",{content:(0,jd.__)("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,Si.getBlockType)("core/group")){let l=(0,Si.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,jd.__)("Typography"),category:"overview",blocks:o}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach(i=>{let s=(0,Si.getBlockType)(i);if(s&&s.example){let l={name:i,title:s.title,category:"overview",blocks:(0,Si.getBlockFromExample)(i,{...s.example,attributes:{...s.example.attributes,style:void 0}})};t.push(l)}}),t}function zG(e){let t=(0,Si.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,Si.getBlockFromExample)(s.name,{...s.example,attributes:{...s.example?.attributes,style:void 0}})}));if(!!!(0,Si.getBlockType)("core/heading"))return t;let o={name:"core/heading",title:(0,jd.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map(s=>(0,Si.createBlock)("core/heading",{content:(0,jd.sprintf)((0,jd.__)("Heading %d"),s),level:s}))},n=Zrt(e),i=Xrt(e);return[o,...n,...t,...i]}var y_e=a(U(),1),h3=a(Y(),1);var m3=a(At(),1),g_e=a(Y(),1),v_e=a(U(),1);function X_(e={},t=!1){let o=QW("spacing.blockGap")!==null,n=!o,{disableLayoutStyles:i,getBlockStyles:s}=(0,g_e.useSelect)(l=>{let{getEditorSettings:c}=l(I),{getBlockStyles:u}=l(m3.store);return{disableLayoutStyles:!!c()?.disableLayoutStyles,getBlockStyles:u}},[]);return(0,v_e.useMemo)(()=>{if(!e?.styles||!e?.settings)return[[],{}];let l=(0,m3.getBlockTypes)();return lv(e,l,{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i,disableRootPadding:t,getBlockStyles:s})},[o,n,e,i,t,s])}function b_e(e=!1){let{merged:t}=lo();return X_(t,e)}function Qrt(e){let[t,r]=b_e(e),{getEditorSettings:o}=(0,h3.useSelect)(I),{updateEditorSettings:n}=(0,h3.useDispatch)(I);(0,y_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 g3({disableRootPadding:e}){return Qrt(e),null}var Ht=a(E(),1),{ExperimentalBlockEditorProvider:Jrt}=K(Fn.privateApis);function ag(e){return!e||Object.keys(e).length===0}var $rt=(e,t)=>{if(!e||!t||!t?.contentDocument)return;let r=e==="top"?t.contentDocument.body:t.contentDocument.getElementById(e);r&&r.scrollIntoView({behavior:"smooth"})},S_e=e=>e&&typeof e=="string"&&(e==="/"||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function x_e(){let{colors:e,gradients:t}=(0,Fn.__experimentalUseMultipleOriginColorsAndGradients)(),[r,o,n,i]=(0,Fn.useSettings)("color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default");return(0,Hr.useMemo)(()=>{let l={colors:e,gradients:t,duotones:[]};return n&&n.length&&l.duotones.push({name:(0,tu._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:n}),r&&i&&i.length&&l.duotones.push({name:(0,tu._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:i}),o&&o.length&&l.duotones.push({name:(0,tu._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:o}),l},[e,t,o,n,i,r])}function C_e(e){let t=[],r=IE({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 eot(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 tot({isSelected:e,onClick:t,onSelect:r,showTabs:o=!0,userConfig:n={},path:i=""},s){let l=Qh("color.text"),c=Qh("color.background"),u=x_e(),d=(0,Hr.useMemo)(()=>zG(u),[u]),f=(0,Hr.useMemo)(()=>LG().filter(w=>d.some(S=>S.category===w.slug)),[d]),m=C_e(d),{base:h}=lo(),g=S_e(i),v=(0,Hr.useMemo)(()=>!ag(n)&&!ag(h)?Oi(h,n):{},[h,n]),b=(0,dy.useSelect)(w=>w(Fn.store).getSettings(),[]),[_]=X_(v),y=(0,Hr.useMemo)(()=>({...b,styles:!ag(_)&&!ag(n)?_:b.styles,isPreviewMode:!0}),[_,b,n]);return(0,Ht.jsx)("div",{ref:s,className:J("editor-style-book",{"is-button":!!t}),style:{color:l,background:c},children:o?(0,Ht.jsxs)(Tn.Root,{className:"editor-style-book__tabs",defaultValue:f[0]?.slug,children:[(0,Ht.jsx)("div",{className:"editor-style-book__tablist-container",children:(0,Ht.jsx)(Tn.List,{children:f.map(w=>(0,Ht.jsx)(Tn.Tab,{value:w.slug,children:w.title},w.slug))})}),f.map(w=>{let S=w.slug?LG().find(C=>C.slug===w.slug):null,x=S?IE(S,d):{examples:d};return(0,Ht.jsx)(Tn.Panel,{value:w.slug,tabIndex:-1,className:"editor-style-book__tabpanel",children:(0,Ht.jsx)(HG,{category:w.slug,examples:x,isSelected:e,onSelect:r,settings:y,title:w.title,goTo:g})},w.slug)})]}):(0,Ht.jsx)(HG,{examples:{examples:m},isSelected:e,onClick:t,onSelect:r,settings:y,goTo:g})})}var T_e=({userConfig:e={},isStatic:t=!1,path:r,onPathChange:o,settings:n})=>{let i=(0,dy.useSelect)(N=>n??N(I).getEditorSettings(),[n]),s=(0,dy.useSelect)(N=>N(__e.store).canUser("create",{kind:"postType",name:"attachment"}),[]);(0,Hr.useEffect)(()=>{(0,dy.dispatch)(Fn.store).updateSettings({...i,mediaUpload:s?w_e.uploadMedia:void 0})},[i,s]);let[l,c]=(0,Hr.useState)("/"),u=r??l,d=o??c,f=N=>u===`/blocks/${encodeURIComponent(N)}`||u.startsWith(`/blocks/${encodeURIComponent(N)}/`),m=(N,P=!1)=>{if(Z_.find(T=>T.slug===N)){d("/colors/palette");return}if(N==="typography"){d("/typography");return}P||d(`/blocks/${encodeURIComponent(N)}`)},h=x_e(),g=zG(h),v=C_e(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 N=decodeURIComponent(u).split("/blocks/")[1];N?.includes("/variations")&&([N,_]=N.split("/variations/")),N&&g.find(P=>P.name===N)&&(b=N)}else t||(b="overview");let y=d_e.find(N=>N.slug===b),w=(0,Hr.useMemo)(()=>y?IE(y,g):{examples:[g.find(N=>N.name===b)]},[y,g,b]),S=(0,Hr.useMemo)(()=>b?_&&w?.examples?.length?{examples:eot(w.examples,_)}:w:{examples:v},[b,v,_,w]),{base:x}=lo(),C=S_e(u),A=(0,Hr.useMemo)(()=>!ag(e)&&!ag(x)?Oi(x,e):{},[x,e]),[k]=X_(A),R=(0,Hr.useMemo)(()=>({...i,styles:!ag(k)&&!ag(e)?k:i.styles,isPreviewMode:!0}),[k,i,e]);return(0,Ht.jsx)("div",{className:"editor-style-book",children:(0,Ht.jsxs)(Fn.BlockEditorProvider,{settings:R,children:[(0,Ht.jsx)(g3,{disableRootPadding:!0}),(0,Ht.jsx)(HG,{examples:S,settings:R,goTo:C,isSelected:t?null:f,onSelect:t?null:m})]})})},HG=({examples:e,isSelected:t,onClick:r,onSelect:o,settings:n,title:i,goTo:s})=>{let[l,c]=(0,Hr.useState)(!1),[u,d]=(0,Hr.useState)(!1),f=(0,Hr.useRef)(null),m={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:g=>{if(g.defaultPrevented)return;let{keyCode:v}=g;r&&(v===v3.ENTER||v===v3.SPACE)&&(g.preventDefault(),r(g))},onClick:g=>{g.defaultPrevented||r&&(g.preventDefault(),r(g))},readonly:!0},h=()=>d(!0);return(0,Hr.useLayoutEffect)(()=>{u&&f.current&&s?.top&&$rt("top",f.current)},[s?.top,u]),(0,Ht.jsxs)(Fn.__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,Ht.jsx)(Fn.__unstableEditorStyles,{styles:n.styles}),(0,Ht.jsxs)("style",{children:[f_e,!!r&&"body { cursor: var(--wpds-cursor-control, pointer); } body * { pointer-events: none; }"]}),(0,Ht.jsx)(rot,{className:"editor-style-book__examples",filteredExamples:e,label:i?(0,tu.sprintf)((0,tu.__)("Examples of blocks in the %s category"),i):(0,tu.__)("Examples of blocks"),isSelected:t,onSelect:o},i)]})},rot=(0,Hr.memo)(({className:e,filteredExamples:t,label:r,isSelected:o,onSelect:n})=>(0,Ht.jsxs)(uy.Composite,{orientation:"vertical",className:e,"aria-label":r,role:"grid",children:[!!t?.examples?.length&&t.examples.map(i=>(0,Ht.jsx)(E_e,{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,Ht.jsxs)(uy.Composite.Group,{className:"editor-style-book__subcategory",children:[(0,Ht.jsx)(uy.Composite.GroupLabel,{children:(0,Ht.jsx)("h2",{className:"editor-style-book__subcategory-title",children:i.title})}),(0,Ht.jsx)(oot,{examples:i.examples,isSelected:o,onSelect:n})]},`subcategory-${i.slug}`))]})),oot=({examples:e,isSelected:t,onSelect:r})=>!!e?.length&&e.map(o=>(0,Ht.jsx)(E_e,{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)),not=["example-duotones"],E_e=({id:e,title:t,blocks:r,isSelected:o,onClick:n,content:i})=>{let s=(0,dy.useSelect)(d=>d(Fn.store).getSettings(),[]),l=(0,Hr.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,Hr.useMemo)(()=>Array.isArray(r)?r:[r],[r]),u=not.includes(e)||!n?{disabled:!0,accessibleWhenDisabled:!!n}:{};return(0,Ht.jsx)("div",{role:"row",children:(0,Ht.jsx)("div",{role:"gridcell",children:(0,Ht.jsxs)(uy.Composite.Item,{className:J("editor-style-book__example",{"is-selected":o,"is-disabled-example":!!u?.disabled}),id:e,"aria-label":n?(0,tu.sprintf)((0,tu.__)("Open %s styles in Styles panel"),t):void 0,render:(0,Ht.jsx)("div",{}),role:n?"button":null,onClick:n,...u,children:[(0,Ht.jsx)("span",{className:"editor-style-book__example-title",children:t}),(0,Ht.jsx)("div",{className:"editor-style-book__example-preview","aria-hidden":!0,children:(0,Ht.jsx)(uy.Disabled,{className:"editor-style-book__example-preview__content",children:i||(0,Ht.jsxs)(Jrt,{value:c,settings:l,children:[(0,Ht.jsx)(Fn.__unstableEditorStyles,{}),(0,Ht.jsx)(Fn.BlockList,{renderAppender:!1})]})})})]})})})},P_e=(0,Hr.forwardRef)(tot);var NE=a(E(),1);function k_e({path:e,onPathChange:t,userConfig:r,forwardedRef:o}){return(0,NE.jsx)(P_e,{ref:o,path:e,userConfig:r,isSelected:n=>e===`/blocks/${encodeURIComponent(n)}`||e?.startsWith(`/blocks/${encodeURIComponent(n)}/`),onSelect:n=>{if(Z_.find(i=>i.slug===n)){t?.("/colors/palette");return}if(n==="typography"){t?.("/typography");return}t?.("/blocks/"+encodeURIComponent(n))}})}function iot({path:e,onPathChange:t,forwardedRef:r}){let{user:o}=lo(),{revisions:n,isLoading:i}=Kb(),s=(0,OE.useMemo)(()=>{let c=e?.match(/^\/revisions\/(.+)$/);return c?c[1]:null},[e]),l=(0,OE.useMemo)(()=>!s||!n.length?null:n.find(c=>String(c.id)===String(s)),[s,n]);return i?null:(0,NE.jsx)(k_e,{forwardedRef:r,path:e,onPathChange:t,userConfig:l||o})}function sot({path:e,onPathChange:t},r){return e?.startsWith("/revisions")?(0,NE.jsx)(iot,{forwardedRef:r,path:e,onPathChange:t}):(0,NE.jsx)(k_e,{forwardedRef:r,path:e,onPathChange:t})}var R_e=(0,OE.forwardRef)(sot);var A_e=a(G(),1),ru=a(be(),1),UG=a(Y(),1),lg=a(U(),1);var kp=a(E(),1),{ExperimentalBlockEditorProvider:aot,BlockStyleVariationOverridesWithConfig:lot}=K(ru.privateApis);function b3(e){return!e||Object.keys(e).length===0}function cot({path:e},t){let r=(0,UG.useSelect)(b=>b(ru.store).getBlocks(),[]),{user:o,base:n}=lo(),{revisions:i,isLoading:s}=Kb(),l=(0,lg.useMemo)(()=>{let b=e?.match(/^\/revisions\/(.+)$/);return b?b[1]:null},[e]),u=(0,lg.useMemo)(()=>!l||!i.length?null:i.find(b=>String(b.id)===String(l)),[l,i])||o,d=(0,lg.useMemo)(()=>!b3(u)&&!b3(n)?Oi(n,u):{},[n,u]),f=(0,lg.useMemo)(()=>Array.isArray(r)?r:[r],[r]),m=(0,UG.useSelect)(b=>b(ru.store).getSettings(),[]),h=(0,lg.useMemo)(()=>({...m,isPreviewMode:!0}),[m]),[g]=X_(d),v=!b3(g)&&!b3(u)?g:h.styles;return s?null:(0,kp.jsxs)(ru.__unstableIframe,{ref:t,className:"editor-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,kp.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,kp.jsx)(A_e.Disabled,{className:"editor-revisions__example-preview__content",children:(0,kp.jsxs)(aot,{value:f,settings:h,children:[(0,kp.jsx)(ru.BlockList,{renderAppender:!1}),(0,kp.jsx)(ru.__unstableEditorStyles,{styles:v}),(0,kp.jsx)(lot,{config:d})]})})]})}var I_e=(0,lg.forwardRef)(cot);var _3=a(Y(),1),fy=a(U(),1),D_e=a(G(),1);var y3=a(z(),1),cg=a(Oo(),1),N_e=a(G(),1);var zd=a(E(),1),O_e=20;function WG({direction:e,resizeWidthBy:t}){function r(i){let{keyCode:s}=i;s!==cg.LEFT&&s!==cg.RIGHT||(i.preventDefault(),e==="left"&&s===cg.LEFT||e==="right"&&s===cg.RIGHT?t(O_e):(e==="left"&&s===cg.RIGHT||e==="right"&&s===cg.LEFT)&&t(-O_e))}let o={active:{opacity:1,scaleY:1.3}},n=`resizable-editor__resize-help-${e}`;return(0,zd.jsxs)(zd.Fragment,{children:[(0,zd.jsxs)(Ke.Root,{children:[(0,zd.jsx)(Ke.Trigger,{render:(0,zd.jsx)(N_e.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,"aria-label":(0,y3.__)("Drag to resize"),"aria-describedby":n,onKeyDown:r,variants:o,whileFocus:"active",whileHover:"active",whileTap:"active",role:"separator","aria-orientation":"vertical"},"handle")}),(0,zd.jsx)(Ke.Popup,{children:(0,y3.__)("Drag to resize")})]}),(0,zd.jsx)(Jt,{id:n,children:(0,y3.__)("Use left and right arrow keys to resize the canvas.")})]})}var w3=a(E(),1),M_e={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 F_e(e,t,r=0){return t>0&&e>=t-r}function uot({className:e,enableResizing:t,height:r,children:o}){let[n,i]=(0,fy.useState)(!1),{setCanvasWidth:s}=K((0,_3.useDispatch)(I)),l=(0,_3.useSelect)(f=>{if(!t)return;let{getCanvasWidth:m}=K(f(I));return m()},[t]),c=(0,fy.useRef)(),u=(0,fy.useCallback)(f=>{if(c.current){let m=F_e(c.current.offsetWidth+f,c.current.parentElement?.offsetWidth??0,80);s(m?void 0:c.current.offsetWidth+f)}},[s]),d=(0,fy.useCallback)(f=>{let m=f.offsetWidth,h=f.parentElement?.offsetWidth??0;s(F_e(m,h,80)?void 0:m)},[s]);return(0,w3.jsx)(D_e.ResizableBox,{className:J("editor-resizable-editor",e,{"is-resizable":t,"is-resizing":n}),ref:f=>{c.current=f?.resizable},size:{width:t&&l?l+"px":"100%",height:t&&r?r:"100%"},onResizeStart:()=>{i(!0)},onResize:(f,m,h)=>{d(h)},onResizeStop:(f,m,h)=>{i(!1),d(h)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,w3.jsx)(WG,{direction:"left",resizeWidthBy:u}),right:(0,w3.jsx)(WG,{direction:"right",resizeWidthBy:u})},handleClasses:void 0,handleStyles:{left:M_e,right:M_e},children:o})}var Q_=uot;var ug=a(E(),1);function GG(e,t){return t?(0,S3.__)("Style Book"):e?.startsWith("/revisions")?(0,S3.__)("Style Revisions"):""}function j_e(){let{stylesPath:e,showStylebook:t,showListViewByDefault:r}=(0,ME.useSelect)(m=>{let{getStylesPath:h,getShowStylebook:g}=K(m(I)),v=m(V_e.store).get("core","showListViewByDefault");return{stylesPath:h(),showStylebook:g(),showListViewByDefault:v}},[]),{resetStylesNavigation:o,setStylesPath:n}=K((0,ME.useDispatch)(I)),{setIsListViewOpened:i}=(0,ME.useDispatch)(I),s=(0,x3.useFocusOnMount)("firstElement"),l=(0,x3.useFocusReturn)(),c=null;t?c=(0,ug.jsx)(R_e,{path:e,onPathChange:n,ref:l}):e?.startsWith("/revisions")&&(c=(0,ug.jsx)(I_e,{path:e,ref:l}));let u=GG(e,t),d=()=>{i(r),o()};return(0,ug.jsx)("div",{className:"editor-styles-canvas",children:(0,ug.jsx)(Q_,{enableResizing:!1,children:(0,ug.jsxs)("section",{className:"editor-styles-canvas__section",ref:s,onKeyDown:m=>{m.keyCode===B_e.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),d())},"aria-label":u,children:[(0,ug.jsx)(L_e.Button,{size:"compact",className:"editor-styles-canvas__close-button",icon:Ii,label:(0,S3.__)("Close"),onClick:d}),c]})})})}var z_e=a(Y(),1),YG=a(Lt(),1),qG=a(be(),1),H_e=a(ne(),1);function U_e(){return(0,z_e.useSelect)(e=>{let{getBlockAttributes:t,getBlockName:r,__experimentalGetParsedPattern:o}=e(qG.store),{getEditedEntityRecord:n,getCurrentTheme:i}=e(H_e.store),{getEditedContentOnlySection:s}=K(e(qG.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,YG.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,YG.decodeEntities)(h.title),type:"template-part"}}}return null},[])}var Gs=a(E(),1),dot=ou.__unstableMotion.create(ou.Button);function T3(e){let{stopEditingContentOnlySection:t}=K((0,FE.useDispatch)(DE.store)),r=U_e(),{postId:o,postType:n,postTypeLabel:i,documentTitle:s,isNotFound:l,templateTitle:c,onNavigateToPreviousEntityRecord:u,isTemplatePreview:d,stylesCanvasTitle:f}=(0,FE.useSelect)(C=>{let{getCurrentPostType:A,getCurrentPostId:k,getEditorSettings:R,getRenderingMode:N}=C(I),{getEditedEntityRecord:P,getPostType:T,getCurrentTheme:M,isResolving:j}=C(W_e.store),F=A(),D=k(),B=P("postType",F,D),{default_template_types:L=[]}=M()??{},O=Tl({templateTypes:L,template:B}),V=T(F)?.labels?.singular_name,{getStylesPath:W,getShowStylebook:q}=K(C(I)),Z=W(),Q=q(),ce=GG(Z,Q);return{postId:D,postType:F,postTypeLabel:V,documentTitle:B.title,isNotFound:!B&&!j("getEditedEntityRecord","postType",F,D),templateTitle:O.title,onNavigateToPreviousEntityRecord:R().onNavigateToPreviousEntityRecord,isTemplatePreview:N()==="template-locked",stylesCanvasTitle:ce}},[]),{open:m}=(0,FE.useDispatch)(G_e.store),h=(0,Y_e.useReducedMotion)(),g=S4.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=u3(o),x=(0,C3.useRef)(!1);return(0,C3.useEffect)(()=>{x.current=!0},[]),(0,Gs.jsxs)("div",{className:J("editor-document-bar",{"has-back-button":v}),children:[(0,Gs.jsx)(ou.__unstableAnimatePresence,{children:v&&(0,Gs.jsx)(dot,{className:"editor-document-bar__back",icon:(0,dg.isRTL)()?J4:Z4,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,dg.__)("Back")})}),!g&&d&&!v&&(0,Gs.jsx)(DE.BlockIcon,{icon:Ya,className:"editor-document-bar__icon-layout"}),l?(0,Gs.jsx)(ou.__experimentalText,{children:(0,dg.__)("Document not found")}):(0,Gs.jsx)(ou.Button,{className:"editor-document-bar__command",onClick:()=>m(),size:"compact",children:(0,Gs.jsxs)(ou.__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,Gs.jsx)(DE.BlockIcon,{icon:y}),(0,Gs.jsxs)(ou.__experimentalText,{size:"body",as:"h1",children:[(0,Gs.jsx)("span",{className:"editor-document-bar__post-title",children:_?(0,K_e.__unstableStripHTML)(_):(0,dg.__)("No title")}),r&&(0,Gs.jsx)("span",{className:"editor-document-bar__post-type-label",children:r.type==="template-part"?`\xB7 ${(0,dg.__)("Template Part")}`:`\xB7 ${(0,dg.__)("Pattern")}`}),!r&&S&&(0,Gs.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${S}`}),!r&&i&&!e.title&&!S&&(0,Gs.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${(0,q_e.decodeEntities)(i)}`})]})]},v)})]})}var my=a(z(),1),J_=a(Y(),1),P3=a(U(),1),k3=a(Vc(),1),E3=a(be(),1),Z_e=a(ne(),1),oi=a(G(),1);var py=a(E(),1),fot=({children:e,isValid:t,isDisabled:r,level:o,href:n,onSelect:i})=>{function s(l){if(r){l.preventDefault();return}i()}return(0,py.jsx)("li",{className:J("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!t,"is-disabled":r}),children:(0,py.jsxs)("a",{href:n,className:"document-outline__button","aria-disabled":r,onClick:s,children:[(0,py.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,py.jsx)("strong",{className:"document-outline__level",children:o}),(0,py.jsx)("span",{className:"document-outline__item-content",children:e})]})})},KG=fot;var ur=a(E(),1),pot=(0,ur.jsx)("em",{children:(0,my.__)("(Empty heading)")}),mot=[(0,ur.jsx)("br",{},"incorrect-break"),(0,ur.jsx)("em",{children:(0,my.__)("(Incorrect heading level)")},"incorrect-message")],hot=[(0,ur.jsx)("br",{},"incorrect-break-h1"),(0,ur.jsx)("em",{children:(0,my.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],got=[(0,ur.jsx)("br",{},"incorrect-break-multiple-h1"),(0,ur.jsx)("em",{children:(0,my.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function vot(){return(0,ur.jsxs)(oi.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ur.jsx)(oi.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,ur.jsx)(oi.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,ur.jsx)(oi.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,ur.jsx)(oi.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,ur.jsx)(oi.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,ur.jsx)(oi.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,ur.jsx)(oi.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,ur.jsx)(oi.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,ur.jsx)(oi.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,ur.jsx)(oi.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,ur.jsx)(oi.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,ur.jsx)(oi.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,ur.jsx)(oi.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 bot=(e=[])=>e.filter(t=>t.name==="core/heading").map(t=>({...t,level:t.attributes.level,isEmpty:yot(t)})),yot=e=>!e.attributes.content||e.attributes.content.trim().length===0;function $_({onSelect:e,hasOutlineItemsDisabled:t}){let{selectBlock:r}=(0,J_.useDispatch)(E3.store),{title:o,isTitleSupported:n}=(0,J_.useSelect)(g=>{let{getEditedPostAttribute:v}=g(I),{getPostType:b}=g(Z_e.store),_=b(v("type"));return{title:v("title"),isTitleSupported:_?.supports?.title??!1}}),i=(0,J_.useSelect)(g=>{let{getClientIdsWithDescendants:v,getBlock:b}=g(E3.store);return v().map(y=>b(y))}),s=(0,J_.useSelect)(g=>{if(g(I).getRenderingMode()==="post-only")return;let{getBlocksByName:v,getClientIdsOfDescendants:b}=g(E3.store),[_]=v("core/post-content");if(_)return b(_)},[]),l=(0,P3.useRef)(1),c=(0,P3.useMemo)(()=>bot(i),[i]);if(c.length<1)return(0,ur.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,ur.jsx)(vot,{}),(0,ur.jsx)("p",{children:(0,my.__)("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,ur.jsx)("div",{className:"document-outline",children:(0,ur.jsxs)("ul",{children:[d&&(0,ur.jsx)(KG,{level:(0,my.__)("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,ur.jsxs)(KG,{level:`H${g.level}`,isValid:b,isDisabled:t||!h(g.clientId),href:`#block-${g.clientId}`,onSelect:()=>{r(g.clientId),e?.()},children:[g.isEmpty?pot:(0,k3.getTextContent)((0,k3.create)({html:g.attributes.content})),v&&mot,g.level===1&&m&&got,d&&g.level===1&&!m&&hot]},g.clientId)})]})})}var X_e=a(Y(),1),Q_e=a(be(),1);function J_e({children:e}){return(0,X_e.useSelect)(r=>{let{getGlobalBlockCount:o}=r(Q_e.store);return o("core/heading")>0})?e:null}var $_e=a(U(),1),eSe=a(Y(),1),tc=a(z(),1),tSe=a(be(),1),rSe=a(ya(),1),oSe=a(Oo(),1),nSe=a(E(),1);function wot(){let{registerShortcut:e}=(0,eSe.useDispatch)(rSe.store);return(0,$_e.useEffect)(()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,tc.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,tc.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,tc.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,tc.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,oSe.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,tc.__)("Show or hide the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,tc.__)("Enter or exit distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,tc.__)("Show or hide the Settings panel."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,tc.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/new-note",category:"block",description:(0,tc.__)("Add a new note."),keyCombination:{modifier:"primaryAlt",character:"m"}}),e({name:"core/editor/next-region",category:"global",description:(0,tc.__)("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,tc.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})},[e]),(0,nSe.jsx)(tSe.BlockEditorKeyboardShortcuts.Register,{})}var iSe=wot;var R3=a(z(),1),sSe=a(G(),1),A3=a(Y(),1),LE=a(Oo(),1);var aSe=a(U(),1);var lSe=a(E(),1);function _ot(e,t){let r=(0,LE.isAppleOS)()?LE.displayShortcut.primaryShift("z"):LE.displayShortcut.primary("y"),o=(0,A3.useSelect)(i=>i(I).hasEditorRedo(),[]),{redo:n}=(0,A3.useDispatch)(I);return(0,lSe.jsx)(sSe.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,R3.isRTL)()?iv:rv,label:(0,R3.__)("Redo"),shortcut:r,"aria-disabled":!o,onClick:o?n:void 0,className:"editor-history__redo"})}var I3=(0,aSe.forwardRef)(_ot);var O3=a(z(),1),cSe=a(G(),1),N3=a(Y(),1),uSe=a(Oo(),1);var dSe=a(U(),1);var fSe=a(E(),1);function Sot(e,t){let r=(0,N3.useSelect)(n=>n(I).hasEditorUndo(),[]),{undo:o}=(0,N3.useDispatch)(I);return(0,fSe.jsx)(cSe.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,O3.isRTL)()?rv:iv,label:(0,O3.__)("Undo"),shortcut:uSe.displayShortcut.primary("z"),"aria-disabled":!r,onClick:r?o:void 0,className:"editor-history__undo"})}var M3=(0,dSe.forwardRef)(Sot);var mSe=a(Ga(),1),hSe=a(Y(),1),gSe=a(be(),1),vSe=a(It(),1);var F3=a(G(),1),eS=a(z(),1),D3=a(Y(),1),pSe=a(U(),1),ZG=a(be(),1),hy=a(E(),1);function L3(){let[e,t]=(0,pSe.useState)(!1),r=(0,D3.useSelect)(i=>i(ZG.store).isValidTemplate(),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,D3.useDispatch)(ZG.store);return r?null:(0,hy.jsxs)(hy.Fragment,{children:[(0,hy.jsx)(F3.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,eS.__)("Keep it as is"),onClick:()=>o(!0)},{label:(0,eS.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,eS.__)("The content of your post doesn\u2019t match the template assigned to your post type.")}),(0,hy.jsx)(F3.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,eS.__)("Reset"),onConfirm:()=>{t(!1),n()},onCancel:()=>t(!1),size:"medium",children:(0,eS.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}var XG=a(E(),1);function xot(){(0,mSe.default)("wp.editor.EditorNotices",{since:"7.0",version:"7.2",alternative:"wp.notices.InlineNotices"});let e=(0,hSe.useSelect)(t=>t(gSe.store).isValidTemplate(),[]);return(0,XG.jsx)(vSe.InlineNotices,{pinnedNoticesClassName:"components-editor-notices__pinned",dismissibleNoticesClassName:"components-editor-notices__dismissible",children:!e&&(0,XG.jsx)(L3,{})})}var bSe=xot;var ySe=a(Ga(),1),wSe=a(It(),1),_Se=a(E(),1);function SSe(){return(0,ySe.default)("wp.editor.EditorSnackbars",{since:"7.0",version:"7.2",alternative:"wp.notices.SnackbarNotices"}),(0,_Se.jsx)(wSe.SnackbarNotices,{className:"components-editor-notices__snackbar"})}var Op=a(G(),1),Ip=a(z(),1),tS=a(U(),1),BE=a(ke(),1),RSe=a(Y(),1);var gy=a(z(),1),$G=a(Y(),1),V3=a(G(),1),eY=a(ne(),1);var B3=a(G(),1),QG=a(z(),1),xSe=a(Y(),1),JG=a(ne(),1),CSe=a(Lt(),1);var Rp=a(E(),1);function TSe({record:e,checked:t,onChange:r}){let{name:o,kind:n,title:i,key:s}=e,{entityRecordTitle:l,hasPostMetaChanges:c}=(0,xSe.useSelect)(u=>{if(n!=="postType"||o!=="wp_template")return{entityRecordTitle:i,hasPostMetaChanges:K(u(I)).hasPostMetaChanges(o,s)};let d=u(JG.store).getEditedEntityRecord(n,o,s),{default_template_types:f=[]}=u(JG.store).getCurrentTheme()??{};return{entityRecordTitle:Tl({template:d,templateTypes:f}).title,hasPostMetaChanges:K(u(I)).hasPostMetaChanges(o,s)}},[o,n,i,s]);return(0,Rp.jsxs)(Rp.Fragment,{children:[(0,Rp.jsx)(B3.PanelRow,{children:(0,Rp.jsx)(B3.CheckboxControl,{label:(0,CSe.decodeEntities)(l)||(0,QG.__)("Untitled"),checked:t,onChange:r,className:"entities-saved-states__change-control"})}),c&&(0,Rp.jsx)("ul",{className:"entities-saved-states__changes",children:(0,Rp.jsx)("li",{children:(0,QG.__)("Post Meta.")})})]})}var Ap=a(E(),1);function Cot(e,t){switch(e){case"site":return t===1?(0,gy.__)("This change will affect your whole site."):(0,gy.__)("These changes will affect your whole site.");case"wp_template":return(0,gy.__)("This change will affect other parts of your site that use this template.");case"page":case"post":return(0,gy.__)("The following has been modified.")}}function Tot({record:e}){let{editedRecord:t,savedRecord:r}=(0,$G.useSelect)(n=>{let{getEditedEntityRecord:i,getEntityRecord:s}=n(eY.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=g1(t,r,{maxResults:10});return o.length?(0,Ap.jsx)("ul",{className:"entities-saved-states__changes",children:o.map(n=>(0,Ap.jsx)("li",{children:n},n))}):null}function Eot({record:e,count:t}){if(e?.name==="globalStyles")return null;let r=Cot(e?.name,t);return r?(0,Ap.jsx)(V3.PanelRow,{children:r}):null}function ESe({list:e,unselectedEntities:t,setUnselectedEntities:r}){let o=e.length,n=e[0],s=(0,$G.useSelect)(l=>l(eY.store).getEntityConfig(n.kind,n.name),[n.kind,n.name]).label;return n?.name==="wp_template_part"&&(s=o===1?(0,gy.__)("Template Part"):(0,gy.__)("Template Parts")),(0,Ap.jsxs)(V3.PanelBody,{title:s,initialOpen:!0,className:"entities-saved-states__panel-body",children:[(0,Ap.jsx)(Eot,{record:n,count:o}),e.map(l=>(0,Ap.jsx)(TSe,{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,Ap.jsx)(Tot,{record:n})]})}var PSe=a(Y(),1),kSe=a(ne(),1),j3=a(U(),1),z3=()=>{let{editedEntities:e,siteEdits:t,siteEntityConfig:r}=(0,PSe.useSelect)(c=>{let{__experimentalGetDirtyEntityRecords:u,getEntityRecordEdits:d,getEntityConfig:f}=c(kSe.store);return{editedEntities:u(),siteEdits:d("root","site"),siteEntityConfig:f("root","site")}},[]),o=(0,j3.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,j3.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 ni=a(E(),1);function H3({close:e,renderDialog:t,variant:r}){let o=z3();return(0,ni.jsx)(VE,{close:e,renderDialog:t,variant:r,...o})}function VE({additionalPrompt:e=void 0,close:t,onSave:r=void 0,saveEnabled:o=void 0,saveLabel:n=(0,Ip.__)("Save"),renderDialog:i,dirtyEntityRecords:s,isDirty:l,setUnselectedEntities:c,unselectedEntities:u,variant:d="default",successNoticeContent:f}){let m=(0,tS.useRef)(),{saveDirtyEntities:h}=K((0,RSe.useDispatch)(I)),g=s.reduce((M,j)=>{let{name:F}=j;return M[F]||(M[F]=[]),M[F].push(j),M},{}),{site:v,wp_template:b,wp_template_part:_,...y}=g,w=[v,b,_,...Object.values(y)].filter(Array.isArray),S=o??l,x=(0,tS.useCallback)(()=>t(),[t]),[C,A]=(0,BE.__experimentalUseDialog)({onClose:()=>x()}),k=(0,BE.useInstanceId)(VE,"entities-saved-states__panel-label"),R=(0,BE.useInstanceId)(VE,"entities-saved-states__panel-description"),N=s.length?(0,Ip.__)("Select the items you want to save."):void 0,P=d==="inline",T=(0,ni.jsxs)(ni.Fragment,{children:[(0,ni.jsx)(Op.FlexItem,{isBlock:!P,as:Op.Button,variant:P?"tertiary":"secondary",size:P?void 0:"compact",onClick:x,children:(0,Ip.__)("Cancel")}),(0,ni.jsx)(Op.FlexItem,{isBlock:!P,as:Op.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,ni.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,ni.jsx)(Op.Flex,{className:"entities-saved-states__panel-header",gap:2,children:T}),(0,ni.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,ni.jsx)("div",{className:"entities-saved-states__text-prompt--header-wrapper",children:(0,ni.jsx)("strong",{id:i?k:void 0,className:"entities-saved-states__text-prompt--header",children:(0,Ip.__)("Are you ready to save?")})}),(0,ni.jsxs)("div",{id:i?R:void 0,children:[e,(0,ni.jsx)("p",{className:"entities-saved-states__text-prompt--changes-count",children:l?(0,tS.createInterpolateElement)((0,Ip.sprintf)((0,Ip._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,ni.jsx)("strong",{})}):N})]})]}),w.map(M=>(0,ni.jsx)(ESe,{list:M,unselectedEntities:u,setUnselectedEntities:c},M[0].name)),P&&(0,ni.jsx)(Op.Flex,{direction:"row",justify:"flex-end",className:"entities-saved-states__panel-footer",children:T})]})}var ISe=a(U(),1),U3=a(z(),1),vy=a(G(),1),OSe=a(Y(),1),NSe=a(ke(),1),MSe=a(Bn(),1);var fg=a(E(),1);function Pot(){try{return(0,OSe.select)(I).getEditedPostContent()}catch{}}function ASe({text:e,children:t,variant:r="secondary"}){let o=(0,NSe.useCopyToClipboard)(e);return(0,fg.jsx)(vy.Button,{__next40pxDefaultSize:!0,variant:r,ref:o,children:t})}var kot=class extends ISe.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,MSe.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,fg.jsxs)(vy.__experimentalHStack,{className:"editor-error-boundary",alignment:"baseline",spacing:4,justify:"space-between",expanded:!1,wrap:!0,children:[(0,fg.jsx)(vy.__experimentalText,{as:"p",children:(0,U3.__)("The editor has encountered an unexpected error.")}),(0,fg.jsxs)(vy.__experimentalHStack,{expanded:!1,children:[t&&(0,fg.jsx)(ASe,{text:Pot,children:(0,U3.__)("Copy contents")}),(0,fg.jsx)(ASe,{variant:"primary",text:e?.stack,children:(0,U3.__)("Copy error")})]})]}):this.props.children}},FSe=kot;var Np=a(U(),1),zE=a(ke(),1),pg=a(Y(),1),tY=a(z(),1),DSe=a(At(),1),LSe=a(It(),1);var BSe=a(E(),1),Rot=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,jE,Aot=()=>{if(jE!==void 0)return jE;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),jE=!0}catch{jE=!1}return jE};function Iot(){let e=(0,pg.useRegistry)(),{postId:t,isEditedPostNew:r}=(0,pg.useSelect)(o=>({postId:o(I).getCurrentPostId(),isEditedPostNew:o(I).isEditedPostNew()}),[]);(0,Np.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(_))){y2(t,r);return}if(!!u().autosave)return;let{createWarningNotice:m,removeNotice:h}=e.dispatch(LSe.store),{editPost:g,resetEditorBlocks:v}=e.dispatch(I),b="wpEditorAutosaveRestore";m((0,tY.__)("The backup of this post in your browser is different from the version below."),{id:b,actions:[{label:(0,tY.__)("Restore the backup"),onClick(){let{content:_,...y}=l;g(y),v((0,DSe.parse)(l.content)),h(b)}}]})},[e,t,r])}function Oot(){let{postId:e,isEditedPostNew:t,isDirty:r,isAutosaving:o,didError:n}=(0,pg.useSelect)(u=>({postId:u(I).getCurrentPostId(),isEditedPostNew:u(I).isEditedPostNew(),isDirty:u(I).isEditedPostDirty(),isAutosaving:u(I).isAutosavingPost(),didError:u(I).didPostSaveRequestFail()}),[]),i=(0,Np.useRef)(r),s=(0,Np.useRef)(o);(0,Np.useEffect)(()=>{!n&&(s.current&&!o||i.current&&!r)&&y2(e,t),i.current=r,s.current=o},[r,o,n]);let l=(0,zE.usePrevious)(t),c=(0,zE.usePrevious)(e);(0,Np.useEffect)(()=>{c===e&&l&&!t&&y2(e,!0)},[t,e])}function Not(){let{autosave:e}=(0,pg.useDispatch)(I),t=(0,Np.useCallback)(()=>{Rot(()=>e({local:!0}))},[]);Iot(),Oot();let r=(0,pg.useSelect)(o=>o(I).getEditorSettings().localAutosaveInterval,[]);return(0,BSe.jsx)(c3,{interval:r,autosave:t})}var VSe=(0,zE.ifCondition)(Aot)(Not);var jSe=a(Y(),1),zSe=a(ne(),1);function Mot({children:e}){return(0,jSe.useSelect)(r=>{let{getEditedPostAttribute:o}=r(I),{getPostType:n}=r(zSe.store);return!!n(o("type"))?.supports?.["page-attributes"]},[])?e:null}var rS=Mot;var rY=a(z(),1),nS=a(G(),1),W3=a(Y(),1),WSe=a(U(),1);var HSe=a(Y(),1),USe=a(ne(),1);function Fot(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 Dot({children:e,supportKeys:t}){let r=(0,HSe.useSelect)(n=>{let{getEditedPostAttribute:i}=n(I),{getPostType:s}=n(USe.store);return s(i("type"))},[]),o=!!r;return r&&(o=(Array.isArray(t)?t:[t]).some(n=>Fot(r.supports,n))),o?e:null}var co=Dot;var oS=a(E(),1);function Lot(){let e=(0,W3.useSelect)(s=>s(I).getEditedPostAttribute("menu_order")??0,[]),{editPost:t}=(0,W3.useDispatch)(I),[r,o]=(0,WSe.useState)(null),n=s=>{o(s);let l=Number(s);Number.isInteger(l)&&s.trim?.()!==""&&t({menu_order:l})},i=r??e;return(0,oS.jsx)(nS.Flex,{children:(0,oS.jsx)(nS.FlexBlock,{children:(0,oS.jsx)(nS.__experimentalNumberControl,{label:(0,rY.__)("Order"),help:(0,rY.__)("Set the page order."),value:i,onChange:n,hideLabelFromVision:!0,onBlur:()=>{o(null)}})})})}function GSe(){return(0,oS.jsx)(co,{supportKeys:"page-attributes",children:(0,oS.jsx)(Lot,{})})}var oxe=a(Y(),1),nxe=a(ne(),1);var nY=a($0(),1),Ra=a(z(),1),mg=a(G(),1),QSe=a(ke(),1),Hd=a(U(),1),sS=a(Y(),1),sY=a(Lt(),1),Y3=a(ne(),1),JSe=a(be(),1),$Se=a(ho(),1);var YSe=a(G(),1),qSe=a(U(),1),HE=a(E(),1),Bot=(0,qSe.forwardRef)(({className:e,label:t,children:r},o)=>(0,HE.jsxs)(YSe.__experimentalHStack,{className:J("editor-post-panel__row",e),ref:o,children:[t&&(0,HE.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,HE.jsx)("div",{className:"editor-post-panel__row-control",children:r})]})),dr=Bot;var KSe=a(Lt(),1);function G3(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 iS=e=>(0,KSe.decodeEntities)(e),oY=e=>({...e,name:iS(e.name)}),ZSe=e=>(e??[]).map(oY);var ka=a(E(),1);function iY(e){return e?.title?.rendered?(0,sY.decodeEntities)(e.title.rendered):`#${e.id} (${(0,Ra.__)("no title")})`}var XSe=(e,t)=>{let r=(0,nY.default)(e||"").toLowerCase(),o=(0,nY.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function exe(){let{editPost:e}=(0,sS.useDispatch)(I),[t,r]=(0,Hd.useState)(""),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:s,isLoading:l}=(0,sS.useSelect)(f=>{let{getPostType:m,getEntityRecords:h,getEntityRecord:g,isResolving:v}=f(Y3.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?iY(k):"",pageItems:C?h("postType",y,A):null,isLoading:C?v("getEntityRecords",["postType",y,A]):!1}},[t]),c=(0,Hd.useMemo)(()=>{let f=(v,b=0)=>v.map(w=>[{value:w.id,label:"\u2014 ".repeat(b)+(0,sY.decodeEntities)(w.name),rawName:w.name},...f(w.children||[],b+1)]).sort(([w],[S])=>{let x=XSe(w.rawName,t),C=XSe(S.rawName,t);return x>=C?1:-1}).flat();if(!s)return[];let m=s.map(v=>({id:v.id,parent:v.parent,name:iY(v)}));t||(m=G3(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,ka.jsx)(mg.ComboboxControl,{className:"editor-page-attributes__parent",label:(0,Ra.__)("Parent"),help:(0,Ra.__)("Choose a parent page."),value:n,options:c,onFilterValueChange:(0,QSe.debounce)(u,300),onChange:d,hideLabelFromVision:!0,isLoading:l})}function Vot({isOpen:e,onClick:t}){let r=(0,sS.useSelect)(n=>{let{getEditedPostAttribute:i}=n(I),s=i("parent");if(!s)return null;let{getEntityRecord:l}=n(Y3.store),c=i("type");return l("postType",c,s)},[]),o=(0,Hd.useMemo)(()=>r?iY(r):(0,Ra.__)("None"),[r]);return(0,ka.jsx)(mg.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,Ra.sprintf)((0,Ra.__)("Change parent: %s"),o),onClick:t,children:o})}function txe(){let e=(0,sS.useSelect)(n=>n(Y3.store).getEntityRecord("root","__unstableBase")?.home,[]),[t,r]=(0,Hd.useState)(null),o=(0,Hd.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return(0,ka.jsx)(dr,{label:(0,Ra.__)("Parent"),ref:r,children:(0,ka.jsx)(mg.Dropdown,{popoverProps:o,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,ka.jsx)(Vot,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,ka.jsxs)("div",{className:"editor-post-parent",children:[(0,ka.jsx)(JSe.__experimentalInspectorPopoverHeader,{title:(0,Ra.__)("Parent"),onClose:n}),(0,ka.jsxs)("div",{children:[(0,Hd.createInterpolateElement)((0,Ra.sprintf)((0,Ra.__)('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,$Se.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,ka.jsx)("wbr",{})}),(0,ka.jsx)("p",{children:(0,Hd.createInterpolateElement)((0,Ra.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,ka.jsx)(mg.ExternalLink,{href:(0,Ra.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,ka.jsx)(exe,{})]})})})}var rxe=exe;var q3=a(E(),1),jot="page-attributes";function zot(){let{isEnabled:e,postType:t}=(0,oxe.useSelect)(r=>{let{getEditedPostAttribute:o,isEditorPanelEnabled:n}=r(I),{getPostType:i}=r(nxe.store);return{isEnabled:n(jot),postType:i(o("type"))}},[]);return!e||!t?null:(0,q3.jsx)(txe,{})}function K3(){return(0,q3.jsx)(rS,{children:(0,q3.jsx)(zot,{})})}var rc=a(z(),1),Fp=a(G(),1),lS=a(Y(),1),uY=a(ne(),1),axe=a(be(),1),cS=a(U(),1);var lxe=a(It(),1);var Z3=a(Y(),1),lY=a(U(),1),nu=a(At(),1),iu=a(G(),1),by=a(z(),1);var Mp=a(E(),1),aY=(0,by.__)("Custom Template");function hg({onClose:e}){let{defaultBlockTemplate:t,onNavigateToEntityRecord:r}=(0,Z3.useSelect)(d=>{let{getEditorSettings:f,getCurrentTemplateId:m}=d(I);return{defaultBlockTemplate:f().defaultBlockTemplate,onNavigateToEntityRecord:f().onNavigateToEntityRecord,getTemplateId:m}}),{createTemplate:o}=K((0,Z3.useDispatch)(I)),[n,i]=(0,lY.useState)(""),[s,l]=(0,lY.useState)(!1),c=()=>{i(""),e()},u=async d=>{if(d.preventDefault(),s)return;l(!0);let f=t??(0,nu.serialize)([(0,nu.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,nu.createBlock)("core/site-title"),(0,nu.createBlock)("core/site-tagline")]),(0,nu.createBlock)("core/separator"),(0,nu.createBlock)("core/group",{tagName:"main"},[(0,nu.createBlock)("core/group",{layout:{inherit:!0}},[(0,nu.createBlock)("core/post-title")]),(0,nu.createBlock)("core/post-content",{layout:{inherit:!0}})])]),m=await o({slug:jv(n||aY)||"wp-custom-template",content:f,title:n||aY,status:"publish"});l(!1),r({postId:m.id,postType:"wp_template"}),c()};return(0,Mp.jsx)(iu.Modal,{title:(0,by.__)("Create custom template"),onRequestClose:c,focusOnMount:"firstContentElement",size:"small",overlayClassName:"editor-post-template__create-template-modal",children:(0,Mp.jsx)("form",{onSubmit:u,children:(0,Mp.jsxs)(iu.__experimentalVStack,{spacing:"3",children:[(0,Mp.jsx)(iu.TextControl,{label:(0,by.__)("Name"),value:n,onChange:i,placeholder:aY,disabled:s,help:(0,by.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,Mp.jsxs)(iu.__experimentalHStack,{justify:"right",children:[(0,Mp.jsx)(iu.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,by.__)("Cancel")}),(0,Mp.jsx)(iu.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:s,"aria-disabled":s,children:(0,by.__)("Create")})]})]})})})}var yy=a(Y(),1),ixe=a(U(),1),gg=a(ne(),1),X3=a(z(),1);function wy(){return(0,yy.useSelect)(e=>{let{getCurrentPostId:t,getCurrentPostType:r}=e(I);return{postId:t(),postType:r()}},[])}function _y(){let{postType:e,postId:t}=wy();return(0,yy.useSelect)(r=>{let{canUser:o,getEntityRecord:n,getEntityRecords:i}=r(gg.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 sxe(e){return(0,yy.useSelect)(t=>t(gg.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e}),[e])}function UE(){let{postType:e,postId:t}=wy(),[r]=(0,gg.useEntityProp)("postType",e,"slug",t),o=cY(),n=_y(),i=sxe(e),s=(0,yy.useSelect)(l=>{if(!window?.__experimentalDataFormInspector||!o)return null;let{getDefaultTemplateId:c,getEntityRecord:u}=l(gg.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,ixe.useMemo)(()=>n&&[...(i||[]).filter(l=>l.is_custom&&l.slug!==o&&!!l.content.raw),s&&{...s,title:{rendered:(0,X3.sprintf)((0,X3.__)("%s (default)"),s.title.rendered)},isDefault:!0}].filter(Boolean),[i,s,o,n])}function aS(){return(0,yy.useSelect)(e=>{let{getEditorSettings:t,getCurrentTemplateId:r,getCurrentPostType:o}=e(I),{getPostType:n,canUser:i}=e(gg.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 cY(){let{postType:e,postId:t}=wy(),r=sxe(e),o=(0,yy.useSelect)(n=>n(gg.store).getEditedEntityRecord("postType",e,t)?.template,[e,t]);if(o)return r?.find(n=>n.slug===o)?.slug}var Aa=a(E(),1);function Hot({isOpen:e,onClick:t}){let r=(0,lS.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(uY.store).canUser("create",{kind:"postType",name:"wp_template"})&&o(I).getCurrentTemplateId();return l?.title||l?.slug||s?.[n]},[]);return(0,Aa.jsx)(Fp.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,rc.__)("Template options"),onClick:t,children:r??(0,rc.__)("Default template")})}function Uot({onClose:e}){let t=_y(),{availableTemplates:r,fetchedTemplates:o,selectedTemplateSlug:n,canCreate:i,canEdit:s,currentTemplateId:l,onNavigateToEntityRecord:c,getEditorSettings:u}=(0,lS.useSelect)(b=>{let{canUser:_,getEntityRecords:y}=b(uY.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,cS.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,lS.useDispatch)(I),{createSuccessNotice:h}=(0,lS.useDispatch)(lxe.store),[g,v]=(0,cS.useState)(!1);return(0,Aa.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,Aa.jsx)(axe.__experimentalInspectorPopoverHeader,{title:(0,rc.__)("Template"),help:(0,rc.__)("Templates define the way content is displayed when viewing your site."),actions:i?[{icon:C4,label:(0,rc.__)("Add template"),onClick:()=>v(!0)}]:[],onClose:e}),t?(0,Aa.jsx)(Fp.SelectControl,{hideLabelFromVision:!0,label:(0,rc.__)("Template"),value:f?.value??"",options:d,onChange:b=>m({template:b||""})}):(0,Aa.jsx)(Fp.Notice,{status:"warning",isDismissible:!1,children:(0,rc.__)("The posts page template cannot be changed.")}),s&&c&&(0,Aa.jsx)("p",{children:(0,Aa.jsx)(Fp.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>{c({postId:l,postType:"wp_template"}),e(),h((0,rc.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,rc.__)("Go back"),onClick:()=>u().onNavigateToPreviousEntityRecord()}]})},children:(0,rc.__)("Edit template")})}),g&&(0,Aa.jsx)(hg,{onClose:()=>v(!1)})]})}function Wot(){let[e,t]=(0,cS.useState)(null),r=(0,cS.useMemo)(()=>({anchor:e,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[e]);return(0,Aa.jsx)(dr,{label:(0,rc.__)("Template"),ref:t,children:(0,Aa.jsx)(Fp.Dropdown,{popoverProps:r,focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Aa.jsx)(Hot,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Aa.jsx)(Uot,{onClose:o})})})}var Q3=Wot;var e6=a(G(),1),pxe=a(Rh(),1),t6=a(Y(),1),mxe=a(TU(),1);var dxe=a(G(),1);var J3=a(Y(),1),cxe=a(Dt(),1);var uxe=a(E(),1),{PreferenceBaseOption:Got}=K(cxe.privateApis);function vg(e){let{toggleEditorPanelEnabled:t}=(0,J3.useDispatch)(I),{isChecked:r,isRemoved:o}=(0,J3.useSelect)(n=>{let{isEditorPanelEnabled:i,isEditorPanelRemoved:s}=n(I);return{isChecked:i(e.panelName),isRemoved:s(e.panelName)}},[e.panelName]);return o?null:(0,uxe.jsx)(Got,{isChecked:r,onChange:()=>t(e.panelName),...e})}var dY=a(E(),1),{Fill:Yot,Slot:qot}=(0,dxe.createSlotFill)("EnablePluginDocumentSettingPanelOption"),fxe=({label:e,panelName:t})=>(0,dY.jsx)(Yot,{children:(0,dY.jsx)(vg,{label:e,panelName:t})});fxe.Slot=qot;var $3=fxe;var bg=a(E(),1),{Fill:Kot,Slot:Zot}=(0,e6.createSlotFill)("PluginDocumentSettingPanel"),hxe=({name:e,className:t,title:r,icon:o,children:n})=>{let{name:i}=(0,pxe.usePluginContext)(),s=`${i}/${e}`,{opened:l,isEnabled:c}=(0,t6.useSelect)(d=>{let{isEditorPanelOpened:f,isEditorPanelEnabled:m}=d(I);return{opened:f(s),isEnabled:m(s)}},[s]),{toggleEditorPanelOpened:u}=(0,t6.useDispatch)(I);return e===void 0&&(0,mxe.default)("PluginDocumentSettingPanel requires a name property."),(0,bg.jsxs)(bg.Fragment,{children:[(0,bg.jsx)($3,{label:r,panelName:s}),(0,bg.jsx)(Kot,{children:c&&(0,bg.jsx)(e6.PanelBody,{className:t,title:r,icon:o,opened:l,onToggle:()=>u(s),children:n})})]})};hxe.Slot=Zot;var r6=hxe;var gxe=a(be(),1),vxe=a(G(),1),bxe=a(ke(),1),fY=a(E(),1),Xot=(e,t)=>e.filter(r=>!t.includes(r)).length===0,Qot=(e,t)=>!Array.isArray(t)||Xot(e,t),Jot=({allowedBlocks:e,icon:t,label:r,onClick:o,small:n,role:i})=>(0,fY.jsx)(gxe.BlockSettingsMenuControls,{children:({selectedBlocks:s,onClose:l})=>Qot(s,e)?(0,fY.jsx)(vxe.MenuItem,{onClick:(0,bxe.compose)(o,l),icon:t,label:n?r:void 0,role:i,children:!n&&r}):null}),yxe=Jot;var wxe=a(G(),1),_xe=a(Rh(),1);var Sxe=a(E(),1);function xxe(e){let t=(0,_xe.usePluginContext)();return(0,Sxe.jsx)(zl,{name:"core/plugin-more-menu",as:e.as??wxe.MenuItem,icon:e.icon||t.icon,...e})}var Cxe=a(Rh(),1),o6=a(G(),1),pY=a(E(),1),{Fill:$ot,Slot:ent}=(0,o6.createSlotFill)("PluginPostPublishPanel"),Txe=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,Cxe.usePluginContext)();return(0,pY.jsx)($ot,{children:(0,pY.jsx)(o6.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};Txe.Slot=ent;var n6=Txe;var i6=a(G(),1),mY=a(E(),1),{Fill:tnt,Slot:rnt}=(0,i6.createSlotFill)("PluginPostStatusInfo"),Exe=({children:e,className:t})=>(0,mY.jsx)(tnt,{children:(0,mY.jsx)(i6.PanelRow,{className:t,children:e})});Exe.Slot=rnt;var uS=Exe;var s6=a(G(),1),Pxe=a(Rh(),1),hY=a(E(),1),{Fill:ont,Slot:nnt}=(0,s6.createSlotFill)("PluginPrePublishPanel"),kxe=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,Pxe.usePluginContext)();return(0,hY.jsx)(ont,{children:(0,hY.jsx)(s6.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};kxe.Slot=nnt;var a6=kxe;var Rxe=a(G(),1),Axe=a(Rh(),1);var Ixe=a(E(),1);function Oxe(e){let t=(0,Axe.usePluginContext)();return(0,Ixe.jsx)(zl,{name:"core/plugin-preview-menu",as:e.as??Rxe.MenuItem,icon:e.icon||t.icon,...e})}var Nxe=a(E(),1);function Sy({className:e,...t}){return(0,Nxe.jsx)(Ul,{panelClassName:e,className:"editor-sidebar",scope:"core",...t})}var Mxe=a(E(),1);function Fxe(e){return(0,Mxe.jsx)(Ih,{__unstableExplicitMenuItem:!0,scope:"core",...e})}var Dp=a(Y(),1),o1e=a(Lt(),1),yg=a(G(),1),l6=a(U(),1),Cy=a(z(),1),mS=a(ne(),1);var n1e=a(It(),1),i1e=a(Dt(),1);var fS=a(U(),1),Vxe=a(Lt(),1),jxe=a(be(),1),pS=a(G(),1),dS=a(z(),1),zxe=a(Y(),1),Hxe=a(ne(),1),Uxe=a(At(),1);var Lxe=a($0(),1);function Dxe(e=""){return e=(0,Lxe.default)(e),e=e.trim().toLowerCase(),e}function int(e,t){let r=Dxe(t),o=Dxe(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 Bxe(e=[],t=""){if(!t)return e;let r=e.map(o=>[o,int(o,t)]).filter(([,o])=>o>0);return r.sort(([,o],[,n])=>n-o),r.map(([o])=>o)}var Ia=a(E(),1);function gY({onRequestClose:e,onSelect:t}){let{postType:r,postId:o}=wy(),{editEntityRecord:n}=(0,zxe.useDispatch)(Hxe.store),i=async s=>{n("postType",r,o,{template:s.isDefault?"":s.name},{undoIgnore:!0}),e(),t?.()};return(0,Ia.jsx)(pS.Modal,{title:(0,dS.__)("Choose a template"),onRequestClose:e,overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,Ia.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,Ia.jsx)(snt,{onSelect:i})})})}function Wxe({onClick:e}){let[t,r]=(0,fS.useState)(!1),o=UE();return(0,Ia.jsxs)(Ia.Fragment,{children:[(0,Ia.jsx)(pS.MenuItem,{disabled:!o?.length,accessibleWhenDisabled:!0,onClick:()=>r(!0),children:(0,dS.__)("Change template")}),t&&(0,Ia.jsx)(gY,{onRequestClose:()=>r(!1),onSelect:e})]})}function snt({onSelect:e}){let[t,r]=(0,fS.useState)(""),o=UE(),n=(0,fS.useMemo)(()=>o.map(s=>({name:s.slug,blocks:(0,Uxe.parse)(s.content.raw),title:(0,Vxe.decodeEntities)(s.title.rendered),id:s.id,isDefault:s.isDefault})),[o]),i=(0,fS.useMemo)(()=>Bxe(n,t),[n,t]);return(0,Ia.jsxs)(Ia.Fragment,{children:[(0,Ia.jsx)(pS.SearchControl,{onChange:r,value:t,label:(0,dS.__)("Search"),placeholder:(0,dS.__)("Search"),className:"editor-post-template__swap-template-search"}),(0,Ia.jsx)(jxe.__experimentalBlockPatternsList,{label:(0,dS.__)("Templates"),blockPatterns:i,onClickPattern:e})]})}var Gxe=a(G(),1),Yxe=a(z(),1),qxe=a(Y(),1),Kxe=a(ne(),1);var Zxe=a(E(),1);function Xxe({onClick:e}){let t=cY(),r=_y(),{postType:o,postId:n}=wy(),{editEntityRecord:i}=(0,qxe.useDispatch)(Kxe.store);return!t||!r?null:(0,Zxe.jsx)(Gxe.MenuItem,{onClick:()=>{i("postType",o,n,{template:""},{undoIgnore:!0}),e()},children:(0,Yxe.__)("Use default template")})}var Qxe=a(G(),1),Jxe=a(z(),1),$xe=a(Y(),1),e1e=a(ne(),1),t1e=a(U(),1);var xy=a(E(),1);function r1e(){let{canCreateTemplates:e}=(0,$xe.useSelect)(n=>{let{canUser:i}=n(e1e.store);return{canCreateTemplates:i("create",{kind:"postType",name:"wp_template"})}},[]),[t,r]=(0,t1e.useState)(!1),o=_y();return!e||!o?null:(0,xy.jsxs)(xy.Fragment,{children:[(0,xy.jsx)(Qxe.MenuItem,{onClick:()=>{r(!0)},children:(0,Jxe.__)("Create new template")}),t&&(0,xy.jsx)(hg,{onClose:()=>{r(!1)}})]})}var Oa=a(E(),1);function s1e(){let{isTemplateHidden:e,onNavigateToEntityRecord:t,getEditorSettings:r,hasGoBack:o,hasSpecificTemplate:n,id:i}=(0,Dp.useSelect)(S=>{let{getRenderingMode:x,getEditorSettings:C,getCurrentPost:A,getCurrentTemplateId:k}=K(S(I)),R=C(),N=A();return{isTemplateHidden:x()==="post-only",onNavigateToEntityRecord:R.onNavigateToEntityRecord,getEditorSettings:C,hasGoBack:R.hasOwnProperty("onNavigateToPreviousEntityRecord"),hasSpecificTemplate:!!N.template,id:k()}},[]),{get:s}=(0,Dp.useSelect)(i1e.store),{editedRecord:l,hasResolved:c}=(0,mS.useEntityRecord)("postType","wp_template",i),{getEntityRecord:u}=(0,Dp.useSelect)(mS.store),{editEntityRecord:d}=(0,Dp.useDispatch)(mS.store),{createSuccessNotice:f}=(0,Dp.useDispatch)(n1e.store),{setRenderingMode:m,setDefaultRenderingMode:h}=K((0,Dp.useDispatch)(I)),g=(0,Dp.useSelect)(S=>!!S(mS.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[v,b]=(0,l6.useState)(null),_=(0,l6.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,Cy.__)("Go back"),onClick:()=>r().onNavigateToPreviousEntityRecord()}]:void 0,w=()=>{s("core/edit-site","welcomeGuideTemplate")||f((0,Cy.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:y})};return(0,Oa.jsx)(dr,{label:(0,Cy.__)("Template"),ref:b,children:(0,Oa.jsx)(yg.DropdownMenu,{popoverProps:_,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,Cy.__)("Template options"),text:(0,o1e.decodeEntities)(l.title),icon:null,children:({onClose:S})=>(0,Oa.jsxs)(Oa.Fragment,{children:[(0,Oa.jsxs)(yg.MenuGroup,{children:[g&&(0,Oa.jsx)(yg.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,Cy.__)("Edit template")}),(0,Oa.jsx)(Wxe,{onClick:S}),(0,Oa.jsx)(Xxe,{onClick:S}),g&&(0,Oa.jsx)(r1e,{})]}),(0,Oa.jsx)(yg.MenuGroup,{children:(0,Oa.jsx)(yg.MenuItem,{icon:e?void 0:Ro,isSelected:!e,role:"menuitemcheckbox",onClick:()=>{let x=e?"template-locked":"post-only";m(x),h(x)},children:(0,Cy.__)("Show template")})})]})})})}var vY=a(E(),1);function c6(){let e=aS();return e==="classic"?(0,vY.jsx)(Q3,{}):e==="block-theme"?(0,vY.jsx)(s1e,{}):null}var x1e=a(Y(),1),C1e=a(ne(),1);var d1e=a(ke(),1),f1e=a(U(),1),p1e=a(Y(),1),m1e=a(z(),1),h1e=a(G(),1);var a1e=a(z(),1),l1e=a(U(),1),c1e=a(Y(),1),bY=a(Lt(),1),u1e=a(ne(),1);var WE={_fields:"id,name",context:"view"},u6={who:"authors",per_page:100,...WE};function d6(e){let{authorId:t,authors:r,postAuthor:o,isLoading:n}=(0,c1e.useSelect)(s=>{let{getUser:l,getUsers:c,isResolving:u}=s(u1e.store),{getEditedPostAttribute:d}=s(I),f=d("author"),m={...u6};return e&&(m.search=e,m.search_columns=["name"]),{authorId:f,authors:c(m),postAuthor:l(f,WE),isLoading:u("getUsers",[m])}},[e]),i=(0,l1e.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,a1e.__)("(No author)")}]),[...c,...s]},[r,o]);return{authorId:t,authorOptions:i,postAuthor:o,isLoading:n}}var g1e=a(E(),1);function v1e(){let[e,t]=(0,f1e.useState)(),{editPost:r}=(0,p1e.useDispatch)(I),{authorId:o,authorOptions:n,isLoading:i}=d6(e),s=l=>{l&&r({author:l})};return(0,g1e.jsx)(h1e.ComboboxControl,{label:(0,m1e.__)("Author"),options:n,value:o,onFilterValueChange:(0,d1e.debounce)(t,300),onChange:s,allowReset:!1,hideLabelFromVision:!0,isLoading:i})}var b1e=a(z(),1),y1e=a(Y(),1),w1e=a(G(),1);var _1e=a(E(),1);function S1e(){let{editPost:e}=(0,y1e.useDispatch)(I),{authorId:t,authorOptions:r}=d6(),o=n=>{let i=Number(n);e({author:i})};return(0,_1e.jsx)(w1e.SelectControl,{className:"post-author-selector",label:(0,b1e.__)("Author"),options:r,onChange:o,value:t,hideLabelFromVision:!0})}var yY=a(E(),1),ant=25;function lnt(){return(0,x1e.useSelect)(t=>t(C1e.store).getUsers(u6)?.length>=ant,[])?(0,yY.jsx)(v1e,{}):(0,yY.jsx)(S1e,{})}var f6=lnt;var T1e=a(Y(),1);var E1e=a(E(),1);function p6({children:e}){let{hasAssignAuthorAction:t}=(0,T1e.useSelect)(r=>({hasAssignAuthorAction:!!r(I).getCurrentPost()?._links?.["wp:action-assign-author"]}),[]);return t?(0,E1e.jsx)(co,{supportKeys:"author",children:e}):null}var Ty=a(z(),1),m6=a(G(),1),h6=a(U(),1),P1e=a(Lt(),1),k1e=a(be(),1),R1e=a(Y(),1),A1e=a(ne(),1);var Ud=a(E(),1);function cnt({isOpen:e,onClick:t}){let{postAuthor:r}=(0,R1e.useSelect)(n=>{let i=n(I).getEditedPostAttribute("author");return{postAuthor:n(A1e.store).getUser(i,WE)}},[]),o=(0,P1e.decodeEntities)(r?.name)||(0,Ty.__)("(No author)");return(0,Ud.jsx)(m6.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,Ty.sprintf)((0,Ty.__)("Change author: %s"),o),onClick:t,children:o})}function unt(){let[e,t]=(0,h6.useState)(null),r=(0,h6.useMemo)(()=>({anchor:e,placement:"left-start",offset:36,shift:!0}),[e]);return(0,Ud.jsx)(p6,{children:(0,Ud.jsx)(dr,{label:(0,Ty.__)("Author"),ref:t,children:(0,Ud.jsx)(m6.Dropdown,{popoverProps:r,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Ud.jsx)(cnt,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Ud.jsxs)("div",{className:"editor-post-author",children:[(0,Ud.jsx)(k1e.__experimentalInspectorPopoverHeader,{title:(0,Ty.__)("Author"),onClose:o}),(0,Ud.jsx)(f6,{onClose:o})]})})})})}var g6=unt;var wg=a(z(),1),b6=a(G(),1),y6=a(Y(),1);var v6=a(E(),1),dnt=[{label:(0,wg._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,wg.__)("Visitors can add new comments and replies.")},{label:(0,wg.__)("Closed"),value:"closed",description:[(0,wg.__)("Visitors cannot add new comments or replies."),(0,wg.__)("Existing comments remain visible.")].join(" ")}];function fnt(){let e=(0,y6.useSelect)(o=>o(I).getEditedPostAttribute("comment_status")??"open",[]),{editPost:t}=(0,y6.useDispatch)(I),r=o=>t({comment_status:o});return(0,v6.jsx)("form",{children:(0,v6.jsx)(b6.__experimentalVStack,{spacing:4,children:(0,v6.jsx)(b6.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,wg.__)("Comment status"),options:dnt,onChange:r,selected:e})})})}var w6=fnt;var su=a(z(),1),hS=a(G(),1),_Y=a(Y(),1),T6=a(U(),1),I1e=a(be(),1),O1e=a(ne(),1);var _6=a(z(),1),S6=a(G(),1),x6=a(Y(),1);var wY=a(E(),1);function pnt(){let e=(0,x6.useSelect)(o=>o(I).getEditedPostAttribute("ping_status")??"open",[]),{editPost:t}=(0,x6.useDispatch)(I),r=()=>t({ping_status:e==="open"?"closed":"open"});return(0,wY.jsx)(S6.CheckboxControl,{label:(0,_6.__)("Enable pingbacks & trackbacks"),checked:e==="open",onChange:r,help:(0,wY.jsx)(S6.ExternalLink,{href:(0,_6.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,_6.__)("Learn more about pingbacks & trackbacks")})})}var C6=pnt;var Ys=a(E(),1),mnt="discussion-panel";function hnt({onClose:e}){return(0,Ys.jsxs)("div",{className:"editor-post-discussion",children:[(0,Ys.jsx)(I1e.__experimentalInspectorPopoverHeader,{title:(0,su.__)("Discussion"),onClose:e}),(0,Ys.jsxs)(hS.__experimentalVStack,{spacing:4,children:[(0,Ys.jsx)(co,{supportKeys:"comments",children:(0,Ys.jsx)(w6,{})}),(0,Ys.jsx)(co,{supportKeys:"trackbacks",children:(0,Ys.jsx)(C6,{})})]})]})}function gnt({isOpen:e,onClick:t}){let{commentStatus:r,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,_Y.useSelect)(l=>{let{getEditedPostAttribute:c}=l(I),{getPostType:u}=l(O1e.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,su._x)("Open",'Adjective: e.g. "Comments are open"'):s=i?(0,su.__)("Comments only"):(0,su._x)("Open",'Adjective: e.g. "Comments are open"'):o==="open"?s=n?(0,su.__)("Pings only"):(0,su.__)("Pings enabled"):s=(0,su.__)("Closed"),(0,Ys.jsx)(hS.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,su.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:s})}function E6(){let{isEnabled:e}=(0,_Y.useSelect)(n=>{let{isEditorPanelEnabled:i}=n(I);return{isEnabled:i(mnt)}},[]),[t,r]=(0,T6.useState)(null),o=(0,T6.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return e?(0,Ys.jsx)(co,{supportKeys:["comments","trackbacks"],children:(0,Ys.jsx)(dr,{label:(0,su.__)("Discussion"),ref:r,children:(0,Ys.jsx)(hS.Dropdown,{popoverProps:o,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,Ys.jsx)(gnt,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,Ys.jsx)(hnt,{onClose:n})})})}):null}var gS=a(z(),1),k6=a(G(),1),R6=a(Y(),1),N1e=a(U(),1),M1e=a(Lt(),1);var P6=a(E(),1);function GE({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){let{excerpt:r,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,R6.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,R6.useDispatch)(I),[s,l]=(0,N1e.useState)((0,M1e.decodeEntities)(r)),c=d=>{i({[n]:d})},u=o?(0,gS.__)("Write a description (optional)"):(0,gS.__)("Write an excerpt (optional)");return(0,P6.jsx)("div",{className:"editor-post-excerpt",children:(0,P6.jsx)(k6.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,gS.__)("Write a description"):(0,P6.jsx)(k6.ExternalLink,{href:(0,gS.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,gS.__)("Learn more about manual excerpts")})})})}var F1e=a(E(),1);function vnt({children:e}){return(0,F1e.jsx)(co,{supportKeys:"excerpt",children:e})}var Ey=vnt;var Lp=a(z(),1),au=a(G(),1),qE=a(Y(),1),O6=a(U(),1),L1e=a(be(),1),xY=a(ne(),1),B1e=a(Lt(),1);var A6=a(G(),1),SY=a(E(),1),{Fill:bnt,Slot:ynt}=(0,A6.createSlotFill)("PluginPostExcerpt"),D1e=({children:e,className:t})=>(0,SY.jsx)(bnt,{children:(0,SY.jsx)(A6.PanelRow,{className:t,children:e})});D1e.Slot=ynt;var YE=D1e;var uo=a(E(),1),I6="post-excerpt";function wnt(){let{isOpened:e,isEnabled:t,postType:r}=(0,qE.useSelect)(s=>{let{isEditorPanelOpened:l,isEditorPanelEnabled:c,getCurrentPostType:u}=s(I);return{isOpened:l(I6),isEnabled:c(I6),postType:u()}},[]),{toggleEditorPanelOpened:o}=(0,qE.useDispatch)(I),n=()=>o(I6);if(!t)return null;let i=["wp_template","wp_template_part","wp_block"].includes(r);return(0,uo.jsx)(au.PanelBody,{title:i?(0,Lp.__)("Description"):(0,Lp.__)("Excerpt"),opened:e,onToggle:n,children:(0,uo.jsx)(YE.Slot,{children:s=>(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(GE,{}),s]})})})}function V1e(){return(0,uo.jsx)(Ey,{children:(0,uo.jsx)(wnt,{})})}function j1e(){return(0,uo.jsx)(Ey,{children:(0,uo.jsx)(_nt,{})})}function _nt(){let{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:r,allowEditing:o}=(0,qE.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(xY.store).getEntityRecord("postType",b,h()),A=!x&&_?Tl({template:C,templateTypes:f(xY.store).getCurrentTheme()?.default_template_types})?.description:void 0,k=v(I6)||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,O6.useState)(null),s=r?(0,Lp.__)("Description"):(0,Lp.__)("Excerpt"),l=(0,O6.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,uo.jsx)(au.__experimentalText,{align:"left",numberOfLines:4,truncate:o,children:(0,B1e.decodeEntities)(t)});if(!o)return c;let u=r?(0,Lp.__)("Add a description\u2026"):(0,Lp.__)("Add an excerpt\u2026"),d=r?(0,Lp.__)("Edit description"):(0,Lp.__)("Edit excerpt");return(0,uo.jsxs)(au.__experimentalVStack,{children:[c,(0,uo.jsx)(au.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:l,focusOnMount:!0,ref:i,renderToggle:({onToggle:f})=>(0,uo.jsx)(au.Button,{__next40pxDefaultSize:!0,onClick:f,variant:"link",children:c?d:u}),renderContent:({onClose:f})=>(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(L1e.__experimentalInspectorPopoverHeader,{title:s,onClose:f}),(0,uo.jsx)(au.__experimentalVStack,{spacing:4,children:(0,uo.jsx)(YE.Slot,{children:m=>(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(GE,{hideLabelFromVision:!0,updateOnBlur:!0}),m]})})})]})})]})}var hl=a(z(),1),TY=a(Bn(),1),is=a(G(),1),W1e=a(GA(),1),M6=a(U(),1),G1e=a(ke(),1),vS=a(Y(),1),Py=a(be(),1),Y1e=a(ne(),1);var z1e=a(Y(),1),H1e=a(ne(),1);function N6({children:e,supportKeys:t}){let{postType:r,themeSupports:o}=(0,z1e.useSelect)(i=>({postType:i(I).getEditedPostAttribute("type"),themeSupports:i(H1e.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 CY=a(E(),1);function Snt({children:e}){return(0,CY.jsx)(N6,{supportKeys:"post-thumbnails",children:(0,CY.jsx)(co,{supportKeys:"thumbnail",children:e})})}var Bp=Snt;var xi=a(E(),1),U1e=["image"],xnt=(0,hl.__)("Featured image"),Cnt=(0,hl.__)("Add a featured image"),Tnt=(0,xi.jsx)("p",{children:(0,hl.__)("To edit the featured image, you need permission to upload media.")});function Ent(e,t){if(!e)return{};let r=(0,TY.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,TY.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 Pnt({currentPostId:e,featuredImageId:t,onUpdateImage:r,onRemoveImage:o,media:n,postType:i,noticeUI:s,noticeOperations:l,isRequestingFeaturedImageMedia:c}){let u=(0,M6.useRef)(!1),[d,f]=(0,M6.useState)(!1),{getSettings:m}=(0,vS.useSelect)(Py.store),{mediaSourceUrl:h}=Ent(n,e);function g(y){m().mediaUpload({allowedTypes:U1e,filesList:y,onFileChange([w]){if((0,W1e.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,hl.sprintf)((0,hl.__)("Current image: %s"),y.alt_text):(0,hl.sprintf)((0,hl.__)("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,xi.jsxs)(Bp,{children:[s,(0,xi.jsxs)("div",{className:"editor-post-featured-image",children:[n&&(0,xi.jsx)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:v(n)}),(0,xi.jsx)(Py.MediaUploadCheck,{fallback:Tnt,children:(0,xi.jsx)(Py.MediaUpload,{title:i?.labels?.featured_image||xnt,onSelect:r,unstableFeaturedImageFlow:!0,allowedTypes:U1e,modalClass:"editor-post-featured-image__media-modal",render:({open:y})=>(0,xi.jsxs)("div",{className:"editor-post-featured-image__container",children:[_?(0,xi.jsx)(is.Notice,{status:"warning",isDismissible:!1,children:(0,hl.__)("Could not retrieve the featured image data.")}):(0,xi.jsxs)(is.Button,{__next40pxDefaultSize:!0,ref:b,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:y,"aria-label":t?(0,hl.__)("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,xi.jsx)("img",{className:"editor-post-featured-image__preview-image",src:h,alt:v(n)}),(d||c)&&(0,xi.jsx)(is.Spinner,{}),!t&&!d&&(i?.labels?.set_featured_image||Cnt)]}),!!t&&(0,xi.jsxs)(is.__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,xi.jsx)(is.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:y,"aria-haspopup":"dialog",variant:_?"secondary":void 0,children:(0,hl.__)("Replace")}),(0,xi.jsx)(is.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{o(),u.current=!0},variant:_?"secondary":void 0,isDestructive:_,children:(0,hl.__)("Remove")})]}),(0,xi.jsx)(is.DropZone,{onFilesDrop:g})]}),value:t})})]})]})}var knt=(0,vS.withSelect)(e=>{let{getEntityRecord:t,getPostType:r,hasFinishedResolution:o}=e(Y1e.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"}])}}),Rnt=(0,vS.withDispatch)((e,{noticeOperations:t},{select:r})=>{let{editPost:o}=e(I);return{onUpdateImage(n){o({featured_media:n.id})},onDropImage(n){r(Py.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})}}}),KE=(0,G1e.compose)(is.withNotices,knt,Rnt,(0,is.withFilters)("editor.PostFeaturedImage"))(Pnt);var q1e=a(z(),1),K1e=a(G(),1),F6=a(Y(),1),Z1e=a(ne(),1);var bS=a(E(),1),EY="featured-image";function D6({withPanelBody:e=!0}){let{postType:t,isEnabled:r,isOpened:o}=(0,F6.useSelect)(i=>{let{getEditedPostAttribute:s,isEditorPanelEnabled:l,isEditorPanelOpened:c}=i(I),{getPostType:u}=i(Z1e.store);return{postType:u(s("type")),isEnabled:l(EY),isOpened:c(EY)}},[]),{toggleEditorPanelOpened:n}=(0,F6.useDispatch)(I);return r?e?(0,bS.jsx)(Bp,{children:(0,bS.jsx)(K1e.PanelBody,{title:t?.labels?.featured_image??(0,q1e.__)("Featured image"),opened:o,onToggle:()=>n(EY),children:(0,bS.jsx)(KE,{})})}):(0,bS.jsx)(Bp,{children:(0,bS.jsx)(KE,{})}):null}var qs=a(z(),1),L6=a(G(),1),B6=a(Y(),1),J1e=a(ke(),1),$1e=a(ne(),1);var X1e=a(Y(),1);var Q1e=a(E(),1);function yS({children:e}){return(0,X1e.useSelect)(r=>r(I).getEditorSettings().disablePostFormats,[])?null:(0,Q1e.jsx)(co,{supportKeys:"post-formats",children:e})}var ky=a(E(),1),ZE=[{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 XE(){let t=`post-format-selector-${(0,J1e.useInstanceId)(XE)}`,{postFormat:r,suggestedFormat:o,supportedFormats:n}=(0,B6.useSelect)(u=>{let{getEditedPostAttribute:d,getSuggestedPostFormat:f}=u(I),m=d("format"),h=u($1e.store).getThemeSupports();return{postFormat:m??"standard",suggestedFormat:f(),supportedFormats:h.formats}},[]),i=ZE.filter(u=>n?.includes(u.id)||r===u.id),s=i.find(u=>u.id===o),{editPost:l}=(0,B6.useDispatch)(I),c=u=>l({format:u});return(0,ky.jsx)(yS,{children:(0,ky.jsxs)("div",{className:"editor-post-format",children:[(0,ky.jsx)(L6.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,ky.jsx)("p",{className:"editor-post-format__suggestion",children:(0,ky.jsx)(L6.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>c(s.id),children:(0,qs.sprintf)((0,qs.__)("Apply suggested format: %s"),s.caption)})})]})})}var _g=a(z(),1),PY=a(G(),1),QE=a(Y(),1);var kY=a(ho(),1);var eCe=a(Y(),1);var tCe=a(E(),1);function Ant({children:e}){let{lastRevisionId:t,revisionsCount:r}=(0,eCe.useSelect)(o=>{let{getCurrentPostLastRevisionId:n,getCurrentPostRevisionsCount:i}=o(I);return{lastRevisionId:n(),revisionsCount:i()}},[]);return!t||r<2?null:(0,tCe.jsx)(co,{supportKeys:"revisions",children:e})}var Ry=Ant;var wS=a(E(),1);function rCe(){return(0,QE.useSelect)(e=>{let{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:r,getEditorSettings:o}=e(I);return{lastRevisionId:t(),revisionsCount:r(),disableVisualRevisions:!!o().disableVisualRevisions}},[])}function Int(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=rCe(),{setCurrentRevisionId:o}=K((0,QE.useDispatch)(I)),n=r?{href:(0,kY.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,wS.jsx)(Ry,{children:(0,wS.jsx)(PY.Button,{__next40pxDefaultSize:!0,...n,className:"editor-post-last-revision__title",icon:pf,iconPosition:"right",text:(0,_g.sprintf)((0,_g.__)("Revisions (%s)"),t)})})}function oCe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=rCe(),{setCurrentRevisionId:o}=K((0,QE.useDispatch)(I)),n=r?{href:(0,kY.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,wS.jsx)(Ry,{children:(0,wS.jsx)(dr,{label:(0,_g.__)("Revisions"),children:(0,wS.jsx)(PY.Button,{...n,className:"editor-private-post-last-revision__button",text:t,"aria-label":(0,_g.sprintf)((0,_g._n)("Open revisions screen: %d revision","Open revisions screen: %d revisions",t),t),variant:"tertiary",size:"compact"})})})}var V6=Int;var nCe=a(G(),1);var j6=a(E(),1);function Ont(){return(0,j6.jsx)(Ry,{children:(0,j6.jsx)(nCe.PanelBody,{className:"editor-post-last-revision__panel",children:(0,j6.jsx)(V6,{})})})}var iCe=Ont;var ii=a(z(),1),cu=a(G(),1),$E=a(Y(),1),IY=a(ho(),1),JE=a(U(),1),_S=a(Bn(),1),uCe=a(ke(),1),OY=a(ne(),1);var lu=a(z(),1),Nnt="authentication-failed",Mnt="connection-expired",Fnt="connection-limit-exceeded",sCe="document-size-limit-exceeded",AY="protocol-mismatch",aCe="unknown-error",RY={[Nnt]:{title:(0,lu.__)("Unable to connect"),description:(0,lu.__)("Real-time collaboration couldn't verify your permissions. Check that you have access to edit this post or contact your site administrator.")},[Mnt]:{title:(0,lu.__)("Connection expired"),description:(0,lu.__)("Your connection to real-time collaboration has timed out. Editing is paused to prevent conflicts with other editors.")},[Fnt]:{title:(0,lu.__)("Too many editors connected"),description:(0,lu.__)("Real-time collaboration has reached its connection limit. Try again later or contact your site administrator.")},[AY]:{title:(0,lu.__)("Protocol update"),description:(0,lu.__)("Real-time collaboration has been updated. Please refresh the page to continue editing.")},[aCe]:{title:(0,lu.__)("Connection lost"),description:(0,lu.__)("The connection to real-time collaboration was interrupted. Editing is paused to prevent conflicts with other editors.")}};function lCe(e){return e?.code&&RY[e?.code]?RY[e.code]:RY[aCe]}var Xr=a(E(),1);function cCe(){let{isCollaborationSupported:e,syncConnectionStatus:t}=(0,$E.useSelect)(r=>{let{isCollaborationSupported:o,getSyncConnectionStatus:n}=K(r(OY.store));return{isCollaborationSupported:o(),syncConnectionStatus:n()}},[]);return e?null:sCe===t?.error?.code?(0,Xr.jsx)("p",{children:(0,ii.__)("Because this post is too large for real-time collaboration, only one person can edit at a time.")}):(0,Xr.jsx)("p",{children:(0,ii.__)("Because this post uses plugins that aren\u2019t compatible with real-time collaboration, only one person can edit at a time.")})}function dCe(){let t="core/editor/post-locked-modal-"+(0,uCe.useInstanceId)(dCe),{autosave:r,updatePostLock:o}=(0,$E.useDispatch)(I),{isCollaborationEnabled:n,isLocked:i,isTakeover:s,user:l,postId:c,postLockUtils:u,activePostLock:d,postType:f,previewLink:m}=(0,$E.useSelect)(y=>{let{isPostLocked:w,isPostLockTakeover:S,getPostLockUser:x,getCurrentPostId:C,getActivePostLock:A,getEditedPostAttribute:k,getEditedPostPreviewLink:R,getEditorSettings:N,isCollaborationEnabledForCurrentPost:P}=K(y(I)),{getPostType:T}=y(OY.store);return{isCollaborationEnabled:P(),isLocked:w(),isTakeover:S(),user:x(),postId:C(),postLockUtils:N().postLockUtils,activePostLock:A(),postType:T(k("type")),previewLink:R()}},[]);if((0,JE.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,_S.addAction)("heartbeat.send",t,y),(0,_S.addAction)("heartbeat.tick",t,w),window.addEventListener("beforeunload",S),()=>{(0,_S.removeAction)("heartbeat.send",t),(0,_S.removeAction)("heartbeat.tick",t),window.removeEventListener("beforeunload",S)}},[]),!i||n)return null;let h=l.name,g=l.avatar,v=(0,IY.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:c,action:"edit",_wpnonce:u.nonce}),b=(0,IY.addQueryArgs)("edit.php",{post_type:f?.slug}),_=(0,ii.__)("Exit editor");return(0,Xr.jsx)(cu.Modal,{title:s?(0,ii.__)("Someone else has taken over this post"):(0,ii.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,Xr.jsxs)(cu.__experimentalHStack,{alignment:"top",spacing:6,children:[!!g&&(0,Xr.jsx)("img",{src:g,alt:(0,ii.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,Xr.jsxs)("div",{children:[!!s&&(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)("p",{children:(0,JE.createInterpolateElement)(h?(0,ii.sprintf)((0,ii.__)("<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,ii.__)("Another user now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."),{strong:(0,Xr.jsx)("strong",{}),PreviewLink:(0,Xr.jsx)(cu.ExternalLink,{href:m,children:(0,ii.__)("preview")})})}),(0,Xr.jsx)(cCe,{})]}),!s&&(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)("p",{children:(0,JE.createInterpolateElement)(h?(0,ii.sprintf)((0,ii.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),h):(0,ii.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,Xr.jsx)("strong",{}),PreviewLink:(0,Xr.jsx)(cu.ExternalLink,{href:m,children:(0,ii.__)("preview")})})}),(0,Xr.jsx)(cCe,{}),(0,Xr.jsx)("p",{children:(0,ii.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,Xr.jsxs)(cu.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!s&&(0,Xr.jsx)(cu.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:v,children:(0,ii.__)("Take over")}),(0,Xr.jsx)(cu.Button,{__next40pxDefaultSize:!0,variant:"primary",href:b,children:_})]})]})]})})}var fCe=dCe;var mCe=a(z(),1),hCe=a(G(),1),H6=a(Y(),1);var pCe=a(Y(),1);function Dnt({children:e}){let{hasPublishAction:t,isPublished:r}=(0,pCe.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 z6=Dnt;var NY=a(E(),1);function Lnt(){let e=(0,H6.useSelect)(o=>o(I).getEditedPostAttribute("status"),[]),{editPost:t}=(0,H6.useDispatch)(I),r=()=>{t({status:e==="pending"?"draft":"pending"})};return(0,NY.jsx)(z6,{children:(0,NY.jsx)(hCe.CheckboxControl,{label:(0,mCe.__)("Pending review"),checked:e==="pending",onChange:r})})}var gCe=Lnt;var vCe=a(U(),1),Vp=a(G(),1),Ay=a(z(),1),U6=a(Y(),1),bCe=a(Bn(),1),yCe=a(ne(),1);var Na=a(E(),1);function Bnt(){let e=(0,vCe.renderToString)((0,Na.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,Na.jsxs)(Vp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,Na.jsx)(Vp.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,Na.jsx)(Vp.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,Na.jsx)("p",{children:(0,Ay.__)("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,bCe.applyFilters)("editor.PostPreview.interstitialMarkup",e),e}function Vnt(e,t){e.write(t),e.title=(0,Ay.__)("Generating preview\u2026"),e.close()}async function jnt(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 znt(e){let t=await jnt(e);t&&Vnt(t,Bnt())}function wCe({forceIsAutosaveable:e,onPreview:t}){let{postId:r,currentPostLink:o,previewLink:n,isSaveable:i,isViewable:s}=(0,U6.useSelect)(f=>{let m=f(I),v=f(yCe.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,U6.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 znt(m);let h=await l({forceIsAutosaveable:e});m.location=h,t?.()}}}function _Ce({forceIsAutosaveable:e,onPreview:t}){let r=wCe({forceIsAutosaveable:e,onPreview:t});return r?(0,Na.jsx)(Vp.MenuItem,{icon:fs,...r,children:(0,Ay.__)("Preview in new tab")}):null}function SS({className:e,textContent:t,forceIsAutosaveable:r,role:o,onPreview:n}){let i=wCe({forceIsAutosaveable:r,onPreview:n});return i?(0,Na.jsx)(Vp.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",role:o,size:"compact",accessibleWhenDisabled:!0,...i,children:t||(0,Na.jsxs)(Na.Fragment,{children:[(0,Ay._x)("Preview","imperative verb"),(0,Na.jsx)(Jt,{render:(0,Na.jsx)("span",{}),children:(0,Ay.__)("(opens in a new tab)")})]})}):null}var TCe=a(G(),1),G6=a(Y(),1);var Sg=a(z(),1),SCe=a(Y(),1),xCe=a(ke(),1);function W6(){let e=(0,xCe.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:r,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:s,hasNonPostEntityChanges:l,postStatusHasChanged:c,postStatus:u,isPostSavingLocked:d}=(0,SCe.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,Sg.__)("Publishing\u2026"):(t||r)&&o&&!s?(0,Sg.__)("Saving\u2026"):i?l&&!d||t||c&&!["future","publish"].includes(u)||!c&&u==="future"?(0,Sg.__)("Save"):r?(0,Sg.__)("Schedule"):(0,Sg.__)("Publish"):e?(0,Sg.__)("Publish"):(0,Sg.__)("Submit for Review")}var MY=a(E(),1),CCe=()=>{};function Hnt({forceIsDirty:e,isOpen:t,isToggle:r,onSubmit:o=CCe,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,G6.useSelect)(B=>{let L=B(I);return{isSaving:L.isSavingPost(),isAutoSaving:L.isAutosavingPost(),isBeingScheduled:L.isEditedPostBeingScheduled(),visibility:L.getEditedPostVisibility(),isSaveable:L.isEditedPostSaveable(),isPostSavingLocked:L.isPostSavingLocked(),isPublishable:L.isEditedPostPublishable(),isPublished:L.isCurrentPostPublished(),hasPublishAction:!!L.getCurrentPost()?._links?.["wp:action-publish"],postType:L.getCurrentPostType(),postId:L.getCurrentPostId(),postStatus:L.getEditedPostAttribute("status"),postStatusHasChanged:L.getPostEdits()?.status,hasNonPostEntityChanges:L.hasNonPostEntityChanges(),isSavingNonPostEntityChanges:L.isSavingNonPostEntityChanges()}},[]),{editPost:x,savePost:C}=(0,G6.useDispatch)(I),A=B=>{x({status:B},{undoIgnore:!0}),C()},k=B=>(...L)=>{if(v&&i){let O=V=>{V&&V.some(W=>W.kind==="postType"&&W.name===w&&W.key===S)&&B(...L)};return i(()=>O),CCe}return B(...L)},R=c||b||(m||!f||!u&&!e)&&!v,N=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))},M=()=>{N||n()},j={"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":N,"aria-expanded":t,className:"editor-post-publish-panel__toggle",isBusy:m&&d,variant:"primary",size:"compact",onClick:k(M),"aria-haspopup":v?"dialog":void 0},D=r?F:j;return(0,MY.jsx)(TCe.Button,{...D,className:`${D.className} editor-post-publish-button__button`,size:"compact",children:(0,MY.jsx)(W6,{})})}var xS=Hnt;var lF=a(z(),1),IS=a(U(),1),jy=a(G(),1),cF=a(Y(),1),Eg=a(ke(),1);var wTe=a(ne(),1);var uu=a(z(),1),iP=a(G(),1),lTe=a(Y(),1);var cTe=a(ho(),1),uTe=a(ne(),1),dTe=a(Lt(),1);var CS=a(z(),1),ECe=a(U(),1),TS=a(G(),1),PCe=a(ke(),1),q6=a(Y(),1),kCe=a(be(),1);var Iy=a(z(),1),Y6=[{label:(0,Iy.__)("Public"),value:"public",description:(0,Iy.__)("Visible to everyone.")},{label:(0,Iy.__)("Private"),value:"private",description:(0,Iy.__)("Only visible to site admins and editors.")},{label:(0,Iy.__)("Password protected"),value:"password",description:(0,Iy.__)("Only visible to those who know the password.")}];var Oy=a(E(),1);function eP({onClose:e}){let t=(0,PCe.useInstanceId)(eP),{status:r,visibility:o,password:n}=(0,q6.useSelect)(d=>({status:d(I).getEditedPostAttribute("status"),visibility:d(I).getEditedPostVisibility(),password:d(I).getEditedPostAttribute("password")})),{editPost:i}=(0,q6.useDispatch)(I),[s,l]=(0,ECe.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,Oy.jsxs)("div",{className:"editor-post-visibility",children:[(0,Oy.jsx)(kCe.__experimentalInspectorPopoverHeader,{title:(0,CS.__)("Visibility"),help:(0,CS.__)("Control how this post is viewed."),onClose:e}),(0,Oy.jsxs)(TS.__experimentalVStack,{spacing:4,children:[(0,Oy.jsx)(TS.RadioControl,{label:(0,CS.__)("Visibility"),hideLabelFromVision:!0,options:Y6,selected:s?"password":o,onChange:c}),s&&(0,Oy.jsx)(TS.TextControl,{label:(0,CS.__)("Password"),onChange:u,value:n,placeholder:(0,CS.__)("Use a secure password"),type:"text",id:`editor-post-visibility__password-input-${t}`,maxLength:255})]})]})}var RCe=a(Y(),1);function K6(){return FY()}function FY(){let e=(0,RCe.useSelect)(t=>t(I).getEditedPostVisibility(),[]);return Y6.find(t=>t.value===e)?.label}var ACe=a(an(),1),ICe=a(z(),1),tP=a(Y(),1),OCe=a(be(),1),Z6=a(U(),1),NCe=a(ne(),1);var DY=a(E(),1),{PrivatePublishDateTimePicker:Unt}=K(OCe.privateApis);function ES(e){return(0,DY.jsx)(LY,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function LY({onClose:e,showPopoverHeaderActions:t,isCompact:r}){let{postDate:o,postType:n}=(0,tP.useSelect)(h=>({postDate:h(I).getEditedPostAttribute("date"),postType:h(I).getCurrentPostType()}),[]),{editPost:i}=(0,tP.useDispatch)(I),s=h=>i({date:h}),[l,c]=(0,Z6.useState)(mT(new Date(o))),u=(0,tP.useSelect)(h=>h(NCe.store).getEntityRecords("postType",n,{status:"publish,future",after:mT(l).toISOString(),before:vue(l).toISOString(),exclude:[h(I).getCurrentPostId()],per_page:100,_fields:"id,date"}),[l,n]),d=(0,Z6.useMemo)(()=>(u||[]).map(({date:h})=>({date:new Date(h)})),[u]),f=(0,ACe.getSettings)(),m=/a(?!\\)/i.test(f.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,DY.jsx)(Unt,{currentDate:o,onChange:s,is12Hour:m,dateOrder:(0,ICe._x)("dmy","date order"),events:d,onMonthPreviewed:h=>c(Due(h)),onClose:e,isCompact:r,showPopoverHeaderActions:t})}var Ks=a(z(),1),oc=a(an(),1),FCe=a(Y(),1);function PS(e){return kS(e)}function kS({full:e=!1}={}){let{date:t,isFloating:r}=(0,FCe.useSelect)(o=>({date:o(I).getEditedPostAttribute("date"),isFloating:o(I).isEditedPostDateFloating()}),[]);return e?DCe(t):Wnt(t,{isFloating:r})}function DCe(e){let t=(0,oc.getDate)(e),r=Gnt(),o=(0,oc.dateI18n)((0,Ks._x)("F j, Y g:i\xA0a","post schedule full date format"),t);return(0,Ks.isRTL)()?`${r} ${o}`:`${o} ${r}`}function Wnt(e,{isFloating:t=!1,now:r=new Date}={}){if(!e||t)return(0,Ks.__)("Immediately");if(!Ynt(r))return DCe(e);let o=(0,oc.getDate)(e);if(MCe(o,r))return(0,Ks.sprintf)((0,Ks.__)("Today at %s"),(0,oc.dateI18n)((0,Ks._x)("g:i\xA0a","post schedule time format"),o));let n=new Date(r);return n.setDate(n.getDate()+1),MCe(o,n)?(0,Ks.sprintf)((0,Ks.__)("Tomorrow at %s"),(0,oc.dateI18n)((0,Ks._x)("g:i\xA0a","post schedule time format"),o)):o.getFullYear()===r.getFullYear()?(0,oc.dateI18n)((0,Ks._x)("F j g:i\xA0a","post schedule date format without year"),o):(0,oc.dateI18n)((0,Ks._x)("F j, Y g:i\xA0a","post schedule full date format"),o)}function Gnt(){let{timezone:e}=(0,oc.getSettings)();return e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${e.offset<0?"":"+"}${e.offsetFormatted}`}function Ynt(e){let{timezone:t}=(0,oc.getSettings)(),r=Number(t.offset),o=-1*(e.getTimezoneOffset()/60);return r===o}function MCe(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}var Dy=a(z(),1),YCe=a(U(),1),zY=a(Y(),1),qCe=a(G(),1),eF=a(ne(),1);var Ci=a(z(),1),Fy=a(U(),1),J6=a(G(),1);var My=a(Y(),1),Q6=a(ne(),1),zCe=a(ke(),1),HCe=a(Pl(),1),UCe=a(It(),1);var X6=a(G(),1),LCe=a(Y(),1),BCe=a(ne(),1);var Ny=a(E(),1),qnt=3,Knt={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function VCe({onSelect:e,taxonomy:t}){let{_terms:r,showTerms:o}=(0,LCe.useSelect)(i=>{let s=i(BCe.store).getEntityRecords("taxonomy",t.slug,Knt);return{_terms:s,showTerms:s?.length>=qnt}},[t.slug]);if(!o)return null;let n=ZSe(r);return(0,Ny.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,Ny.jsx)(X6.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,Ny.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:n.map(i=>(0,Ny.jsx)("li",{children:(0,Ny.jsx)(X6.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(i),children:i.name})},i.id))})]})}var rP=a(E(),1),BY=[],WCe=100,jCe={per_page:WCe,_fields:"id,name",context:"view"},GCe=(e,t)=>iS(e).toLowerCase()===iS(t).toLowerCase(),VY=(e,t)=>e.map(r=>t.find(o=>GCe(o.name,r))?.id).filter(r=>r!==void 0);function jY({slug:e}){let[t,r]=(0,Fy.useState)([]),[o,n]=(0,Fy.useState)(""),i=(0,zCe.useDebounce)(n,500),{terms:s,termIds:l,taxonomy:c,hasAssignAction:u,hasCreateAction:d,hasResolvedTerms:f}=(0,My.useSelect)(N=>{let{getCurrentPost:P,getEditedPostAttribute:T}=N(I),{getEntityRecords:M,getEntityRecord:j,hasFinishedResolution:F}=N(Q6.store),D=P(),B=j("root","taxonomy",e),L=B?T(B.rest_base):BY,O={...jCe,include:L?.join(","),per_page:-1};return{hasCreateAction:B?D._links?.["wp:action-create-"+B.rest_base]??!1:!1,hasAssignAction:B?D._links?.["wp:action-assign-"+B.rest_base]??!1:!1,taxonomy:B,termIds:L,terms:L?.length?M("taxonomy",e,O):BY,hasResolvedTerms:F("getEntityRecords",["taxonomy",e,O])}},[e]),{searchResults:m}=(0,My.useSelect)(N=>{let{getEntityRecords:P}=N(Q6.store);return{searchResults:o?P("taxonomy",e,{...jCe,search:o}):BY}},[o,e]);(0,Fy.useEffect)(()=>{if(f){let N=(s??[]).map(P=>iS(P.name));r(N)}},[s,f]);let h=(0,Fy.useMemo)(()=>(m??[]).map(N=>iS(N.name)),[m]),{editPost:g}=(0,My.useDispatch)(I),{saveEntityRecord:v}=(0,My.useDispatch)(Q6.store),{createErrorNotice:b}=(0,My.useDispatch)(UCe.store);if(!u)return null;async function _(N){try{let P=await v("taxonomy",e,N,{throwOnError:!0});return oY(P)}catch(P){if(P.code!=="term_exists")throw P;return{id:P.data.term_id,name:N.name}}}function y(N){g({[c.rest_base]:N})}function w(N){let P=[...s??[],...m??[]],T=N.reduce((j,F)=>(j.some(D=>D.toLowerCase()===F.toLowerCase())||j.push(F),j),[]),M=T.filter(j=>!P.find(F=>GCe(F.name,j)));if(r(T),M.length===0){y(VY(T,P));return}d&&Promise.all(M.map(j=>_({name:j}))).then(j=>{let F=P.concat(j);y(VY(T,F))}).catch(j=>{b(j.message,{type:"snackbar"}),y(VY(T,P))})}function S(N){if(l.includes(N.id))return;let P=[...l,N.id],T=e==="post_tag"?(0,Ci.__)("Tag"):(0,Ci.__)("Term"),M=(0,Ci.sprintf)((0,Ci._x)("%s added","term"),c?.labels?.singular_name??T);(0,HCe.speak)(M,"assertive"),y(P)}let x=c?.labels?.add_new_item??(e==="post_tag"?(0,Ci.__)("Add Tag"):(0,Ci.__)("Add Term")),C=c?.labels?.singular_name??(e==="post_tag"?(0,Ci.__)("Tag"):(0,Ci.__)("Term")),A=(0,Ci.sprintf)((0,Ci._x)("%s added","term"),C),k=(0,Ci.sprintf)((0,Ci._x)("%s removed","term"),C),R=(0,Ci.sprintf)((0,Ci._x)("Remove %s","term"),C);return(0,rP.jsxs)(oe,{direction:"column",gap:"lg",children:[(0,rP.jsx)(J6.FormTokenField,{value:t,suggestions:h,onChange:w,onInputChange:i,maxSuggestions:WCe,label:x,messages:{added:A,removed:k,remove:R}}),(0,rP.jsx)(VCe,{taxonomy:c,onSelect:S})]})}var $6=(0,J6.withFilters)("editor.PostTaxonomyType")(jY);var Ly=a(E(),1),Znt=()=>{let e=(0,zY.useSelect)(n=>n(eF.store).getTaxonomy("post_tag")?.labels,[]),t=e?.add_new_item??(0,Dy.__)("Add tag"),r=e?.name??(0,Dy.__)("Tags"),o=[(0,Dy.__)("Suggestion:"),(0,Ly.jsx)("span",{className:"editor-post-publish-panel__link",children:t},"label")];return(0,Ly.jsxs)(qCe.PanelBody,{initialOpen:!1,title:o,children:[(0,Ly.jsx)("p",{children:(0,Dy.sprintf)((0,Dy.__)("%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."),r)}),(0,Ly.jsx)($6,{slug:"post_tag"})]})},Xnt=()=>{let{postHasTags:e,siteHasTags:t,isPostTypeSupported:r}=(0,zY.useSelect)(n=>{let i=n(I).getCurrentPostType(),s=n(eF.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(eF.store).getEntityRecords("taxonomy","post_tag",{per_page:1})?.length:!1;return{postHasTags:!!u?.length,siteHasTags:d,isPostTypeSupported:c&&l}},[]),[o]=(0,YCe.useState)(e);return!r||!t||o?null:(0,Ly.jsx)(Znt,{})},KCe=Xnt;var tF=a(G(),1),rF=a(Y(),1),By=a(z(),1),ZCe=a(ne(),1);var xg=a(E(),1),Qnt=(e,t)=>ZE.filter(o=>e?.includes(o.id)).find(o=>o.id===t),Jnt=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:r})=>(0,xg.jsx)(tF.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(e),children:t});function XCe(){let{currentPostFormat:e,suggestion:t}=(0,rF.useSelect)(i=>{let{getEditedPostAttribute:s,getSuggestedPostFormat:l}=i(I),c=i(ZCe.store).getThemeSupports().formats??[];return{currentPostFormat:s("format"),suggestion:Qnt(c,l())}},[]),{editPost:r}=(0,rF.useDispatch)(I),o=i=>r({format:i}),n=[(0,By.__)("Suggestion:"),(0,xg.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,By.__)("Use a post format")},"label")];return!t||t.id===e?null:(0,xg.jsxs)(tF.PanelBody,{initialOpen:!1,title:n,children:[(0,xg.jsx)("p",{children:(0,By.__)("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,xg.jsx)("p",{children:(0,xg.jsx)(Jnt,{onUpdatePostFormat:o,suggestedPostFormat:t.id,suggestionText:(0,By.sprintf)((0,By.__)('Apply the "%1$s" format.'),t.caption)})})]})}var nF=a(z(),1),oTe=a(Y(),1),nTe=a(G(),1),WY=a(ne(),1),iF=a(U(),1);var ai=a(z(),1),jp=a(U(),1),eTe=a(It(),1),fo=a(G(),1),RS=a(Y(),1),tTe=a(ke(),1),oP=a(ne(),1),HY=a(Pl(),1),rTe=a(Lt(),1);var si=a(E(),1),{normalizeTextString:QCe}=K(fo.privateApis),{RECEIVE_INTERMEDIATE_RESULTS:$nt}=K(oP.privateApis),JCe={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view",[$nt]:!0},eit=8,$Ce=[];function tit(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 rit(e,t,r){return e.find(o=>(!o.parent&&!t||parseInt(o.parent)===parseInt(t))&&o.name.toLowerCase()===r.toLowerCase())}function oit(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)),QCe(o.name).indexOf(QCe(e))!==-1||o.children.length>0?o:!1};return t}function UY({slug:e}){let[t,r]=(0,jp.useState)(!1),[o,n]=(0,jp.useState)(""),[i,s]=(0,jp.useState)(""),[l,c]=(0,jp.useState)(!1),[u,d]=(0,jp.useState)(""),[f,m]=(0,jp.useState)([]),h=(0,tTe.useDebounce)(HY.speak,500),{hasCreateAction:g,hasAssignAction:v,terms:b,loading:_,availableTerms:y,taxonomy:w}=(0,RS.useSelect)(te=>{let{getCurrentPost:de,getEditedPostAttribute:me}=te(I),{getEntityRecord:ee,getEntityRecords:$,isResolving:ue}=te(oP.store),ve=ee("root","taxonomy",e),Ee=de();return{hasCreateAction:ve?!!Ee._links?.["wp:action-create-"+ve.rest_base]:!1,hasAssignAction:ve?!!Ee._links?.["wp:action-assign-"+ve.rest_base]:!1,terms:ve?me(ve.rest_base):$Ce,loading:ue("getEntityRecords",["taxonomy",e,JCe]),availableTerms:$("taxonomy",e,JCe)||$Ce,taxonomy:ve}},[e]),{editPost:S}=(0,RS.useDispatch)(I),{saveEntityRecord:x}=(0,RS.useDispatch)(oP.store),C=(0,jp.useMemo)(()=>tit(G3(y),b),[y]),{createErrorNotice:A}=(0,RS.useDispatch)(eTe.store);if(!v)return null;let k=te=>x("taxonomy",e,te,{throwOnError:!0}),R=te=>{S({[w.rest_base]:te})},N=te=>{let me=b.includes(te)?b.filter(ee=>ee!==te):[...b,te];R(me)},P=te=>{n(te)},T=te=>{s(te)},M=()=>{c(!l)},j=async te=>{if(te.preventDefault(),o===""||t)return;let de=rit(y,i,o);if(de){b.some(ue=>ue===de.id)||R([...b,de.id]),n(""),s("");return}r(!0);let me;try{me=await k({name:o,parent:i||void 0})}catch(ue){A(ue.message,{type:"snackbar"});return}let ee=e==="category"?(0,ai.__)("Category"):(0,ai.__)("Term"),$=(0,ai.sprintf)((0,ai._x)("%s added","term"),w?.labels?.singular_name??ee);(0,HY.speak)($,"assertive"),r(!1),n(""),s(""),R([...b,me.id])},F=te=>{let de=C.map(oit(te)).filter(ue=>ue),me=ue=>{let ve=0;for(let Ee=0;Ee<ue.length;Ee++)ve++,ue[Ee].children!==void 0&&(ve+=me(ue[Ee].children));return ve};d(te),m(de);let ee=me(de),$=(0,ai.sprintf)((0,ai._n)("%d result found.","%d results found.",ee),ee);h($,"assertive")},D=te=>te.map(de=>(0,si.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,si.jsx)(fo.CheckboxControl,{checked:b.indexOf(de.id)!==-1,onChange:()=>{let me=parseInt(de.id,10);N(me)},label:(0,rTe.decodeEntities)(de.name)}),!!de.children.length&&(0,si.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:D(de.children)})]},de.id)),B=(te,de,me)=>w?.labels?.[te]??(e==="category"?de:me),L=B("add_new_item",(0,ai.__)("Add Category"),(0,ai.__)("Add Term")),O=B("new_item_name",(0,ai.__)("Add Category"),(0,ai.__)("Add Term")),V=B("parent_item",(0,ai.__)("Parent Category"),(0,ai.__)("Parent Term")),W=`\u2014 ${V} \u2014`,q=L,Z=w?.labels?.search_items??(0,ai.__)("Search Terms"),Q=w?.name??(0,ai.__)("Terms"),ce=y.length>=eit;return(0,si.jsxs)(fo.Flex,{direction:"column",gap:"4",children:[ce&&!_&&(0,si.jsx)(fo.SearchControl,{label:Z,placeholder:Z,value:u,onChange:F}),_&&(0,si.jsx)(fo.Flex,{justify:"center",style:{height:"40px"},children:(0,si.jsx)(fo.Spinner,{})}),(0,si.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":Q,children:D(u!==""?f:C)}),!_&&g&&(0,si.jsx)(fo.FlexItem,{children:(0,si.jsx)(fo.Button,{__next40pxDefaultSize:!0,onClick:M,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":l,variant:"link",children:L})}),l&&(0,si.jsx)("form",{onSubmit:j,children:(0,si.jsxs)(fo.Flex,{direction:"column",gap:"4",children:[(0,si.jsx)(fo.TextControl,{className:"editor-post-taxonomies__hierarchical-terms-input",label:O,value:o,onChange:P,required:!0}),!!y.length&&(0,si.jsx)(fo.TreeSelect,{label:V,noOptionLabel:W,onChange:T,selectedId:i,tree:C}),(0,si.jsx)(fo.FlexItem,{children:(0,si.jsx)(fo.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:q})})]})})]})}var oF=(0,fo.withFilters)("editor.PostTaxonomyType")(UY);var AS=a(E(),1);function nit(){let{hasNoCategory:e,hasSiteCategories:t}=(0,oTe.useSelect)(i=>{let s=i(I).getCurrentPostType(),{canUser:l,getEntityRecord:c}=i(WY.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(WY.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,iF.useState)(!1);if((0,iF.useEffect)(()=>{e&&o(!0)},[e]),!r||!t)return null;let n=[(0,nF.__)("Suggestion:"),(0,AS.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,nF.__)("Assign a category")},"label")];return(0,AS.jsxs)(nTe.PanelBody,{initialOpen:!1,title:n,children:[(0,AS.jsx)("p",{children:(0,nF.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,AS.jsx)(oF,{slug:"category"})]})}var iTe=nit;var Wd=a(G(),1),nP=a(Y(),1),Cg=a(z(),1),Vy=a(be(),1),sF=a(U(),1);var nc=a(E(),1),{mediaSideloadFromUrlKey:iit}=K(Vy.privateApis);function sTe(e){let t=[];return e.forEach(r=>{t.push(r),t.push(...sTe(r.innerBlocks))}),t}function sit(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 GY(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 ait({clientId:e,alt:t,url:r}){let{selectBlock:o}=(0,nP.useDispatch)(Vy.store);return(0,nc.jsx)(Wd.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,Cg.__)("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 aTe(){let[e,t]=(0,sF.useState)(!1),[r,o]=(0,sF.useState)(!1),[n,i]=(0,sF.useState)(!1),{editorBlocks:s,mediaSideloadFromUrl:l}=(0,nP.useSelect)(h=>({editorBlocks:h(Vy.store).getBlocks(),mediaSideloadFromUrl:h(Vy.store).getSettings()[iit]}),[]),c=sTe(s).filter(h=>sit(h)),{updateBlockAttributes:u}=(0,nP.useDispatch)(Vy.store);if(!l||!c.length)return null;let d=[(0,Cg.__)("Suggestion:"),(0,nc.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Cg.__)("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}=GY(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}=GY(v);return g[b].then(_=>f(v,_)).then(()=>o(!0)).catch(()=>i(!0))})).finally(()=>{t(!1)})}return(0,nc.jsxs)(Wd.PanelBody,{initialOpen:!0,title:d,children:[(0,nc.jsx)("p",{children:(0,Cg.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,nc.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,nc.jsx)(Wd.__unstableAnimatePresence,{onExitComplete:()=>o(!1),children:c.map(h=>{let{url:g,alt:v}=GY(h);return(0,nc.jsx)(ait,{clientId:h.clientId,url:g,alt:v},h.clientId)})}),e||r?(0,nc.jsx)(Wd.Spinner,{}):(0,nc.jsx)(Wd.Button,{size:"compact",variant:"primary",onClick:m,children:(0,Cg._x)("Upload","verb")})]}),n&&(0,nc.jsx)("p",{children:(0,Cg.__)("Upload failed, try again.")})]})}var Ir=a(E(),1);function lit({children:e}){let{isBeingScheduled:t,isRequestingSiteIcon:r,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:s}=(0,lTe.useSelect)(d=>{let{getCurrentPost:f,isEditedPostBeingScheduled:m}=d(I),{getEntityRecord:h,isResolving:g}=d(uTe.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,cTe.filterURLForDisplay)(v.home)}},[]),l=(0,Ir.jsx)(iP.Icon,{className:"components-site-icon",size:"36px",icon:KV});n&&(l=(0,Ir.jsx)("img",{alt:(0,uu.__)("Site Icon"),className:"components-site-icon",src:n})),r&&(l=null);let c,u;return o?t?(c=(0,uu.__)("Are you ready to schedule?"),u=(0,uu.__)("Your work will be published at the specified date and time.")):(c=(0,uu.__)("Are you ready to publish?"),u=(0,uu.__)("Double-check your settings before publishing.")):(c=(0,uu.__)("Are you ready to submit for review?"),u=(0,uu.__)("Your work will be reviewed and then approved.")),(0,Ir.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,Ir.jsx)("div",{children:(0,Ir.jsx)("strong",{children:c})}),(0,Ir.jsx)("p",{children:u}),(0,Ir.jsxs)("div",{className:"components-site-card",children:[l,(0,Ir.jsxs)("div",{className:"components-site-info",children:[(0,Ir.jsx)("span",{className:"components-site-name",children:(0,dTe.decodeEntities)(i)||(0,uu.__)("(Untitled)")}),(0,Ir.jsx)("span",{className:"components-site-home",children:s})]})]}),(0,Ir.jsx)(aTe,{}),o&&(0,Ir.jsxs)(Ir.Fragment,{children:[(0,Ir.jsx)(iP.PanelBody,{initialOpen:!1,title:[(0,uu.__)("Visibility:"),(0,Ir.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Ir.jsx)(K6,{})},"label")],children:(0,Ir.jsx)(eP,{})}),(0,Ir.jsx)(iP.PanelBody,{initialOpen:!1,title:[(0,uu.__)("Publish:"),(0,Ir.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Ir.jsx)(PS,{})},"label")],children:(0,Ir.jsx)(ES,{})})]}),(0,Ir.jsx)(XCe,{}),(0,Ir.jsx)(KCe,{}),(0,Ir.jsx)(iTe,{}),e]})}var fTe=lit;var fu=a(G(),1),du=a(z(),1),Tg=a(U(),1),hTe=a(Y(),1),aF=a(ho(),1),gTe=a(Lt(),1),vTe=a(ke(),1),bTe=a(ne(),1);var Yo=a(E(),1),pTe="%postname%",mTe="%pagename%",cit=e=>{let{slug:t}=e;return e.permalink_template.includes(pTe)?e.permalink_template.replace(pTe,t):e.permalink_template.includes(mTe)?e.permalink_template.replace(mTe,t):e.permalink_template};function uit({text:e}){let[t,r]=(0,Tg.useState)(!1),o=(0,Tg.useRef)(),n=(0,vTe.useCopyToClipboard)(e,()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(!1)},4e3)});return(0,Tg.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,Yo.jsx)(fu.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:n,children:t?(0,du.__)("Copied!"):(0,du.__)("Copy")})}function yTe({focusOnMount:e,children:t}){let{post:r,postType:o,isScheduled:n}=(0,hTe.useSelect)(m=>{let{getEditedPostAttribute:h,getCurrentPost:g,isCurrentPostScheduled:v}=m(I),{getPostType:b}=m(bTe.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"?cit(r):r.link,u=(0,aF.addQueryArgs)("post-new.php",{post_type:r.type}),d=(0,Tg.useCallback)(m=>{e&&m&&m.focus()},[e]),f=n?(0,Yo.jsxs)(Yo.Fragment,{children:[(0,du.__)("is now scheduled. It will go live on")," ",(0,Yo.jsx)(PS,{}),"."]}):(0,du.__)("is now live.");return(0,Yo.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,Yo.jsxs)(fu.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,Yo.jsx)(fu.ExternalLink,{ref:d,href:c,children:(0,gTe.decodeEntities)(r.title)||(0,du.__)("(no title)")})," ",f]}),(0,Yo.jsxs)(fu.PanelBody,{children:[(0,Yo.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,Yo.jsx)("strong",{children:(0,du.__)("What\u2019s next?")})}),(0,Yo.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,Yo.jsx)(fu.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,du.sprintf)((0,du.__)("%s address"),i),value:(0,aF.safeDecodeURIComponent)(c),onFocus:m=>m.target.select()}),(0,Yo.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,Yo.jsx)(uit,{text:c})})]}),(0,Yo.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!n&&(0,Yo.jsxs)(fu.Button,{variant:"primary",href:c,__next40pxDefaultSize:!0,icon:fs,iconPosition:"right",target:"_blank",children:[s,(0,Yo.jsx)(Jt,{render:(0,Yo.jsx)("span",{}),children:(0,du.__)("(opens in a new tab)")})]}),(0,Yo.jsx)(fu.Button,{variant:n?"primary":"secondary",__next40pxDefaultSize:!0,href:u,children:l})]})]}),t]})}var wn=a(E(),1);function uF({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,cF.useSelect)(N=>{let{getPostType:P}=N(wTe.store),{getCurrentPost:T,getCurrentPostId:M,getEditedPostAttribute:j,isCurrentPostPublished:F,isCurrentPostScheduled:D,isEditedPostBeingScheduled:B,isEditedPostDirty:L,isAutosavingPost:O,isSavingPost:V,isSavingNonPostEntityChanges:W,isPublishSidebarEnabled:q}=N(I),Z=P(j("type"));return{hasPublishAction:T()._links?.["wp:action-publish"]??!1,isPostTypeViewable:Z?.viewable,isBeingScheduled:B(),isDirty:L(),isPublished:F(),isPublishSidebarEnabled:q(),isSaving:V()&&!O(),isSavingNonPostEntityChanges:W(),isScheduled:D(),currentPostId:M()}},[]),{disablePublishSidebar:v,enablePublishSidebar:b}=(0,cF.useDispatch)(I),_=(0,IS.useRef)(null),y=(0,Eg.useMergeRefs)([(0,Eg.useFocusReturn)(),(0,Eg.useConstrainedTabbing)()]);(0,IS.useEffect)(()=>{_.current?.focus()},[]);let w=(0,IS.useRef)(g),S=(0,Eg.useEvent)(t);(0,IS.useEffect)(()=>{let N=g!==w.current;w.current=g,(N||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,wn.jsxs)("div",{ref:y,tabIndex:-1,className:"editor-post-publish-panel",...n,children:[(0,wn.jsx)("div",{className:"editor-post-publish-panel__header",children:R?(0,wn.jsx)(jy.Button,{size:"compact",onClick:t,icon:Ii,label:(0,lF.__)("Close panel")}):(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,wn.jsx)(jy.Button,{ref:_,accessibleWhenDisabled:!0,disabled:m,onClick:t,variant:"secondary",size:"compact",children:(0,lF.__)("Cancel")})}),(0,wn.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,wn.jsx)(xS,{onSubmit:C,forceIsDirty:e})})]})}),(0,wn.jsxs)("div",{className:"editor-post-publish-panel__content",children:[k&&(0,wn.jsx)(fTe,{children:o&&(0,wn.jsx)(o,{})}),R&&(0,wn.jsx)(yTe,{focusOnMount:!0,children:r&&(0,wn.jsx)(r,{})}),f&&(0,wn.jsx)(jy.Spinner,{})]}),(0,wn.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,wn.jsx)(jy.CheckboxControl,{label:(0,lF.__)("Always show pre-publish checks."),checked:d,onChange:x})})]})}var gF=a(G(),1),vF=a(ke(),1),bF=a(Y(),1),yF=a(U(),1),zy=a(z(),1);var ETe=a(Oo(),1),PTe=a(Dt(),1);var gl=a(G(),1),Sr=a(z(),1),hF=a(Y(),1),sP=a(U(),1),xTe=a(ne(),1),CTe=a(be(),1),TTe=a(ke(),1);var YY=a(z(),1),STe=a(G(),1),fF=a(Y(),1);var _Te=a(Y(),1);function dF({children:e}){let{hasStickyAction:t,postType:r}=(0,_Te.useSelect)(o=>({hasStickyAction:o(I).getCurrentPost()._links?.["wp:action-sticky"]??!1,postType:o(I).getCurrentPostType()}),[]);return r!=="post"||!t?null:e}var qY=a(E(),1);function pF(){let e=(0,fF.useSelect)(r=>r(I).getEditedPostAttribute("sticky")??!1,[]),{editPost:t}=(0,fF.useDispatch)(I);return(0,qY.jsx)(dF,{children:(0,qY.jsx)(STe.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,YY.__)("Sticky"),help:(0,YY.__)("Pin this post to the top of the blog."),checked:e,onChange:()=>t({sticky:!e})})})}var _n=a(E(),1),mF={"auto-draft":{label:(0,Sr.__)("Draft"),icon:e0},draft:{label:(0,Sr.__)("Draft"),icon:e0},pending:{label:(0,Sr.__)("Pending"),icon:r1},private:{label:(0,Sr.__)("Private"),icon:Jx},future:{label:(0,Sr.__)("Scheduled"),icon:lm},publish:{label:(0,Sr.__)("Published"),icon:tv}},KY=[{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 ZY(){let{status:e,date:t,password:r,postId:o,postType:n,canEdit:i}=(0,hF.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,TTe.useInstanceId)(ZY,"editor-change-status__password-input"),{editEntityRecord:u}=(0,hF.useDispatch)(xTe.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(sm.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,_n.jsx)(dr,{label:(0,Sr.__)("Status"),ref:f,children:i?(0,_n.jsx)(gl.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:m,focusOnMount:!0,renderToggle:({onToggle:b,isOpen:_})=>(0,_n.jsx)(gl.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:b,icon:mF[e]?.icon,"aria-label":(0,Sr.sprintf)((0,Sr.__)("Change status: %s"),mF[e]?.label),"aria-expanded":_,children:mF[e]?.label}),renderContent:({onClose:b})=>(0,_n.jsxs)(_n.Fragment,{children:[(0,_n.jsx)(CTe.__experimentalInspectorPopoverHeader,{title:(0,Sr.__)("Status & visibility"),onClose:b}),(0,_n.jsx)("form",{onSubmit:_=>{_.preventDefault(),b()},children:(0,_n.jsxs)(gl.__experimentalVStack,{spacing:4,children:[(0,_n.jsx)(gl.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,Sr.__)("Status"),options:KY,onChange:v,selected:e==="auto-draft"?"draft":e}),e==="future"&&(0,_n.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,_n.jsx)(LY,{showPopoverHeaderActions:!1,isCompact:!0})}),e!=="private"&&(0,_n.jsxs)(gl.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,_n.jsx)(gl.CheckboxControl,{label:(0,Sr.__)("Password protected"),help:(0,Sr.__)("Only visible to those who know the password."),checked:s,onChange:g}),s&&(0,_n.jsx)("div",{className:"editor-change-status__password-input",children:(0,_n.jsx)(gl.TextControl,{label:(0,Sr.__)("Password"),onChange:_=>h({password:_}),value:r,placeholder:(0,Sr.__)("Use a secure password"),type:"text",id:c,maxLength:255})})]}),(0,_n.jsx)(pF,{})]})})]})}):(0,_n.jsx)("div",{className:"editor-post-status is-read-only",children:mF[e]?.label})})}var wF=a(E(),1);function _F({forceIsDirty:e}){let[t,r]=(0,yF.useState)(!1),o=(0,vF.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,bF.useSelect)(T=>{let M=T(I),{get:j}=T(PTe.store);return{isAutosaving:M.isAutosavingPost(),isDirty:e||M.isEditedPostDirty(),isNew:M.isEditedPostNew(),isPublished:M.isCurrentPostPublished(),isSaving:M.isSavingPost(),isSaveable:M.isEditedPostSaveable(),isSavingLocked:M.isPostSavingLocked(),isSavingNonPostEntityChanges:M.isSavingNonPostEntityChanges(),isScheduled:M.isCurrentPostScheduled(),hasPublishAction:!!M.getCurrentPost()?._links?.["wp:action-publish"],showIconLabels:j("core","showIconLabels"),postStatus:M.getEditedPostAttribute("status"),postStatusHasChanged:!!M.getPostEdits()?.status,postType:M.getCurrentPostType()}},[e]),y=v==="pending",{savePost:w}=(0,bF.useDispatch)(I),S=(0,vF.usePrevious)(u);if((0,yF.useEffect)(()=>{let T;return S&&!u&&(r(!0),T=setTimeout(()=>{r(!1)},1e3)),()=>clearTimeout(T)},[u]),_===Sl||!h&&y)return null;let x=!["pending","draft","auto-draft"].includes(v)&&KY.map(({value:T})=>T).includes(v);if(l||m||x||b&&["pending","draft"].includes(v))return null;let C=y?(0,zy.__)("Save as pending"):(0,zy.__)("Save draft"),A=(0,zy.__)("Save"),k=t||!s&&!i,R=u||k,N=u||k||!c||d||f,P;return u?P=n?(0,zy.__)("Autosaving"):(0,zy.__)("Saving"):k?P=(0,zy.__)("Saved"):o?P=C:g&&(P=A),(0,wF.jsxs)(gF.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,gF.__unstableGetAnimateClassName)({type:"loading"})]:u}):void 0,onClick:N?void 0:()=>w(),shortcut:N?void 0:ETe.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:iB,label:P||C,"aria-disabled":N,children:[R&&(0,wF.jsx)(xn,{icon:k?Ro:aB}),P]})}var kTe=a(Y(),1);function SF({children:e}){return(0,kTe.useSelect)(r=>r(I).getCurrentPost()._links?.["wp:action-publish"]??!1,[])?e:null}var xF=a(G(),1),NS=a(z(),1),CF=a(U(),1),RTe=a(Y(),1);var OS=a(E(),1);function TF(){let[e,t]=(0,CF.useState)(null),r=(0,RTe.useSelect)(s=>s(I).getCurrentPostType(),[]),o=(0,CF.useMemo)(()=>({anchor:e,"aria-label":(0,NS.__)("Change publish date"),placement:"left-start",offset:36,shift:!0}),[e]),n=kS(),i=kS({full:!0});return sm.includes(r)?null:(0,OS.jsx)(SF,{children:(0,OS.jsx)(dr,{label:(0,NS.__)("Publish"),ref:t,children:(0,OS.jsx)(xF.Dropdown,{popoverProps:o,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:s,isOpen:l})=>(0,OS.jsx)(xF.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:s,"aria-label":(0,NS.sprintf)((0,NS.__)("Change date: %s"),n),label:i,showTooltip:n!==i,"aria-expanded":l,children:n}),renderContent:({onClose:s})=>(0,OS.jsx)(ES,{onClose:s})})})})}var EF=a(G(),1),MS=a(z(),1),PF=a(Y(),1),ATe=a(U(),1),ITe=a(Ga(),1);var Hy=a(E(),1);function OTe(){(0,ITe.default)("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});let[e,t]=(0,ATe.useState)(!1),{editPost:r,savePost:o}=(0,PF.useDispatch)(I),{isSaving:n,isPublished:i,isScheduled:s}=(0,PF.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,MS.__)("Are you sure you want to unpublish this post?"),u=(0,MS.__)("Unpublish")):s&&(c=(0,MS.__)("Are you sure you want to unschedule this post?"),u=(0,MS.__)("Unschedule"));let d=()=>{t(!1),r({status:"draft"}),o()};return(0,Hy.jsxs)(Hy.Fragment,{children:[(0,Hy.jsx)(EF.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,MS.__)("Switch to draft")}),(0,Hy.jsx)(EF.__experimentalConfirmDialog,{isOpen:e,onConfirm:d,onCancel:()=>t(!1),confirmButtonText:u,children:c})]})}var NTe=a(Y(),1),aP=a(z(),1);var XY=a(E(),1);function kF(){let{syncStatus:e,postType:t}=(0,NTe.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,XY.jsx)(dr,{label:(0,aP.__)("Sync status"),children:(0,XY.jsx)("div",{className:"editor-post-sync-status__value",children:e==="unsynced"?(0,aP._x)("Not synced","pattern (singular)"):(0,aP._x)("Synced","pattern (singular)")})})}var MTe=a(U(),1),FTe=a(Y(),1),DTe=a(ne(),1);var QY=a(E(),1),dit=e=>e;function fit({taxonomyWrapper:e=dit}){let{postType:t,taxonomies:r}=(0,FTe.useSelect)(n=>({postType:n(I).getCurrentPostType(),taxonomies:n(DTe.store).getEntityRecords("root","taxonomy")}),[]);return(r??[]).filter(n=>n.types.includes(t)&&n.visibility?.show_ui).map(n=>{let i=n.hierarchical?oF:$6;return(0,QY.jsx)(MTe.Fragment,{children:e((0,QY.jsx)(i,{slug:n.slug}),n)},`taxonomy-${n.slug}`)})}var FS=fit;var LTe=a(Y(),1),BTe=a(ne(),1);function RF({children:e}){return(0,LTe.useSelect)(r=>{let o=r(I).getCurrentPostType();return r(BTe.store).getEntityRecords("root","taxonomy")?.some(i=>i.types.includes(o))},[])?e:null}var VTe=a(G(),1),AF=a(Y(),1);var lP=a(E(),1);function pit({taxonomy:e,children:t}){let r=e?.slug,o=r?`taxonomy-panel-${r}`:"",{isEnabled:n,isOpened:i}=(0,AF.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,AF.useDispatch)(I);if(!n)return null;let l=e?.labels?.menu_name;return l?(0,lP.jsx)(VTe.PanelBody,{title:l,opened:i,onToggle:()=>s(o),children:t}):null}function IF(){return(0,lP.jsx)(RF,{children:(0,lP.jsx)(FS,{taxonomyWrapper:(e,t)=>(0,lP.jsx)(pit,{taxonomy:t,children:e})})})}var sEe=a(oEe(),1),DS=a(U(),1),tq=a(z(),1),aEe=a(ne(),1),FF=a(Y(),1),lEe=a(ke(),1);var nEe=1e3;function iEe(e,t){if(Math.max(e.length,t.length)<=nEe)return tG(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<=nEe?d=tG(l,c):d=_0e(l,c),o>0&&d.unshift({value:e.slice(0,o)}),i<e.length&&d.push({value:e.slice(i)}),d}function Cit(e,t){return Math.max(0,Math.min(t.length,e))}function Tit(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 eq(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=Tit(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 Cit(s,o)}var Pg=a(E(),1);function uP(){let e=(0,lEe.useInstanceId)(uP),t=(0,DS.useRef)(),r=(0,DS.useRef)(),o=(0,DS.useRef)(),{value:n,type:i,id:s}=(0,FF.useSelect)(u=>{let{getCurrentPostType:d,getCurrentPostId:f,getEditedPostContent:m}=u(I);return{value:m(),type:d(),id:f()}},[]),{editEntityRecord:l}=(0,FF.useDispatch)(aEe.store);(0,DS.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=iEe(d,n),v=eq(f,g,d,n),b=eq(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,Pg.jsxs)(Pg.Fragment,{children:[(0,Pg.jsx)(Jt,{render:(0,Pg.jsx)("label",{htmlFor:`post-content-${e}`}),children:(0,tq.__)("Type text or HTML")}),(0,Pg.jsx)(sEe.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,tq.__)("Start writing with text or HTML")})]})}var uEe=a(z(),1),BS=a(U(),1),dEe=a(Lt(),1),HF=a(Y(),1),rq=a(be(),1),fEe=a(Oo(),1),pEe=a(At(),1),VS=a(Vc(),1),mEe=a(ke(),1),oq=a(sg(),1);var DF="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",LF=/[\r\n]+/g;var LS=a(U(),1),cEe=a(Y(),1);function BF(e){let t=(0,LS.useRef)(),{isCleanNewPost:r}=(0,cEe.useSelect)(o=>{let{isCleanNewPost:n}=o(I);return{isCleanNewPost:n()}},[]);return(0,LS.useImperativeHandle)(e,()=>({focus:()=>{t?.current?.focus()}})),(0,LS.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 VF=a(Y(),1);function jF(){let{editPost:e}=(0,VF.useDispatch)(I),{title:t}=(0,VF.useSelect)(o=>{let{getEditedPostAttribute:n}=o(I);return{title:n("title")}},[]);function r(o){e({title:o})}return{title:t,setTitle:r}}var zF=a(E(),1),{useRichText:Eit}=K(VS.privateApis),Pit=(0,BS.forwardRef)((e,t)=>{let{placeholder:r,isEditingContentOnlySection:o,isPreview:n}=(0,HF.useSelect)(P=>{let{getSettings:T,getEditedContentOnlySection:M}=K(P(rq.store)),{titlePlaceholder:j,isPreviewMode:F}=T();return{placeholder:j,isEditingContentOnlySection:!!M(),isPreview:F}},[]),[i,s]=(0,BS.useState)(!1),{ref:l}=BF(t),{title:c,setTitle:u}=jF(),[d,f]=(0,BS.useState)({}),{clearSelectedBlock:m,insertBlocks:h,insertDefaultBlock:g}=(0,HF.useDispatch)(rq.store),v=(0,dEe.decodeEntities)(r)||(0,uEe.__)("Add title"),{value:b,onChange:_,ref:y}=Eit({value:c,onChange(P){u(P.replace(LF," "))},placeholder:v,selectionStart:d.start,selectionEnd:d.end,onSelectionChange(P,T){f(M=>{let{start:j,end:F}=M;return j===P&&F===T?M:{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===fEe.ENTER&&(P.preventDefault(),C())}function k(P){let T=P.clipboardData,M="",j="";try{M=T.getData("text/plain"),j=T.getData("text/html")}catch{return}let F=(0,pEe.pasteHandler)({HTML:j,plainText:M});if(P.preventDefault(),!!F.length)if(typeof F!="string"){let[D]=F;if(!c&&(D.name==="core/heading"||D.name==="core/paragraph")){let B=(0,oq.__unstableStripHTML)(D.attributes.content);u(B),w(F.slice(1))}else w(F)}else{let D=(0,oq.__unstableStripHTML)(F);_((0,VS.insert)(b,(0,VS.create)({html:D})))}}let R=J(DF,{"is-selected":i}),N=o?{opacity:.2}:void 0;return(0,zF.jsx)("h1",{ref:(0,mEe.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:N})}),UF=(0,BS.forwardRef)((e,t)=>(0,zF.jsx)(co,{supportKeys:"title",children:(0,zF.jsx)(Pit,{ref:t})}));var hEe=a(G(),1),gEe=a(z(),1),vEe=a(Lt(),1),bEe=a(Y(),1),yEe=a(be(),1),WF=a(U(),1);var wEe=a(E(),1);function kit(e,t){let{placeholder:r}=(0,bEe.useSelect)(h=>{let{getSettings:g}=h(yEe.store),{titlePlaceholder:v}=g();return{placeholder:v}},[]),[o,n]=(0,WF.useState)(!1),{title:i,setTitle:s}=jF(),{ref:l}=BF(t);function c(h){s(h.replace(LF," "))}function u(){n(!0)}function d(){n(!1)}let f=J(DF,{"is-selected":o,"is-raw-text":!0}),m=(0,vEe.decodeEntities)(r)||(0,gEe.__)("Add title");return(0,wEe.jsx)(hEe.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 GF=(0,WF.forwardRef)(kit);var jS=a(z(),1),qF=a(G(),1),zS=a(Y(),1),xEe=a(U(),1);var _Ee=a(Y(),1),SEe=a(ne(),1);function YF({children:e}){let{canTrashPost:t}=(0,_Ee.useSelect)(r=>{let{isEditedPostNew:o,getCurrentPostId:n,getCurrentPostType:i}=r(I),{canUser:s}=r(SEe.store),l=i(),c=n(),u=o(),d=c?s("delete",{kind:"postType",name:l,id:c}):!1;return{canTrashPost:(!u||c)&&d&&!$K.includes(l)}},[]);return t?e:null}var dP=a(E(),1);function HS({onActionPerformed:e}){let t=(0,zS.useRegistry)(),{isNew:r,isDeleting:o,postId:n,title:i}=(0,zS.useSelect)(d=>{let f=d(I);return{isNew:f.isEditedPostNew(),isDeleting:f.isDeletingPost(),postId:f.getCurrentPostId(),title:f.getCurrentPostAttribute("title")}},[]),{trashPost:s}=(0,zS.useDispatch)(I),[l,c]=(0,xEe.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,dP.jsxs)(YF,{children:[(0,dP.jsx)(qF.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:o,"aria-disabled":o,onClick:o?void 0:()=>c(!0),children:(0,jS.__)("Move to trash")}),(0,dP.jsx)(qF.__experimentalConfirmDialog,{isOpen:l,onConfirm:u,onCancel:()=>c(!1),confirmButtonText:(0,jS.__)("Move to trash"),size:"small",children:(0,jS.sprintf)((0,jS.__)('Are you sure you want to move "%s" to the trash?'),i)})]})}var fP=a(Y(),1),pP=a(ho(),1),KF=a(U(),1),CEe=a(be(),1),Uy=a(z(),1),Ma=a(G(),1),TEe=a(It(),1);var EEe=a(ne(),1),ZF=a(ke(),1);var Co=a(E(),1);function mP({onClose:e}){let{isEditable:t,postSlug:r,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:s}=(0,fP.useSelect)(h=>{let g=h(I).getCurrentPost(),v=h(I).getCurrentPostType(),b=h(EEe.store).getPostType(v),_=h(I).getPermalinkParts(),y=g?._links?.["wp:action-publish"]??!1;return{isEditable:h(I).isPermalinkEditable()&&y,postSlug:(0,pP.safeDecodeURIComponent)(h(I).getEditedPostSlug()),viewPostLabel:b?.labels?.view_item,postLink:g.link,permalinkPrefix:_?.prefix,permalinkSuffix:_?.suffix,permalink:(0,pP.safeDecodeURIComponent)(h(I).getPermalink())}},[]),{editPost:l}=(0,fP.useDispatch)(I),{createNotice:c}=(0,fP.useDispatch)(TEe.store),[u,d]=(0,KF.useState)(!1),f=(0,ZF.useCopyToClipboard)(s,()=>{c("info",(0,Uy.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),m="editor-post-url__slug-description-"+(0,ZF.useInstanceId)(mP);return(0,Co.jsxs)("div",{className:"editor-post-url",children:[(0,Co.jsx)(CEe.__experimentalInspectorPopoverHeader,{title:(0,Uy.__)("Slug"),onClose:e}),(0,Co.jsxs)(Ma.__experimentalVStack,{spacing:3,children:[t&&(0,Co.jsx)("p",{className:"editor-post-url__intro",children:(0,KF.createInterpolateElement)((0,Uy.__)("<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>"),{span:(0,Co.jsx)("span",{id:m}),a:(0,Co.jsx)(Ma.ExternalLink,{href:(0,Uy.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,Co.jsxs)("div",{children:[t&&(0,Co.jsxs)(Co.Fragment,{children:[(0,Co.jsx)(Ma.__experimentalInputControl,{prefix:(0,Co.jsx)(Ma.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,Co.jsx)(Ma.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Co.jsx)(Ma.Button,{icon:Hx,ref:f,size:"small",label:"Copy"})}),label:(0,Uy.__)("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,pP.cleanForSlug)(h.target.value)}),u&&d(!1)},"aria-describedby":m}),(0,Co.jsxs)("p",{className:"editor-post-url__permalink",children:[(0,Co.jsx)("span",{className:"editor-post-url__permalink-visual-label",children:(0,Uy.__)("Permalink:")}),(0,Co.jsxs)(Ma.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:[(0,Co.jsx)("span",{className:"editor-post-url__link-prefix",children:n}),(0,Co.jsx)("span",{className:"editor-post-url__link-slug",children:r}),(0,Co.jsx)("span",{className:"editor-post-url__link-suffix",children:i})]})]})]}),!t&&(0,Co.jsx)(Ma.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:o})]})]})]})}var PEe=a(Y(),1),kEe=a(ne(),1);function XF({children:e}){return(0,PEe.useSelect)(r=>{let o=r(I).getCurrentPostType();return!(!r(kEe.store).getPostType(o)?.viewable||!r(I).getCurrentPost().link||!r(I).getPermalinkParts())},[])?e:null}var REe=a(Y(),1),QF=a(ho(),1);function AEe(){return nq()}function nq(){let e=(0,REe.useSelect)(t=>t(I).getPermalink(),[]);return(0,QF.filterURLForDisplay)((0,QF.safeDecodeURIComponent)(e))}var JF=a(U(),1),$F=a(Y(),1),WS=a(G(),1),US=a(z(),1),IEe=a(ho(),1),OEe=a(ne(),1);var vl=a(E(),1);function eD(){let{isFrontPage:e}=(0,$F.useSelect)(i=>{let{getCurrentPostId:s}=i(I),{getEditedEntityRecord:l,canUser:c}=i(OEe.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,JF.useState)(null),o=(0,JF.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]),n=e?(0,US.__)("Link"):(0,US.__)("Slug");return(0,vl.jsx)(XF,{children:(0,vl.jsxs)(dr,{label:n,ref:r,children:[!e&&(0,vl.jsx)(WS.Dropdown,{popoverProps:o,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:s})=>(0,vl.jsx)(Rit,{isOpen:i,onClick:s}),renderContent:({onClose:i})=>(0,vl.jsx)(mP,{onClose:i})}),e&&(0,vl.jsx)(Ait,{})]})})}function Rit({isOpen:e,onClick:t}){let{slug:r}=(0,$F.useSelect)(n=>({slug:n(I).getEditedPostSlug()}),[]),o=(0,IEe.safeDecodeURIComponent)(r);return(0,vl.jsx)(WS.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,US.sprintf)((0,US.__)("Change link: %s"),o),onClick:t,children:(0,vl.jsx)(vl.Fragment,{children:o})})}function Ait(){let{postLink:e}=(0,$F.useSelect)(t=>{let{getCurrentPost:r}=t(I);return{postLink:r()?.link}},[]);return(0,vl.jsx)(WS.ExternalLink,{className:"editor-post-url__front-page-link",href:e,target:"_blank",children:e})}var NEe=a(Y(),1);function MEe({render:e}){let t=(0,NEe.useSelect)(r=>r(I).getCurrentPost()._links?.["wp:action-publish"]??!1);return e({canEdit:t})}var YEe=a(z(),1),oD=a(G(),1),qEe=a(Y(),1);var KEe=a(U(),1),ZEe=a(be(),1);var Hp=a(z(),1),UEe=a(Y(),1),WEe=a(be(),1);var FEe=a(Y(),1),DEe=a(z(),1),LEe=a(aw(),1);var BEe=a(E(),1);function GS(){let e=(0,FEe.useSelect)(r=>r(I).getEditedPostAttribute("content"),[]),t=(0,DEe._x)("words","Word count type. Do not translate!");return(0,BEe.jsx)("span",{className:"word-count",children:(0,LEe.count)(e,t)})}var VEe=a(Y(),1),kg=a(z(),1),jEe=a(aw(),1),iq=a(U(),1);var tD=a(E(),1),Iit=189;function YS(){let e=(0,VEe.useSelect)(n=>n(I).getEditedPostAttribute("content"),[]),t=(0,kg._x)("words","Word count type. Do not translate!"),r=Math.round((0,jEe.count)(e,t)/Iit),o=r===0?(0,iq.createInterpolateElement)((0,kg.__)("<span>< 1</span> minute"),{span:(0,tD.jsx)("span",{})}):(0,iq.createInterpolateElement)((0,kg.sprintf)((0,kg._n)("<span>%s</span> minute","<span>%s</span> minutes",r),r),{span:(0,tD.jsx)("span",{})});return(0,tD.jsx)("span",{className:"time-to-read",children:o})}var zEe=a(Y(),1),HEe=a(aw(),1);function qS(){let e=(0,zEe.useSelect)(t=>t(I).getEditedPostAttribute("content"),[]);return(0,HEe.count)(e,"characters_including_spaces")}var Qr=a(E(),1);function Oit({hasOutlineItemsDisabled:e,onRequestClose:t}){let{headingCount:r,paragraphCount:o,numberOfBlocks:n}=(0,UEe.useSelect)(i=>{let{getGlobalBlockCount:s}=i(WEe.store);return{headingCount:s("core/heading"),paragraphCount:s("core/paragraph"),numberOfBlocks:s()}},[]);return(0,Qr.jsxs)(Qr.Fragment,{children:[(0,Qr.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,Hp.__)("Document Statistics"),tabIndex:"0",children:(0,Qr.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,Qr.jsxs)("li",{className:"table-of-contents__count",children:[(0,Hp.__)("Words"),(0,Qr.jsx)(GS,{})]}),(0,Qr.jsxs)("li",{className:"table-of-contents__count",children:[(0,Hp.__)("Characters"),(0,Qr.jsx)("span",{className:"table-of-contents__number",children:(0,Qr.jsx)(qS,{})})]}),(0,Qr.jsxs)("li",{className:"table-of-contents__count",children:[(0,Hp.__)("Time to read"),(0,Qr.jsx)(YS,{})]}),(0,Qr.jsxs)("li",{className:"table-of-contents__count",children:[(0,Hp.__)("Headings"),(0,Qr.jsx)("span",{className:"table-of-contents__number",children:r})]}),(0,Qr.jsxs)("li",{className:"table-of-contents__count",children:[(0,Hp.__)("Paragraphs"),(0,Qr.jsx)("span",{className:"table-of-contents__number",children:o})]}),(0,Qr.jsxs)("li",{className:"table-of-contents__count",children:[(0,Hp.__)("Blocks"),(0,Qr.jsx)("span",{className:"table-of-contents__number",children:n})]})]})}),r>0&&(0,Qr.jsxs)(Qr.Fragment,{children:[(0,Qr.jsx)("hr",{}),(0,Qr.jsx)("h2",{className:"table-of-contents__title",children:(0,Hp.__)("Document Outline")}),(0,Qr.jsx)($_,{onSelect:t,hasOutlineItemsDisabled:e})]})]})}var GEe=Oit;var rD=a(E(),1);function Nit({hasOutlineItemsDisabled:e,repositionDropdown:t,...r},o){let n=(0,qEe.useSelect)(i=>!!i(ZEe.store).getBlockCount(),[]);return(0,rD.jsx)(oD.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:i,onToggle:s})=>(0,rD.jsx)(oD.Button,{__next40pxDefaultSize:!0,...r,ref:o,onClick:n?s:void 0,icon:HB,"aria-expanded":i,"aria-haspopup":"true",label:(0,YEe.__)("Details"),tooltipPosition:"bottom","aria-disabled":!n}),renderContent:({onClose:i})=>(0,rD.jsx)(GEe,{onRequestClose:i,hasOutlineItemsDisabled:e})})}var XEe=(0,KEe.forwardRef)(Nit);var QEe=a(z(),1),JEe=a(U(),1),$Ee=a(Y(),1),ePe=a(ne(),1);function tPe(){let{__experimentalGetDirtyEntityRecords:e}=(0,$Ee.useSelect)(ePe.store);return(0,JEe.useEffect)(()=>{let t=r=>{if(e().length>0)return r.returnValue=(0,QEe.__)("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 sq=a(Ga(),1),nPe=a(U(),1),we=a(be(),1),iPe=a(oPe(),1),sPe=a(E(),1);function wt(e,t,r=[]){let o=(0,nPe.forwardRef)((n,i)=>((0,sq.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,sPe.jsx)(t,{ref:i,...n})));return r.forEach(n=>{o[n]=wt(e+"."+n,t[n])}),o}function Gd(e,t){return(...r)=>((0,sq.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...r))}var aPe=wt("RichText",we.RichText,["Content"]);aPe.isEmpty=Gd("RichText.isEmpty",we.RichText.isEmpty);var Mit=wt("Autocomplete",we.Autocomplete),Fit=wt("AlignmentToolbar",we.AlignmentToolbar),Dit=wt("BlockAlignmentToolbar",we.BlockAlignmentToolbar),Lit=wt("BlockControls",we.BlockControls,["Slot"]),Bit=wt("BlockEdit",we.BlockEdit),Vit=wt("BlockEditorKeyboardShortcuts",we.BlockEditorKeyboardShortcuts),jit=wt("BlockFormatControls",we.BlockFormatControls,["Slot"]),zit=wt("BlockIcon",we.BlockIcon),Hit=wt("BlockInspector",we.BlockInspector),Uit=wt("BlockList",we.BlockList),Wit=wt("BlockMover",we.BlockMover),Git=wt("BlockNavigationDropdown",we.BlockNavigationDropdown),Yit=wt("BlockSelectionClearer",we.BlockSelectionClearer),qit=wt("BlockSettingsMenu",we.BlockSettingsMenu),Kit=wt("BlockTitle",we.BlockTitle),Zit=wt("BlockToolbar",we.BlockToolbar),Xit=wt("ColorPalette",we.ColorPalette),Qit=wt("ContrastChecker",we.ContrastChecker),Jit=wt("CopyHandler",we.CopyHandler),$it=wt("DefaultBlockAppender",we.DefaultBlockAppender),est=wt("FontSizePicker",we.FontSizePicker),tst=wt("Inserter",we.Inserter),rst=wt("InnerBlocks",we.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),ost=wt("InspectorAdvancedControls",we.InspectorAdvancedControls,["Slot"]),nst=wt("InspectorControls",we.InspectorControls,["Slot"]),ist=wt("PanelColorSettings",we.PanelColorSettings),sst=wt("PlainText",we.PlainText),ast=wt("RichTextShortcut",we.RichTextShortcut),lst=wt("RichTextToolbarButton",we.RichTextToolbarButton),cst=wt("__unstableRichTextInputEvent",we.__unstableRichTextInputEvent),ust=wt("MediaPlaceholder",we.MediaPlaceholder),dst=wt("MediaUpload",we.MediaUpload),fst=wt("MediaUploadCheck",we.MediaUploadCheck),pst=wt("MultiSelectScrollIntoView",we.MultiSelectScrollIntoView),mst=wt("NavigableToolbar",we.NavigableToolbar),hst=wt("ObserveTyping",we.ObserveTyping),gst=wt("SkipToSelectedBlock",we.SkipToSelectedBlock),vst=wt("URLInput",we.URLInput),bst=wt("URLInputButton",we.URLInputButton),yst=wt("URLPopover",we.URLPopover),wst=wt("Warning",we.Warning),_st=wt("WritingFlow",we.WritingFlow),Sst=Gd("createCustomColorsHOC",we.createCustomColorsHOC),xst=Gd("getColorClassName",we.getColorClassName),Cst=Gd("getColorObjectByAttributeValues",we.getColorObjectByAttributeValues),Tst=Gd("getColorObjectByColorValue",we.getColorObjectByColorValue),Est=Gd("getFontSize",we.getFontSize),Pst=Gd("getFontSizeClass",we.getFontSizeClass),kst=Gd("withColorContext",we.withColorContext),Rst=Gd("withColors",we.withColors),Ast=Gd("withFontSizes",we.withFontSizes);var Ist=H_,Ost=H_;function Nst(e=[]){return e.push({...a3},{...l3}),e}(0,lPe.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",Nst);var cPe=a(U(),1),aq=a(Bn(),1),uPe=a(Ga(),1),nD=a(yf(),1);var KS=a(E(),1),{MediaUploadModal:Mst}=K(nD.privateApis),Fst=class extends cPe.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,KS.jsxs)(KS.Fragment,{children:[s({open:this.openModal}),(0,KS.jsx)(Mst,{allowedTypes:e,multiple:t,value:r,onSelect:c=>{o(c),this.closeModal()},onClose:this.closeModal,title:n,isOpen:l,modalClass:i})]})}};window.__experimentalDataViewsMediaModal?(0,aq.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>((0,uPe.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."}),Fst)):(0,aq.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>nD.MediaUpload);var fPe=a(Bn(),1),pPe=a(kl(),1),mPe=a(ke(),1),iD=a(be(),1),lq=a(Y(),1),hPe=a(At(),1);var pu=a(E(),1),{PatternOverridesControls:Dst,ResetOverridesControl:Lst,PATTERN_TYPES:Bst,PATTERN_SYNC_TYPES:dPe}=K(pPe.privateApis),Vst=(0,mPe.createHigherOrderComponent)(e=>t=>{let r=(0,lq.useSelect)(o=>{let{__experimentalBlockBindingsSupportedAttributes:n}=o(iD.store).getSettings();return!!n?.[t.name]},[t.name]);return(0,pu.jsxs)(pu.Fragment,{children:[(0,pu.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,pu.jsx)(jst,{...t})]})},"withPatternOverrideControls");function jst(e){let t=(0,iD.useBlockEditingMode)(),{hasPatternOverridesSource:r,isEditingSyncedPattern:o}=(0,lq.useSelect)(c=>{let{getCurrentPostType:u,getEditedPostAttribute:d}=c(I);return{hasPatternOverridesSource:!!(0,hPe.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:u()===Bst.user&&d("meta")?.wp_pattern_sync_status!==dPe.unsynced&&d("wp_pattern_sync_status")!==dPe.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,pu.jsxs)(pu.Fragment,{children:[s&&(0,pu.jsx)(Dst,{...e}),l&&(0,pu.jsx)(Lst,{...e})]}):null}(0,fPe.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",Vst);var gPe=a(Bn(),1),vPe=a(ke(),1),bPe=a(U(),1),cq=a(z(),1),ZS=a(be(),1),sD=a(G(),1),yPe=a(Y(),1),Yd=a(E(),1),zst=["core/navigation-link","core/navigation-submenu"];function Hst({attributes:e}){let{kind:t,id:r,type:o}=e,n=(0,ZS.useBlockEditingMode)(),i=(0,yPe.useSelect)(l=>l(ZS.store).getSettings().onNavigateToEntityRecord,[]),s=(0,bPe.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,Yd.jsx)(ZS.__unstableBlockToolbarLastItem,{children:(0,Yd.jsx)(sD.ToolbarGroup,{children:(0,Yd.jsx)(sD.ToolbarButton,{name:"view",title:(0,cq.__)("View"),onClick:s,children:(0,cq.__)("View")})})})}var Ust=(0,vPe.createHigherOrderComponent)(e=>t=>{let r=zst.includes(t.name);return(0,Yd.jsxs)(Yd.Fragment,{children:[(0,Yd.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Yd.jsx)(Hst,{...t})]})},"withNavigationViewButton");(0,gPe.addFilter)("editor.BlockEdit","core/editor/with-navigation-view-button",Ust);var wPe=a(Bn(),1),_Pe=a(ke(),1),SPe=a(U(),1),uq=a(z(),1),XS=a(be(),1),aD=a(G(),1),Rg=a(Y(),1);var qd=a(E(),1),Wst="core/navigation",Gst="core/template-part",Yst="edit-post/block";function qst({clientId:e}){let t=(0,Rg.useRegistry)(),{selectBlock:r,flashBlock:o}=(0,Rg.useDispatch)(XS.store),{requestInspectorTab:n}=K((0,Rg.useDispatch)(XS.store)),{enableComplementaryArea:i}=(0,Rg.useDispatch)(He),{hasNavigationBlocks:s,firstNavigationBlockId:l,isNavigationEditable:c}=(0,Rg.useSelect)(d=>{let{getClientIdsOfDescendants:f,getBlockName:m,getBlockEditingMode:h}=d(XS.store),v=f(e).filter(y=>m(y)===Wst),b=v.length>0,_=b?v[0]:null;return{hasNavigationBlocks:b,firstNavigationBlockId:_,isNavigationEditable:h(_)!=="disabled"}},[e]),u=(0,SPe.useCallback)(()=>{l&&t.batch(()=>{r(l),o(l,500),i("core",Yst),n("list",{openPanel:l})})},[l,t,r,o,i,n]);return!s||!c?null:(0,qd.jsx)(XS.__unstableBlockToolbarLastItem,{children:(0,qd.jsx)(aD.ToolbarGroup,{children:(0,qd.jsx)(aD.ToolbarButton,{label:(0,uq.__)("Edit navigation"),onClick:u,children:(0,uq.__)("Edit navigation")})})})}var Kst=(0,_Pe.createHigherOrderComponent)(e=>t=>{let r=t.name===Gst;return(0,qd.jsxs)(qd.Fragment,{children:[(0,qd.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,qd.jsx)(qst,{clientId:t.clientId})]})},"withTemplatePartNavigationEditButton");(0,wPe.addFilter)("editor.BlockEdit","core/editor/with-template-part-navigation-edit-button",Kst);var TPe=a(Bn(),1),EPe=a(ke(),1),Ag=a(be(),1),hP=a(G(),1),Up=a(z(),1),Wp=a(At(),1),cD=a(U(),1),QS=a(Y(),1),PPe=a(It(),1),kPe=a(ne(),1);function dq(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 ic=a(E(),1),{cleanEmptyObject:Zst}=K(Ag.privateApis),xPe={...Wp.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},Xst={"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"},Qst={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},Jst=["border","color","spacing","typography"],CPe=(e,t)=>{let r=e;return t.forEach(o=>{r=r?.[o]}),r},$st=["borderColor","borderWidth","borderStyle"],RPe=["top","right","bottom","left"];function eat(e,t,r){if(!e&&!t)return[];let o=[...lD("top",e,r),...lD("right",e,r),...lD("bottom",e,r),...lD("left",e,r)],{color:n,style:i,width:s}=e||{};return(t||n||s)&&!i&&RPe.forEach(c=>{r?.[c]?.style||o.push({path:["border",c,"style"],value:"solid"})}),o}function lD(e,t,r){if(!t?.[e]||r?.[e]?.style)return[];let{color:o,style:n,width:i}=t[e];return!(o||i)||n?[]:[{path:["border",e,"style"],value:"solid"}]}function tat(e,t,r){let o=(0,QS.useSelect)(i=>K(i(Wp.store)).getSupportedStyles(e),[e]),n=r?.styles?.blocks?.[e];return(0,cD.useMemo)(()=>{let i=o.flatMap(s=>{if(!xPe[s])return[];let{value:l}=xPe[s],c=l.join("."),u=t[Qst[c]],d=u?`var:preset|${Xst[c]}|${u}`:CPe(t.style,l);if(s==="linkColor"){let f=d?[{path:l,value:d}]:[],m=["elements","link",":hover","color","text"],h=CPe(t.style,m);return h&&f.push({path:m,value:h}),f}if($st.includes(s)&&d){let f=[{path:l,value:d}];return RPe.forEach(m=>{let h=[...l];h.splice(-1,0,m),f.push({path:h,value:d})}),f}return d?[{path:l,value:d}]:[]});return eat(t.style?.border,t.borderColor,n?.border).forEach(s=>i.push(s)),i},[o,t,n])}function rat({name:e,attributes:t,setAttributes:r}){let{user:o,setUser:n}=lo(),i=tat(e,t,o),{__unstableMarkNextChangeAsNotPersistent:s}=(0,QS.useDispatch)(Ag.store),{createSuccessNotice:l}=(0,QS.useDispatch)(PPe.store),c=(0,cD.useCallback)(()=>{if(i.length!==0&&i.length>0){let{style:u}=t,d=structuredClone(u),f=structuredClone(o);for(let{path:h,value:g}of i)dq(d,h,void 0),dq(f,["styles","blocks",e,...h],g);let m={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:Zst(d)};s(),r(m),n(f,{undoIgnore:!0}),l((0,Up.sprintf)((0,Up.__)("%s styles applied."),(0,Wp.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,Up.__)("Undo"),onClick(){s(),r(t),n(o,{undoIgnore:!0})}}]})}},[s,t,i,l,e,r,n,o]);return(0,ic.jsxs)(hP.BaseControl,{className:"editor-push-changes-to-global-styles-control",help:(0,Up.sprintf)((0,Up.__)("Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks."),(0,Wp.getBlockType)(e).title),children:[(0,ic.jsx)(hP.BaseControl.VisualLabel,{children:(0,Up.__)("Styles")}),(0,ic.jsx)(hP.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:i.length===0,onClick:c,children:(0,Up.__)("Apply globally")})]})}function oat(e){let t=(0,Ag.useBlockEditingMode)(),r=(0,QS.useSelect)(i=>i(kPe.store).getCurrentTheme()?.is_block_theme,[]),o=Jst.some(i=>(0,Wp.hasBlockSupport)(e.name,i));return t==="default"&&o&&r?(0,ic.jsx)(Ag.InspectorAdvancedControls,{children:(0,ic.jsx)(rat,{...e})}):null}var nat=(0,EPe.createHigherOrderComponent)(e=>t=>(0,ic.jsxs)(ic.Fragment,{children:[(0,ic.jsx)(e,{...t},"edit"),t.isSelected&&(0,ic.jsx)(oat,{...t})]}));(0,TPe.addFilter)("editor.BlockEdit","core/editor/push-changes-to-global-styles",nat);var gP=a(G(),1),APe=a(E(),1),fq="__experimentalMainDashboardButton",IPe=()=>{let e=(0,gP.__experimentalUseSlotFills)(fq);return!!(e&&e.length)},{Fill:iat,Slot:sat}=(0,gP.createSlotFill)(fq),OPe=iat,aat=()=>{let e=(0,gP.__experimentalUseSlotFills)(fq);return(0,APe.jsx)(sat,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};OPe.Slot=aat;var uD=OPe;var NOe=a(Y(),1),MOe=a(ne(),1),FOe=a(G(),1),DOe=a(z(),1);var FP=a(Y(),1),jg=a(z(),1),v2e=a(Dt(),1),lx=a(be(),1),b2e=a(ke(),1),fL=a(U(),1),y2e=a(Lt(),1),w2e=a(It(),1);var lRe=a(be(),1),cRe=a(Y(),1),EP=a(ke(),1),uRe=a(Dt(),1),dRe=a(U(),1);var JS=a(be(),1),NPe=a(U(),1),dD=a(G(),1),pq=a(z(),1);var MPe=a(Y(),1);var Gp=a(E(),1),{useHasBlockToolbar:lat}=K(JS.privateApis);function FPe({isCollapsed:e,onToggle:t}){let{blockSelectionStart:r}=(0,MPe.useSelect)(i=>({blockSelectionStart:i(JS.store).getBlockSelectionStart()}),[]),o=lat(),n=!!r;return(0,NPe.useEffect)(()=>{r&&t(!1)},[r,t]),o?(0,Gp.jsxs)(Gp.Fragment,{children:[(0,Gp.jsx)("div",{className:J("editor-collapsible-block-toolbar",{"is-collapsed":e||!n}),children:(0,Gp.jsx)(JS.BlockToolbar,{hideDragHandle:!0})}),(0,Gp.jsx)(dD.Popover.Slot,{name:"block-toolbar"}),(0,Gp.jsx)(dD.Button,{className:"editor-collapsible-block-toolbar__toggle",icon:e?xl:Cl,onClick:()=>{t(!e)},label:e?(0,pq.__)("Show block tools"):(0,pq.__)("Hide block tools"),size:"compact"})]}):null}var DPe=a(ke(),1),fD=a(Y(),1),Wy=a(z(),1),LPe=a(be(),1),$S=a(G(),1);var mq=a(U(),1),BPe=a(ya(),1),VPe=a(Dt(),1);var mu=a(E(),1);function cat({className:e,disableBlockTools:t=!1}){let{setIsInserterOpened:r,setIsListViewOpened:o}=(0,fD.useDispatch)(I),{isDistractionFree:n,isInserterOpened:i,isListViewOpen:s,listViewShortcut:l,inserterSidebarToggleRef:c,listViewToggleRef:u,showIconLabels:d}=(0,fD.useSelect)(y=>{let{get:w}=y(VPe.store),{isListViewOpened:S,getEditorMode:x,getInserterSidebarToggleRef:C,getListViewToggleRef:A}=K(y(I)),{getShortcutRepresentation:k}=y(BPe.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,DPe.useViewportMatch)("wide"),h=(0,Wy.__)("Document tools"),g=(0,mq.useCallback)(()=>o(!s),[o,s]),v=(0,mq.useCallback)(()=>r(!i),[i,r]),b=(0,Wy._x)("Block Inserter","Generic label for block inserter button"),_=i?(0,Wy.__)("Close"):(0,Wy.__)("Add");return(0,mu.jsx)(LPe.NavigableToolbar,{className:J("editor-document-tools","edit-post-header-toolbar",e),"aria-label":h,variant:"unstyled",children:(0,mu.jsxs)("div",{className:"editor-document-tools__left",children:[!n&&(0,mu.jsx)($S.ToolbarButton,{ref:c,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:i,onMouseDown:f,onClick:v,disabled:t,icon:yc,label:d?_:b,showTooltip:!d,"aria-expanded":i}),(m||!d)&&(0,mu.jsxs)(mu.Fragment,{children:[(0,mu.jsx)($S.ToolbarItem,{as:M3,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),(0,mu.jsx)($S.ToolbarItem,{as:I3,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),!n&&(0,mu.jsx)($S.ToolbarButton,{className:"editor-document-tools__document-overview-toggle",icon:Xx,disabled:t,isPressed:s,label:(0,Wy.__)("Document Overview"),onClick:g,shortcut:l,showTooltip:!d,variant:d?"tertiary":void 0,"aria-expanded":s,ref:u})]})]})})}var jPe=cat;var vP=a(G(),1);var Ig=a(E(),1),hq={distractionFreeDisabled:{y:"-50px"},distractionFreeHover:{y:0},distractionFreeHidden:{y:"-50px"},visible:{y:0},hidden:{y:0}},uat={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=IPe();return(0,Ig.jsxs)("div",{className:J("editor-header edit-post-header",e),children:[n&&(0,Ig.jsx)(vP.__unstableMotion.div,{className:"editor-header__back-button",variants:uat,transition:{type:"tween"},children:(0,Ig.jsx)(uD.Slot,{})}),(0,Ig.jsx)(vP.__unstableMotion.div,{variants:hq,className:"editor-header__toolbar",transition:{type:"tween"},children:t}),r&&(0,Ig.jsx)(vP.__unstableMotion.div,{variants:hq,className:"editor-header__center",transition:{type:"tween"},children:r}),(0,Ig.jsx)(vP.__unstableMotion.div,{variants:hq,transition:{type:"tween"},className:"editor-header__settings",children:o})]})}var To=a(z(),1),ex=a(Y(),1),bq=a(Oo(),1);var Kd=a(G(),1),Gy=a(Dt(),1);var zPe=a(G(),1),mD=a(Y(),1),gq=a(z(),1),HPe=a(ke(),1),UPe=a(It(),1);var WPe=a(E(),1);function GPe(){let{createNotice:e}=(0,mD.useDispatch)(UPe.store),{getEditedPostContent:t}=(0,mD.useSelect)(I);function r(){return t()}function o(){e("info",(0,gq.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}let n=(0,HPe.useCopyToClipboard)(r,o);return(0,WPe.jsx)(zPe.MenuItem,{ref:n,children:(0,gq.__)("Copy all blocks")})}var bP=a(z(),1),hD=a(G(),1),gD=a(Y(),1),YPe=a(ya(),1);var vq=a(E(),1),dat=[{value:"visual",label:(0,bP.__)("Visual editor")},{value:"text",label:(0,bP.__)("Code editor")}];function fat(){let{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:r,mode:o}=(0,gD.useSelect)(l=>({shortcut:l(YPe.store).getShortcutRepresentation("core/editor/toggle-mode"),isRichEditingEnabled:l(I).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:l(I).getEditorSettings().codeEditingEnabled,mode:l(I).getEditorMode()}),[]),{switchEditorMode:n}=(0,gD.useDispatch)(I),i=o;!t&&o==="visual"&&(i="text"),!r&&o==="text"&&(i="visual");let s=dat.map(l=>(!r&&l.value==="text"&&(l={...l,disabled:!0}),!t&&l.value==="visual"&&(l={...l,disabled:!0,info:(0,bP.__)("You can enable the visual editor in your profile settings.")}),l.value!==i&&!l.disabled?{...l,shortcut:e}:l));return(0,vq.jsx)(hD.MenuGroup,{label:(0,bP.__)("Editor"),children:(0,vq.jsx)(hD.MenuItemsChoice,{choices:s,value:i,onSelect:n})})}var qPe=fat;var KPe=a(G(),1),ZPe=a(E(),1),{Fill:XPe,Slot:pat}=(0,KPe.createSlotFill)("ToolsMoreMenuGroup");XPe.Slot=({fillProps:e})=>(0,ZPe.jsx)(pat,{fillProps:e});var vD=XPe;var QPe=a(G(),1),JPe=a(E(),1),{Fill:$Pe,Slot:mat}=(0,QPe.createSlotFill)(Symbol("ViewMoreMenuGroup"));$Pe.Slot=({fillProps:e})=>(0,JPe.jsx)(mat,{fillProps:e});var bD=$Pe;var po=a(E(),1);function yD({disabled:e=!1}){let{openModal:t}=(0,ex.useDispatch)(He),{set:r}=(0,ex.useDispatch)(Gy.store),{toggleDistractionFree:o}=(0,ex.useDispatch)(I),n=(0,ex.useSelect)(s=>s(Gy.store).get("core","showIconLabels"),[]),i=()=>{r("core","distractionFree",!1)};return(0,po.jsx)(po.Fragment,{children:(0,po.jsx)(Kd.DropdownMenu,{icon:go,label:(0,To.__)("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,po.jsxs)(po.Fragment,{children:[(0,po.jsxs)(Kd.MenuGroup,{label:(0,To._x)("View","noun"),children:[(0,po.jsx)(Gy.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:i,label:(0,To.__)("Top toolbar"),info:(0,To.__)("Access all block and document tools in a single place"),messageActivated:(0,To.__)("Top toolbar activated."),messageDeactivated:(0,To.__)("Top toolbar deactivated.")}),(0,po.jsx)(Gy.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,To.__)("Distraction free"),info:(0,To.__)("Write with calmness"),handleToggling:!1,onToggle:()=>o({createNotice:!1}),messageActivated:(0,To.__)("Distraction free mode activated."),messageDeactivated:(0,To.__)("Distraction free mode deactivated."),shortcut:bq.displayShortcut.primaryShift("\\")}),(0,po.jsx)(Gy.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,To.__)("Spotlight mode"),info:(0,To.__)("Focus on one block at a time"),messageActivated:(0,To.__)("Spotlight mode activated."),messageDeactivated:(0,To.__)("Spotlight mode deactivated.")}),(0,po.jsx)(bD.Slot,{fillProps:{onClose:s}})]}),(0,po.jsx)(qPe,{}),(0,po.jsx)(zl.Slot,{name:"core/plugin-more-menu",label:(0,To.__)("Panels"),fillProps:{onClick:s}}),(0,po.jsxs)(Kd.MenuGroup,{label:(0,To.__)("Tools"),children:[(0,po.jsx)(Kd.MenuItem,{onClick:()=>t("editor/keyboard-shortcut-help"),shortcut:bq.displayShortcut.access("h"),children:(0,To.__)("Keyboard shortcuts")}),(0,po.jsx)(GPe,{}),(0,po.jsxs)(Kd.MenuItem,{icon:fs,href:(0,To.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),target:"_blank",rel:"noopener",children:[(0,To.__)("Help"),(0,po.jsx)(Jt,{render:(0,po.jsx)("span",{}),children:(0,To.__)("(opens in a new tab)")})]}),(0,po.jsx)(vD.Slot,{fillProps:{onClose:s}})]}),(0,po.jsx)(Kd.MenuGroup,{children:(0,po.jsx)(Kd.MenuItem,{onClick:()=>t("editor/preferences"),children:(0,To.__)("Preferences")})})]})})})}var tke=a(ke(),1),wD=a(Y(),1);var rke=a(E(),1),eke="toggle",yq="button";function oke({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let r,o=(0,tke.useViewportMatch)("medium","<"),{togglePublishSidebar:n}=(0,wD.useDispatch)(I),{hasPublishAction:i,isBeingScheduled:s,isPending:l,isPublished:c,isPublishSidebarEnabled:u,isPublishSidebarOpened:d,isScheduled:f,postStatus:m,postStatusHasChanged:h,postType:g}=(0,wD.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===Sl||c||h&&!["future","publish"].includes(m)||f&&s||l&&!i&&!o?r=yq:o||u?r=eke:r=yq,(0,rke.jsx)(xS,{forceIsDirty:e,isOpen:d,isToggle:r===eke,onToggle:n,setEntitiesSavedStatesCallback:t})}var nke=a(z(),1),ike=a(G(),1);var ske=a(ne(),1),ake=a(Y(),1),lke=a(Dt(),1);var cke=a(E(),1);function uke(){let{hasLoaded:e,permalink:t,isPublished:r,label:o,showIconLabels:n}=(0,ake.useSelect)(i=>{let s=i(I).getCurrentPostType(),l=i(ske.store).getPostType(s),{get:c}=i(lke.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,cke.jsx)(ike.Button,{icon:fs,label:o||(0,nke.__)("View post"),href:t,target:"_blank",showTooltip:!n,size:"compact"})}var dke=a(ke(),1),Fa=a(G(),1),Ti=a(z(),1);var yP=a(Y(),1),fke=a(ne(),1),pke=a(Dt(),1);var _D=a(be(),1);var Dn=a(E(),1),{getViewportBreakpoints:hat}=K(Nu);function mke({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}=(0,yP.useSelect)(N=>{let{getCurrentPostType:P,getCurrentTemplateId:T,getRenderingMode:M,getDeviceType:j}=K(N(I)),{isResponsiveEditing:F}=K(N(_D.store)),D=N(_D.store).getSettings(),{getEntityRecord:B,getPostType:L}=N(fke.store),{get:O}=N(pke.store),V=P(),W=hat(D.__experimentalFeatures?.viewport);return{deviceType:j(),homeUrl:B("root","__unstableBase")?.home,hasMobileViewport:W.mobile!==void 0,hasTabletViewport:W.tablet!==void 0,isTemplate:V==="wp_template",isViewable:L(V)?.viewable??!1,showIconLabels:O("core","showIconLabels"),isTemplateHidden:M()==="post-only",templateId:T(),isResponsiveEditing:F()}},[]),{setDeviceType:m,setRenderingMode:h,setDefaultRenderingMode:g}=K((0,yP.useDispatch)(I)),{resetZoomLevel:v,setStyleStateViewport:b,setResponsiveEditing:_}=K((0,yP.useDispatch)(_D.store)),y=N=>{m(N),v()},w=()=>{let N=!f;_(N),b(N?m2[r]??"default":"default")};if((0,dke.useViewportMatch)("medium","<"))return null;let x={placement:"bottom-end"},C={className:"editor-preview-dropdown__toggle",iconPosition:"right",size:"compact",showTooltip:!c,disabled:t,accessibleWhenDisabled:t},A={"aria-label":(0,Ti.__)("View options")},k={desktop:Kk,mobile:t0,tablet:qR},R=[{value:"Desktop",label:(0,Ti.__)("Desktop"),icon:Kk,info:f?(0,Ti.__)("Style all viewports."):(0,Ti.__)("Preview desktop viewport.")},...i?[{value:"Tablet",label:(0,Ti.__)("Tablet"),icon:qR,info:f?(0,Ti.__)("Style tablet only."):(0,Ti.__)("Preview tablet viewport.")}]:[],...n?[{value:"Mobile",label:(0,Ti.__)("Mobile"),icon:t0,info:f?(0,Ti.__)("Style mobile only."):(0,Ti.__)("Preview mobile viewport.")}]:[]];return(0,Dn.jsx)(Fa.DropdownMenu,{className:J("editor-preview-dropdown",`editor-preview-dropdown--${r.toLowerCase()}`),popoverProps:x,toggleProps:C,menuProps:A,icon:k[r.toLowerCase()],label:(0,Ti.__)("View"),disableOpenOnArrowDown:t,children:({onClose:N})=>(0,Dn.jsxs)(Dn.Fragment,{children:[(0,Dn.jsx)(Fa.MenuGroup,{children:(0,Dn.jsx)(Fa.MenuItemsChoice,{choices:R,value:r,onSelect:y})}),(0,Dn.jsx)(Fa.MenuGroup,{children:(0,Dn.jsx)(Fa.MenuItem,{icon:f?Ro:void 0,isSelected:f,role:"menuitemcheckbox",onClick:w,info:(0,Ti.__)("Style changes apply only to the selected viewport."),children:(0,Ti.__)("Responsive styles")})}),s&&(0,Dn.jsx)(Fa.MenuGroup,{children:(0,Dn.jsxs)(Fa.MenuItem,{href:o,target:"_blank",icon:fs,onClick:N,children:[(0,Ti.__)("View site"),(0,Dn.jsx)(Jt,{render:(0,Dn.jsx)("span",{}),children:(0,Ti.__)("(opens in a new tab)")})]})}),!s&&!!d&&(0,Dn.jsx)(Fa.MenuGroup,{children:(0,Dn.jsx)(Fa.MenuItem,{icon:u?void 0:Ro,isSelected:!u,role:"menuitemcheckbox",onClick:()=>{let P=u?"template-locked":"post-only";h(P),g(P),v()},children:(0,Ti.__)("Show template")})}),l&&(0,Dn.jsx)(Fa.MenuGroup,{children:(0,Dn.jsx)(_Ce,{forceIsAutosaveable:e,onPreview:N})}),(0,Dn.jsx)(zl.Slot,{name:"core/plugin-preview-menu",fillProps:{onClick:N}})]})})}var hke=a(G(),1),wq=a(z(),1),gke=a(U(),1),wP=a(Y(),1),_q=a(be(),1);var Sq=a(Dt(),1),SD=a(ya(),1),vke=a(Oo(),1);var bke=a(E(),1),gat=({disabled:e})=>{let{isZoomOut:t,showIconLabels:r,isDistractionFree:o}=(0,wP.useSelect)(u=>({isZoomOut:K(u(_q.store)).isZoomOut(),showIconLabels:u(Sq.store).get("core","showIconLabels"),isDistractionFree:u(Sq.store).get("core","distractionFree")})),{resetZoomLevel:n,setZoomLevel:i}=K((0,wP.useDispatch)(_q.store)),{registerShortcut:s,unregisterShortcut:l}=(0,wP.useDispatch)(SD.store);return(0,gke.useEffect)(()=>(s({name:"core/editor/zoom",category:"global",description:(0,wq.__)("Enter or exit zoom out."),keyCombination:{modifier:(0,vke.isAppleOS)()?"primaryShift":"secondary",character:"0"}}),()=>{l("core/editor/zoom")}),[s,l]),(0,SD.useShortcut)("core/editor/zoom",()=>{t?n():i("auto-scaled")},{isDisabled:o}),(0,bke.jsx)(hke.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=>{t?n():i("auto-scaled")},icon:kV,label:(0,wq.__)("Zoom Out"),isPressed:t,size:"compact",showTooltip:!r,className:"editor-zoom-out-toggle"})},yke=gat;var sRe=a(G(),1),ix=a(U(),1),aRe=a(ne(),1),LD=a(z(),1);var Ske=a(G(),1),xke=a(U(),1);var tx=a(U(),1);function wke(e){let[t,r]=(0,tx.useState)(e),[o,n]=(0,tx.useState)(e?"loading":"idle");t!==e&&(r(e),n(e?"loading":"idle"));let i=(0,tx.useCallback)(()=>n("loaded"),[]),s=(0,tx.useCallback)(()=>n("error"),[]);return{status:o,handleLoad:i,handleError:s}}var hu=a(E(),1);c2([VN]);var _ke="#1e1e1e",vat="#fff";function bat({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}=wke(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,xke.useMemo)(()=>s&&Ao(s).isReadable(_ke,{level:"AA",size:"normal"})?_ke:vat,[s]),y={...u,...s?{"--editor-avatar-outline-color":s,"--editor-avatar-name-color":_}:{}},w=(0,hu.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,hu.jsxs)("span",{className:"editor-avatar__image",children:[t&&(0,hu.jsx)("img",{src:t,alt:"",crossOrigin:"anonymous",className:"editor-avatar__img",onLoad:m,onError:h}),!g&&b]}),l&&!!c&&(0,hu.jsx)("span",{className:"editor-avatar__status-indicator",children:(0,hu.jsx)(Ske.Icon,{icon:c})}),v&&(0,hu.jsx)("span",{className:"editor-avatar__name",children:o||r})]});return r&&(!v||o)?(0,hu.jsxs)(Ke.Root,{children:[(0,hu.jsx)(Ke.Trigger,{render:w}),(0,hu.jsx)(Ke.Popup,{children:r})]}):w}var Yp=bat;var Cke=a(U(),1),xD=a(z(),1),CD=a(E(),1);function yat({className:e,max:t=3,children:r,...o}){let n=Cke.Children.toArray(r),i=n.slice(0,t),s=n.length-t;return(0,CD.jsxs)("div",{role:"group",className:J("editor-avatar-group",e),...o,children:[i,s>0&&(0,CD.jsx)("span",{className:"editor-avatar-group__overflow","aria-label":(0,xD.sprintf)((0,xD._n)("%d more collaborator","%d more collaborators",s),s),children:`+${s}`})]})}var xq=yat;var CP=a(z(),1),ED=a(G(),1);var Lke=a(Pl(),1);function qp(e){return e?.["48"]||e?.["96"]||e?.["24"]}var Pke=a(z(),1),Og=a(Vc(),1);function kke(e){return e.trim()}var _P=-16,wat=16,Tke=20,Eke=["#6F42C1","#D94145","#FBBF24","#FF35EE","#879F11","#0F766E","#00CFFF"];function Da(e){return Eke[e%Eke.length]}function Rke(e,t=10){if(!e)return"";let r=(0,Pke._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 Ng(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 Ake(e,t){let r=new Set(Ng(e)),o=Number(t);return r.has(o)?e:(r.add(o),{...e,noteId:[...r]})}var SP="core/note";function _at(e,t){if(t==null)return null;let r=null;if(e instanceof Og.RichTextData?r=e.toHTMLString():typeof e=="string"&&(r=e),!r||r.indexOf("wp-note")===-1)return null;let o=String(t),i=(0,Og.create)({html:r}).formats,s=-1;for(let l=0;l<i.length;l++)if(i[l]?.find(d=>d.type===SP&&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 TD(e,t){if(!e)return null;for(let r of Object.keys(e)){let o=_at(e[r],t);if(o)return{attributeKey:r,start:o.start,end:o.end}}return null}var Sat=-1;function Ike(e,t){let r=TD(t,e?.id);return r?r.start:Sat}function Oke(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!==SP)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===SP);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!==SP);n[l]=[...u,...d]}return{...e,formats:n}}function Cq(e,t){if(!(e instanceof Og.RichTextData))return null;let r=String(t),o=(0,Og.create)({html:e.toHTMLString()}),n=!1,i=o.formats.map(s=>{if(!s)return s;let l=s.filter(c=>!(c.type===SP&&c.attributes?.["data-id"]===r));return l.length===s.length?s:(n=!0,l.length?l:void 0)});return n?Og.RichTextData.fromHTMLString(new Og.RichTextData({...o,formats:i}).toHTMLString()):null}function xP(e){return e.find(t=>t.status==="hold")??e[0]??null}function Nke(e,t){let r=new Set(Ng(e));return r.delete(Number(t)),{...e,noteId:r.size>0?[...r]:void 0}}function Mke({threads:e,selectedNoteId:t,blockRects:r,heights:o,scrollTop:n=0}){let i={},s=Math.max(0,e.findIndex(v=>v.id===t)),l=e[s];if(!l||!r[l.id])return{positions:{}};let u=r[l.id].top||0,d=o[l.id]||0;i[l.id]=_P;let f=u+_P,m=d;for(let v=s+1;v<e.length;v++){let b=e[v],_=r[b.id];if(!_)continue;let y=_.top||0,w=o[b.id]||0,S=_P,x=f+m;y<x+wat&&(S=x-y+Tke),i[b.id]=S,f=y+S,m=w}let h=u+_P;for(let v=s-1;v>=0;v--){let b=e[v],_=r[b.id];if(!_)continue;let y=_.top||0,w=o[b.id]||0,S=_P;y+w>h&&(S=h-y-w-Tke),i[b.id]=S,h=y+S}let g={};for(let v of e){let b=r[v.id];b&&i[v.id]!==void 0&&(g[v.id]=b.top+n+i[v.id])}return{positions:g}}function Fke(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 ss(e,t,r){return Fke(e,t,r).then(o=>{o&&(o.focus(),o.scrollIntoView({block:"nearest"}))})}function Dke(e,t){return Fke(e,t).then(r=>{r?.scrollIntoView({block:"nearest"})})}var La=a(E(),1);function Bke({activeCollaborators:e,popoverAnchor:t,setIsPopoverVisible:r,cursorRegistry:o}){let n=i=>{o.scrollToCursor(i,{behavior:"smooth",block:"center",highlightDuration:2e3})&&((0,Lke.speak)((0,CP.__)("Scrolled to cursor"),"polite"),r(!1))};return(0,La.jsx)(ED.Popover,{anchor:t,placement:"bottom",offset:8,className:"editor-collaborators-presence__list",onClose:()=>r(!1),children:(0,La.jsxs)("div",{className:"editor-collaborators-presence__list-content",children:[(0,La.jsxs)("div",{className:"editor-collaborators-presence__list-header",children:[(0,La.jsxs)("div",{className:"editor-collaborators-presence__list-header-title",children:[(0,CP.__)("Collaborators"),(0,La.jsx)("span",{children:e.length})]}),(0,La.jsx)("div",{className:"editor-collaborators-presence__list-header-action",children:(0,La.jsx)(ED.Button,{__next40pxDefaultSize:!0,icon:Ii,iconSize:24,label:(0,CP.__)("Close Collaborators List"),onClick:()=>r(!1)})})]}),(0,La.jsx)("div",{className:"editor-collaborators-presence__list-items",children:e.map(i=>{let s=i.isMe;return(0,La.jsxs)("button",{className:"editor-collaborators-presence__list-item",disabled:s,onClick:()=>n(i.clientId),children:[(0,La.jsx)(Yp,{src:qp(i.collaboratorInfo.avatar_urls),name:i.collaboratorInfo.name,borderColor:s?"var(--wp-admin-theme-color)":Da(i.collaboratorInfo.id),dimmed:!i.isConnected}),(0,La.jsx)("div",{className:"editor-collaborators-presence__list-item-info",children:(0,La.jsx)("div",{className:"editor-collaborators-presence__list-item-name",children:s?(0,CP.__)("You"):i.collaboratorInfo.name})})]},i.clientId)})})]})})}function xat(e,t){e.classList.add("collaborators-overlay-cursor-highlighted"),setTimeout(()=>{e.classList.remove("collaborators-overlay-cursor-highlighted")},t)}function Vke(){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&&xat(o,r.highlightDuration),!0):!1},removeAll(){e.clear()}}}var iRe=a(be(),1);var FD=a(ke(),1),gu=a(U(),1),oRe=a(z(),1);var PD="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)",Tq="9999px",Eq="32px",Pq="24px",kD="4px",RD="8px",kq="1px",jke="2px",Mg="#fff",zke="11px",Hke="13px",Rq="var(--wpds-typography-font-weight-emphasis, 600)",Uke="20px";var Wke=`
.editor-avatar {
	position: relative;
	display: inline-flex;
	align-items: center;
	border-radius: ${Tq};
	flex-shrink: 0;
	box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) ${Mg}, ${PD};
}
.editor-avatar__image {
	box-sizing: border-box;
	position: relative;
	width: ${Eq};
	height: ${Eq};
	border-radius: ${Tq};
	border: 0;
	background-color: var(--wp-admin-theme-color, #3858e9);
	overflow: hidden;
	overflow: clip;
	flex-shrink: 0;
	font-size: 0;
	color: ${Mg};
}
.is-small > .editor-avatar__image {
	width: ${Pq};
	height: ${Pq};
}
.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) ${Mg};
	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: ${zke};
	font-weight: ${Rq};
	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: ${Hke};
	font-weight: ${Rq};
	line-height: ${Uke};
	color: var(--editor-avatar-name-color, ${Mg});
	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: ${kD};
	padding-inline-end: ${RD};
	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 Gke=`
.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: ${jke};
	border-radius: ${kq};
	outline: ${kq} solid ${Mg};
	box-shadow: ${PD};
	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: -${kD};
	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% - ${RD}));
	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(${Mg}, 0.7);
	z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
	.collaborators-overlay-user-label,
	.collaborators-overlay-user-cursor {
		animation: none;
	}
}
`;function Yke(e,t){let r=null,o=()=>{try{e()}catch{}r=setTimeout(o,t)};return r=setTimeout(o,t),()=>{r&&clearTimeout(r)}}var Iq=a(ne(),1),ox=a(U(),1);var rx=a(U(),1);function AD(e){let[t,r]=(0,rx.useState)(0),o=(0,rx.useRef)(null),n=(0,rx.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:Cat,useResolvedSelection:Tat}=K(Iq.privateApis),{SelectionType:Eat}=K(Iq.privateApis);function qke(e,t,r,o,n){let i=(0,ox.useRef)(new Set),s=Cat(r??null,o??null),l=Tat(r??null,o??null),[c,u]=(0,ox.useState)([]),[d,f]=AD(n);return(0,ox.useEffect)(()=>{if(!t){u([]);return}let m=i.current,h=new Set,g=s.filter(y=>{let w=y.editorState?.selection?.type===Eat.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)":Da(y.collaboratorInfo.id),userName:y.collaboratorInfo.name,avatarUrl:qp(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=Aq(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=Aq(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=Aq(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 Aq=(e,t)=>e.querySelector(`[data-block="${t}"]`);var Nq=a(ne(),1),$ke=a(Y(),1),MD=a(U(),1),eRe=a(Dt(),1);var Qke=a(ne(),1);var Pat=500,ID=(e,t,r,o)=>e===null||!t?null:kat(t,e,r,o)??null,kat=(e,t,r,o)=>{let{node:n,offset:i}=Oq(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}},OD=(e,t,r,o,n)=>{let i=t,s=r;i>s&&([i,s]=[s,i]);let l=Oq(e,i,o),c=Oq(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},Kke=(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},Zke=(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},Oq=(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>Pat)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}},Xke=(e,t)=>e.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING;var{SelectionDirection:Rat,SelectionType:ND}=K(Qke.privateApis);function TP(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 Jke(e,t,r,o){return e.type===ND.None||e.type===ND.WholeBlock?{}:e.type===ND.Cursor?Aat(t,o):r?Iat(e,t,r,o):{}}function Aat(e,t){if(!e.localClientId)return{};let r=TP(t.editorDocument,e);return{coords:ID(e.richTextOffset,r,t.editorDocument,t.overlayRect)}}function Iat(e,t,r,o){if(!t.localClientId||!r.localClientId||t.richTextOffset===null||r.richTextOffset===null)return{};let i=e.selectionDirection===Rat.Backward?t:r,s,l=null;if(e.type===ND.SelectionInOneBlock){let u=Oat(t,r,o);s=u.rects,l=u.blockElement}else{let u=Nat(t,r,o);s=u.rects,l=i.localClientId===u.firstBlockClientId?u.firstBlock:u.lastBlock}if(s.length>0)return{coords:ID(i.richTextOffset,l,o.editorDocument,o.overlayRect),selectionRects:s};let c=TP(o.editorDocument,t);return{coords:ID(t.richTextOffset,c,o.editorDocument,o.overlayRect)}}function Oat(e,t,r){let o=TP(r.editorDocument,e);return!o||e.richTextOffset===null||t.richTextOffset===null?{rects:[],blockElement:null}:{rects:OD(o,e.richTextOffset,t.richTextOffset,r.editorDocument,r.overlayRect)??[],blockElement:o}}function Nat(e,t,r){let o=e,n=t,i=TP(r.editorDocument,o),s=TP(r.editorDocument,n);if(i&&s&&Xke(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=OD(i,o.richTextOffset,Number.MAX_SAFE_INTEGER,r.editorDocument,r.overlayRect);c&&l.push(...c);let u=Zke(o.localClientId,n.localClientId,r.editorDocument);for(let f of u){let m=Kke(f,r.editorDocument,r.overlayRect);l.push(...m)}let d=OD(s,0,n.richTextOffset,r.editorDocument,r.overlayRect);return d&&l.push(...d),{rects:l,firstBlock:i,lastBlock:s,firstBlockClientId:o.localClientId}}var{useActiveCollaborators:Mat,useResolvedSelection:Fat}=K(Nq.privateApis),{SelectionType:nx}=K(Nq.privateApis);function tRe(e,t,r,o,n){let i=Mat(r??null,o??null),s=Fat(r??null,o??null),l=(0,$ke.useSelect)(m=>m(eRe.store).get("core","showCollaborationCursor"),[]),[c,u]=(0,MD.useState)([]),[d,f]=AD(n);return(0,MD.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:nx.None},y={richTextOffset:null,localClientId:null,attributeKey:null},w;if(_.type===nx.Cursor)try{y=s(_)}catch{return}else if(_.type===nx.SelectionInOneBlock||_.type===nx.SelectionInMultipleBlocks)try{y=s({type:nx.Cursor,cursorPosition:_.cursorStartPosition}),w=s({type:nx.Cursor,cursorPosition:_.cursorEndPosition})}catch{return}let S=b.collaboratorInfo.name,x=b.clientId,C=b.isMe?"var(--wp-admin-theme-color)":Da(b.collaboratorInfo.id),A=qp(b.collaboratorInfo.avatar_urls),k=Jke(_,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 Zd=a(E(),1),rRe=500,Dat=1e4;function nRe({blockEditorDocument:e,postId:t,postType:r,cursorRegistry:o}){let[n,i]=(0,gu.useState)(null),{cursors:s,rerenderCursorsAfterDelay:l}=tRe(n,e??null,t??null,r??null,rRe),{highlights:c,rerenderHighlightsAfterDelay:u}=qke(n,e??null,t??null,r??null,rRe),d=(0,gu.useCallback)(()=>{l(),u()},[l,u]),f=(0,FD.useResizeObserver)(d);(0,gu.useEffect)(()=>{let v=l(),b=u();return()=>{v(),b()}},[l,u]),(0,gu.useEffect)(()=>{if(s.length!==0)return Yke(l,Dat)},[s.length,l]);let m=(0,FD.useMergeRefs)([i,f]),h=(0,gu.useRef)(new Map);(0,gu.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,gu.useCallback)(v=>b=>{b?h.current.set(v,b):h.current.delete(v)},[]);return(0,Zd.jsxs)("div",{className:"collaborators-overlay-full",ref:m,children:[(0,Zd.jsx)("style",{children:Wke+Gke}),s.map(v=>(0,Zd.jsxs)("div",{children:[!v.isMe&&v.selectionRects?.map((b,_)=>(0,Zd.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,Zd.jsxs)("div",{ref:g(v.clientId),className:"collaborators-overlay-user",style:{left:`${v.x}px`,top:`${v.y}px`},children:[!v.isMe&&(0,Zd.jsx)("div",{className:"collaborators-overlay-user-cursor",style:{backgroundColor:v.color,height:`${v.height}px`}}),(0,Zd.jsx)(Yp,{className:"collaborators-overlay-user-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,label:v.isMe?(0,oRe.__)("You"):void 0,borderColor:v.color})]})]},v.clientId)),c.map(v=>(0,Zd.jsx)(Yp,{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 Mq=a(E(),1),{BlockCanvasCover:Lat}=K(iRe.privateApis);function DD({postId:e,postType:t,cursorRegistry:r}){return(0,Mq.jsx)(Lat.Fill,{children:({containerRef:o})=>(0,Mq.jsx)(nRe,{blockEditorDocument:o.current?.ownerDocument,postId:e,postType:t,cursorRegistry:r})})}var sc=a(E(),1),{useActiveCollaborators:Bat}=K(aRe.privateApis);function Fq({postId:e,postType:t}){let r=Bat(e,t),o=r.filter(f=>!f.isMe),n=(0,ix.useMemo)(()=>[...r].sort((f,m)=>f.isMe&&!m.isMe?-1:!f.isMe&&m.isMe?1:0),[r]),[i]=(0,ix.useState)(Vke),[s,l]=(0,ix.useState)(!1),[c,u]=(0,ix.useState)(null);if(o.length===0)return null;let d=r.find(f=>f.isMe);return(0,sc.jsxs)(sc.Fragment,{children:[(0,sc.jsxs)("div",{className:"editor-collaborators-presence",children:[(0,sc.jsx)(sRe.Button,{__next40pxDefaultSize:!0,className:"editor-collaborators-presence__button",onClick:()=>l(!s),isPressed:s,ref:u,"aria-label":(0,LD.sprintf)((0,LD.__)("Collaborators list, %d online"),n.length),children:(0,sc.jsxs)(xq,{max:4,children:[d&&(0,sc.jsx)(Yp,{src:qp(d.collaboratorInfo.avatar_urls),name:d.collaboratorInfo.name,borderColor:"var(--wp-admin-theme-color)",size:"small"},d.clientId),o.map(f=>(0,sc.jsx)(Yp,{src:qp(f.collaboratorInfo.avatar_urls),name:f.collaboratorInfo.name,borderColor:Da(f.collaboratorInfo.id),size:"small"},f.clientId))]})}),s&&(0,sc.jsx)(Bke,{activeCollaborators:n,popoverAnchor:c,setIsPopoverVisible:l,cursorRegistry:i})]}),(0,sc.jsx)(DD,{postId:e,postType:t,cursorRegistry:i})]})}var Eo=a(E(),1);function Vat({customSaveButton:e,forceIsDirty:t,setEntitiesSavedStatesCallback:r}){let o=(0,EP.useViewportMatch)("large"),n=(0,EP.useViewportMatch)("medium"),i=(0,EP.useMediaQuery)("(max-width: 403px)"),{postId:s,postType:l,isTextEditor:c,isPublishSidebarOpened:u,showIconLabels:d,hasFixedToolbar:f,hasBlockSelection:m,hasSectionRootClientId:h,isStylesCanvasActive:g}=(0,cRe.useSelect)(w=>{let{get:S}=w(uRe.store),{getEditorMode:x,getCurrentPostType:C,getCurrentPostId:A,isPublishSidebarOpened:k}=w(I),{getStylesPath:R,getShowStylebook:N}=K(w(I)),{getBlockSelectionStart:P,getSectionRootClientId:T}=K(w(lRe.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")||N()}},[]),v=["post","page","wp_template"].includes(l)&&h,[b,_]=(0,dRe.useState)(!0),y=!i&&(!f||f&&(!m||b));return(0,Eo.jsx)(pD,{toolbar:(0,Eo.jsxs)(Eo.Fragment,{children:[(0,Eo.jsx)(jPe,{disableBlockTools:g||c}),f&&n&&(0,Eo.jsx)(FPe,{isCollapsed:b,onToggle:_})]}),center:y?(0,Eo.jsxs)(Eo.Fragment,{children:[(0,Eo.jsx)(Fq,{postType:l,postId:s}),(0,Eo.jsx)(T3,{})]}):void 0,settings:(0,Eo.jsxs)(Eo.Fragment,{children:[!y&&!i&&(0,Eo.jsx)(Fq,{postType:l,postId:s}),!e&&!u&&(0,Eo.jsx)(_F,{forceIsDirty:t}),(0,Eo.jsx)(uke,{}),(0,Eo.jsx)(mke,{forceIsAutosaveable:t,disabled:g}),(0,Eo.jsx)(SS,{className:"editor-header__post-preview-button",forceIsAutosaveable:t}),o&&v&&(0,Eo.jsx)(yke,{disabled:g}),(o||!d)&&(0,Eo.jsx)(Oh.Slot,{scope:"core"}),!e&&(0,Eo.jsx)(oke,{forceIsDirty:t,setEntitiesSavedStatesCallback:r}),e,(0,Eo.jsx)(yD,{})]})})}var fRe=Vat;var PP=a(Y(),1),VD=a(be(),1),pRe=a(ke(),1),kP=a(U(),1),mRe=a(Dt(),1),hRe=a(Oo(),1);var BD=a(E(),1),{PrivateInserterLibrary:jat}=K(VD.privateApis);function gRe(){let{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:r,showMostUsedBlocks:o,sidebarIsOpened:n}=(0,PP.useSelect)(m=>{let{getInserterSidebarToggleRef:h,getInserter:g,isPublishSidebarOpened:v}=K(m(I)),{getBlockRootClientId:b,isZoomOut:_,getSectionRootClientId:y}=K(m(VD.store)),{get:w}=m(mRe.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,PP.useDispatch)(I),{disableComplementaryArea:s}=(0,PP.useDispatch)(He),l=(0,pRe.useViewportMatch)("medium","<"),c=(0,kP.useRef)(),u=(0,kP.useCallback)(()=>{i(!1),t.current?.focus()},[t,i]),d=(0,kP.useCallback)(m=>{m.keyCode===hRe.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),u())},[u]),f=(0,BD.jsx)("div",{className:"editor-inserter-sidebar__content",children:(0,BD.jsx)(jat,{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,BD.jsx)("div",{onKeyDown:d,className:"editor-inserter-sidebar",children:f})}var zD=a(be(),1),HD=a(ke(),1),UD=a(Y(),1),Dq=a(sg(),1),vu=a(U(),1),AP=a(z(),1),bRe=a(ya(),1),yRe=a(Oo(),1);var RP=a(G(),1),jD=a(z(),1);var Ei=a(E(),1);function vRe(){return(0,Ei.jsxs)(Ei.Fragment,{children:[(0,Ei.jsxs)("div",{className:"editor-list-view-sidebar__outline",children:[(0,Ei.jsxs)("div",{children:[(0,Ei.jsx)(RP.__experimentalText,{children:(0,jD.__)("Characters:")}),(0,Ei.jsx)(RP.__experimentalText,{children:(0,Ei.jsx)(qS,{})})]}),(0,Ei.jsxs)("div",{children:[(0,Ei.jsx)(RP.__experimentalText,{children:(0,jD.__)("Words:")}),(0,Ei.jsx)(GS,{})]}),(0,Ei.jsxs)("div",{children:[(0,Ei.jsx)(RP.__experimentalText,{children:(0,jD.__)("Time to read:")}),(0,Ei.jsx)(YS,{})]})]}),(0,Ei.jsx)($_,{})]})}var Fg=a(E(),1),{TabbedSidebar:zat}=K(zD.privateApis);function wRe(){let{setIsListViewOpened:e}=(0,UD.useDispatch)(I),{getListViewToggleRef:t}=K((0,UD.useSelect)(I)),r=(0,HD.useFocusOnMount)("firstElement"),o=(0,vu.useCallback)(()=>{e(!1),t().current?.focus()},[t,e]),n=(0,vu.useCallback)(v=>{v.keyCode===yRe.ESCAPE&&!v.defaultPrevented&&(v.preventDefault(),o())},[o]),[i,s]=(0,vu.useState)(null),[l,c]=(0,vu.useState)("list-view"),u=(0,vu.useRef)(),d=(0,vu.useRef)(),f=(0,vu.useRef)(),m=(0,HD.useMergeRefs)([r,f,s]);function h(v){let b=Dq.focus.tabbable.find(d.current)[0];if(v==="list-view"){let _=Dq.focus.tabbable.find(f.current)[0];(u.current.contains(_)?_:b).focus()}else b.focus()}let g=(0,vu.useCallback)(()=>{u.current.contains(u.current.ownerDocument.activeElement)?o():h(l)},[o,l]);return(0,bRe.useShortcut)("core/editor/toggle-list-view",g),(0,Fg.jsx)("div",{className:"editor-list-view-sidebar",onKeyDown:n,ref:u,children:(0,Fg.jsx)(zat,{tabs:[{name:"list-view",title:(0,AP._x)("List View","Post overview"),panel:(0,Fg.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,Fg.jsx)("div",{className:"editor-list-view-sidebar__list-view-panel-content",children:(0,Fg.jsx)(zD.__experimentalListView,{dropZoneElement:i})})}),panelRef:m},{name:"outline",title:(0,AP._x)("Outline","Post overview"),panel:(0,Fg.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,Fg.jsx)(vRe,{})})}],onClose:o,onSelect:v=>c(v),defaultTabId:"list-view",ref:d,closeButtonLabel:(0,AP.__)("Close")})})}var OP=a(Y(),1),IP=a(G(),1);var Lg=a(z(),1);var WD=a(Y(),1),Dg=a(G(),1),_Re=a(ne(),1),Kp=a(z(),1),GD=a(an(),1),SRe=a(U(),1);var xRe=a(ke(),1);var bu=a(E(),1);function Hat(){let{revisions:e,perPage:t,currentRevisionId:r,revisionKey:o,revisionPage:n,totalRevisions:i}=(0,WD.useSelect)(w=>{let{getCurrentRevisionId:S,getRevisionPage:x,getPageRevisions:C,getRevisionsPerPage:A}=K(w(I)),k=w(I).getCurrentPostType();if(!k)return{};let N=w(_Re.store).getEntityConfig("postType",k)?.revisionKey||"id",P=x();return{revisions:C(P),perPage:A(),currentRevisionId:S(),revisionKey:N,revisionPage:P,totalRevisions:w(I).getCurrentPostRevisionsCount()}},[]),{setCurrentRevisionId:s,setRevisionPage:l}=K((0,WD.useDispatch)(I)),c=(0,xRe.useFocusOnMount)(!0),u=!e,d=Math.ceil(i/t)||1,f=(0,SRe.useMemo)(()=>e&&[...e].reverse(),[e]),m=f?.findIndex(w=>w[o]===r),h=w=>{let S=f?.[w];S&&s(S[o])},g=(0,GD.getSettings)(),v=w=>{let S=f?.[w];return S?(0,GD.dateI18n)(g.formats.datetime,S.date):w},b=d>1;if(u&&!b)return(0,bu.jsx)(Dg.Spinner,{});if(!u&&!f?.length)return(0,bu.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,Kp.__)("No revisions found.")});if(i<=1)return(0,bu.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,Kp.__)("Only one revision found.")});let _=w=>{let S=i-(w-1)*t,x=Math.max(1,S-t+1);return(0,Kp.sprintf)((0,Kp.__)("Revisions %1$s\u2013%2$s"),x,S)},y=u||m===-1?(0,bu.jsx)(Dg.Spinner,{}):(0,bu.jsx)(Dg.RangeControl,{ref:c,"aria-valuetext":v(m),className:"editor-revisions-header__slider",hideLabelFromVision:!0,label:(0,Kp.__)("Revision"),max:f?.length-1,min:0,marks:!0,onChange:h,renderTooltipContent:v,value:m,withInputField:!1});return b?(0,bu.jsxs)(oe,{direction:"row",gap:"sm",align:"center",style:{flex:1},children:[(0,bu.jsx)(Dg.Button,{icon:kr,label:n<d?_(n+1):(0,Kp.__)("No older revisions"),onClick:()=>l(n+1),disabled:u||n>=d,size:"compact",accessibleWhenDisabled:!0}),(0,bu.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",justifyContent:"center"},children:y}),(0,bu.jsx)(Dg.Button,{icon:hr,label:n>1?_(n-1):(0,Kp.__)("No newer revisions"),onClick:()=>l(n-1),disabled:u||n<=1,size:"compact",accessibleWhenDisabled:!0})]}):y}var CRe=Hat;var Ba={document:"edit-post/document",block:"edit-post/block"};var bl=a(E(),1);function Uat({showDiff:e,onToggleDiff:t}){let{currentRevisionId:r,sidebarIsOpened:o}=(0,OP.useSelect)(d=>({currentRevisionId:K(d(I)).getCurrentRevisionId(),sidebarIsOpened:!!d(He).getActiveComplementaryArea("core")}),[]),{setCurrentRevisionId:n,restoreRevision:i}=K((0,OP.useDispatch)(I)),{enableComplementaryArea:s,disableComplementaryArea:l}=(0,OP.useDispatch)(He),c=!!r,u=()=>{r&&i(r)};return(0,bl.jsx)(pD,{className:"editor-revisions-header",toolbar:(0,bl.jsx)(IP.Button,{__next40pxDefaultSize:!0,size:"compact",icon:ov,label:(0,Lg._x)("Show changes","revisions"),isPressed:e,onClick:t}),center:(0,bl.jsx)(CRe,{}),settings:(0,bl.jsxs)(bl.Fragment,{children:[(0,bl.jsx)(SS,{className:"editor-header__post-preview-button"}),(0,bl.jsx)(IP.Button,{__next40pxDefaultSize:!0,icon:(0,Lg.isRTL)()?ev:mf,label:(0,Lg._x)("Settings","panel button label"),isPressed:o,"aria-expanded":o,onClick:()=>{o?l("core"):s("core",Ba.document)},size:"compact"}),(0,bl.jsx)(IP.Button,{__next40pxDefaultSize:!0,variant:"secondary",size:"compact",onClick:()=>n(null),children:(0,Lg.__)("Exit")}),(0,bl.jsx)(IP.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,variant:"primary",size:"compact",className:"editor-revisions-header__restore-button",disabled:!c,onClick:u,children:(0,Lg.__)("Restore")}),(0,bl.jsx)(yD,{disabled:!0})]})})}var Lq=Uat;var t2e=a(G(),1),r2e=a(be(),1),o2e=a(Y(),1),n2e=a(U(),1),i2e=a(Bn(),1);var ac=a(be(),1),_u=a(U(),1),tL=a(Y(),1),Uq=a(At(),1),YRe=a(ne(),1),rL=a(ke(),1);var Bq=a(Y(),1),TRe=a(ne(),1),YD=a(U(),1),Vq=a(z(),1),ERe=a(G(),1);var PRe=a(E(),1);function kRe({contentRef:e}){let{onNavigateToEntityRecord:t,templateId:r}=(0,Bq.useSelect)(s=>{let{getEditorSettings:l,getCurrentTemplateId:c}=s(I);return{onNavigateToEntityRecord:l().onNavigateToEntityRecord,templateId:c()}},[]),o=(0,Bq.useSelect)(s=>!!s(TRe.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[n,i]=(0,YD.useState)(!1);return(0,YD.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,PRe.jsx)(ERe.__experimentalConfirmDialog,{isOpen:n,confirmButtonText:(0,Vq.__)("Edit template"),onConfirm:()=>{i(!1),t({postId:r,postType:"wp_template"})},onCancel:()=>i(!1),size:"medium",children:(0,Vq.__)("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 ARe=a(ke(),1),qD=a(Y(),1),jq=a(be(),1);var Wat=500;function RRe(e,t,r){return Math.min(Math.max(e,t),r)}function Gat(e,t,r){let o=e-RRe(e,r.left,r.right),n=t-RRe(t,r.top,r.bottom);return Math.sqrt(o*o+n*n)}function IRe({isEnabled:e=!0}={}){let{getEnabledClientIdsTree:t,getBlockName:r,getBlockOrder:o}=K((0,qD.useSelect)(jq.store)),{selectBlock:n}=(0,qD.useDispatch)(jq.store);return(0,ARe.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=Gat(c,u,v);b<f&&b<Wat&&(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 KD=a(Y(),1),ORe=a(ke(),1),zq=a(be(),1);function NRe(){let{getSettings:e,isZoomOut:t}=K((0,KD.useSelect)(zq.store)),{resetZoomLevel:r}=K((0,KD.useDispatch)(zq.store));return(0,ORe.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 MRe=a(Y(),1),FRe=a(ke(),1),ZD=a(be(),1),DRe=a(At(),1),Yat=':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';function LRe(e){let t=(0,MRe.useRegistry)(),r=(0,FRe.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(ZD.store).getBlockOrder(""),d=u[u.length-1],f=t.select(ZD.store).getBlock(d),{selectBlock:m,insertDefaultBlock:h}=t.dispatch(ZD.store);f&&(0,DRe.isUnmodifiedDefaultBlock)(f)?m(d):h()}let{ownerDocument:i}=o;return i.addEventListener("pointerdown",n),()=>{i.removeEventListener("pointerdown",n)}},[t]);return e?[r,Yat]:[]}var XD=a(Y(),1),BRe=a(ke(),1),Hq=a(be(),1);function VRe(){let{getEditedContentOnlySection:e}=K((0,XD.useSelect)(Hq.store)),{stopEditingContentOnlySection:t}=K((0,XD.useDispatch)(Hq.store));return(0,BRe.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 QD=a(Y(),1),zRe=a(ke(),1),HRe=a(At(),1),JD=a(ne(),1),$D=a(be(),1),Xd=a(G(),1),URe=a(Bn(),1),Bg=a(U(),1),wu=a(z(),1);var sx=a(U(),1);function jRe(e){let[t,r]=(0,sx.useState)(),o=(0,sx.useRef)(!1);return(0,sx.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 yu=a(E(),1),{BlockCanvasCover:qat}=K($D.privateApis),{retrySyncConnection:Kat}=K(JD.privateApis),Zat=2e4;function WRe(){let[e,t]=(0,Bg.useState)(!1),[r,o]=(0,Bg.useState)(!1),[n,i]=(0,Bg.useState)(!1),{connectionStatus:s,isCollaborationEnabled:l,postType:c}=(0,QD.useSelect)(S=>{let{getSyncConnectionStatus:x,getPostType:C}=K(S(JD.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}=jRe(s),f=(0,zRe.useCopyToClipboard)(()=>{let S=(0,QD.select)($D.store).getBlocks();return(0,HRe.serialize)(S)});(0,Bg.useEffect)(()=>{let S=setTimeout(()=>{t(!0)},Zat);return()=>clearTimeout(S)},[]),(0,Bg.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,Bg.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===AY;if(!l||!e&&!h||!r)return null;let g=s&&"error"in s?s?.error:void 0;if(!m&&(0,URe.applyFilters)("editor.isSyncConnectionErrorHandled",!1,g?.code)!==!1)return null;let v=n?()=>{u(),Kat()}:void 0,b=lCe(g),_="",y=!1;d&&d>0?_=(0,wu.sprintf)((0,wu._n)("Retrying connection in %d second\u2026","Retrying connection in %d seconds\u2026",d),d):d===0&&(y=!0,_=(0,wu.__)("Retrying\u2026"));let w="edit.php";return c?.slug&&(w=`edit.php?post_type=${c.slug}`),(0,yu.jsx)(qat.Fill,{children:(0,yu.jsx)(Xd.Modal,{overlayClassName:"editor-sync-connection-error-modal",isDismissible:!1,onRequestClose:()=>{},shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,size:"medium",title:b.title,children:(0,yu.jsxs)(Xd.__experimentalVStack,{spacing:6,children:[(0,yu.jsx)("p",{children:b.description}),_&&(0,yu.jsx)("p",{className:"editor-sync-connection-error-modal__retry-countdown",children:_}),(0,yu.jsxs)(Xd.__experimentalHStack,{justify:"right",children:[(0,yu.jsx)(Xd.Button,{__next40pxDefaultSize:!0,href:w,isDestructive:!0,variant:"tertiary",children:(0,wu.sprintf)((0,wu.__)("Back to %s"),c?.labels?.name??(0,wu.__)("Posts"))}),(0,yu.jsx)(Xd.Button,{__next40pxDefaultSize:!0,ref:f,variant:v?"secondary":"primary",children:(0,wu.__)("Copy Post Content")}),v&&(0,yu.jsx)(Xd.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,"aria-disabled":y,disabled:y,isBusy:y,variant:"primary",onClick:v,children:(0,wu.__)("Retry")})]})]})})})}var li=a(E(),1),{LayoutStyle:eL,useLayoutClasses:Xat,useLayoutStyles:Qat,ExperimentalBlockCanvas:Jat,useFlashEditableBlocks:$at}=K(ac.privateApis);function Wq(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=Wq(e[t].innerBlocks);if(r)return r}}}function GRe(e){for(let t=0;t<e.length;t++)if(e[t].name==="core/post-content")return!0;return!1}function elt({autoFocus:e,iframeProps:t,contentRef:r,className:o}){let n=(0,rL.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}=(0,tL.useSelect)(me=>{let{getCurrentPostId:ee,getCurrentPostType:$,getCurrentTemplateId:ue,getEditorSettings:ve,getRenderingMode:Ee,getDeviceType:ie,getCanvasWidth:ae}=K(me(I)),{getPostType:pe,getEditedEntityRecord:le}=me(YRe.store),se=$(),Ae=Ee(),ye;se===Au?ye="core/block":Ae==="post-only"&&(ye="core/post-content");let Se=ve(),Pe=Se.supportsTemplateMode,Me=pe(se),X=ue(),fe=X?le("postType",xr,X):void 0;return{renderingMode:Ae,postContentAttributes:Se.postContentAttributes,isDesignPostType:sm.includes(se),editedPostTemplate:Me?.viewable&&Pe?fe:void 0,wrapperBlockName:ye,wrapperUniqueId:ee(),deviceType:ie(),isFocusedEntity:!!Se.onNavigateToPreviousEntityRecord,postType:se,isPreview:Se.isPreviewMode,styles:Se.styles,hasCanvasWidth:ae()!==void 0}},[]),{isCleanNewPost:_}=(0,tL.useSelect)(I),{hasRootPaddingAwareAlignments:y,themeHasDisabledLayoutStyles:w,themeSupportsLayout:S,isZoomedOut:x}=(0,tL.useSelect)(me=>{let{getSettings:ee,isZoomOut:$}=K(me(ac.store)),ue=ee();return{themeHasDisabledLayoutStyles:ue.disableLayoutStyles,themeSupportsLayout:ue.supportsLayout,hasRootPaddingAwareAlignments:ue.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:$()}},[]),C=(0,_u.useRef)(),[A]=(0,ac.useSettings)("layout"),k=(0,_u.useMemo)(()=>i!=="post-only"||m?{type:"default"}:S?{...A,type:"constrained"}:{type:"default"},[i,S,A,m]),R=(0,_u.useMemo)(()=>{if(!l?.content&&!l?.blocks&&s)return s;if(l?.blocks)return Wq(l?.blocks);let me=typeof l?.content=="string"?l?.content:"";return Wq((0,Uq.parse)(me))||{}},[l?.content,l?.blocks,s]),N=(0,_u.useMemo)(()=>{if(!l?.content&&!l?.blocks)return!1;if(l?.blocks)return GRe(l?.blocks);let me=typeof l?.content=="string"?l?.content:"";return GRe((0,Uq.parse)(me))||!1},[l?.content,l?.blocks]),{layout:P={},align:T=""}=R||{},M=Xat(R,"core/post-content"),j=J({"is-layout-flow":!S},S&&M,T&&`align${T}`),F=Qat(R,"core/post-content",".block-editor-block-list__layout.is-root-container"),D=(0,_u.useMemo)(()=>P&&(P?.type==="constrained"||P?.inherit||P?.contentSize||P?.wideSize)?{...A,...P,type:"constrained"}:{...A,...P,type:"default"},[P?.type,P?.inherit,P?.contentSize,P?.wideSize,A]),B=s?D:k,L=B?.type==="default"&&!N?k:B,O=(0,_u.useRef)();(0,_u.useEffect)(()=>{!e||!_()||O?.current?.focus()},[e,_]);let V=`.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;}`,W=[fk,Ai,Au].includes(h)&&!g&&!n&&!x||b,q=h===fk&&g,[Z,Q]=LRe(!g&&i==="post-only"&&!m),ce="display:flex;align-items:center;justify-content:center;",te=(0,_u.useMemo)(()=>[...v??[],{css:`:where(.block-editor-iframe__body){display:flow-root;}.is-root-container{display:flow-root;${W||q?"min-height:0!important;":""}}
				${Q||""}
				${W?`.block-editor-iframe__html{background:var(--wp-editor-canvas-background);min-height:100vh;${ce}}.block-editor-iframe__body{width:100%;}`:""}${q?`.block-editor-iframe__body{${ce}padding:var(--wp--style--block-gap,2em);}`:""}`}],[v,W,q,Q]),de=(0,ac.__unstableUseTypewriter)();return r=(0,rL.useMergeRefs)([C,r,i==="post-only"?de:null,$at({isEnabled:i==="template-locked"}),IRe({isEnabled:i==="template-locked"}),NRe(),Z,VRe()]),(0,li.jsxs)("div",{className:J("editor-visual-editor","edit-post-visual-editor",o,{"has-vertical-padding":f||b,"has-horizontal-padding":f||W}),children:[(0,li.jsx)(WRe,{}),(0,li.jsx)(Q_,{enableResizing:W,height:"100%",children:(0,li.jsxs)(Jat,{shouldIframe:!0,contentRef:r,styles:te,height:"100%",iframeProps:{...t,style:t?.style},children:[S&&!w&&i==="post-only"&&!m&&(0,li.jsxs)(li.Fragment,{children:[(0,li.jsx)(eL,{selector:".editor-visual-editor__post-title-wrapper",layout:k}),(0,li.jsx)(eL,{selector:".block-editor-block-list__layout.is-root-container",layout:L}),T&&(0,li.jsx)(eL,{css:V}),F&&(0,li.jsx)(eL,{layout:D,css:F})]}),i==="post-only"&&!m&&(0,li.jsx)("div",{className:J("editor-visual-editor__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":y}),contentEditable:!1,style:{marginTop:"4rem"},children:(0,li.jsx)(UF,{ref:O})}),(0,li.jsxs)(ac.RecursionProvider,{blockName:c,uniqueId:u,children:[(0,li.jsx)(ac.BlockList,{className:J("is-"+d.toLowerCase()+"-preview",i!=="post-only"||m?"wp-site-blocks":`${j} wp-block-post-content`,{"has-global-padding":i==="post-only"&&!m&&y}),layout:B,dropZoneElement:C.current?.parentNode,__unstableDisableDropZone:i==="template-locked"}),i==="template-locked"&&(0,li.jsx)(kRe,{contentRef:C})]})]})})]})}var oL=elt;var ax=a(z(),1),nL=a(Vc(),1),qRe=[{name:"revision/diff-removed",title:(0,ax.__)("Removed"),tagName:"del",className:"revision-diff-removed"},{name:"revision/diff-added",title:(0,ax.__)("Added"),tagName:"ins",className:"revision-diff-added"},{name:"revision/diff-format-added",title:(0,ax.__)("Format added"),tagName:"span",className:"revision-diff-format-added"},{name:"revision/diff-format-removed",title:(0,ax.__)("Format removed"),tagName:"span",className:"revision-diff-format-removed"},{name:"revision/diff-format-changed",title:(0,ax.__)("Format changed"),tagName:"span",className:"revision-diff-format-changed"}];function KRe(){for(let e of qRe)(0,nL.registerFormatType)(e.name,{...e,attributes:{title:"title"},edit:()=>null})}function ZRe(){for(let e of qRe)(0,nL.unregisterFormatType)(e.name)}var yl=a(U(),1),iL=a(ke(),1),QRe=a(Y(),1),sL=a(be(),1),NP=a(z(),1);var Vg=a(E(),1),{useBlockElementRef:tlt}=K(sL.privateApis);function JRe(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(...JRe(r.innerBlocks));return t}var XRe={added:(0,NP.__)("Go to added block"),removed:(0,NP.__)("Go to removed block"),modified:(0,NP.__)("Go to modified block")};function Gq(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 rlt({clientId:e,status:t,subscribe:r}){let o=(0,yl.useRef)();tlt(e,o);let[n,i]=(0,yl.useState)(()=>Gq(o.current));return(0,yl.useEffect)(()=>r(()=>{i(Gq(o.current))}),[r]),(0,yl.useEffect)(()=>{i(Gq(o.current))},[t]),n?(0,Vg.jsxs)(Ke.Root,{children:[(0,Vg.jsx)(Ke.Trigger,{render:(0,Vg.jsx)("button",{className:`revision-diff-marker is-${t}`,style:{top:`${n.top}%`,height:`${Math.max(n.height,.5)}%`},onClick:()=>o.current?.focus(),"aria-label":XRe[t]})}),(0,Vg.jsx)(Ke.Popup,{children:XRe[t]})]}):null}function $Re(){let[e,t]=(0,yl.useState)(!1),r=(0,yl.useRef)(new Set),o=(0,QRe.useSelect)(l=>l(sL.store).getBlocks(),[]),n=(0,yl.useMemo)(()=>JRe(o),[o]),i=(0,yl.useCallback)(l=>(r.current.add(l),()=>r.current.delete(l)),[]),s=(0,iL.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,iL.useMergeRefs)([s,t]),(0,Vg.jsx)("div",{className:"revision-diff-markers",role:"navigation","aria-label":(0,NP.__)("Document changes"),children:e&&n.map(({clientId:l,status:c})=>(0,Vg.jsx)(rlt,{clientId:l,status:c,subscribe:i},l))},"diff-markers")]}var Va=a(E(),1),{usePrivateStyleOverride:e2e}=K(r2e.privateApis),olt=`
<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>
`,nlt=`
	.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;
	}
	.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 ilt(e){return t=>{let{block:r,className:o}=t,n=r?.__revisionDiffStatus?.status,i=J(o,{"is-revision-added":n==="added","is-revision-removed":n==="removed","is-revision-modified":n==="modified"});return(0,Va.jsx)(e,{...t,className:i})}}var slt="editor/revisions-canvas/withRevisionDiffClasses";(0,i2e.addFilter)("editor.BlockListBlock",slt,ilt);function alt({showDiff:e}){return e2e({css:e?nlt:""}),e2e({assets:e?olt:"",__unstableType:"svgs"}),null}function llt({showDiff:e}){let[t,r]=$Re();return(0,Va.jsxs)(Va.Fragment,{children:[(0,Va.jsx)(oL,{contentRef:t}),e&&r]})}function Yq(){(0,n2e.useEffect)(()=>(KRe(),()=>{ZRe()}),[]);let{revision:e,showDiff:t}=(0,o2e.useSelect)(r=>{let{getCurrentRevision:o,isShowingRevisionDiff:n}=K(r(I));return{revision:o(),showDiff:n()}},[]);return e?(0,Va.jsxs)(Va.Fragment,{children:[(0,Va.jsx)(alt,{showDiff:t}),(0,Va.jsx)("div",{className:"editor-revisions-canvas__content",children:(0,Va.jsx)(llt,{showDiff:t})})]}):(0,Va.jsx)("div",{className:"editor-revisions-canvas__loading",children:(0,Va.jsx)(t2e.Spinner,{})})}var lL=a(Y(),1),aL=a(U(),1),lc=a(z(),1),s2e=a(It(),1),a2e=a(ne(),1),l2e=a(Dt(),1);var{useOnCollaboratorJoin:clt,useOnCollaboratorLeave:ult,useOnPostSave:dlt}=K(a2e.privateApis),qq={COLLAB_POST_UPDATED:"collab-post-updated",COLLAB_USER_ENTERED:"collab-user-entered",COLLAB_USER_EXITED:"collab-user-exited"},Kq=["publish","private","future"];function flt(e,t,r){return r?(0,lc.sprintf)((0,lc.__)("Post published by %s."),e):Kq.includes(t)?(0,lc.sprintf)((0,lc.__)("Post updated by %s."),e):(0,lc.sprintf)((0,lc.__)("Draft saved by %s."),e)}function c2e(e,t){let{postStatus:r,isCollaborationEnabled:o,showJoinNotifications:n,showLeaveNotifications:i,showPostSaveNotifications:s}=(0,lL.useSelect)(y=>{let{getCurrentPostAttribute:w,isCollaborationEnabledForCurrentPost:S}=K(y(I)),x=C=>y(l2e.store).get("core",C)??!0;return{postStatus:w("status"),isCollaborationEnabled:S(),showJoinNotifications:x("showCollaborationJoinNotifications"),showLeaveNotifications:x("showCollaborationLeaveNotifications"),showPostSaveNotifications:x("showCollaborationPostSaveNotifications")}},[]),{createNotice:l}=(0,lL.useDispatch)(s2e.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);clt(m,h,(0,aL.useCallback)((y,w)=>{c&&(w&&y.collaboratorInfo.enteredAt<w.collaboratorInfo.enteredAt||l("info",(0,lc.sprintf)((0,lc.__)("%s has joined the post."),y.collaboratorInfo.name),{id:`${qq.COLLAB_USER_ENTERED}-${y.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1}))},[l,c])),ult(g,v,(0,aL.useCallback)(y=>{u&&l("info",(0,lc.sprintf)((0,lc.__)("%s has left the post."),y.collaboratorInfo.name),{id:`${qq.COLLAB_USER_EXITED}-${y.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[l,u])),dlt(b,_,(0,aL.useCallback)((y,w,S)=>{if(!d||!r)return;let x=y.postStatus??r??"draft",C=S?.postStatus??r,A=!(C&&Kq.includes(C))&&Kq.includes(x),k=flt(w.collaboratorInfo.name,x,A);l("info",k,{id:`${qq.COLLAB_POST_UPDATED}-${w.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[l,r,d]))}var cL=a(Y(),1),MP=a(G(),1),Zq=a(z(),1),u2e=a(U(),1);var cc=a(E(),1),{Fill:B0r,Slot:plt}=(0,MP.createSlotFill)("ActionsPanel");function d2e({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:r,forceIsDirtyPublishPanel:o}){let{closePublishSidebar:n,togglePublishSidebar:i}=(0,cL.useDispatch)(I),{publishSidebarOpened:s,isPublishable:l,isDirty:c,hasOtherEntitiesChanges:u}=(0,cL.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,u2e.useCallback)(()=>e(!0),[]),f;return s?f=(0,cc.jsx)(uF,{onClose:n,forceIsDirty:o,PrePublishExtension:a6.Slot,PostPublishExtension:n6.Slot}):l&&!u?f=(0,cc.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,cc.jsx)(MP.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,"aria-expanded":!1,children:(0,Zq.__)("Open publish panel")})}):f=(0,cc.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,cc.jsx)(MP.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:d,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!c,accessibleWhenDisabled:!0,children:(0,Zq.__)("Open save panel")})}),(0,cc.jsxs)(cc.Fragment,{children:[r&&(0,cc.jsx)(H3,{close:t,renderDialog:!0}),(0,cc.jsx)(plt,{bubblesVirtually:!0}),!r&&f]})}var f2e=a(G(),1),uL=a(Y(),1),Xq=a(z(),1),p2e=a(ya(),1),dL=a(U(),1);var Zp=a(E(),1);function m2e({autoFocus:e=!1}){let{switchEditorMode:t}=(0,uL.useDispatch)(I),{shortcut:r,isRichEditingEnabled:o}=(0,uL.useSelect)(i=>{let{getEditorSettings:s}=i(I),{getShortcutRepresentation:l}=i(p2e.store);return{shortcut:l("core/editor/toggle-mode"),isRichEditingEnabled:s().richEditingEnabled}},[]),n=(0,dL.useRef)();return(0,dL.useEffect)(()=>{e||n?.current?.focus()},[e]),(0,Zp.jsxs)("div",{className:"editor-text-editor",children:[o&&(0,Zp.jsxs)("div",{className:"editor-text-editor__toolbar",children:[(0,Zp.jsx)("h2",{children:(0,Xq.__)("Editing code")}),(0,Zp.jsx)(f2e.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t("visual"),shortcut:r,children:(0,Xq.__)("Exit code editor")})]}),(0,Zp.jsxs)("div",{className:"editor-text-editor__body",children:[(0,Zp.jsx)(GF,{ref:n}),(0,Zp.jsx)(uP,{})]})]})}var Or=a(E(),1),h2e={header:(0,jg.__)("Editor top bar"),body:(0,jg.__)("Editor content"),sidebar:(0,jg.__)("Editor settings"),actions:(0,jg.__)("Editor publish"),footer:(0,jg.__)("Editor footer")};function g2e(){let e=(0,FP.useSelect)(t=>t(lx.store).isValidTemplate(),[]);return(0,Or.jsx)(w2e.InlineNotices,{className:"editor-notices",pinnedNoticesClassName:"editor-notices__pinned",dismissibleNoticesClassName:"editor-notices__dismissible",children:!e&&(0,Or.jsx)(L3,{})})}function _2e({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,FP.useSelect)(j=>{let{get:F}=j(v2e.store),{getEditorSettings:D,getPostTypeLabel:B,getCurrentPostType:L,getCurrentPostId:O}=j(I),{getStylesPath:V,getShowStylebook:W,isRevisionsMode:q,isShowingRevisionDiff:Z}=K(j(I)),Q=D(),ce=j(I).getEditorMode();return!Q.richEditingEnabled&&ce==="visual"&&(ce="text"),!Q.codeEditingEnabled&&ce==="text"&&(ce="visual"),{mode:ce,postId:O(),postType:L(),isInserterOpened:j(I).isInserterOpened(),isListViewOpened:j(I).isListViewOpened(),isDistractionFree:F("core","distractionFree"),isPreviewMode:Q.isPreviewMode,showBlockBreadcrumbs:F("core","showBlockBreadcrumbs"),postTypeLabel:B(),stylesPath:V(),showStylebook:W(),isRevisionsMode:q(),showDiff:Z()}},[]),{setShowRevisionDiff:C}=K((0,FP.useDispatch)(I));c2e(d,f);let A=(0,b2e.useViewportMatch)("medium"),k=h?(0,jg.__)("Document Overview"):(0,jg.__)("Block Library"),R=w||y?.startsWith("/revisions"),N=!R,[P,T]=(0,fL.useState)(!1),M=(0,fL.useCallback)(j=>{typeof P=="function"&&P(j),T(!1)},[P]);return S?(0,Or.jsx)(Tb,{className:J("editor-editor-interface",e),labels:h2e,header:(0,Or.jsx)(Lq,{showDiff:x,onToggleDiff:()=>C(!x)}),content:(0,Or.jsx)(Yq,{}),sidebar:(0,Or.jsx)(Ul.Slot,{scope:"core"})}):(0,Or.jsx)(Tb,{isDistractionFree:g,className:J("editor-editor-interface",e,{"is-entity-save-view-open":!!P,"is-distraction-free":g&&!v}),labels:{...h2e,secondarySidebar:k},header:!v&&(0,Or.jsx)(fRe,{forceIsDirty:r,setEntitiesSavedStatesCallback:T,customSaveButton:i,forceDisableBlockTools:l}),editorNotices:(0,Or.jsx)(g2e,{}),secondarySidebar:!v&&u==="visual"&&(m&&(0,Or.jsx)(gRe,{})||h&&(0,Or.jsx)(wRe,{})),sidebar:!v&&!g&&(0,Or.jsx)(Ul.Slot,{scope:"core"}),content:(0,Or.jsxs)(Or.Fragment,{children:[!g&&!v&&(0,Or.jsx)(g2e,{}),R&&(0,Or.jsx)(j_e,{}),N&&(0,Or.jsxs)(Or.Fragment,{children:[!v&&u==="text"&&(0,Or.jsx)(m2e,{autoFocus:n}),!v&&!A&&u==="visual"&&(0,Or.jsx)(lx.BlockToolbar,{hideDragHandle:!0}),(v||u==="visual")&&(0,Or.jsx)(oL,{contentRef:o,autoFocus:n,iframeProps:c}),t,(0,Or.jsx)(DD,{postId:d,postType:f})]})]}),footer:!v&&!g&&A&&b&&u==="visual"&&(0,Or.jsx)(lx.BlockBreadcrumb,{rootLabelText:_?(0,y2e.decodeEntities)(_):void 0}),actions:v?void 0:s||(0,Or.jsx)(d2e,{closeEntitiesSavedStates:M,isEntitiesSavedStatesOpen:P,setEntitiesSavedStatesCallback:T,forceIsDirtyPublishPanel:r})})}var jL=a(be(),1),WP=a(Y(),1),qg=a(U(),1),Ex=a(z(),1);var IIe=a(ya(),1),OIe=a(G(),1);var S2e=a(Y(),1),x2e=a(kl(),1);var C2e=a(E(),1),{OverridesPanel:mlt}=K(x2e.privateApis);function T2e(){return(0,S2e.useSelect)(t=>t(I).getCurrentPostType()==="wp_block",[])?(0,C2e.jsx)(mlt,{}):null}var cAe=a(Y(),1);var wl=a(G(),1);var L2e=a(ne(),1),B2e=a(Y(),1),V2e=a(U(),1),Ug=a(z(),1),j2e=a(sg(),1);var bL=a(Y(),1),LP=a(U(),1),M2e=a(z(),1),px=a(G(),1);var F2e=a(ne(),1);var DP=a(Y(),1),gL=a(U(),1),O2e=a(ne(),1);var uc=a(z(),1),E2e=a(U(),1),Xp=a(G(),1),ux=a(Y(),1),mL=a(ne(),1),P2e=a(It(),1);var pL=a(Lt(),1);function cx(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 zg=a(E(),1),hlt=({items:e,closeModal:t})=>{let[r]=e,o=cx(r),{showOnFront:n,currentHomePage:i,isSaving:s}=(0,ux.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:b}=g(mL.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,ux.useDispatch)(mL.store),{createSuccessNotice:c,createErrorNotice:u}=(0,ux.useDispatch)(P2e.store);async function d(g){g.preventDefault();try{await l("root","site",{page_on_front:r.id,show_on_front:"page"}),c((0,uc.__)("Homepage updated."),{type:"snackbar"})}catch(v){let b=v.message&&v.code!=="unknown_error"?v.message:(0,uc.__)("An error occurred while setting the homepage.");u(b,{type:"snackbar"})}finally{t?.()}}let f="";n==="posts"?f=(0,uc.__)("This will replace the current homepage which is set to display latest posts."):i&&(f=(0,uc.sprintf)((0,uc.__)('This will replace the current homepage: "%s"'),cx(i)));let m=(0,uc.sprintf)((0,uc.__)('Set "%1$s" as the site homepage? %2$s'),o,f).trim(),h=(0,uc.__)("Set homepage");return(0,zg.jsx)("form",{onSubmit:d,children:(0,zg.jsxs)(Xp.__experimentalVStack,{spacing:"5",children:[(0,zg.jsx)(Xp.__experimentalText,{children:m}),(0,zg.jsxs)(Xp.__experimentalHStack,{justify:"right",children:[(0,zg.jsx)(Xp.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:s,accessibleWhenDisabled:!0,children:(0,uc.__)("Cancel")}),(0,zg.jsx)(Xp.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:s,accessibleWhenDisabled:!0,children:h})]})]})})},k2e=()=>{let{pageOnFront:e,pageForPosts:t}=(0,ux.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(mL.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,E2e.useMemo)(()=>({id:"set-as-homepage",label:(0,uc.__)("Set as homepage"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:hlt}),[t,e])};var dc=a(z(),1),R2e=a(U(),1),Qp=a(G(),1),dx=a(Y(),1),hL=a(ne(),1),A2e=a(It(),1);var Hg=a(E(),1),glt=({items:e,closeModal:t})=>{let[r]=e,o=cx(r),{currentPostsPage:n,isPageForPostsSet:i,isSaving:s}=(0,dx.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:b}=g(hL.store),_=v("root","site");return{currentPostsPage:v("postType","page",_?.page_for_posts),isPageForPostsSet:_?.page_for_posts!==0,isSaving:b("root","site")}}),{saveEntityRecord:l}=(0,dx.useDispatch)(hL.store),{createSuccessNotice:c,createErrorNotice:u}=(0,dx.useDispatch)(A2e.store);async function d(g){g.preventDefault();try{await l("root","site",{page_for_posts:r.id,show_on_front:"page"}),c((0,dc.__)("Posts page updated."),{type:"snackbar"})}catch(v){let b=v.message&&v.code!=="unknown_error"?v.message:(0,dc.__)("An error occurred while setting the posts page.");u(b,{type:"snackbar"})}finally{t?.()}}let f=i&&n?(0,dc.sprintf)((0,dc.__)('This will replace the current posts page: "%s"'),cx(n)):(0,dc.__)("This page will show the latest posts."),m=(0,dc.sprintf)((0,dc.__)('Set "%1$s" as the posts page? %2$s'),o,f),h=(0,dc.__)("Set posts page");return(0,Hg.jsx)("form",{onSubmit:d,children:(0,Hg.jsxs)(Qp.__experimentalVStack,{spacing:"5",children:[(0,Hg.jsx)(Qp.__experimentalText,{children:m}),(0,Hg.jsxs)(Qp.__experimentalHStack,{justify:"right",children:[(0,Hg.jsx)(Qp.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:s,accessibleWhenDisabled:!0,children:(0,dc.__)("Cancel")}),(0,Hg.jsx)(Qp.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:s,accessibleWhenDisabled:!0,children:h})]})]})})},I2e=()=>{let{pageOnFront:e,pageForPosts:t}=(0,dx.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(hL.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,R2e.useMemo)(()=>({id:"set-as-posts-page",label:(0,dc.__)("Set as posts page"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:glt}),[t,e])};var N2e=a(E(),1);function vL({postType:e,onActionPerformed:t,context:r}){let{defaultActions:o}=(0,DP.useSelect)(c=>{let{getEntityActions:u}=K(c(I));return{defaultActions:u("postType",e)}},[e]),n=(0,DP.useSelect)(c=>{if(e!=="page")return!1;let{getDefaultTemplateId:u,getEntityRecord:d,canUser:f}=c(O2e.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=k2e(),s=I2e(),{registerPostTypeSchema:l}=K((0,DP.useDispatch)(I));return(0,gL.useEffect)(()=>{l(e)},[l,e]),(0,gL.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,N2e.jsx)(d,{...f,onActionPerformed:m=>{f.onActionPerformed&&f.onActionPerformed(m),t(c[u].id,m)}})}}}return c},[r,o,t,i,s,n])}var Pi=a(E(),1),{Menu:fx,kebabCase:vlt}=K(px.privateApis);function D2e({postType:e,postId:t,onActionPerformed:r}){let[o,n]=(0,LP.useState)(null),{item:i,permissions:s}=(0,bL.useSelect)(d=>{let{getEditedEntityRecord:f,getEntityRecordPermissions:m}=K(d(F2e.store));return{item:f("postType",e,t),permissions:m("postType",e,t)}},[t,e]),l=(0,LP.useMemo)(()=>({...i,permissions:s}),[i,s]),c=vL({postType:e,onActionPerformed:r}),u=(0,LP.useMemo)(()=>c.filter(d=>!d.isEligible||d.isEligible(l)),[c,l]);return(0,Pi.jsxs)(Pi.Fragment,{children:[(0,Pi.jsxs)(fx,{placement:"bottom-end",children:[(0,Pi.jsx)(fx.TriggerButton,{render:(0,Pi.jsx)(px.Button,{size:"small",icon:go,label:(0,M2e.__)("Actions"),disabled:!u.length,accessibleWhenDisabled:!0,className:"editor-all-actions-button"})}),(0,Pi.jsx)(fx.Popover,{children:(0,Pi.jsx)(wlt,{actions:u,items:[l],setActiveModalAction:n})})]}),!!o&&(0,Pi.jsx)(ylt,{action:o,items:[l],closeModal:()=>n(null)})]})}function blt({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Pi.jsx)(fx.Item,{onClick:t,children:(0,Pi.jsx)(fx.ItemLabel,{children:o})})}function ylt({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t);return(0,Pi.jsx)(px.Modal,{title:e.modalHeader||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r??(()=>{}),focusOnMount:"firstContentElement",size:"medium",overlayClassName:`editor-action-modal editor-action-modal__${vlt(e.id)}`,children:(0,Pi.jsx)(e.RenderModal,{items:t,closeModal:r})})}function wlt({actions:e,items:t,setActiveModalAction:r}){let o=(0,bL.useRegistry)();return(0,Pi.jsx)(fx.Group,{children:e.map(n=>(0,Pi.jsx)(blt,{action:n,onClick:()=>{if("RenderModal"in n){r(n);return}n.callback(t,{registry:o})},items:t},n.id))})}var Su=a(E(),1),{Badge:_lt}=K(wl.privateApis);function Wg({postType:e,postId:t,hideActions:r=!1,onActionPerformed:o,onClose:n}){let i=(0,V2e.useMemo)(()=>Array.isArray(t)?t:[t],[t]),{postTitle:s,icon:l,labels:c}=(0,B2e.useSelect)(f=>{let{getEditedEntityRecord:m,getCurrentTheme:h,getPostType:g}=f(L2e.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=([xr,Ai].includes(e)?Tl({template:S,templateTypes:x}):{})?.title||S?.title}return{postTitle:w,icon:v(e,{area:S?.area}),labels:g(e)?.labels}},[i,e]),u=u3(t),d=(0,Ug.__)("No title");return c?.name&&i.length>1?d=(0,Ug.sprintf)((0,Ug.__)("%1$d %2$s"),i.length,c?.name):s&&(d=(0,j2e.__unstableStripHTML)(s)),(0,Su.jsxs)(wl.__experimentalVStack,{spacing:1,className:"editor-post-card-panel",children:[(0,Su.jsxs)(wl.__experimentalHStack,{spacing:2,className:"editor-post-card-panel__header",alignment:"flex-start",children:[(0,Su.jsx)(wl.Icon,{className:"editor-post-card-panel__icon",icon:l}),(0,Su.jsxs)(wl.__experimentalText,{numberOfLines:2,truncate:!0,className:"editor-post-card-panel__title",as:"h2",children:[(0,Su.jsx)("span",{className:"editor-post-card-panel__title-name",children:d}),u&&i.length===1&&(0,Su.jsx)(_lt,{children:u})]}),!r&&i.length===1&&(0,Su.jsx)(D2e,{postType:e,postId:i[0],onActionPerformed:o}),n&&(0,Su.jsx)(wl.Button,{size:"small",icon:jx,label:(0,Ug.__)("Close"),onClick:n})]}),i.length>1&&(0,Su.jsx)(wl.__experimentalText,{className:"editor-post-card-panel__description",children:(0,Ug.sprintf)((0,Ug.__)("Changes will be applied to all selected %s."),c?.name?.toLowerCase())})]})}var z2e=a(G(),1),H2e=a(Y(),1),fc=a(z(),1),U2e=a(aw(),1),W2e=a(U(),1),Qq=a(ne(),1);var yL=a(E(),1),Slt=189;function G2e(){let e=(0,H2e.useSelect)(t=>{let{getEditedPostAttribute:r,getCurrentPostType:o,getCurrentPostId:n}=t(I),{canUser:i}=t(Qq.store),{getEntityRecord:s}=t(Qq.store),l=i("read",{kind:"root",name:"site"})?s("root","site"):void 0,c=o();return!(+n()===l?.page_for_posts)&&![xr,Ai].includes(c)&&r("content")},[]);return(0,yL.jsx)(Jq,{postContent:e})}function Jq({postContent:e}){let t=(0,fc._x)("words","Word count type. Do not translate!"),r=(0,W2e.useMemo)(()=>e?(0,U2e.count)(e,t):0,[e,t]);if(!r)return null;let o=Math.round(r/Slt),n=(0,fc.sprintf)((0,fc._n)("%s word","%s words",r),r.toLocaleString()),i=o<=1?(0,fc.__)("1 minute"):(0,fc.sprintf)((0,fc._n)("%s minute","%s minutes",o),o.toLocaleString());return(0,yL.jsx)("div",{className:"editor-post-content-information",children:(0,yL.jsx)(z2e.__experimentalText,{children:(0,fc.sprintf)((0,fc.__)("%1$s, %2$s read time."),n,i)})})}var wL=a(G(),1),mx=a(z(),1),Y2e=a(Y(),1),_L=a(U(),1),q2e=a(be(),1);var Jp=a(E(),1);function xlt(){let{postFormat:e}=(0,Y2e.useSelect)(i=>{let{getEditedPostAttribute:s}=i(I);return{postFormat:s("format")??"standard"}},[]),t=ZE.find(i=>i.id===e),[r,o]=(0,_L.useState)(null),n=(0,_L.useMemo)(()=>({anchor:r,placement:"left-start",offset:36,shift:!0}),[r]);return(0,Jp.jsx)(yS,{children:(0,Jp.jsx)(dr,{label:(0,mx.__)("Format"),ref:o,children:(0,Jp.jsx)(wL.Dropdown,{popoverProps:n,contentClassName:"editor-post-format__dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:s})=>(0,Jp.jsx)(wL.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,Jp.jsxs)("div",{className:"editor-post-format__dialog-content",children:[(0,Jp.jsx)(q2e.__experimentalInspectorPopoverHeader,{title:(0,mx.__)("Format"),onClose:i}),(0,Jp.jsx)(XE,{})]})})})})}var K2e=xlt;var Z2e=a(G(),1),X2e=a(Y(),1),SL=a(z(),1),Q2e=a(an(),1);var $q=a(E(),1);function J2e(){let e=(0,X2e.useSelect)(t=>t(I).getEditedPostAttribute("modified"),[]);return e?(0,$q.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,$q.jsx)(Z2e.__experimentalText,{children:(0,SL.sprintf)((0,SL.__)("Last edited %s."),(0,Q2e.humanTimeDiff)(e))})}):null}var $2e=a(G(),1),eAe=a(E(),1);function Clt({className:e,children:t}){return(0,eAe.jsx)($2e.__experimentalVStack,{className:J("editor-post-panel__section",e),children:t})}var hx=Clt;var $p=a(z(),1),tAe=a(ke(),1),xL=a(Y(),1),eK=a(ne(),1),rAe=a(Lt(),1),gx=a(G(),1),CL=a(U(),1),oAe=a(be(),1);var Qd=a(E(),1),Tlt={};function nAe(){let{editEntityRecord:e}=(0,xL.useDispatch)(eK.store),{postsPageTitle:t,postsPageId:r,isTemplate:o,postSlug:n}=(0,xL.useSelect)(d=>{let{getEntityRecord:f,getEditedEntityRecord:m,canUser:h}=d(eK.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):Tlt,{getEditedPostAttribute:b,getCurrentPostType:_}=d(I);return{postsPageId:v?.id,postsPageTitle:v?.title,isTemplate:_()===xr,postSlug:b("slug")}},[]),[i,s]=(0,CL.useState)(null),l=(0,CL.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,rAe.decodeEntities)(t);return(0,Qd.jsx)(dr,{label:(0,$p.__)("Blog title"),ref:s,children:(0,Qd.jsx)(gx.Dropdown,{popoverProps:l,contentClassName:"editor-blog-title-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:d,onToggle:f})=>(0,Qd.jsx)(gx.Button,{size:"compact",variant:"tertiary","aria-expanded":d,"aria-label":(0,$p.sprintf)((0,$p.__)("Change blog title: %s"),u),onClick:f,children:u}),renderContent:({onClose:d})=>(0,Qd.jsxs)(Qd.Fragment,{children:[(0,Qd.jsx)(oAe.__experimentalInspectorPopoverHeader,{title:(0,$p.__)("Blog title"),onClose:d}),(0,Qd.jsx)(gx.__experimentalInputControl,{placeholder:(0,$p.__)("No title"),value:t,onChange:(0,tAe.debounce)(c,300),label:(0,$p.__)("Blog title"),help:(0,$p.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),hideLabelFromVision:!0})]})})})}var vx=a(z(),1),TL=a(Y(),1),tK=a(ne(),1),bx=a(G(),1),EL=a(U(),1),iAe=a(be(),1);var Jd=a(E(),1);function sAe(){let{editEntityRecord:e}=(0,TL.useDispatch)(tK.store),{postsPerPage:t,isTemplate:r,postSlug:o}=(0,TL.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()===xr,postSlug:u("slug"),postsPerPage:h?.posts_per_page||1}},[]),[n,i]=(0,EL.useState)(null),s=(0,EL.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,Jd.jsx)(dr,{label:(0,vx.__)("Posts per page"),ref:i,children:(0,Jd.jsx)(bx.Dropdown,{popoverProps:s,contentClassName:"editor-posts-per-page-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,Jd.jsx)(bx.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,vx.__)("Change posts per page"),onClick:u,children:t}),renderContent:({onClose:c})=>(0,Jd.jsxs)(Jd.Fragment,{children:[(0,Jd.jsx)(iAe.__experimentalInspectorPopoverHeader,{title:(0,vx.__)("Posts per page"),onClose:c}),(0,Jd.jsx)(bx.__experimentalNumberControl,{placeholder:0,value:t,spinControls:"custom",step:"1",min:"1",onChange:l,label:(0,vx.__)("Posts per page"),help:(0,vx.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),hideLabelFromVision:!0})]})})})}var ja=a(z(),1),PL=a(Y(),1),rK=a(ne(),1),$d=a(G(),1),kL=a(U(),1),aAe=a(be(),1);var pc=a(E(),1),Elt=[{label:(0,ja._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,ja.__)("Visitors can add new comments and replies.")},{label:(0,ja.__)("Closed"),value:"",description:[(0,ja.__)("Visitors cannot add new comments or replies."),(0,ja.__)("Existing comments remain visible.")].join(" ")}];function lAe(){let{editEntityRecord:e}=(0,PL.useDispatch)(rK.store),{allowCommentsOnNewPosts:t,isTemplate:r,postSlug:o}=(0,PL.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(I),{getEditedEntityRecord:f,canUser:m}=c(rK.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===xr,postSlug:u("slug"),allowCommentsOnNewPosts:h?.default_comment_status||""}},[]),[n,i]=(0,kL.useState)(null),s=(0,kL.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,pc.jsx)(dr,{label:(0,ja.__)("Discussion"),ref:i,children:(0,pc.jsx)($d.Dropdown,{popoverProps:s,contentClassName:"editor-site-discussion-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,pc.jsx)($d.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,ja.__)("Change discussion settings"),onClick:u,children:t?(0,ja.__)("Comments open"):(0,ja.__)("Comments closed")}),renderContent:({onClose:c})=>(0,pc.jsxs)(pc.Fragment,{children:[(0,pc.jsx)(aAe.__experimentalInspectorPopoverHeader,{title:(0,ja.__)("Discussion"),onClose:c}),(0,pc.jsxs)($d.__experimentalVStack,{spacing:3,children:[(0,pc.jsx)($d.__experimentalText,{children:(0,ja.__)("Changes will apply to new posts only. Individual posts may override these settings.")}),(0,pc.jsx)($d.RadioControl,{className:"editor-site-discussion__options",hideLabelFromVision:!0,label:(0,ja.__)("Comment status"),options:Elt,onChange:l,selected:t})]})]})})})}var fr=a(E(),1),Plt="post-status";function uAe({onActionPerformed:e}){let{isRemovedPostStatusPanel:t,postType:r,postId:o}=(0,cAe.useSelect)(n=>{let{isEditorPanelRemoved:i,getCurrentPostType:s,getCurrentPostId:l}=n(I);return{isRemovedPostStatusPanel:i(Plt),postType:s(),postId:l()}},[]);return(0,fr.jsx)(hx,{className:"editor-post-summary",children:(0,fr.jsx)(uS.Slot,{children:n=>(0,fr.jsx)(fr.Fragment,{children:(0,fr.jsxs)(oe,{direction:"column",gap:"lg",children:[(0,fr.jsx)(Wg,{postType:r,postId:o,onActionPerformed:e}),(0,fr.jsx)(D6,{withPanelBody:!1}),(0,fr.jsx)(j1e,{}),(0,fr.jsxs)(oe,{direction:"column",gap:"xs",children:[(0,fr.jsx)(G2e,{}),(0,fr.jsx)(J2e,{})]}),!t&&(0,fr.jsxs)(oe,{direction:"column",gap:"lg",children:[(0,fr.jsxs)(oe,{direction:"column",gap:"xs",children:[(0,fr.jsx)(ZY,{}),(0,fr.jsx)(TF,{}),(0,fr.jsx)(eD,{}),(0,fr.jsx)(g6,{}),(0,fr.jsx)(c6,{}),(0,fr.jsx)(E6,{}),(0,fr.jsx)(oCe,{}),(0,fr.jsx)(K3,{}),(0,fr.jsx)(kF,{}),(0,fr.jsx)(nAe,{}),(0,fr.jsx)(sAe,{}),(0,fr.jsx)(lAe,{}),(0,fr.jsx)(K2e,{}),n]}),(0,fr.jsx)(HS,{onActionPerformed:e})]})]})})})})}var xAe=a(z(),1),em=a(Y(),1),yx=a(ne(),1);var BP=a(U(),1);var dAe=a(U(),1),fAe=a(Y(),1),Alt=a(Dt(),1);var Ilt=a(Y(),1),Olt=a(Dt(),1);var hAe=a(Y(),1),gAe=a(ne(),1);var pAe=a(vf(),1),{lock:L_r,unlock:mAe}=(0,pAe.__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 oK({kind:e,name:t,fields:r}){let o=Array.isArray(r)?r:r?.split(","),n=o?[...o].sort().join(","):void 0;return(0,hAe.useSelect)(i=>mAe(i(gAe.store)).getViewConfig(e,t,{fields:n}),[e,t,n])}var _Ae=a(z(),1);var vAe=a(G(),1),RL=a(Y(),1),AL=a(z(),1),bAe=a(ho(),1);var yAe=a(E(),1);function wAe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=(0,RL.useSelect)(i=>{let{getCurrentPostLastRevisionId:s,getCurrentPostRevisionsCount:l,getEditorSettings:c}=i(I);return{lastRevisionId:s(),revisionsCount:l(),disableVisualRevisions:!!c().disableVisualRevisions}},[]),{setCurrentRevisionId:o}=K((0,RL.useDispatch)(I)),n=r?{href:(0,bAe.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,yAe.jsx)(vAe.Button,{...n,variant:"link",text:String(t),"aria-label":(0,AL.sprintf)((0,AL._n)("Open revisions screen: %d revision","Open revisions screen: %d revisions",t),t)})}var Nlt={id:"revisions",label:(0,_Ae.__)("Revisions"),readOnly:!0,enableSorting:!1,render:wAe,isVisible:e=>{let t=e._links?.["version-history"]?.[0]?.count??0;return!!(e._links?.["predecessor-version"]?.[0]?.id??null)&&t>=2}},SAe=Nlt;var mc=a(E(),1),Mlt={layout:{type:"panel"},fields:[]},Flt=["form"];function Dlt(e){let{isPostStatusRemoved:t,featuredImageEnabled:r,excerptEnabled:o,discussionEnabled:n,pageAttributesEnabled:i}=(0,em.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,BP.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 IL={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(yx.store).getEditedEntityRecord("root","site")?.page_for_posts,fields:["posts_page_title"],isVisible:e=>["home","index"].includes(e.slug??"")}}};function Llt(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 CAe({onActionPerformed:e}){let{postType:t,postId:r,isPostStatusRemoved:o,availableTemplates:n}=(0,em.useSelect)(_=>{let{getCurrentPostType:y,getCurrentPostId:w,isEditorPanelRemoved:S,getEditorSettings:x}=_(I),C=_(yx.store).getCurrentTheme()?.is_block_theme?null:x().availableTemplates??null;return{postType:y(),postId:w(),isPostStatusRemoved:S("post-status"),availableTemplates:C}},[]),{form:i}=oK({kind:"postType",name:t,fields:Flt}),s=Dlt(i??Mlt),l=(0,em.useSelect)(_=>!t||!r?null:_(yx.store).getEditedEntityRecord("postType",t,r),[t,r]),c=aS(),u=(0,em.useSelect)(_=>{let{getEditedEntityRecord:y,canUser:w}=_(yx.store),S={};for(let[x,C]of Object.entries(IL[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,BP.useMemo)(()=>{if(!l)return l;let _={...u};return n&&Object.keys(n).length&&(_.available_templates=n),{...l,..._}},[l,u,n]),{editEntityRecord:f}=(0,em.useDispatch)(yx.store),m=(0,em.useRegistry)(),h=(0,BP.useMemo)(()=>{let _={};for(let[y,w]of Object.entries(IL[t]??{}))for(let S of w.fields??[])_[S]=y;return _},[t]),g=U_({postType:t}),v=(0,BP.useMemo)(()=>g?.map(_=>{let y=h[_.id];return y?Llt(_,y,IL[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,xAe.__)("Default template")}:_:null:_}).filter(Boolean).concat(SAe),[g,c,n,h,t]);return(0,mc.jsx)(hx,{className:"editor-post-summary",children:(0,mc.jsxs)(oe,{direction:"column",gap:"lg",children:[(0,mc.jsx)(Wg,{postType:t,postId:r,onActionPerformed:e}),(0,mc.jsx)(RT,{data:d,fields:v,form:s,onChange:_=>{let y=IL[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,mc.jsxs)(mc.Fragment,{children:[(0,mc.jsx)(uS.Slot,{children:_=>_.length>0&&(0,mc.jsx)(oe,{direction:"column",gap:"xs",children:_})}),(0,mc.jsx)(HS,{onActionPerformed:e})]})]})})}var BAe=a(Y(),1),ML=a(G(),1),VAe=a(z(),1),jAe=a(ho(),1);var OL=a(Y(),1),PAe=a(ne(),1);var tm=a(an(),1),xu=a(U(),1),Gg=a(z(),1);var hc=a(E(),1),Blt=10,TAe=[],Vlt={pickerActivity:!0},jlt={type:"pickerActivity",titleField:"date",descriptionField:"details",fields:["author"],layout:{density:"compact"},page:1,perPage:Blt},zlt=864e5;function EAe(e){let t=(0,tm.getDate)(null).getTime(),r=(0,tm.getDate)(e??null);return t-r.getTime()>zlt?(0,tm.dateI18n)((0,tm.getSettings)().formats.datetimeAbbreviated,r):(0,tm.humanTimeDiff)(r)}function kAe(e){return e.slug?.endsWith("-autosave-v1")??!1}function Hlt({item:e}){return kAe(e)?(0,hc.jsx)(aC,{intent:"none",children:(0,Gg.__)("Autosave")}):null}function RAe(){let{setCurrentRevisionId:e}=K((0,OL.useDispatch)(I)),[t,r]=(0,xu.useState)(jlt),{revisions:o,revisionKey:n,currentRevisionId:i}=(0,OL.useSelect)(h=>{let{getCurrentPostType:g}=h(I),{getCurrentRevisionId:v,getRevisionPage:b,getPageRevisions:_}=K(h(I)),{getEntityConfig:y}=h(PAe.store),w=g(),x=y("postType",w)?.revisionKey||"id",C=v();return{revisions:_(b()),revisionKey:x,currentRevisionId:C}},[]),s=!o,l=(0,xu.useMemo)(()=>[{id:"date",label:(0,Gg.__)("Date"),getValue:({item:h})=>{let g=EAe(h.date);return kAe(h)?(0,Gg.sprintf)((0,Gg.__)("%1$s, %2$s"),g,(0,Gg.__)("Autosave")):g},render:({item:h})=>(0,hc.jsxs)(oe,{direction:"row",align:"center",gap:"sm",children:[(0,hc.jsx)(ys,{variant:"heading-sm",render:(0,hc.jsx)("time",{dateTime:h.date}),children:EAe(h.date)}),(0,hc.jsx)(Hlt,{item:h})]}),enableSorting:!1,enableHiding:!1},BC,{id:"details",label:(0,Gg.__)("Details"),render:({item:h})=>String(h[n])!==String(i)?null:(0,hc.jsx)(Jq,{postContent:h.content?.raw}),enableSorting:!1,enableHiding:!1}],[n,i]),{data:c,paginationInfo:u}=(0,xu.useMemo)(()=>qU(o||TAe,t,l),[o,t,l]);(0,xu.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,xu.useMemo)(()=>i?[String(i)]:TAe,[i]),f=(0,xu.useCallback)(h=>{if(h.length===0)return;let g=h[h.length-1];e(Number(g))},[e]),m=(0,xu.useCallback)(h=>String(h[n]),[n]);return(0,hc.jsx)("div",{className:"editor-post-revisions-timeline",children:(0,hc.jsxs)(TT,{view:t,onChangeView:r,fields:l,data:c,isLoading:s,paginationInfo:u,defaultLayouts:Vlt,getItemId:m,selection:d,onChangeSelection:f,children:[(0,hc.jsx)(TT.Layout,{}),(0,hc.jsx)(TT.Footer,{})]})})}var NAe=a(Y(),1),MAe=a(U(),1),FAe=a(z(),1);var AAe=a(G(),1);var Yg=a(E(),1);function NL({title:e,entries:t,initialOpen:r,className:o}){if(!t)return null;let n=Object.entries(t).map(([i,s])=>(0,Yg.jsx)(dr,{label:i,children:(0,Yg.jsx)("span",{className:"editor-revision-fields-diff__value",children:s.map((l,c)=>l.added?(0,Yg.jsx)("ins",{className:"editor-revision-fields-diff__added",children:l.value},c):l.removed?(0,Yg.jsx)("del",{className:"editor-revision-fields-diff__removed",children:l.value},c):(0,Yg.jsx)("span",{children:l.value},c))})},i));return(0,Yg.jsx)(AAe.PanelBody,{title:e,initialOpen:r,children:(0,Yg.jsx)("div",{className:o,children:n})})}var DAe=a(E(),1);function IAe(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function OAe(e){return!e||e==="[]"||e==="{}"}function LAe(){let{revision:e,previousRevision:t}=(0,NAe.useSelect)(o=>{let{getCurrentRevision:n,getPreviousRevision:i}=K(o(I));return{revision:n(),previousRevision:i()}},[]),r=(0,MAe.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=IAe(o[l]),u=IAe(n[l]);OAe(c)&&OAe(u)||(s[l]=L_(u,c))}return Object.keys(s).length===0?null:s},[e,t]);return(0,DAe.jsx)(NL,{title:(0,FAe.__)("Meta"),entries:r,initialOpen:!1,className:"editor-revision-meta-diff__content"})}var Cu=a(E(),1);function zAe(){let{revisionId:e,postId:t}=(0,BAe.useSelect)(r=>{let{getCurrentRevisionId:o,getCurrentPostId:n}=K(r(I));return{revisionId:o(),postId:n()}},[]);return e?(0,Cu.jsxs)(Cu.Fragment,{children:[(0,Cu.jsx)(hx,{className:"editor-post-summary",children:(0,Cu.jsxs)(ML.__experimentalVStack,{spacing:4,children:[(0,Cu.jsx)(Wg,{postId:t,hideActions:!0}),(0,Cu.jsx)(ML.ExternalLink,{href:(0,jAe.addQueryArgs)("revision.php",{revision:e}),children:(0,VAe.__)("Open classic revisions screen")})]})}),(0,Cu.jsx)(LAe,{}),(0,Cu.jsx)(RAe,{})]}):null}var jP=a(Y(),1),iK=a(ne(),1),KAe=a(G(),1),sK=a(z(),1),ZAe=a(be(),1),XAe=a(At(),1);var HAe=a(Y(),1),UAe=a(U(),1),nK=a(ne(),1),WAe=a(At(),1),GAe=a(kl(),1);var{EXCLUDED_PATTERN_SOURCES:Ult,PATTERN_TYPES:Wlt}=K(GAe.privateApis);function YAe(e,t){return e.innerBlocks=e.innerBlocks.map(r=>YAe(r,t)),e.name==="core/template-part"&&e.attributes.theme===void 0&&(e.attributes.theme=t),e}function Glt(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:!Ult.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 Ylt(e,t){return e.map(r=>({...r,keywords:r.keywords||[],type:Wlt.theme,blocks:(0,WAe.parse)(r.content,{__unstableSkipMigrationLogs:!0}).map(o=>YAe(o,t))}))}function qAe({area:e,name:t,slug:r}){let{blockPatterns:o,restBlockPatterns:n,currentThemeStylesheet:i}=(0,HAe.useSelect)(s=>{let{getEditorSettings:l}=s(I),c=l();return{blockPatterns:c.__experimentalAdditionalBlockPatterns??c.__experimentalBlockPatterns,restBlockPatterns:s(nK.store).getBlockPatterns(),currentThemeStylesheet:s(nK.store).getCurrentTheme().stylesheet}},[]);return(0,UAe.useMemo)(()=>{let s=[...o||[],...n||[]],l=Glt(s,{area:e,name:t,slug:r});return Ylt(l,i)},[e,t,r,o,n,i])}var VP=a(E(),1);function qlt({availableTemplates:e,onSelect:t}){return!e||e?.length===0?null:(0,VP.jsx)(ZAe.__experimentalBlockPatternsList,{label:(0,sK.__)("Templates"),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0})}function Klt(){let{area:e,name:t,slug:r,postType:o,postId:n}=(0,jP.useSelect)(c=>{let{getCurrentPostType:u,getCurrentPostId:d}=c(I),{getEditedEntityRecord:f}=c(iK.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,jP.useDispatch)(iK.store),s=qAe({area:e,name:t,slug:r}),l=async c=>{await i("postType",o,n,{blocks:c.blocks,content:(0,XAe.serialize)(c.blocks)})};return s?.length?(0,VP.jsx)(KAe.PanelBody,{title:(0,sK.__)("Design"),initialOpen:o===Ai,children:(0,VP.jsx)(qlt,{availableTemplates:s,onSelect:l})}):null}function QAe(){let{postType:e}=(0,jP.useSelect)(t=>{let{getCurrentPostType:r}=t(I);return{postType:r()}},[]);return[Ai,xr].includes(e)?(0,VP.jsx)(Klt,{}):null}var JAe=a(G(),1),zP=a(z(),1),$Ae=a(Y(),1),eIe=a(U(),1),tIe=a(Lt(),1);var HP=a(E(),1),{Tabs:aK}=K(JAe.privateApis),Zlt=(e,t)=>{let{postTypeLabel:r,isRevisionsMode:o}=(0,$Ae.useSelect)(i=>{let{getPostTypeLabel:s}=i(I),{isRevisionsMode:l}=K(i(I));return{postTypeLabel:s(),isRevisionsMode:l()}},[]),n;return o?n=(0,zP.__)("Revision"):r?n=(0,tIe.decodeEntities)(r):n=(0,zP._x)("Document","noun, panel"),(0,HP.jsxs)(aK.TabList,{ref:t,children:[(0,HP.jsx)(aK.Tab,{tabId:Ba.document,"data-tab-id":Ba.document,children:n}),(0,HP.jsx)(aK.Tab,{tabId:Ba.block,"data-tab-id":Ba.block,children:(0,zP.__)("Block")})]})},rIe=(0,eIe.forwardRef)(Zlt);var wx=a(Y(),1),_x=a(ne(),1),lK=a(be(),1),om=a(G(),1),cK=a(U(),1),rm=a(z(),1),oIe=a(Lt(),1),FL=a(Oo(),1),nIe=a(It(),1),iIe=a(Dt(),1);var Ln=a(E(),1);function sIe(){let e=(0,wx.useSelect)(x=>x(I).getCurrentTemplateId(),[]),[t,r]=(0,cK.useState)(!1),[o,n]=(0,cK.useState)(!1),s=!!UE()?.length,{onNavigateToEntityRecord:l,canCreateTemplate:c,hasGoBack:u,getEditorSettings:d}=(0,wx.useSelect)(x=>{let{getEditorSettings:C}=x(I),A=C();return{onNavigateToEntityRecord:A.onNavigateToEntityRecord,canCreateTemplate:!!x(_x.store).canUser("create",{kind:"postType",name:"wp_template"}),hasGoBack:A.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:C}},[]),{get:f}=(0,wx.useSelect)(iIe.store),{createSuccessNotice:m}=(0,wx.useDispatch)(nIe.store),{editedRecord:h,hasResolved:g}=(0,_x.useEntityRecord)("postType","wp_template",e),[v]=(0,_x.useEntityBlockEditor)("postType","wp_template",{id:e});if(!g)return null;let b=u?[{label:(0,rm.__)("Go back"),onClick:()=>d().onNavigateToPreviousEntityRecord()}]:void 0,_=()=>{f("core/edit-site","welcomeGuideTemplate")||m((0,rm.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:b})},y=(0,oIe.decodeEntities)(h.title),w=!!v?.length&&(0,Ln.jsx)(lK.BlockPreview.Async,{children:(0,Ln.jsx)(lK.BlockPreview,{blocks:v})}),S=()=>{if(!w)return null;if(s){let x=(0,rm.__)("Change template");return(0,Ln.jsxs)(Ke.Root,{children:[(0,Ln.jsx)(Ke.Trigger,{render:(0,Ln.jsx)("div",{className:"editor-template-actions-panel__preview",role:"button",tabIndex:0,"aria-label":x,onClick:()=>n(!0),onKeyDown:C=>{(C.keyCode===FL.ENTER||C.keyCode===FL.SPACE)&&(C.preventDefault(),n(!0))},children:w})}),(0,Ln.jsx)(Ke.Popup,{children:x})]})}return(0,Ln.jsx)("div",{className:"editor-template-actions-panel__preview",children:w})};return(0,Ln.jsxs)(Ln.Fragment,{children:[(0,Ln.jsx)(om.PanelBody,{title:(0,rm.sprintf)((0,rm.__)("Template: %s"),y),initialOpen:!1,children:(0,Ln.jsxs)(om.__experimentalVStack,{children:[S(),(0,Ln.jsxs)(om.__experimentalHStack,{children:[l&&(0,Ln.jsx)(om.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{l({postId:h.id,postType:"wp_template"}),_()},children:(0,rm.__)("Edit")}),c&&(0,Ln.jsx)(om.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:(0,rm.__)("Create new")})]})]})}),t&&(0,Ln.jsx)(hg,{onClose:()=>r(!1)}),o&&(0,Ln.jsx)(gY,{onRequestClose:()=>n(!1)})]})}var Sx=a(Y(),1),xx=a(ne(),1),uK=a(be(),1),Eu=a(G(),1),aIe=a(U(),1),Tu=a(z(),1),lIe=a(Lt(),1),cIe=a(It(),1),uIe=a(Dt(),1);var Zs=a(E(),1);function dIe(){let e=(0,Sx.useSelect)(v=>v(I).getCurrentTemplateId(),[]),[t,r]=(0,aIe.useState)(!1),{onNavigateToEntityRecord:o,canCreateTemplate:n,hasGoBack:i,getEditorSettings:s}=(0,Sx.useSelect)(v=>{let{getEditorSettings:b}=v(I),_=b();return{onNavigateToEntityRecord:_.onNavigateToEntityRecord,canCreateTemplate:!!v(xx.store).canUser("create",{kind:"postType",name:"wp_template"})&&_.supportsTemplateMode,hasGoBack:_.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:b}},[]),{get:l}=(0,Sx.useSelect)(uIe.store),{createSuccessNotice:c}=(0,Sx.useDispatch)(cIe.store),{editedRecord:u}=(0,xx.useEntityRecord)("postType","wp_template",e),[d]=(0,xx.useEntityBlockEditor)("postType","wp_template",{id:e});if(!e&&!n)return null;let f=i?[{label:(0,Tu.__)("Go back"),onClick:()=>s().onNavigateToPreviousEntityRecord()}]:void 0,m=()=>{l("core/edit-site","welcomeGuideTemplate")||c((0,Tu.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:f})},h=u?(0,lIe.decodeEntities)(u.title):void 0,g=!!d?.length&&(0,Zs.jsx)(uK.BlockPreview.Async,{children:(0,Zs.jsx)(uK.BlockPreview,{blocks:d})});return(0,Zs.jsxs)(Zs.Fragment,{children:[(0,Zs.jsx)(Eu.PanelBody,{title:u?(0,Tu.sprintf)((0,Tu.__)("Template: %s"),h):(0,Tu.__)("Template"),initialOpen:!1,children:(0,Zs.jsxs)(Eu.__experimentalVStack,{children:[!e&&(0,Zs.jsx)(Eu.__experimentalText,{children:(0,Tu.__)("This page uses a classic template. To edit this template with blocks, create a block template.")}),u&&g&&(0,Zs.jsx)("div",{className:"editor-template-actions-panel__preview",children:g}),(0,Zs.jsxs)(Eu.__experimentalHStack,{children:[u&&o&&(0,Zs.jsx)(Eu.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o({postId:u.id,postType:"wp_template"}),m()},children:(0,Tu.__)("Edit")}),n&&(0,Zs.jsx)(Eu.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:e?(0,Tu.__)("Create new"):(0,Tu.__)("Create block template")})]})]})}),t&&(0,Zs.jsx)(hg,{onClose:()=>r(!1)})]})}var dK=a(E(),1);function fIe(){let e=aS();return e==="classic"?(0,dK.jsx)(dIe,{}):e==="block-theme"?(0,dK.jsx)(sIe,{}):null}var UP=a(Y(),1),pIe=a(be(),1),mIe=a(G(),1),hIe=a(z(),1);var DL=a(E(),1),{BlockQuickNavigation:Xlt}=K(pIe.privateApis),Qlt="core/template-part";function Jlt({postType:e}){let t=FM(),r=(0,UP.useSelect)(n=>{let{getPostBlocksByName:i}=K(n(I));return i(xr===e?Qlt:t)},[e,t]),{enableComplementaryArea:o}=(0,UP.useDispatch)(He);return r.length===0?null:(0,DL.jsx)(mIe.PanelBody,{title:(0,hIe.__)("Content"),children:(0,DL.jsx)(Xlt,{clientIds:r,onSelect:()=>{o("core","edit-post/document")}})})}function gIe(){let{postType:e,renderingMode:t}=(0,UP.useSelect)(r=>{let{getCurrentPostType:o,getRenderingMode:n}=K(r(I));return{postType:o(),renderingMode:n()}},[]);return t==="post-only"&&e!==xr?null:(0,DL.jsx)(Jlt,{postType:e})}var LL=a(Y(),1),vIe=a(U(),1),bIe=a(At(),1),VL=a(be(),1),yIe=a(G(),1),wIe=a(z(),1);var BL=a(E(),1),{BlockQuickNavigation:$lt}=K(VL.privateApis);function ect(){let e=(0,LL.useSelect)(o=>{let{getBlockTypes:n}=o(bIe.store);return n()},[]),t=(0,vIe.useMemo)(()=>e.filter(o=>o.category==="theme").map(({name:o})=>o),[e]),r=(0,LL.useSelect)(o=>{let{getBlocksByName:n}=o(VL.store);return n(t)},[t]);return r.length===0?null:(0,BL.jsx)(yIe.PanelBody,{title:(0,wIe.__)("Content"),children:(0,BL.jsx)($lt,{clientIds:r})})}function _Ie(){return(0,LL.useSelect)(t=>{let{getCurrentPostType:r}=t(I);return r()},[])!==Ai?null:(0,BL.jsx)(ect,{})}var SIe=a(be(),1),xIe=a(Y(),1),CIe=a(z(),1);var TIe=a(E(),1);function EIe(){let{block:e}=(0,xIe.useSelect)(r=>{let{getSelectedBlock:o}=r(SIe.store);return{block:o()}},[]);if(!e)return null;let t=e.attributes?.__revisionDiffStatus?.changedAttributes;return(0,TIe.jsx)(NL,{title:(0,CIe.__)("Changed attributes"),entries:t,initialOpen:!0})}var Cx=a(Y(),1),PIe=a(U(),1),kIe=a(be(),1),RIe=a(Dt(),1);function tct(){let{hasBlockSelection:e}=(0,Cx.useSelect)(n=>({hasBlockSelection:!!n(kIe.store).getBlockSelectionStart()}),[]),{getActiveComplementaryArea:t}=(0,Cx.useSelect)(He),{enableComplementaryArea:r}=(0,Cx.useDispatch)(He),{get:o}=(0,Cx.useSelect)(RIe.store);(0,PIe.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 AIe=tct;var Jr=a(E(),1),{Tabs:Tx}=K(OIe.privateApis),rct=!0,oct=({tabName:e,keyboardShortcut:t,onActionPerformed:r,extraPanels:o})=>{let n=(0,qg.useRef)(null),i=(0,qg.useContext)(Tx.Context),s=(0,WP.useSelect)(c=>K(c(I)).isRevisionsMode());(0,qg.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,Jr.jsx)(zAe,{});else{let c=window?.__experimentalDataFormInspector;l=(0,Jr.jsxs)(Jr.Fragment,{children:[c?(0,Jr.jsx)(CAe,{onActionPerformed:r}):(0,Jr.jsx)(uAe,{onActionPerformed:r}),(0,Jr.jsx)(r6.Slot,{}),(0,Jr.jsx)(gIe,{}),c&&(0,Jr.jsx)(fIe,{}),(0,Jr.jsx)(_Ie,{}),(0,Jr.jsx)(QAe,{}),(0,Jr.jsx)(IF,{}),(0,Jr.jsx)(T2e,{}),o]})}return(0,Jr.jsx)(Sy,{identifier:e,header:(0,Jr.jsx)(Tx.Context.Provider,{value:i,children:(0,Jr.jsx)(rIe,{ref:n})}),closeLabel:(0,Ex.__)("Close Settings"),className:"editor-sidebar__panel",headerClassName:"editor-sidebar__panel-tabs",title:(0,Ex._x)("Settings","panel button label"),toggleShortcut:t,icon:(0,Ex.isRTL)()?ev:mf,isActiveByDefault:rct,children:(0,Jr.jsxs)(Tx.Context.Provider,{value:i,children:[(0,Jr.jsx)(Tx.TabPanel,{tabId:Ba.document,focusable:!1,children:l}),(0,Jr.jsxs)(Tx.TabPanel,{tabId:Ba.block,focusable:!1,children:[(0,Jr.jsx)(jL.BlockInspector,{}),s&&(0,Jr.jsx)(EIe,{})]})]})})},nct=({extraPanels:e,onActionPerformed:t})=>{AIe();let{tabName:r,keyboardShortcut:o}=(0,WP.useSelect)(s=>{let l=s(IIe.store).getShortcutRepresentation("core/editor/toggle-sidebar"),c=s(He).getActiveComplementaryArea("core"),u=[Ba.block,Ba.document].includes(c),d=c;return u||(d=s(jL.store).getBlockSelectionStart()?Ba.block:Ba.document),{tabName:d,keyboardShortcut:l}},[]),{enableComplementaryArea:n}=(0,WP.useDispatch)(He),i=(0,qg.useCallback)(s=>{s&&n("core",s)},[n]);return(0,Jr.jsx)(Tx,{selectedTabId:r,onSelect:i,selectOnMove:!1,children:(0,Jr.jsx)(oct,{tabName:r,keyboardShortcut:o,onActionPerformed:t,extraPanels:e})})},NIe=nct;var t4=a(z(),1),af=a(Y(),1),r4=a(U(),1),SOe=a(ke(),1),xOe=a(ya(),1);var yK=a(be(),1);var COe=a(Dt(),1),o4=a(Vc(),1);var nm="edit-post/collab-history-sidebar",ef="edit-post/collab-sidebar",fK=[nm,ef];var sf=a(U(),1),XL=a(z(),1),Ix=a(Y(),1);var QP=a(be(),1);var Kg=a(U(),1),YL=a(G(),1);var KIe=a(ke(),1),as=a(z(),1),ZP=a(Y(),1),ZIe=a(sg(),1),qL=a(be(),1);var mK=a(z(),1),GP=a(U(),1),Rx=a(Y(),1),YP=a(be(),1);var BIe=a(G(),1);var zL=a(z(),1),tf=a(an(),1),MIe=a(ne(),1),FIe=a(Y(),1),DIe=a(be(),1);var gc=a(E(),1);function LIe({avatar:e,name:t,date:r,userId:o}){let n=!!e,i=(0,tf.getSettings)(),{currentUserAvatar:s,currentUserName:l,currentUserId:c,dateFormat:u=i.formats.date}=(0,FIe.useSelect)(v=>{let{canUser:b,getCurrentUser:_,getEntityRecord:y}=v(MIe.store),w=b("read",{kind:"root",name:"site"})?y("root","site"):void 0;if(n)return{dateFormat:w?.date_format};let{getSettings:S}=v(DIe.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,tf.getDate)(r),f=(0,tf.dateI18n)("c",d),h=Math.floor((new Date-d)/(1e3*60*60*24))<30?(0,tf.humanTimeDiff)(d):(0,tf.dateI18n)(u,d),g=(0,tf.dateI18n)((0,zL._x)("F j, Y g:i\xA0a","Note date full date format"),r);return(0,gc.jsxs)(gc.Fragment,{children:[(0,gc.jsx)("img",{src:e||s,className:"editor-collab-sidebar-panel__user-avatar",alt:(0,zL.__)("User avatar"),width:32,height:32,style:{borderColor:Da(o??c)}}),(0,gc.jsxs)(oe,{direction:"column",children:[(0,gc.jsx)("span",{className:"editor-collab-sidebar-panel__user-name",children:t??l}),r&&(0,gc.jsxs)(Ke.Root,{children:[(0,gc.jsx)(Ke.Trigger,{render:(0,gc.jsx)("time",{dateTime:f,className:"editor-collab-sidebar-panel__user-time",children:h})}),(0,gc.jsx)(Ke.Popup,{children:g})]})]})]})}var Yy=a(E(),1);function Px({note:e,actions:t,className:r,children:o,...n}){return(0,Yy.jsxs)(oe,{direction:"column",gap:"sm",className:r,...n,children:[(0,Yy.jsxs)(oe,{direction:"row",align:"center",justify:"flex-start",gap:"md",children:[(0,Yy.jsx)(LIe,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date,userId:e?.author}),t&&(0,Yy.jsx)(BIe.FlexItem,{className:"editor-collab-sidebar-panel__note-actions",onClick:i=>i.stopPropagation(),children:(0,Yy.jsx)(oe,{direction:"row",align:"center",children:t})})]}),o]})}var pK=a(U(),1),kx=a(G(),1);var HL=a(z(),1),WIe=a(ke(),1),GIe=a(Oo(),1);var YIe=a(sg(),1);var VIe=a(U(),1),jIe=a(Y(),1),zIe=a(ne(),1);var HIe=a(E(),1),ict={name:"note-mentions",className:"editor-autocompleters__user editor-collab-sidebar-panel__mention-suggestion",triggerPrefix:"@",useItems(e){let t=(0,jIe.useSelect)(o=>{let{getUsers:n}=o(zIe.store);return n({context:"view",search:encodeURIComponent(e)})},[e]);return[(0,VIe.useMemo)(()=>t?t.map(o=>({key:`note-mention-${o.slug}`,value:o,label:MG(o)})):[],[t])]},getOptionCompletion(e){return{action:"insert-at-caret",value:(0,HIe.jsx)("a",{className:`wp-note-mention user-${e.id}`,href:e.link,children:"@"+e.name})}}},UIe=ict;var rf=a(E(),1),{RichTextControl:sct}=K($5),act=["core/bold","core/italic","core/link","core/code"],lct=[UIe];function qy({onSubmit:e,onCancel:t,note:r,labels:o}){let[n,i]=(0,pK.useState)(r?.content?.raw??""),[s,l]=(0,pK.useState)(!1),c=(0,WIe.useInstanceId)(qy,"comment-input"),u=kke((0,YIe.__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,rf.jsxs)(oe,{className:"editor-collab-sidebar-panel__note-form",direction:"column",gap:"lg",render:(0,rf.jsx)("form",{}),onSubmit:m=>{m.preventDefault(),f()},onKeyDown:m=>{if(GIe.isKeyboardEvent.primary(m,"Enter")){m.preventDefault(),f();return}m.key==="Escape"&&!m.defaultPrevented&&(m.preventDefault(),t(m))},children:[(0,rf.jsx)(sct,{id:c,label:o?.input??(0,HL.__)("Note"),hideLabelFromVision:!0,value:n,onChange:i,allowedFormats:act,completers:lct}),(0,rf.jsxs)(oe,{direction:"row",align:"center",justify:"flex-end",gap:"sm",wrap:"wrap",children:[(0,rf.jsx)(kx.Button,{size:"compact",variant:"tertiary",onClick:t,children:(0,rf.jsx)(kx.__experimentalTruncate,{children:(0,HL.__)("Cancel")})}),(0,rf.jsx)(kx.Button,{size:"compact",accessibleWhenDisabled:!0,variant:"primary",type:"submit",disabled:d,children:(0,rf.jsx)(kx.__experimentalTruncate,{children:o?.submit??(0,HL.__)("Add note")})})]})]})}var qIe=a(E(),1);function UL({floating:e,className:t,style:r,children:o,...n}){let i=!!e;return(0,qIe.jsx)(oe,{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 WL=a(E(),1),{useBlockElement:cct}=K(YP.privateApis);function qP({onSubmit:e,sidebarRef:t,floating:r}){let{clientId:o}=(0,Rx.useSelect)(f=>{let{getSelectedBlockClientId:m}=f(YP.store);return{clientId:m()}},[]),n=(0,Rx.useSelect)(f=>K(f(I)).getSelectedNote(),[]),i=cct(o),{toggleBlockSpotlight:s}=K((0,Rx.useDispatch)(YP.store)),{selectNote:l}=K((0,Rx.useDispatch)(I)),c=(0,GP.useRef)(!1),u=(0,GP.useRef)(void 0);(0,GP.useEffect)(()=>()=>u.current?.(),[]);let d=()=>{l(void 0),i?.focus(),s(o,!1)};return n!=="new"||!o?null:(0,WL.jsx)(UL,{floating:r,className:"editor-collab-sidebar-panel__thread is-selected",gap:"md",tabIndex:0,"aria-label":(0,mK.__)("New note"),role:"treeitem",style:r?{opacity:r.y?void 0:0}:void 0,onFocus:()=>{u.current?.()},onBlur:f=>{if(!document.hasFocus()||c.current)return;let m=f.currentTarget;if(f.relatedTarget&&m.contains(f.relatedTarget))return;let{defaultView:h}=m.ownerDocument;u.current?.();let g=h.requestAnimationFrame(()=>{if(u.current=void 0,c.current)return;let v=m.ownerDocument.activeElement;v&&m.contains(v)||(s(o,!1),l(void 0))});u.current=()=>{h.cancelAnimationFrame(g),u.current=void 0}},children:(0,WL.jsx)(Px,{children:(0,WL.jsx)(qy,{onSubmit:async f=>{c.current=!0;try{let m=await e({content:f});return m&&(l(m.id),ss(m.id,t.current)),m}finally{c.current=!1}},onCancel:d,labels:{input:(0,mK.__)("New note")}})})})}var of=a(U(),1),Ky=a(G(),1);var Sn=a(z(),1);var ci=a(E(),1),{Menu:KP}=K(Ky.privateApis);function uct({items:e,buttonRef:t}){return(0,ci.jsxs)(KP,{placement:"bottom-end",children:[(0,ci.jsx)(KP.TriggerButton,{render:(0,ci.jsx)(Ky.Button,{ref:t,size:"small",icon:go,label:(0,Sn.__)("Actions"),disabled:!e.length,accessibleWhenDisabled:!0})}),(0,ci.jsx)(KP.Popover,{modal:!1,children:e.map(r=>(0,ci.jsx)(KP.Item,{onClick:r.onClick,children:(0,ci.jsx)(KP.ItemLabel,{children:r.title})},r.id))})]})}function GL({note:e,parentNote:t,isSelected:r,onEditNote:o,onDeleteNote:n,onResolve:i}){let[s,l]=(0,of.useState)(null),c=(0,of.useRef)(null),u=(0,of.useRef)(null),d=e?.content?.raw,[f,m]=(0,of.useState)(d),[h,g]=(0,of.useState)(!1),[v,b]=(0,of.useState)(!1);f!==d&&(m(d),g(!1)),(0,of.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,Sn.__)("Edit"),isEligible:({status:R})=>R!=="approved",onClick:()=>l("edit")},{id:"reopen",title:(0,Sn._x)("Reopen","Reopen note"),isEligible:({status:R})=>R==="approved",onClick:()=>o({id:e.id,status:"hold"})},{id:"delete",title:(0,Sn.__)("Delete"),isEligible:()=>!0,onClick:()=>l("delete")}],S=t?.status!=="approved"?w.filter(R=>R.isEligible(e)):[],x=e.parent===0?(0,Sn.__)("Are you sure you want to delete this note? This will also delete all of this note's replies."):(0,Sn.__)("Are you sure you want to delete this reply?"),C=()=>{l(null),c.current?.focus()},A;if(s==="edit")A=(0,ci.jsx)(qy,{onSubmit:R=>{o({id:e.id,content:R}),l(null),c.current?.focus()},onCancel:C,note:e,labels:{submit:(0,Sn._x)("Update","verb"),input:(0,Sn.sprintf)((0,Sn.__)("Edit note %1$s by %2$s"),e.id,e.author_name)}});else{let R;if(y){let N=e.meta._wp_note_status==="resolved"?(0,Sn.__)("Marked as resolved"):(0,Sn.__)("Reopened"),P=e?.content?.raw;R=P&&typeof P=="string"&&P.trim()!==""?(0,Sn.sprintf)((0,Sn.__)("%1$s: %2$s"),N,P):N}else R=e?.content?.rendered;A=(0,ci.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,ci.jsxs)(ci.Fragment,{children:[_&&i&&(0,ci.jsx)(Ky.Button,{label:(0,Sn._x)("Resolve","Mark note as resolved"),size:"small",icon:tv,disabled:e.status==="approved",accessibleWhenDisabled:e.status==="approved",onClick:i}),(0,ci.jsx)(uct,{items:S,buttonRef:c})]}):null;return(0,ci.jsxs)(Px,{note:e,actions:k,role:e.parent!==0?"treeitem":void 0,children:[A,s==="delete"&&(0,ci.jsx)(Ky.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{n(e),l(null)},onCancel:C,confirmButtonText:(0,Sn.__)("Delete"),children:x}),v&&s!=="edit"&&(0,ci.jsx)(nte,{className:"editor-collab-sidebar-panel__show-more-button",variant:"unstyled",size:"small",onClick:()=>g(!h),children:h?(0,Sn.__)("Show less"):(0,Sn.__)("Show more")})]})}var za=a(E(),1),{useBlockElement:dct}=K(qL.privateApis);function XIe({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,ZP.useDispatch)(qL.store)),{selectNote:m}=K((0,ZP.useDispatch)(I)),h=(0,ZP.useRegistry)(),g=dct(e.blockClientId),v=(0,KIe.useDebounce)(u,50),b=(0,Kg.useRef)(null),_=(0,Kg.useRef)(!1),y=(0,Kg.useRef)();(0,Kg.useEffect)(()=>()=>clearTimeout(y.current),[]);let w=s?.registerThread,S=s?.unregisterThread;(0,Kg.useEffect)(()=>{let B=b.current;return B&&w&&w(e.id,g,B),()=>S?.(e.id)},[g,e.id,w,S]),(0,Kg.useEffect)(()=>{!n||e.id==="new"||Dke(e.id,i.current)},[n,s?.y,e.id,i]);let x=()=>{v(e.blockClientId,!0)},C=()=>{v(e.blockClientId,!1)},A=()=>{clearTimeout(y.current),u(e.blockClientId,!0)},k=B=>{if(!document.hasFocus())return;let L=B.relatedTarget?.closest(".editor-collab-sidebar-panel__thread"),O=_.current;L&&!O||O&&B.currentTarget.contains(B.relatedTarget)||(clearTimeout(y.current),y.current=setTimeout(()=>{u(e.blockClientId,!1),K(h.select(I)).getSelectedNote()===e.id&&N()},0))},R=()=>{n||(m(e.id),ss(e.id,i.current),f(e.blockClientId,!0),e.blockClientId&&d(e.blockClientId,null))},N=()=>{m(void 0),f(e.blockClientId,!1)},P=()=>{t({id:e.id,status:"approved"}),N(),c?g?.focus():ss(e.id,i.current)},T=e?.reply||[],M=T.length>0?T[T.length-1]:void 0,j=T.length>0?T.slice(0,-1):[],F=Rke((0,ZIe.__unstableStripHTML)(e.content?.rendered),10),D=e.blockClientId?(0,as.sprintf)((0,as.__)("Note: %s"),F):(0,as.sprintf)((0,as.__)("Original block deleted. Note: %s"),F);return c&&e.id==="new"?(0,za.jsx)(qP,{onSubmit:r,sidebarRef:i,floating:{y:s.y,ref:b}}):(0,za.jsxs)(UL,{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:R,onMouseEnter:x,onMouseLeave:C,onFocus:A,onBlur:k,onKeyUp:B=>{B.key==="Tab"&&(_.current=!1)},onKeyDown:B=>{B.key==="Tab"?_.current=!0:l(B)},tabIndex:0,role:"treeitem","aria-label":D,"aria-expanded":n,children:[(0,za.jsx)(YL.Button,{className:"editor-collab-sidebar-panel__skip-to-note",variant:"secondary",size:"compact",onClick:()=>{ss(e.id,i.current,'[role="textbox"]')},children:(0,as.__)("Add new reply")}),!e.blockClientId&&(0,za.jsx)("p",{className:"editor-collab-sidebar-panel__deleted-block-notice",children:(0,as.__)("Original block deleted.")}),(0,za.jsx)(GL,{note:e,isSelected:n,onEditNote:t,onDeleteNote:o,onResolve:P}),n&&T.map(B=>(0,za.jsx)(GL,{note:B,parentNote:e,isSelected:n,onEditNote:t,onDeleteNote:o},B.id)),!n&&j.length>0&&(0,za.jsx)(oe,{direction:"row",align:"center",justify:"space-between",className:"editor-collab-sidebar-panel__more-reply-separator",children:(0,za.jsx)(YL.Button,{size:"compact",variant:"tertiary",className:"editor-collab-sidebar-panel__more-reply-button",onClick:B=>{B.stopPropagation(),R()},children:(0,as.sprintf)((0,as._n)("%s more reply","%s more replies",j.length),j.length)})}),!n&&M&&(0,za.jsx)(GL,{note:M,parentNote:e,isSelected:!1,onEditNote:t,onDeleteNote:o}),n&&(0,za.jsx)(Px,{role:"treeitem",children:(0,za.jsx)(qy,{onSubmit:B=>e.status==="approved"?t({id:e.id,status:"hold",content:B}):r({content:B,parent:e.id}),onCancel:B=>{B.stopPropagation(),N(),ss(e.id,i.current)},labels:{submit:e.status==="approved"?(0,as.__)("Reopen & Reply"):(0,as.__)("Reply"),input:(0,as.sprintf)((0,as.__)("Reply to note %1$s by %2$s"),e.id,e.author_name)}})}),!!e.blockClientId&&(0,za.jsx)(YL.Button,{className:"editor-collab-sidebar-panel__skip-to-block",variant:"secondary",size:"compact",onClick:B=>{B.stopPropagation(),g?.focus()},children:(0,as.__)("Back to block")})]})}var oOe=a(Pl(),1),Zg=a(z(),1),nf=a(U(),1),ZL=a(ne(),1),Pu=a(Y(),1),Zy=a(be(),1),nOe=a(It(),1),iOe=a(sg(),1),sOe=a(Lt(),1);var Ax=a(Vc(),1);function QIe(){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]},getBlockRects(){return Object.fromEntries(Array.from(t).flatMap(([c,u])=>u?[[c,u.getBoundingClientRect()]]:[]))},getFirstBlockElement(){return t.values().next().value??null}}}var hK=a(z(),1),JIe=a(be(),1),KL=a(Y(),1);var $Ie=a(Vc(),1);var eOe=a(E(),1),XP="core/note",tOe={title:(0,hK.__)("Add note"),tagName:"mark",className:"wp-note",attributes:{"data-id":"data-id"},edit:fct};function fct({value:e,isActive:t,activeAttributes:r}){let o=(0,KL.useDispatch)(),{getActiveComplementaryArea:n}=(0,KL.useSelect)(He);if(!t&&(0,$Ie.isCollapsed)(e))return null;let i=()=>{let s=n("core"),l=s===nm?nm:ef;s!==l&&o(He).enableComplementaryArea("core",l);let c=r["data-id"];K(o(I)).selectNote(c?Number(c):"new",{focus:!0})};return(0,eOe.jsx)(JIe.RichTextToolbarButton,{icon:zx,title:(0,hK.__)("Add note"),onClick:i,isActive:t})}var{cleanEmptyObject:rOe}=K(Zy.privateApis);function aOe(e){let t={post:e,type:"note",status:"all",per_page:-1},{records:r}=(0,ZL.useEntityRecords)("root","comment",t,{enabled:!!e&&typeof e=="number"}),{getBlockAttributes:o}=(0,Pu.useSelect)(Zy.store),{clientIds:n}=(0,Pu.useSelect)(l=>{let{getClientIdsWithDescendants:c}=l(Zy.store);return{clientIds:c()}},[]),{notes:i,unresolvedNotes:s}=(0,nf.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=Ng(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:Ike(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 pct(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 mct(e,t,r,o){if(!(e instanceof Ax.RichTextData))return null;let n=Oke((0,Ax.create)({html:e.toHTMLString()}),{type:XP,attributes:{"data-id":String(t)}},r,o);return Ax.RichTextData.fromHTMLString(new Ax.RichTextData(n).toHTMLString())}function hct(e,t,r,o){for(let n of t()){let i=r(n),s=TD(i,e);if(!s)continue;let l=Cq(i[s.attributeKey],e);l&&o(n,{[s.attributeKey]:l});return}}function lOe(){let{createNotice:e}=(0,Pu.useDispatch)(nOe.store),{saveEntityRecord:t,deleteEntityRecord:r}=(0,Pu.useDispatch)(ZL.store),{getCurrentPostId:o}=(0,Pu.useSelect)(I),{getBlockAttributes:n,getClientIdsWithDescendants:i,getSelectedBlockClientId:s,getSelectionStart:l,getSelectionEnd:c}=(0,Pu.useSelect)(Zy.store),{updateBlockAttributes:u}=(0,Pu.useDispatch)(Zy.store),d=g=>{let v=g.message&&g.code!=="unknown_error"?(0,sOe.decodeEntities)(g.message):(0,Zg.__)("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:pct(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=Ake(S,_.id),C={metadata:rOe(x)};if(b){let A=mct(w?.[b.attributeKey],_.id,b.start,b.end);A&&(C[b.attributeKey]=A)}u(y,C)}return e("snackbar",v?(0,Zg.__)("Reply added."):(0,Zg.__)("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"&&hct(g,i,n,u),(0,oOe.speak)(b==="approved"?(0,Zg.__)("Note marked as resolved."):(0,Zg.__)("Note reopened."))}else await t("root","comment",{id:g,content:v,status:b},{throwOnError:!0}),e("snackbar",(0,Zg.__)("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:rOe(Nke(b?.metadata,g.id))},y=TD(b,g.id);if(y){let w=Cq(b[y.attributeKey],g.id);w&&(_[y.attributeKey]=w)}u(v,_)}e("snackbar",(0,Zg.__)("Note deleted."),{type:"snackbar",isDismissible:!0})}catch(v){d(v)}}}}function cOe(e=!1){let t=(0,Pu.useRegistry)();(0,nf.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",ef)});return()=>{i(),r("core")===ef&&o("core",ef)}},[e,t])}function uOe({threads:e,selectedNoteId:t,isFloating:r,sidebarRef:o}){let[n,i]=(0,nf.useState)({}),[s]=(0,nf.useState)(QIe),l=(0,nf.useSyncExternalStore)(s.subscribe,s.getSnapshot);return(0,nf.useEffect)(()=>{if(!r||!o?.current)return;let c=o.current,u=s.getFirstBlockElement(),d=u?.closest(".is-root-container")??u,f=d?(0,iOe.getScrollContainer)(d):null,m=()=>{c.style.setProperty("--canvas-scroll",`${-(f?.scrollTop??0)}px`)},h=window.requestAnimationFrame(()=>{let b=Mke({threads:e,selectedNoteId:t,blockRects:s.getBlockRects(),heights:l,scrollTop:f?.scrollTop??0});i(b.positions),m()}),g=f?.ownerDocument?.defaultView,v={passive:!0,capture:!0};return g?.addEventListener("scroll",m,v),()=>{window.cancelAnimationFrame(h),g?.removeEventListener("scroll",m,v)}},[o,l,r,t,s,e]),{notePositions:n,registerThread:s.registerThread,unregisterThread:s.unregisterThread}}var _l=a(E(),1),{useBlockElement:gct}=K(QP.privateApis);function gK({notes:e,sidebarRef:t,isFloating:r=!1,styles:o}){let{onCreate:n,onEdit:i,onDelete:s}=lOe(),{selectNote:l}=K((0,Ix.useDispatch)(I)),{selectBlock:c,toggleBlockSpotlight:u}=K((0,Ix.useDispatch)(QP.store)),{noteId:d,selectedBlockClientId:f,orderedBlockIds:m}=(0,Ix.useSelect)(N=>{let{getBlockAttributes:P,getSelectedBlockClientId:T,getClientIdsWithDescendants:M}=N(QP.store),j=T();return{noteId:j?P(j)?.metadata?.noteId:null,selectedBlockClientId:j,orderedBlockIds:M()}},[]),{selectedNote:h,noteFocused:g}=(0,Ix.useSelect)(N=>{let{getSelectedNote:P,isNoteFocused:T}=K(N(I));return{selectedNote:P(),noteFocused:T()}},[]),v=gct(f),b=(0,sf.useMemo)(()=>{if(!r||h!=="new")return e;let N={id:"new",blockClientId:f,content:{rendered:""}},P=[];return m.forEach(T=>{let M=e.filter(j=>j.blockClientId===T);P.push(...M),T===f&&P.push(N)}),P},[e,r,h,f,m]),_=async N=>{let P=b.findIndex(F=>F.id===N.id),T=b[P+1],M=b[P-1];if(await s(N),N.parent!==0){l(N.parent),ss(N.parent,t.current);return}let j=T??M;j?(l(j.id),ss(j.id,t.current),j.blockClientId&&(u(j.blockClientId,!0),c(j.blockClientId,null))):(l(void 0),u(N.blockClientId,!1),v?.focus())},y=(0,sf.useMemo)(()=>{let N=Ng({noteId:d}),P=e.filter(T=>N.includes(T.id));return xP(P)?.id},[d,e]),w=(0,sf.useRef)(f);(0,sf.useEffect)(()=>{w.current!==f&&(w.current=f,l(y))},[f,y,l]),(0,sf.useEffect)(()=>{g&&h&&(ss(h,t.current,h==="new"?'[role="textbox"]':void 0),l(h))},[g,h,l,t]);let{notePositions:S,registerThread:x,unregisterThread:C}=uOe({threads:b,selectedNoteId:h,isFloating:r,sidebarRef:t}),A=Array.isArray(b)&&b.length>0,k=(N,P,T)=>{if(N.defaultPrevented)return;let M=b.findIndex(F=>F.id===P.id),j=N.currentTarget===N.target;(N.key==="Enter"||N.key==="ArrowRight")&&j&&!T?(l(P.id),P.blockClientId&&(c(P.blockClientId,null),u(P.blockClientId,!0))):(N.key==="Enter"||N.key==="ArrowLeft")&&j&&T||N.key==="Escape"?(l(void 0),P.blockClientId&&u(P.blockClientId,!1),ss(P.id,t.current)):N.key==="ArrowDown"&&M<b.length-1&&j?ss(b[M+1].id,t.current):N.key==="ArrowUp"&&M>0&&j?ss(b[M-1].id,t.current):N.key==="Home"&&j?ss(b[0].id,t.current):N.key==="End"&&j&&ss(b[b.length-1].id,t.current)},R=r?-1:b.findIndex(N=>N.status==="approved"&&!!N.blockClientId);return(0,_l.jsx)(oe,{className:"editor-collab-sidebar-panel",style:o,role:"tree",direction:"column",gap:"md",justify:"flex-start",ref:N=>{N&&(t.current=N)},"aria-label":r?(0,XL.__)("Unresolved notes"):(0,XL.__)("All notes"),children:!A&&!r?(0,_l.jsx)(qP,{onSubmit:n,sidebarRef:t}):(0,_l.jsxs)(_l.Fragment,{children:[!r&&h==="new"&&(0,_l.jsx)(qP,{onSubmit:n,sidebarRef:t}),b.map((N,P)=>(0,_l.jsxs)(sf.Fragment,{children:[P===R&&(0,_l.jsx)(oe,{direction:"row",align:"center",justify:"center",gap:"sm",className:"editor-collab-sidebar-panel__status-separator",children:(0,_l.jsx)(ys,{variant:"heading-sm",render:(0,_l.jsx)("p",{}),children:(0,XL.__)("Resolved")})}),(0,_l.jsx)(XIe,{note:N,onAddReply:n,onDeleteNote:_,onEditNote:i,isSelected:h===N.id,sidebarRef:t,floating:r?{y:S[N.id],registerThread:x,unregisterThread:C}:void 0,onKeyDown:T=>k(T,N,h===N.id)})]},N.id))]})})}var dOe=a(G(),1),QL=a(z(),1),$L=a(be(),1),vK=a(Y(),1),fOe=a(At(),1),pOe=a(ya(),1);var JL=a(E(),1),{NoteIconSlotFill:vct}=K($L.privateApis);function bct({clientId:e,onClick:t,isDistractionFree:r}){let o=(0,vK.useSelect)(l=>l($L.store).getBlock(e),[e]),n=(0,vK.useSelect)(l=>l(pOe.store).getShortcutRepresentation("core/editor/new-note"),[]);if(!o?.isValid||o?.name===(0,fOe.getUnregisteredTypeHandlerName)())return null;let i=r||o?.name==="core/freeform",s;return r?s=(0,QL.__)("Notes are disabled in distraction free mode."):o?.name==="core/freeform"&&(s=(0,QL.__)("Convert to blocks to add notes.")),(0,JL.jsx)(dOe.MenuItem,{onClick:t,"aria-haspopup":"dialog",disabled:i,info:s,shortcut:n,children:(0,QL.__)("Add note")})}function bK({onClick:e,isDistractionFree:t}){return(0,JL.jsx)(vct.Fill,{children:({clientId:r,onClose:o})=>(0,JL.jsx)(bct,{clientId:r,isDistractionFree:t,onClick:()=>{e(r),o()}})})}var mOe=a(G(),1);var Ox=a(z(),1),hOe=a(U(),1),e4=a(be(),1),gOe=a(Y(),1);var Xg=a(E(),1),{NoteIconToolbarSlotFill:yct}=K(e4.privateApis);function wct({participants:e}){let t=(0,gOe.useSelect)(c=>{let{getSettings:u}=c(e4.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,Ox.__)("100+"):(0,Ox.sprintf)((0,Ox.__)("+%s"),i);return(0,Xg.jsxs)(oe,{direction:"row",align:"center",gap:"xs",children:[n.map(c=>(0,Xg.jsx)("img",{src:c.avatar||t,alt:c.name,className:"editor-note-indicator__avatar",style:{borderColor:Da(c.id)}},c.id)),i>0&&(0,Xg.jsx)("span",{className:"editor-note-indicator__overflow",children:l})]})}function vOe({onClick:e,note:t}){let r=(0,hOe.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,Xg.jsx)(yct.Fill,{children:(0,Xg.jsx)(mOe.ToolbarButton,{className:"editor-note-indicator",label:(0,Ox.__)("View notes"),onClick:()=>e(),showTooltip:!0,children:(0,Xg.jsx)(wct,{participants:r})})}):null}var yOe=a(U(),1),wOe=a(be(),1);var _ct="40",bOe="80",Sct="mark.wp-note{background-color:transparent;color:inherit;}";function xct(e,t=null){let r=[Sct];for(let o of e??[]){if(!o?.id)continue;let n=Da(o.author??0),s=`mark.wp-note[data-id="${String(o.id).replace(/["\\]/g,"\\$&")}"]`;r.push(`${s}{background-color:${n}${_ct};}`),r.push(`${s}:hover,${s}:focus-within{background-color:${n}${bOe};}`),t&&String(t)===String(o.id)&&r.push(`${s}{background-color:${n}${bOe};}`)}return r.join("")}function _Oe({threads:e,selectedId:t}){let r=(0,yOe.useMemo)(()=>xct(e,t),[e,t]);return(0,wOe.useStyleOverride)({id:"core-note-highlights",css:r}),null}var ls=a(E(),1);function Cct({postId:e}){(0,r4.useEffect)(()=>((0,o4.registerFormatType)(XP,tOe),()=>{(0,o4.unregisterFormatType)(XP)}),[]);let{getActiveComplementaryArea:t}=(0,af.useSelect)(He),{enableComplementaryArea:r}=(0,af.useDispatch)(He),{toggleBlockSpotlight:o,selectBlock:n}=K((0,af.useDispatch)(yK.store)),{selectNote:i}=K((0,af.useDispatch)(I)),s=(0,SOe.useViewportMatch)("medium"),l=(0,r4.useRef)(null),{clientId:c,noteId:u,isClassicBlock:d}=(0,af.useSelect)(R=>{let{getBlockAttributes:N,getSelectedBlockClientId:P,getBlockName:T}=R(yK.store),M=P();return{clientId:M,noteId:M?N(M)?.metadata?.noteId:null,isClassicBlock:M?T(M)==="core/freeform":!1}},[]),f=Ng({noteId:u}),{isDistractionFree:m}=(0,af.useSelect)(R=>{let{get:N}=R(COe.store);return{isDistractionFree:N("core","distractionFree")}},[]),h=(0,af.useSelect)(R=>K(R(I)).getSelectedNote(),[]),{notes:g,unresolvedNotes:v}=aOe(e),b=s,_=g.length>0||!b;cOe(b&&(v.length>0||h!==void 0));async function y({targetClientId:R,noteId:N,isApproved:P}){if(!R)return;let T=await t("core");P?r("core",nm):(!fK.includes(T)||!_)&&r("core",b?ef:nm);let M=await t("core");fK.includes(M)&&(n(R,null),o(R,!0),i(N,{focus:!0}))}function w(R){let N=g.filter(T=>T.blockClientId===R),P=xP(N);return y({targetClientId:R,noteId:P?.id??"new",isApproved:P?.status==="approved"})}function S(R){return y({targetClientId:R,noteId:"new",isApproved:!1})}(0,xOe.useShortcut)("core/editor/new-note",R=>{R.preventDefault(),S(c)},{isDisabled:m||d||!c});let{merged:x}=lo(),C=x?.styles?.color?.background,A=f.length>0?g.filter(R=>f.includes(R.id)):[],k=xP(A);return m?(0,ls.jsx)(bK,{isDistractionFree:!0}):(0,ls.jsxs)(ls.Fragment,{children:[(0,ls.jsx)(_Oe,{threads:v,selectedId:h}),!!k&&(0,ls.jsx)(vOe,{note:k,onClick:()=>w(c)}),(0,ls.jsx)(bK,{onClick:R=>S(R)}),_&&(0,ls.jsx)(Sy,{identifier:nm,name:nm,title:(0,t4.__)("All notes"),header:(0,ls.jsx)("h2",{className:"interface-complementary-area-header__title",children:(0,t4.__)("All notes")}),icon:zx,closeLabel:(0,t4.__)("Close Notes"),children:(0,ls.jsx)(gK,{notes:g,sidebarRef:l})}),s&&(0,ls.jsx)(Sy,{isPinnable:!1,header:!1,identifier:ef,className:"editor-collab-sidebar",headerClassName:"editor-collab-sidebar__header",backgroundColor:C,children:(0,ls.jsx)(gK,{notes:v,sidebarRef:l,styles:{backgroundColor:C},isFloating:!0})})]})}function TOe(){let{postId:e,editorMode:t,revisionsMode:r}=(0,af.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,ls.jsx)(co,{supportKeys:"editor.notes",children:(0,ls.jsx)(Cct,{postId:e})})}var lf=a(G(),1),Nx=a(z(),1);var tk=a(Y(),1),_K=a(U(),1),AOe=a(Dt(),1),l4=a(ke(),1),IOe=a(ne(),1);var im=a(G(),1),n4=a(Y(),1),JP=a(z(),1),EOe=a(Dt(),1);var POe=a(ne(),1);var ku=a(E(),1);function i4({hideWelcomeGuide:e=!1,onChangePath:t}){let{user:r,setUser:o}=lo(),n=!!r&&(Object.keys(r?.styles??{}).length>0||Object.keys(r?.settings??{}).length>0),i=()=>{o({styles:{},settings:{}})},{toggle:s}=(0,n4.useDispatch)(EOe.store),{canEditCSS:l}=(0,n4.useSelect)(u=>{let{getEntityRecord:d,__experimentalGetCurrentGlobalStylesId:f}=u(POe.store),m=f();return{canEditCSS:!!(m?d("root","globalStyles",m):void 0)?._links?.["wp:action-edit-css"]}},[]),c=()=>{t("/css")};return(0,ku.jsx)(im.DropdownMenu,{icon:go,label:(0,JP.__)("More"),toggleProps:{size:"compact"},children:({onClose:u})=>(0,ku.jsxs)(ku.Fragment,{children:[(0,ku.jsxs)(im.MenuGroup,{children:[l&&(0,ku.jsx)(im.MenuItem,{onClick:c,children:(0,JP.__)("Additional CSS")}),!e&&(0,ku.jsx)(im.MenuItem,{onClick:()=>{s("core/edit-site","welcomeGuideStyles"),u()},children:(0,JP.__)("Welcome Guide")})]}),(0,ku.jsx)(im.MenuGroup,{children:(0,ku.jsx)(im.MenuItem,{onClick:()=>{i(),u()},disabled:!n,children:(0,JP.__)("Reset styles")})})]})})}var Xy=a(E(),1);function kOe({className:e,identifier:t,title:r,icon:o,children:n,closeLabel:i,header:s,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,Xy.jsxs)(Xy.Fragment,{children:[(0,Xy.jsx)(Ul,{className:e,scope:"core",identifier:t,title:r,icon:o,closeLabel:i,header:s,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:n}),(0,Xy.jsx)(Ih,{scope:"core",identifier:t,icon:o,children:r})]})}var s4=a(Y(),1),a4=a(G(),1),vc=a(z(),1),wK=a(Dt(),1);var $P=a(E(),1);function ek({nonAnimatedSrc:e,animatedSrc:t}){return(0,$P.jsxs)("picture",{className:"editor-welcome-guide__image",children:[(0,$P.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,$P.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var $r=a(E(),1);function ROe(){let{toggle:e}=(0,s4.useDispatch)(wK.store),{isActive:t,isStylesOpen:r}=(0,s4.useSelect)(n=>{let i=n(He).getActiveComplementaryArea("core");return{isActive:!!n(wK.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:i==="edit-site/global-styles"}},[]);if(!t||!r)return null;let o=(0,vc.__)("Welcome to Styles");return(0,$r.jsx)(a4.Guide,{className:"editor-welcome-guide guide-styles",contentLabel:o,finishButtonText:(0,vc.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,$r.jsx)(ek,{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,$r.jsxs)($r.Fragment,{children:[(0,$r.jsx)("h1",{className:"editor-welcome-guide__heading",children:o}),(0,$r.jsx)("p",{className:"editor-welcome-guide__text",children:(0,vc.__)("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,$r.jsx)(ek,{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,$r.jsxs)($r.Fragment,{children:[(0,$r.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,vc.__)("Set the design")}),(0,$r.jsx)("p",{className:"editor-welcome-guide__text",children:(0,vc.__)("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,$r.jsx)(ek,{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,$r.jsxs)($r.Fragment,{children:[(0,$r.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,vc.__)("Personalize blocks")}),(0,$r.jsx)("p",{className:"editor-welcome-guide__text",children:(0,vc.__)("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,$r.jsx)(ek,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,$r.jsxs)($r.Fragment,{children:[(0,$r.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,vc.__)("Learn more")}),(0,$r.jsxs)("p",{className:"editor-welcome-guide__text",children:[(0,vc.__)("New to block themes and styling your site?")," ",(0,$r.jsx)(a4.ExternalLink,{href:(0,vc.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,vc.__)("Here\u2019s a detailed guide to learn how to make the most of it.")})]})]})}]})}var ki=a(E(),1);function OOe(){let{shouldResetNavigation:e,stylesPath:t,showStylebook:r,showListViewByDefault:o,hasRevisions:n,activeComplementaryArea:i,editorSettings:s}=(0,tk.useSelect)(_=>{let{getActiveComplementaryArea:y}=_(He),{getStylesPath:w,getShowStylebook:S}=K(_(I)),x=_(I).getEditorMode()==="visual",C=_(AOe.store).get("core","showListViewByDefault"),{getEntityRecord:A,__experimentalGetCurrentGlobalStylesId:k}=_(IOe.store),R=k(),N=R?A("root","globalStyles",R):void 0;return{stylesPath:w(),showStylebook:S(),shouldResetNavigation:y("core")!=="edit-site/global-styles"||!x,showListViewByDefault:C,hasRevisions:!!N?._links?.["version-history"]?.[0]?.count,activeComplementaryArea:_(He).getActiveComplementaryArea("core"),editorSettings:_(I).getEditorSettings()}},[]),{setStylesPath:l,setShowStylebook:c,resetStylesNavigation:u}=K((0,tk.useDispatch)(I)),d=(0,l4.useViewportMatch)("medium","<"),f=t.startsWith("/revisions")&&!r,m=t.startsWith("/revisions")&&r,h=(0,l4.usePrevious)(i);(0,_K.useEffect)(()=>{i==="edit-site/global-styles"&&h!=="edit-site/global-styles"&&u()},[i,h,u]),(0,_K.useEffect)(()=>{e&&u()},[e,u]);let{setIsListViewOpened:g}=(0,tk.useDispatch)(I),v=()=>{g(!1),l(f||m?"/":"/revisions")},b=()=>{g(r&&o),c(!r)};return(0,ki.jsxs)(ki.Fragment,{children:[(0,ki.jsx)(kOe,{className:"editor-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,Nx.__)("Styles"),icon:MV,closeLabel:(0,Nx.__)("Close Styles"),panelClassName:"editor-global-styles-sidebar__panel",header:(0,ki.jsxs)(lf.Flex,{className:"editor-global-styles-sidebar__header",gap:1,children:[(0,ki.jsx)(lf.FlexItem,{children:(0,ki.jsx)("h2",{className:"editor-global-styles-sidebar__header-title",children:(0,Nx.__)("Styles")})}),(0,ki.jsxs)(lf.Flex,{justify:"flex-end",gap:1,className:"editor-global-styles-sidebar__header-actions",children:[!d&&(0,ki.jsx)(lf.FlexItem,{children:(0,ki.jsx)(lf.Button,{icon:ov,label:(0,Nx.__)("Style Book"),isPressed:r,accessibleWhenDisabled:!0,disabled:e,onClick:b,size:"compact"})}),(0,ki.jsx)(lf.FlexItem,{children:(0,ki.jsx)(lf.Button,{label:(0,Nx.__)("Revisions"),icon:pf,onClick:v,accessibleWhenDisabled:!0,disabled:!n,isPressed:f||m,size:"compact"})}),(0,ki.jsx)(i4,{onChangePath:l})]})]}),children:(0,ki.jsx)(NM,{path:t,onPathChange:l,settings:s})}),(0,ki.jsx)(ROe,{})]})}var bc=a(E(),1);function Tct({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,NOe.useSelect)(b=>{let{getEntityRecord:_,getResolutionError:y,hasFinishedResolution:w,getCurrentTheme:S,__experimentalGetCurrentGlobalStylesId:x,canUser:C}=b(MOe.store),{getRenderingMode:A,getCurrentPostType:k}=b(I),R=["postType",e,t],N=A(),P=k(),T=S()?.is_block_theme,M=x(),j=M?C("update",{kind:"root",name:"globalStyles",id:M}):!1;return{post:_(...R),template:r?_("postType",xr,r):void 0,hasLoadedPost:w("getEntityRecord",R),error:y("getEntityRecord",R)?.message,isBlockTheme:T,showGlobalStyles:T&&j&&(P==="wp_template"||N==="template-locked")}},[e,t,r]);return(0,bc.jsxs)(bc.Fragment,{children:[m&&!d&&(0,bc.jsx)(FOe.Notice,{status:h?"error":"warning",isDismissible:!1,children:h||(0,DOe.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")}),!!d&&(0,bc.jsxs)(EG,{post:d,__unstableTemplate:f,settings:o,initialEdits:i,useSubRegistry:!1,children:[(0,bc.jsx)(_2e,{...u,children:l}),n,(0,bc.jsx)(NIe,{onActionPerformed:s,extraPanels:c}),(0,bc.jsx)(TOe,{}),g&&(0,bc.jsx)(g3,{}),v&&(0,bc.jsx)(OOe,{})]})]})}var LOe=Tct;var We=a(z(),1),YOe=a(ke(),1),Qy=a(Y(),1),qOe=a(U(),1),rk=a(Dt(),1);var c4=a(Y(),1),BOe=a(Dt(),1);var VOe=a(E(),1),{PreferenceBaseOption:Ect}=K(BOe.privateApis);function jOe(e){let t=(0,c4.useSelect)(n=>n(I).isPublishSidebarEnabled(),[]),{enablePublishSidebar:r,disablePublishSidebar:o}=(0,c4.useDispatch)(I);return(0,VOe.jsx)(Ect,{isChecked:t,onChange:n=>n?r():o(),...e})}var u4=a(Y(),1),zOe=a(Dt(),1),d4=a(At(),1),HOe=a(U(),1),UOe=a(G(),1),Fx=a(z(),1),WOe=a(be(),1);var Mx=a(E(),1),{BlockManager:Pct}=K(WOe.privateApis),kct=[];function GOe(){let{showBlockTypes:e,hideBlockTypes:t}=K((0,u4.useDispatch)(I)),{blockTypes:r,allowedBlockTypes:o,hiddenBlockTypes:n}=(0,u4.useSelect)(m=>({blockTypes:m(d4.store).getBlockTypes(),allowedBlockTypes:m(I).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:m(zOe.store).get("core","hiddenBlockTypes")??kct}),[]),s=(0,HOe.useMemo)(()=>o===!0?r:r.filter(({name:m})=>o?.includes(m)),[o,r]).filter(m=>(0,d4.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,Mx.jsxs)("div",{className:"editor-block-visibility",children:[!!u&&(0,Mx.jsxs)("div",{className:"editor-block-visibility__disabled-blocks-count",children:[(0,Fx.sprintf)((0,Fx._n)("%d block is hidden.","%d blocks are hidden.",u),u),(0,Mx.jsx)(UOe.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:d,children:(0,Fx.__)("Reset")})]}),(0,Mx.jsx)(Pct,{blockTypes:s,selectedBlockTypes:c,onChange:f,showSelectAll:!1})]})}var ot=a(E(),1),{PreferencesModal:Rct,PreferencesModalTabs:Act,PreferencesModalSection:cf,PreferenceToggleControl:cs}=K(rk.privateApis);function KOe({extraSections:e={}}){let t=(0,Qy.useSelect)(o=>o(He).isModalActive("editor/preferences"),[]),{closeModal:r}=(0,Qy.useDispatch)(He);return t?(0,ot.jsx)(Rct,{closeModal:r,children:(0,ot.jsx)(Ict,{extraSections:e})}):null}function Ict({extraSections:e={}}){let t=(0,YOe.useViewportMatch)("medium"),{showBlockBreadcrumbsOption:r,showCollaborationOptions:o}=(0,Qy.useSelect)(c=>{let{getEditorSettings:u,isCollaborationEnabledForCurrentPost:d}=K(c(I)),{get:f}=c(rk.store),m=u().richEditingEnabled;return{showBlockBreadcrumbsOption:!f("core","distractionFree")&&t&&m,showCollaborationOptions:d()}},[t]),{setIsListViewOpened:n,setIsInserterOpened:i}=(0,Qy.useDispatch)(I),{set:s}=(0,Qy.useDispatch)(rk.store),l=(0,qOe.useMemo)(()=>[{name:"general",tabLabel:(0,We.__)("General"),content:(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsxs)(cf,{title:(0,We.__)("Interface"),children:[(0,ot.jsx)(cs,{scope:"core",featureName:"showListViewByDefault",help:(0,We.__)("Opens the List View panel by default."),label:(0,We.__)("Always open List View")}),r&&(0,ot.jsx)(cs,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,We.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,We.__)("Show block breadcrumbs")}),(0,ot.jsx)(cs,{scope:"core",featureName:"allowRightClickOverrides",help:(0,We.__)("Allows contextual List View menus via right-click, overriding browser defaults."),label:(0,We.__)("Allow right-click contextual menus")}),(0,ot.jsx)(cs,{scope:"core",featureName:"enableChoosePatternModal",help:(0,We.__)("Pick from starter content when creating a new page."),label:(0,We.__)("Show starter patterns")}),o&&(0,ot.jsx)(cs,{scope:"core",featureName:"showCollaborationCursor",help:(0,We.__)("Show your own avatar inside blocks during collaborative editing sessions."),label:(0,We.__)("Show avatar in blocks")})]}),o&&(0,ot.jsxs)(cf,{title:(0,We.__)("Collaboration notifications"),children:[(0,ot.jsx)(cs,{scope:"core",featureName:"showCollaborationJoinNotifications",help:(0,We.__)("Show notifications when collaborators join the post."),label:(0,We.__)("Collaborator joined")}),(0,ot.jsx)(cs,{scope:"core",featureName:"showCollaborationLeaveNotifications",help:(0,We.__)("Show notifications when collaborators leave the post."),label:(0,We.__)("Collaborator left")}),(0,ot.jsx)(cs,{scope:"core",featureName:"showCollaborationPostSaveNotifications",help:(0,We.__)("Show notifications when collaborators save, update, or publish the post."),label:(0,We.__)("Post updated")})]}),(0,ot.jsxs)(cf,{title:(0,We.__)("Document settings"),description:(0,We.__)("Select what settings are shown in the document panel."),children:[(0,ot.jsx)($3.Slot,{}),(0,ot.jsx)(FS,{taxonomyWrapper:(c,u)=>(0,ot.jsx)(vg,{label:u.labels.menu_name,panelName:`taxonomy-panel-${u.slug}`})}),(0,ot.jsx)(Bp,{children:(0,ot.jsx)(vg,{label:(0,We.__)("Featured image"),panelName:"featured-image"})}),(0,ot.jsx)(Ey,{children:(0,ot.jsx)(vg,{label:(0,We.__)("Excerpt"),panelName:"post-excerpt"})}),(0,ot.jsx)(co,{supportKeys:["comments","trackbacks"],children:(0,ot.jsx)(vg,{label:(0,We.__)("Discussion"),panelName:"discussion-panel"})}),(0,ot.jsx)(rS,{children:(0,ot.jsx)(vg,{label:(0,We.__)("Page attributes"),panelName:"page-attributes"})})]}),t&&(0,ot.jsx)(cf,{title:(0,We.__)("Publishing"),children:(0,ot.jsx)(jOe,{help:(0,We.__)("Review settings, such as visibility and tags."),label:(0,We.__)("Enable pre-publish checks")})}),e?.general]})},{name:"appearance",tabLabel:(0,We.__)("Appearance"),content:(0,ot.jsxs)(cf,{title:(0,We.__)("Appearance"),description:(0,We.__)("Customize the editor interface to suit your needs."),children:[(0,ot.jsx)(cs,{scope:"core",featureName:"fixedToolbar",onToggle:()=>s("core","distractionFree",!1),help:(0,We.__)("Access all block and document tools in a single place."),label:(0,We.__)("Top toolbar")}),(0,ot.jsx)(cs,{scope:"core",featureName:"distractionFree",onToggle:()=>{s("core","fixedToolbar",!0),i(!1),n(!1)},help:(0,We.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,We.__)("Distraction free")}),(0,ot.jsx)(cs,{scope:"core",featureName:"focusMode",help:(0,We.__)("Highlights the current block and fades other content."),label:(0,We.__)("Spotlight mode")}),e?.appearance]})},{name:"accessibility",tabLabel:(0,We.__)("Accessibility"),content:(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)(cf,{title:(0,We.__)("Navigation"),description:(0,We.__)("Optimize the editing experience for enhanced control."),children:(0,ot.jsx)(cs,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,We.__)("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,We.__)("Contain text cursor inside block")})}),(0,ot.jsx)(cf,{title:(0,We.__)("Interface"),children:(0,ot.jsx)(cs,{scope:"core",featureName:"showIconLabels",label:(0,We.__)("Show button text labels"),help:(0,We.__)("Show text instead of icons on buttons across the interface.")})})]})},{name:"blocks",tabLabel:(0,We.__)("Blocks"),content:(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)(cf,{title:(0,We.__)("Inserter"),children:(0,ot.jsx)(cs,{scope:"core",featureName:"mostUsedBlocks",help:(0,We.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,We.__)("Show most used blocks")})}),(0,ot.jsx)(cf,{title:(0,We.__)("Manage block visibility"),description:(0,We.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."),children:(0,ot.jsx)(GOe,{})})]})},window.__clientSideMediaProcessing&&{name:"media",tabLabel:(0,We.__)("Media"),content:(0,ot.jsx)(ot.Fragment,{children:(0,ot.jsxs)(cf,{title:(0,We.__)("General"),description:(0,We.__)("Customize options related to the media upload flow."),children:[(0,ot.jsx)(cs,{scope:"core/media",featureName:"optimizeOnUpload",help:(0,We.__)("Compress media items before uploading to the server."),label:(0,We.__)("Pre-upload compression")}),(0,ot.jsx)(cs,{scope:"core/media",featureName:"requireApproval",help:(0,We.__)("Require approval step when optimizing existing media."),label:(0,We.__)("Approval step")})]})})}].filter(Boolean),[r,o,e,i,n,s,t]);return(0,ot.jsx)(Act,{sections:l})}var sk=a(At(),1);var ok=a(be(),1),ZOe="content",XOe={name:"core/pattern-overrides",getValues({select:e,clientId:t,context:r,bindings:o}){let n=r["pattern/overrides"],{getBlockAttributes:i}=e(ok.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(ok.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(ok.store).updateBlockAttributes(g.clientId,d),m(g.innerBlocks)};m(s());return}let f=n(u)?.[ZOe];t(ok.store).updateBlockAttributes(u,{[ZOe]:{...f,[c]:{...f?.[c],...Object.entries(d).reduce((m,[h,g])=>(m[h]=g===void 0?"":g,m),{})}}})},canUserEditValue:()=>!0};var f4=a(z(),1),p4=a(ne(),1),nk=a(be(),1),SK=["core/navigation-link","core/navigation-submenu"],QOe=[{label:(0,f4.__)("Post Date"),args:{field:"date"},type:"string"},{label:(0,f4.__)("Post Modified Date"),args:{field:"modified"},type:"string"},{label:(0,f4.__)("Post Link"),args:{field:"link"},type:"string"}],JOe={name:"core/post-data",getValues({select:e,context:t,bindings:r,clientId:o}){let{getBlockAttributes:n,getBlockName:i}=e(nk.store),s=i(o),l=SK.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(p4.store),f=d("postType",u,c),m={};for(let[h,g]of Object.entries(r)){let v=QOe.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(nk.store),s=i(o);if(SK.includes(s))return!1;let l={};Object.values(r).forEach(({args:c,newValue:u})=>{l[c.field]=u}),e(p4.store).editEntityRecord("postType",t?.postType,t?.postId,l)},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(nk.store),n=o(),i=r(n);return!(SK.includes(i)||t?.query||t?.queryId||!t?.postType||!e(p4.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({context:e,select:t}){return t(nk.store).getSelectedBlock()?.name!=="core/post-date"?[]:!e||!e.postId||!e.postType?[]:QOe}};var ik=a(ne(),1);function xK(e,t){let{getRegisteredPostMeta:r}=K(e(ik.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 Oct({select:e,context:t,args:r}){let n=xK(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(ik.store);return i("postType",t?.postType,t?.postId).meta?.[r.key]??n?.label??r.key}var $Oe={name:"core/post-meta",getValues({select:e,context:t,bindings:r}){let o={};for(let[n,i]of Object.entries(r))o[n]=Oct({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(ik.store).editEntityRecord("postType",t?.postType,t?.postId,{meta:o})},canUserEditValue({select:e,context:t,args:r}){return!(t?.query||t?.queryId||!t?.postType||!xK(e,t).some(l=>l.args.key===r.key)||e(I).getEditorSettings().enableCustomFields||!e(ik.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({select:e,context:t}){return xK(e,t).map(({default:o,...n})=>({...n}))}};var Qg=a(z(),1),e5e=a(ne(),1),m4=a(be(),1),CK=["core/navigation-link","core/navigation-submenu"],TK=[{label:(0,Qg.__)("Term ID"),args:{field:"id"},type:"string"},{label:(0,Qg.__)("Name"),args:{field:"name"},type:"string"},{label:(0,Qg.__)("Slug"),args:{field:"slug"},type:"string"},{label:(0,Qg.__)("Link"),args:{field:"link"},type:"string"},{label:(0,Qg.__)("Description"),args:{field:"description"},type:"string"},{label:(0,Qg.__)("Parent ID"),args:{field:"parent"},type:"string"},{label:(0,Qg.__)("Count"),args:{field:"count"},type:"string"}],t5e={name:"core/term-data",usesContext:["taxonomy","termId","termData"],getValues({select:e,context:t,bindings:r,clientId:o}){let{getEntityRecord:n}=e(e5e.store),{getBlockAttributes:i,getBlockName:s}=e(m4.store),l=s(o),c=CK.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=TK.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(m4.store),n=o(),i=r(n);return CK.includes(i)||t?.termQuery||!t?.taxonomy||!t?.termId,!1},getFieldsList({context:e,select:t}){let{getBlockAttributes:r,getBlockName:o,getSelectedBlockClientId:n}=t(m4.store),i=n(),s=o(i);if(CK.includes(s)){let l=r(i);return!l||!l.id||!l.type?[]:TK}return e?e.taxonomy&&e.termId||e.termData?TK:[]:[]}};function r5e(){(0,sk.registerBlockBindingsSource)(XOe),(0,sk.registerBlockBindingsSource)(JOe),(0,sk.registerBlockBindingsSource)($Oe),(0,sk.registerBlockBindingsSource)(t5e)}var h4=a(Y(),1),Ru=a(U(),1),uf=a(z(),1),PK=a(Pl(),1),n5e=a(E1(),1),i5e=a(It(),1),g4=a(G(),1);var ak=a(E(),1),EK="upload-progress",Nct=3e3,o5e=40;function Mct(e){if(e.length<=o5e)return e;let t="\u2026",r=o5e-t.length,o=Math.ceil(r/2),n=Math.floor(r/2);return e.slice(0,o)+t+e.slice(e.length-n)}var Fct=(0,ak.jsx)("span",{className:"editor-upload-progress-snackbar__spinner","aria-hidden":"true",children:(0,ak.jsx)(g4.Spinner,{})}),Dct=(0,ak.jsx)("span",{className:"editor-upload-progress-snackbar__check","aria-hidden":"true",children:(0,ak.jsx)(g4.Icon,{icon:Ro})});function s5e(){let e=(0,h4.useSelect)(g=>g(n5e.store).getItems(),[]),t=xX(),r=(0,Ru.useMemo)(()=>e.filter(g=>!g.parentId),[e]),o=r.length,n=t?t.total-t.completed:0,i=o+n,[s,l]=(0,Ru.useState)(0),c=o+(t?t.total:0);c>s&&l(c);let{createNotice:u,removeNotice:d}=(0,h4.useDispatch)(i5e.store),f=(0,Ru.useRef)(!1),m=(0,Ru.useRef)(!1),h=(0,Ru.useRef)(null);return(0,Ru.useEffect)(()=>()=>{h.current&&clearTimeout(h.current)},[]),(0,Ru.useEffect)(()=>{let g=i>0;if(g&&!m.current?(f.current=!1,(0,PK.speak)((0,uf.__)("Media upload started"),"polite"),h.current&&(clearTimeout(h.current),h.current=null,l(0))):!g&&m.current&&((0,PK.speak)((0,uf.__)("Media upload complete"),"polite"),f.current?l(0):(u("info",(0,uf.__)("Upload complete"),{id:EK,type:"snackbar",isDismissible:!1,explicitDismiss:!1,speak:!1,icon:Dct,onDismiss:()=>{f.current=!0}}),h.current=setTimeout(()=>{d(EK),h.current=null,l(0)},Nct))),m.current=g,!g||f.current)return;let v=s,b=v-i+1,_=Mct(r[0]?.sourceFile?.name||t?.pending[0]||(0,uf.__)("Uploading")),y=v===1?(0,uf.sprintf)((0,uf.__)("Uploading \u2014 %s"),_):(0,uf.sprintf)((0,uf.__)("Uploading %1$d of %2$d \u2014 %3$s"),b,v,_);u("info",y,{id:EK,type:"snackbar",isDismissible:!1,explicitDismiss:!0,speak:!1,icon:Fct,onDismiss:()=>{f.current=!0}})},[i,s,r,t,u,d]),null}var{store:Lct,...Bct}=eW,a5e={};nZ(a5e,{CreateTemplatePartModal:pw,patternTitleField:pC,templateTitleField:I1,BackButton:uD,EntitiesSavedStatesExtensible:VE,Editor:LOe,PluginPostExcerpt:YE,PostCardPanel:Wg,PreferencesModal:KOe,usePostActions:vL,usePostFields:U_,ToolsMoreMenuGroup:vD,ViewMoreMenuGroup:bD,ResizableEditor:Q_,UploadProgressSnackbar:s5e,registerCoreBlockBindingsSources:r5e,getTemplateInfo:Tl,GlobalStylesUIWrapper:NM,GlobalStylesActionMenu:i4,StyleBookPreview:T_e,useGlobalStyles:lo,useStyle:Qh,interfaceStore:Lct,...Bct});var lk=a(Y(),1);function Vct(e,t,r){let{registerEntityAction:o}=K((0,lk.dispatch)(I))}function jct(e,t,r){let{unregisterEntityAction:o}=K((0,lk.dispatch)(I))}function zct(e,t,r){let{registerEntityField:o}=K((0,lk.dispatch)(I))}function Hct(e,t,r){let{unregisterEntityField:o}=K((0,lk.dispatch)(I))}var l5e=a(be(),1);return g5e(Uct);})();
/*! 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.
   *)
*/