| 1 |
"use strict";var wp;(wp||={}).editor=(()=>{var Y5e=Object.create;var mk=Object.defineProperty;var q5e=Object.getOwnPropertyDescriptor;var K5e=Object.getOwnPropertyNames;var Z5e=Object.getPrototypeOf,X5e=Object.prototype.hasOwnProperty;var ta=(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 $e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Yr=(e,t)=>{for(var r in t)mk(e,r,{get:t[r],enumerable:!0})},UK=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of K5e(t))!X5e.call(e,n)&&n!==r&&mk(e,n,{get:()=>t[n],enumerable:!(o=q5e(t,n))||o.enumerable});return e};var a=(e,t,r)=>(r=e!=null?Y5e(Z5e(e)):{},UK(t||!e||!e.__esModule?mk(r,"default",{value:e,enumerable:!0}):r,e)),Q5e=e=>UK(mk({},"__esModule",{value:!0}),e);var K=$e((sdt,WK)=>{WK.exports=window.wp.data});var ae=$e((adt,GK)=>{GK.exports=window.wp.coreData});var U=$e((ldt,YK)=>{YK.exports=window.wp.element});var Te=$e((cdt,qK)=>{qK.exports=window.wp.compose});var Vn=$e((udt,KK)=>{KK.exports=window.wp.hooks});var be=$e((ddt,ZK)=>{ZK.exports=window.wp.blockEditor});var Pt=$e((vdt,rZ)=>{rZ.exports=window.wp.blocks});var an=$e((bdt,oZ)=>{oZ.exports=window.wp.date});var bo=$e((ydt,nZ)=>{nZ.exports=window.wp.url});var Ya=$e((wdt,iZ)=>{iZ.exports=window.wp.deprecated});var Dt=$e((_dt,sZ)=>{sZ.exports=window.wp.preferences});var yf=$e((xdt,dZ)=>{dZ.exports=window.wp.privateApis});var E4=$e((Adt,mZ)=>{mZ.exports=window.wp.styleEngine});var j=$e((Gdt,CZ)=>{CZ.exports=window.wp.i18n});var wk=$e((Ydt,TZ)=>{"use strict";TZ.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 _k=$e((Kdt,kZ)=>{"use strict";var LNe=function(t){return BNe(t)&&!VNe(t)};function BNe(e){return!!e&&typeof e=="object"}function VNe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||HNe(e)}var jNe=typeof Symbol=="function"&&Symbol.for,zNe=jNe?Symbol.for("react.element"):60103;function HNe(e){return e.$$typeof===zNe}function UNe(e){return Array.isArray(e)?[]:{}}function i1(e,t){return t.clone!==!1&&t.isMergeableObject(e)?f0(UNe(e),e,t):e}function WNe(e,t,r){return e.concat(t).map(function(o){return i1(o,r)})}function GNe(e,t){if(!t.customMerge)return f0;var r=t.customMerge(e);return typeof r=="function"?r:f0}function YNe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function EZ(e){return Object.keys(e).concat(YNe(e))}function PZ(e,t){try{return t in e}catch{return!1}}function qNe(e,t){return PZ(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function KNe(e,t,r){var o={};return r.isMergeableObject(e)&&EZ(e).forEach(function(n){o[n]=i1(e[n],r)}),EZ(t).forEach(function(n){qNe(e,n)||(PZ(e,n)&&r.isMergeableObject(t[n])?o[n]=GNe(n,r)(e[n],t[n],r):o[n]=i1(t[n],r))}),o}function f0(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||WNe,r.isMergeableObject=r.isMergeableObject||LNe,r.cloneUnlessOtherwiseSpecified=i1;var o=Array.isArray(t),n=Array.isArray(e),i=o===n;return i?o?r.arrayMerge(e,t,r):KNe(e,t,r):i1(t,r)}f0.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,n){return f0(o,n,r)},{})};var ZNe=f0;kZ.exports=ZNe});var na=$e((upt,SX)=>{SX.exports=window.wp.a11y});var Bu=$e((dpt,xX)=>{xX.exports=window.wp.apiFetch});var It=$e((fpt,CX)=>{CX.exports=window.wp.notices});var Vt=$e((gpt,AX)=>{AX.exports=window.wp.htmlEntities});var Se=$e((wpt,IX)=>{IX.exports=window.wp.primitives});var E=$e((_pt,OX)=>{OX.exports=window.ReactJSXRuntime});var G=$e((rvt,zX)=>{zX.exports=window.wp.components});var Al=$e((Ovt,aQ)=>{aQ.exports=window.wp.patterns});var _e=$e((Nvt,lQ)=>{lQ.exports=window.React});var Vu=$e((gyt,BQ)=>{BQ.exports=window.ReactDOM});var ZJ=$e(KJ=>{"use strict";var M0=_e();function MLe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FLe=typeof Object.is=="function"?Object.is:MLe,DLe=M0.useState,LLe=M0.useEffect,BLe=M0.useLayoutEffect,VLe=M0.useDebugValue;function jLe(e,t){var r=t(),o=DLe({inst:{value:r,getSnapshot:t}}),n=o[0].inst,i=o[1];return BLe(function(){n.value=r,n.getSnapshot=t,E7(n)&&i({inst:n})},[e,r,t]),LLe(function(){return E7(n)&&i({inst:n}),e(function(){E7(n)&&i({inst:n})})},[e]),VLe(r),r}function E7(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!FLe(e,r)}catch{return!0}}function zLe(e,t){return t()}var HLe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?zLe:jLe;KJ.useSyncExternalStore=M0.useSyncExternalStore!==void 0?M0.useSyncExternalStore:HLe});var nC=$e((ywt,XJ)=>{"use strict";XJ.exports=ZJ()});var JJ=$e(QJ=>{"use strict";var aA=_e(),ULe=nC();function WLe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var GLe=typeof Object.is=="function"?Object.is:WLe,YLe=ULe.useSyncExternalStore,qLe=aA.useRef,KLe=aA.useEffect,ZLe=aA.useMemo,XLe=aA.useDebugValue;QJ.useSyncExternalStoreWithSelector=function(e,t,r,o,n){var i=qLe(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=ZLe(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,GLe(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=YLe(e,i[0],i[1]);return KLe(function(){s.hasValue=!0,s.value=l},[l]),XLe(l),l}});var e$=$e((_wt,$J)=>{"use strict";$J.exports=JJ()});var B9=$e((pkt,zte)=>{zte.exports=window.wp.theme});var KA=$e((t2t,Kre)=>{Kre.exports=window.wp.blob});var Mf=$e((r2t,Zre)=>{Zre.exports=window.wp.mediaUtils});var dw=$e((Q2t,_I)=>{var dne={\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"},fne=Object.keys(dne).join("|"),G8e=new RegExp(fne,"g"),Y8e=new RegExp(fne,"");function q8e(e){return dne[e]}var pne=function(e){return e.replace(G8e,q8e)},K8e=function(e){return!!e.match(Y8e)};_I.exports=pne;_I.exports.has=K8e;_I.exports.remove=pne});var yw=$e((UAt,nie)=>{nie.exports=window.wp.wordcount});var Mo=$e((q5t,uae)=>{uae.exports=window.wp.keycodes});var IU=$e((NVt,pde)=>{pde.exports=window.wp.warning});var hd=$e((a7t,$de)=>{$de.exports=window.wp.richText});var _a=$e((fWt,Kpe)=>{Kpe.exports=window.wp.keyboardShortcuts});var Xpe=$e((pWt,Zpe)=>{Zpe.exports=window.wp.viewport});var Dh=$e((mWt,Qpe)=>{Qpe.exports=window.wp.plugins});var H0e=$e((zir,z0e)=>{z0e.exports=window.wp.blockSerializationDefaultParser});var SG=$e((esr,ewe)=>{ewe.exports=window.wp.commands});var QM=$e((wsr,fwe)=>{fwe.exports=window.wp.uploadMedia});var Mp=$e((mlr,A_e)=>{A_e.exports=window.wp.dom});var sEe=$e((chr,iEe)=>{"use strict";var pst="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";iEe.exports=pst});var uEe=$e((uhr,cEe)=>{"use strict";var mst=sEe();function aEe(){}function lEe(){}lEe.resetWarningCache=aEe;cEe.exports=function(){function e(o,n,i,s,l,c){if(c!==mst){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:lEe,resetWarningCache:aEe};return r.PropTypes=r,r}});var fEe=$e((phr,dEe)=>{dEe.exports=uEe()();var dhr,fhr});var mEe=$e((FF,pEe)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof FF<"u")t(pEe,FF);else{var r={exports:{}};t(r,r.exports),e.autosize=r.exports}})(FF,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 gEe=$e((mhr,hEe)=>{var hst=function(e,t,r){return r=window.getComputedStyle,(r?r(e):e.currentStyle)[t.replace(/-(\w)/gi,function(o,n){return n.toUpperCase()})]};hEe.exports=hst});var bEe=$e((hhr,vEe)=>{var cq=gEe();function gst(e){var t=cq(e,"line-height"),r=parseFloat(t,10);if(t===r+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=cq(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=" ",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var s=cq(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}vEe.exports=gst});var wEe=$e(Wp=>{"use strict";var vst=Wp&&Wp.__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)}})(),uq=Wp&&Wp.__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},bst=Wp&&Wp.__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};Wp.__esModule=!0;var LF=_e(),mP=fEe(),DF=mEe(),yst=bEe(),wst=yst,yEe="autosize:resized",_st=(function(e){vst(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:wst(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&&DF(r.textarea)}):this.textarea&&DF(this.textarea),this.textarea&&this.textarea.addEventListener(yEe,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(yEe,this.onResize),DF.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=bst(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=o.state.lineHeight,h=s&&m?m*s:null;return LF.createElement("textarea",uq({},f,{onChange:this.onChange,style:h?uq({},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&&DF.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:mP.number,maxRows:mP.number,onResize:mP.func,innerRef:mP.any,async:mP.bool},t})(LF.Component);Wp.TextareaAutosize=LF.forwardRef(function(e,t){return LF.createElement(_st,uq({},e,{innerRef:t}))})});var SEe=$e((vhr,_Ee)=>{"use strict";var Sst=wEe();_Ee.exports=Sst.TextareaAutosize});var SPe=$e((xgr,_Pe)=>{_Pe.exports=window.wp.serverSideRender});var ndt={};Yr(ndt,{AlignmentToolbar:()=>Mst,Autocomplete:()=>Nst,AutosaveMonitor:()=>h3,BlockAlignmentToolbar:()=>Fst,BlockControls:()=>Dst,BlockEdit:()=>Lst,BlockEditorKeyboardShortcuts:()=>Bst,BlockFormatControls:()=>Vst,BlockIcon:()=>jst,BlockInspector:()=>zst,BlockList:()=>Hst,BlockMover:()=>Ust,BlockNavigationDropdown:()=>Wst,BlockSelectionClearer:()=>Gst,BlockSettingsMenu:()=>Yst,BlockTitle:()=>qst,BlockToolbar:()=>Kst,CharacterCount:()=>ax,ColorPalette:()=>Zst,ContrastChecker:()=>Xst,CopyHandler:()=>Qst,DefaultBlockAppender:()=>Jst,DocumentBar:()=>I3,DocumentOutline:()=>mS,DocumentOutlineCheck:()=>wSe,EditorHistoryRedo:()=>L3,EditorHistoryUndo:()=>j3,EditorKeyboardShortcuts:()=>oS,EditorKeyboardShortcutsRegister:()=>PSe,EditorNotices:()=>jSe,EditorProvider:()=>s_e,EditorSnackbars:()=>WSe,EntitiesSavedStates:()=>Oat,ErrorBoundary:()=>XSe,FontSizePicker:()=>$st,InnerBlocks:()=>tat,Inserter:()=>eat,InspectorAdvancedControls:()=>rat,InspectorControls:()=>oat,LocalAutosaveMonitor:()=>exe,MediaPlaceholder:()=>cat,MediaUpload:()=>uat,MediaUploadCheck:()=>dat,MultiSelectScrollIntoView:()=>fat,NavigableToolbar:()=>pat,ObserveTyping:()=>mat,PageAttributesCheck:()=>gS,PageAttributesOrder:()=>sxe,PageAttributesPanel:()=>Z3,PageAttributesParent:()=>vxe,PageTemplate:()=>J3,PanelColorSettings:()=>nat,PlainText:()=>iat,PluginBlockSettingsMenuItem:()=>Mxe,PluginDocumentSettingPanel:()=>o6,PluginMoreMenuItem:()=>Bxe,PluginPostPublishPanel:()=>i6,PluginPostStatusInfo:()=>CS,PluginPrePublishPanel:()=>l6,PluginPreviewMenuItem:()=>qxe,PluginSidebar:()=>ky,PluginSidebarMoreMenuItem:()=>Xxe,PostAuthor:()=>p6,PostAuthorCheck:()=>m6,PostAuthorPanel:()=>v6,PostComments:()=>_6,PostDiscussionPanel:()=>P6,PostExcerpt:()=>KE,PostExcerptCheck:()=>Oy,PostExcerptPanel:()=>eCe,PostFeaturedImage:()=>JE,PostFeaturedImageCheck:()=>zp,PostFeaturedImagePanel:()=>L6,PostFormat:()=>eP,PostFormatCheck:()=>NS,PostLastRevision:()=>j6,PostLastRevisionCheck:()=>Fy,PostLastRevisionPanel:()=>wCe,PostLockedModal:()=>PCe,PostPendingStatus:()=>ICe,PostPendingStatusCheck:()=>H6,PostPingbacks:()=>T6,PostPreviewButton:()=>DS,PostPublishButton:()=>LS,PostPublishButtonLabel:()=>G6,PostPublishPanel:()=>pF,PostSavedState:()=>CF,PostSchedule:()=>jS,PostScheduleCheck:()=>TF,PostScheduleLabel:()=>zS,PostSchedulePanel:()=>kF,PostSticky:()=>gF,PostStickyCheck:()=>mF,PostSwitchToDraftButton:()=>QTe,PostSyncStatus:()=>IF,PostTaxonomies:()=>ZS,PostTaxonomiesCheck:()=>OF,PostTaxonomiesFlatTermSelector:()=>QY,PostTaxonomiesHierarchicalTermSelector:()=>eq,PostTaxonomiesPanel:()=>MF,PostTemplatePanel:()=>u6,PostTextEditor:()=>hP,PostTitle:()=>YF,PostTitleRaw:()=>KF,PostTrash:()=>rx,PostTrashCheck:()=>ZF,PostTypeSupportCheck:()=>fo,PostURL:()=>yP,PostURLCheck:()=>$F,PostURLLabel:()=>ZEe,PostURLPanel:()=>oD,PostVisibility:()=>nP,PostVisibilityCheck:()=>$Ee,PostVisibilityLabel:()=>Z6,RichText:()=>EPe,RichTextShortcut:()=>sat,RichTextToolbarButton:()=>aat,ServerSideRender:()=>CPe.default,SkipToSelectedBlock:()=>hat,TableOfContents:()=>hPe,TextEditorGlobalKeyboardShortcuts:()=>Iat,ThemeSupportCheck:()=>M6,TimeToRead:()=>sx,URLInput:()=>gat,URLInputButton:()=>vat,URLPopover:()=>bat,UnsavedChangesWarning:()=>wPe,VisualEditorGlobalKeyboardShortcuts:()=>Aat,Warning:()=>yat,WordCount:()=>ix,WritingFlow:()=>wat,__unstableRichTextInputEvent:()=>lat,cleanForSlug:()=>mge,createCustomColorsHOC:()=>_at,getColorClassName:()=>Sat,getColorObjectByAttributeValues:()=>xat,getColorObjectByColorValue:()=>Cat,getFontSize:()=>Tat,getFontSizeClass:()=>Eat,linkAutocompleter:()=>p3,mediaUpload:()=>HN,privateApis:()=>H5e,registerEntityAction:()=>edt,registerEntityField:()=>rdt,store:()=>N,storeConfig:()=>ZC,transformStyles:()=>U5e.transformStyles,unregisterEntityAction:()=>tdt,unregisterEntityField:()=>odt,useEntitiesSavedStatesIsDirty:()=>Nat,usePostScheduleLabel:()=>HS,usePostURLLabel:()=>hq,usePostVisibilityLabel:()=>zY,userAutocompleter:()=>m3,withColorContext:()=>Pat,withColors:()=>kat,withFontSizes:()=>Rat});var v_e=a(K(),1),b_e=a(ae(),1),y_e=a(U(),1),w_e=a(Te(),1),__e=a(Vn(),1);var f3=a(K(),1);var eZ=a(K(),1);var XK=a(be(),1),QK={...XK.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,responsiveEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};var JK=a(K(),1);function J5e(e={},t){return t.type==="SET_IS_READY"?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}function $5e(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 eNe(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 $K=(0,JK.combineReducers)({actions:$5e,fields:eNe,isReady:J5e});function hk(e){return e&&typeof e=="object"&&"raw"in e?e.raw:e}function tNe(e=null,t){return t.type==="SET_EDITED_POST"?t.postId:e}function rNe(e=null,t){return t.type==="SET_CURRENT_TEMPLATE_ID"?t.id:e}function oNe(e=null,t){return t.type==="SET_EDITED_POST"?t.postType:e}function nNe(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function iNe(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 sNe(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 aNe(e={isLocked:!1},t){return t.type==="UPDATE_POST_LOCK"?t.lock:e}function lNe(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 cNe(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 uNe(e=QK,t){return t.type==="UPDATE_EDITOR_SETTINGS"?{...e,...t.settings}:e}function dNe(e="post-only",t){return t.type==="SET_RENDERING_MODE"?t.mode:e}function fNe(e=void 0,t){return t.type==="SET_CANVAS_WIDTH"?t.width:e}function pNe(e=[],t){switch(t.type){case"REMOVE_PANEL":if(!e.includes(t.panelName))return[...e,t.panelName]}return e}function mNe(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 hNe(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 gNe(e={current:null}){return e}function vNe(e={current:null}){return e}function bNe(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 yNe(e="/",t){switch(t.type){case"SET_STYLES_PATH":return t.path;case"RESET_STYLES_NAVIGATION":return"/"}return e}function wNe(e=!1,t){switch(t.type){case"SET_SHOW_STYLEBOOK":return t.show;case"RESET_STYLES_NAVIGATION":return!1}return e}function _Ne(e=null,t){return t.type==="SET_CURRENT_REVISION_ID"?t.revisionId:e}function SNe(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 xNe(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 CNe(e={},t){return t.type==="SELECT_NOTE"?{noteId:t.noteId,options:t.options}:e}var tZ=(0,eZ.combineReducers)({postId:tNe,postType:oNe,templateId:rNe,saving:iNe,deleting:sNe,postLock:aNe,template:nNe,postSavingLock:lNe,editorSettings:uNe,postAutosavingLock:cNe,renderingMode:dNe,canvasWidth:fNe,removedPanels:pNe,blockInserterPanel:mNe,inserterSidebarToggleRef:vNe,listViewPanel:hNe,listViewToggleRef:gNe,publishSidebarActive:bNe,stylesPath:yNe,showStylebook:wNe,revisionId:_Ne,revisionPage:SNe,showRevisionDiff:xNe,selectedNote:CNe,dataviews:$K});var Z4={};Yr(Z4,{__experimentalGetDefaultTemplatePartAreas:()=>H6e,__experimentalGetDefaultTemplateType:()=>U6e,__experimentalGetDefaultTemplateTypes:()=>z6e,__experimentalGetTemplateInfo:()=>W6e,__unstableIsEditorReady:()=>L3e,canInsertBlockType:()=>L6e,canUserUseUnfilteredHTML:()=>R3e,didPostSaveRequestFail:()=>g3e,didPostSaveRequestSucceed:()=>h3e,getActivePostLock:()=>k3e,getAdjacentBlockClientId:()=>l6e,getAutosaveAttribute:()=>hX,getBlock:()=>q3e,getBlockAttributes:()=>Y3e,getBlockCount:()=>$3e,getBlockHierarchyRootClientId:()=>a6e,getBlockIndex:()=>S6e,getBlockInsertionPoint:()=>O6e,getBlockListSettings:()=>j6e,getBlockMode:()=>R6e,getBlockName:()=>W3e,getBlockOrder:()=>_6e,getBlockRootClientId:()=>s6e,getBlockSelectionEnd:()=>t6e,getBlockSelectionStart:()=>e6e,getBlocks:()=>K3e,getBlocksByClientId:()=>J3e,getClientIdsOfDescendants:()=>Z3e,getClientIdsWithDescendants:()=>X3e,getCurrentPost:()=>zn,getCurrentPostAttribute:()=>c1,getCurrentPostId:()=>oa,getCurrentPostLastRevisionId:()=>n3e,getCurrentPostRevisionsCount:()=>Y4,getCurrentPostType:()=>ra,getCurrentTemplateId:()=>o3e,getDeviceType:()=>B3e,getEditedPostAttribute:()=>no,getEditedPostContent:()=>p1,getEditedPostPreviewLink:()=>y3e,getEditedPostSlug:()=>x3e,getEditedPostVisibility:()=>s3e,getEditorBlocks:()=>I3e,getEditorMode:()=>z3e,getEditorSelection:()=>D3e,getEditorSelectionEnd:()=>F3e,getEditorSelectionStart:()=>M3e,getEditorSettings:()=>K4,getFirstMultiSelectedBlockClientId:()=>m6e,getGlobalBlockCount:()=>Q3e,getInserterItems:()=>B6e,getLastMultiSelectedBlockClientId:()=>h6e,getMultiSelectedBlockClientIds:()=>f6e,getMultiSelectedBlocks:()=>p6e,getMultiSelectedBlocksEndClientId:()=>w6e,getMultiSelectedBlocksStartClientId:()=>y6e,getNextBlockClientId:()=>u6e,getPermalink:()=>S3e,getPermalinkParts:()=>yX,getPostEdits:()=>f1,getPostLockUser:()=>P3e,getPostTypeLabel:()=>G6e,getPreviousBlockClientId:()=>c6e,getRenderingMode:()=>Fk,getSelectedBlock:()=>i6e,getSelectedBlockClientId:()=>n6e,getSelectedBlockCount:()=>r6e,getSelectedBlocksInitialCaretPosition:()=>d6e,getStateBeforeOptimisticTransaction:()=>H3e,getSuggestedPostFormat:()=>w3e,getTemplate:()=>F6e,getTemplateLock:()=>D6e,hasChangedContent:()=>mX,hasEditorRedo:()=>e3e,hasEditorUndo:()=>$Me,hasInserterItems:()=>V6e,hasMultiSelection:()=>E6e,hasNonPostEntityChanges:()=>t3e,hasSelectedBlock:()=>o6e,hasSelectedInnerBlock:()=>C6e,inSomeHistory:()=>U3e,isAncestorMultiSelected:()=>b6e,isAutosavingPost:()=>v3e,isBlockInsertionPointVisible:()=>N6e,isBlockMultiSelected:()=>v6e,isBlockSelected:()=>x6e,isBlockValid:()=>G3e,isBlockWithinSelection:()=>T6e,isCaretWithinFormattedText:()=>I6e,isCleanNewPost:()=>r3e,isCurrentPostPending:()=>a3e,isCurrentPostPublished:()=>q4,isCurrentPostScheduled:()=>l3e,isDeletingPost:()=>p3e,isEditedPostAutosaveable:()=>u3e,isEditedPostBeingScheduled:()=>d3e,isEditedPostDateFloating:()=>f3e,isEditedPostDirty:()=>Nk,isEditedPostEmpty:()=>vX,isEditedPostNew:()=>pX,isEditedPostPublishable:()=>c3e,isEditedPostSaveable:()=>gX,isEditorPanelEnabled:()=>O3e,isEditorPanelOpened:()=>N3e,isEditorPanelRemoved:()=>_X,isFirstMultiSelectedBlock:()=>g6e,isInserterOpened:()=>j3e,isListViewOpened:()=>V3e,isMultiSelecting:()=>P6e,isPermalinkEditable:()=>bX,isPostAutosavingLocked:()=>wX,isPostLockTakeover:()=>E3e,isPostLocked:()=>C3e,isPostSavingLocked:()=>T3e,isPreviewingPost:()=>b3e,isPublishSidebarEnabled:()=>A3e,isPublishSidebarOpened:()=>Y6e,isPublishingPost:()=>_3e,isSavingNonPostEntityChanges:()=>m3e,isSavingPost:()=>v0,isSelectionEnabled:()=>k6e,isTyping:()=>A6e,isValidTemplate:()=>M6e});var gm=a(Pt(),1),g0=a(an(),1),u1=a(bo(),1),Xt=a(K(),1),Lu=a(Ya(),1),Mk=a(be(),1),qr=a(ae(),1),m1=a(Dt(),1);var aZ=new Set(["meta"]),lZ="core/editor",x4=/%(?:postname|pagename)%/,C4=60*1e3,cZ=["title","excerpt","content"];var xr="wp_template",Ii="wp_template_part",Nu="wp_block",gk="wp_navigation",El="attachment",vk={custom:"custom",theme:"theme",plugin:"plugin"},T4=["wp_template","wp_template_part"],uZ=[...T4,"wp_block","wp_navigation"],cm=[xr,Ii,Nu,gk];var fZ=a(yf(),1),{lock:pZ,unlock:Y}=(0,fZ.__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");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 zt=(e,t,r)=>{let o=Array.isArray(t)?t:t.split("."),n=e;return o.forEach(i=>{n=n?.[i]}),n??r};var TNe=["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 iv(e,t,r){let o=r?".blocks."+r:"",n=t?"."+t:"",i=`settings${o}${n}`,s=`settings${n}`;if(t)return zt(e,i)??zt(e,s);let l={};return TNe.forEach(c=>{let u=zt(e,`settings${o}.${c}`)??zt(e,`settings.${c}`);u!==void 0&&(l=um(l,c.split("."),u))}),l}function t1(e,t,r,o){let n=o?".blocks."+o:"",i=t?"."+t:"",s=`settings${n}${i}`;return um(e,s.split("."),r)}var gZ=a(E4(),1);var ENe="1600px",PNe="320px",kNe=1,RNe=.25,ANe=.75,INe="14px";function hZ({minimumFontSize:e,maximumFontSize:t,fontSize:r,minimumViewportWidth:o=PNe,maximumViewportWidth:n=ENe,scaleFactor:i=kNe,minimumFontSizeLimit:s}){if(s=Mu(s)?s:INe,r){let w=Mu(r);if(!w?.unit||!w?.value)return null;let S=Mu(s,{coerceTo:w.unit});if(S?.value&&!e&&!t&&w?.value<=S?.value)return null;if(t||(t=`${w.value}${w.unit}`),!e){let x=w.unit==="px"?w.value:w.value*16,C=Math.min(Math.max(1-.075*Math.log2(x),RNe),ANe),I=r1(w.value*C,3);S?.value&&I<S?.value?e=`${S.value}${S.unit}`:e=`${I}${w.unit}`}}let l=Mu(e),c=l?.unit||"rem",u=Mu(t,{coerceTo:c});if(!l||!u)return null;let d=Mu(e,{coerceTo:"rem"}),f=Mu(n,{coerceTo:c}),m=Mu(o,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let g=r1(m.value/100,3),v=r1(g,3)+c,b=100*((u.value-l.value)/h),_=r1((b||1)*i,3),y=`${d.value}${d.unit} + ((1vw - ${v}) * ${_})`;return`clamp(${e}, ${y}, ${t})`}function Mu(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:r,rootSizeValue:o,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),l=e.toString().match(s);if(!l||l.length<3)return null;let[,c,u]=l,d=parseFloat(c);return r==="px"&&(u==="em"||u==="rem")&&(d=d*o,u=r),u==="px"&&(r==="em"||r==="rem")&&(d=d/o,u=r),(r==="em"||r==="rem")&&(u==="em"||u==="rem")&&(u=r),u?{value:r1(d,3),unit:u}:null}function r1(e,t=3){let r=Math.pow(10,t);return Math.round(e*r)/r}function P4(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function ONe(e){let t=e?.typography??{},r=e?.layout,o=Mu(r?.wideSize)?r?.wideSize:null;return P4(t)&&o?{fluid:{maxViewportWidth:o,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function bk(e,t){let{size:r}=e;if(!r||r==="0"||e?.fluid===!1||!P4(t?.typography)&&!P4(e))return r;let o=ONe(t)?.fluid??{},n=hZ({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:r,minimumFontSizeLimit:typeof o=="object"?o?.minFontSize:void 0,maximumViewportWidth:typeof o=="object"?o?.maxViewportWidth:void 0,minimumViewportWidth:typeof o=="object"?o?.minViewportWidth:void 0});return n||r}var Fu="body",o1=":root";function c0(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 u0=[{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)=>bk(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 xc(e,t){if(!e||!t)return t;let r=c0(e),o=c0(t),n=[];return r.forEach(i=>{o.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function vZ(e,t){if(!e||!t)return;let r={};return Object.entries(t).forEach(([o,n])=>{typeof n=="string"&&(r[o]=xc(e,n)),typeof n=="object"&&(r[o]={},Object.entries(n).forEach(([i,s])=>{r[o][i]=xc(e,s)}))}),r}function yk(e,t){return e.includes(",")?c0(e).map(n=>n+t).join(","):e+t}function k4(e,t){let r=`.is-style-${e}`;if(!t)return r;let o=/[^\s:]+/,n=s=>s+r;return c0(t).map(s=>s.replace(o,n)).join(",")}function bZ(e,t){let r=`.is-style-${e}`,o=c0(t).map(n=>{let i=n.trim(),s=`${r} `;return i.startsWith(s)?i.slice(s.length):i});return k4(e,o.join(","))}function NNe(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let r=(0,gZ.getCSSValueFromRawStyle)(zt(t,e.ref));return typeof r=="object"&&r!==null&&"ref"in r&&r?.ref?void 0:r===void 0?e:r}return e}function MNe(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 d0(e,t){if(!e||!t)return e;let r=NNe(e,t);return typeof r=="object"&&r!==null&&"url"in r&&r?.url&&(r.url=MNe(r.url,t?._links?.["wp:theme-file"])),r}function yZ(e,t,r=[],o="slug",n){let i=[t?zt(e,["blocks",t,...r]):void 0,zt(e,r)].filter(Boolean);for(let s of i)if(s){let l=["custom","theme","default"];for(let c of l){let u=s[c];if(u){let d=u.find(f=>f[o]===n);if(d)return o==="slug"||yZ(e,t,r,"slug",d.slug)[o]===d[o]?d:void 0}}}}function FNe(e,t,r,[o,n]=[]){let i=u0.find(l=>l.cssVarInfix===o);if(!i||!e.settings)return r;let s=yZ(e.settings,t,i.path,"slug",n);if(s){let{valueKey:l}=i,c=s[l];return sv(e,t,c)}return r}function DNe(e,t,r,o=[]){let n=(t?zt(e?.settings??{},["blocks",t,"custom",...o]):void 0)??zt(e?.settings??{},["custom",...o]);return n?sv(e,t,n):r}function sv(e,t,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let u=zt(e,r.ref);if(!u||typeof u=="object"&&"ref"in u)return u;r=u}else return r;let o="var:",n="var(--wp--",i=")",s;if(r.startsWith(o))s=r.slice(o.length).split("|");else if(r.startsWith(n)&&r.endsWith(i))s=r.slice(n.length,-i.length).split("--");else return r;let[l,...c]=s;return l==="preset"?FNe(e,t,r,c):l==="custom"?DNe(e,t,r,c):r}var _Z={"@mobile":"mobile","@tablet":"tablet","-current":"@current"};function wZ(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function SZ(e){if(!wZ(e))return e;let t=e;return Object.entries(_Z).forEach(([r,o])=>{Object.hasOwn(e,o)&&(t===e&&(t={...e}),Object.hasOwn(e,r)||(t[r]=e[o]),delete t[o])}),Object.entries(t).forEach(([r,o])=>{if(!wZ(o))return;let n=SZ(o);n!==o&&(t===e&&(t={...e}),t[r]=n)}),t}function av(e){if(!e?.styles)return e;let t=SZ(e.styles);return t===e.styles?e:{...e,styles:t}}function xZ(e){let t=e.split("."),r=t.map(o=>_Z[o]??o);return r.some((o,n)=>o!==t[n])?r.join("."):void 0}function dm(e,t,r,o=!0){let n=t?"."+t:"",i=r?`styles.blocks.${r}${n}`:`styles${n}`;if(!e)return;let s=zt(e,i),l=xZ(i);if(s===void 0&&l){let u=!0,d=e;for(let f of i.split(".")){if(!d||typeof d!="object"||!Object.hasOwn(d,f)){u=!1;break}d=d[f]}u||(s=zt(e,l))}return o?sv(e,r,s):s}function n1(e,t,r,o){let n=t?"."+t:"",i=o?`styles.blocks.${o}${n}`:`styles${n}`;return um(av(e),i.split("."),r)}var R4=a(wk(),1);function lv(e,t){return typeof e!="object"||typeof t!="object"?e===t:(0,R4.default)(e?.styles,t?.styles)&&(0,R4.default)(e?.settings,t?.settings)}var IZ=a(_k(),1);function RZ(e){return Object.prototype.toString.call(e)==="[object Object]"}function AZ(e){var t,r;return RZ(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(RZ(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Oi(e,t){return(0,IZ.default)(av(e),av(t),{isMergeableObject:AZ,customMerge:r=>{if(r==="backgroundImage")return(o,n)=>n??o}})}function OZ(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 Zt=a(j(),1),NZ=a(Pt(),1),Sk=new Map,XNe=[],A4={caption:(0,Zt.__)("Caption"),link:(0,Zt.__)("Link"),button:(0,Zt.__)("Button"),heading:(0,Zt.__)("Heading"),h1:(0,Zt.__)("H1"),h2:(0,Zt.__)("H2"),h3:(0,Zt.__)("H3"),h4:(0,Zt.__)("H4"),h5:(0,Zt.__)("H5"),h6:(0,Zt.__)("H6"),"settings.color":(0,Zt.__)("Color"),"settings.typography":(0,Zt.__)("Typography"),"settings.shadow":(0,Zt.__)("Shadow"),"settings.layout":(0,Zt.__)("Layout"),"styles.color":(0,Zt.__)("Colors"),"styles.spacing":(0,Zt.__)("Spacing"),"styles.background":(0,Zt.__)("Background"),"styles.typography":(0,Zt.__)("Typography")},QNe=OZ(()=>(0,NZ.getBlockTypes)().reduce((e,{name:t,title:r})=>(e[t]=r,e),{})),xk=e=>e!==null&&typeof e=="object";function JNe(e){if(A4[e])return A4[e];let t=e.split(".");if(t?.[0]==="blocks")return QNe()?.[t[1]]||t[1];if(t?.[0]==="elements")return A4[t[1]]||t[1]}function MZ(e,t,r=""){if(!xk(e)&&!xk(t))return e!==t?r.split(".").slice(0,2).join("."):void 0;e=xk(e)?e:{},t=xk(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=MZ(e[i],t[i],s);l&&(n=n.concat(l))}return n}function $Ne(e,t){let r=JSON.stringify({next:e,previous:t});if(Sk.has(r))return Sk.get(r);let o=MZ({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 Sk.set(r,[]),[];let n=Array.isArray(o)?o:[o],i=[...new Set(n)].reduce((s,l)=>{let c=JNe(l);return c&&s.push([l.split(".")[0],c]),s},[]);return Sk.set(r,i),i}function I4(e,t,r={}){let o=$Ne(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,Zt.__)(", "));switch(s){case"blocks":return(0,Zt.sprintf)((0,Zt._n)("%s block.","%s blocks.",c),u);case"elements":return(0,Zt.sprintf)((0,Zt._n)("%s element.","%s elements.",c),u);case"settings":return(0,Zt.sprintf)((0,Zt.__)("%s settings."),u);case"styles":return(0,Zt.sprintf)((0,Zt.__)("%s styles."),u);default:return(0,Zt.sprintf)((0,Zt.__)("%s."),u)}})):XNe}var Ni=a(Pt(),1),l1=a(E4(),1),$Z=a(K(),1);function p0(e,t="root",r={}){if(!t)return null;let{fallback:o=!1}=r,{name:n,selectors:i,supports:s}=e,l=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(l&&i.root?u=i?.root:s?.__experimentalSelector?u=s.__experimentalSelector:u=".wp-block-"+n.replace("core/","").replace("/","-"),c==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=o?u:null;if(l)return zt(i,`${c}.root`,null)||zt(i,c,null)||m;let h=s?zt(s,`${c}.__experimentalSelector`,null):void 0;return h?xc(u,h):m}let f;return l&&(f=zt(i,c,null)),f||(o?p0(e,d[0],r):null)}var eMe={grad:.9,turn:360,rad:360/(2*Math.PI)},wf=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},jn=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Pl=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},HZ=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},FZ=function(e){return{r:Pl(e.r,0,255),g:Pl(e.g,0,255),b:Pl(e.b,0,255),a:Pl(e.a)}},O4=function(e){return{r:jn(e.r),g:jn(e.g),b:jn(e.b),a:jn(e.a,3)}},tMe=/^#([0-9a-f]{3,8})$/i,Ck=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},UZ=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}},WZ=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}},DZ=function(e){return{h:HZ(e.h),s:Pl(e.s,0,100),l:Pl(e.l,0,100),a:Pl(e.a)}},LZ=function(e){return{h:jn(e.h),s:jn(e.s),l:jn(e.l),a:jn(e.a,3)}},BZ=function(e){return WZ((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},s1=function(e){return{h:(t=UZ(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},rMe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,oMe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nMe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,iMe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,F4={string:[[function(e){var t=tMe.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?jn(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?jn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=nMe.exec(e)||iMe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:FZ({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=rMe.exec(e)||oMe.exec(e);if(!t)return null;var r,o,n=DZ({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(eMe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return BZ(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 wf(t)&&wf(r)&&wf(o)?FZ({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(!wf(t)||!wf(r)||!wf(o))return null;var s=DZ({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return BZ(s)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,n=e.a,i=n===void 0?1:n;if(!wf(t)||!wf(r)||!wf(o))return null;var s=(function(l){return{h:HZ(l.h),s:Pl(l.s,0,100),v:Pl(l.v,0,100),a:Pl(l.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return WZ(s)},"hsv"]]},VZ=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]},sMe=function(e){return typeof e=="string"?VZ(e.trim(),F4.string):typeof e=="object"&&e!==null?VZ(e,F4.object):[null,void 0]};var N4=function(e,t){var r=s1(e);return{h:r.h,s:Pl(r.s+100*t,0,100),l:r.l,a:r.a}},M4=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},jZ=function(e,t){var r=s1(e);return{h:r.h,s:r.s,l:Pl(r.l+100*t,0,100),a:r.a}},D4=(function(){function e(t){this.parsed=sMe(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 jn(M4(this.rgba),2)},e.prototype.isDark=function(){return M4(this.rgba)<.5},e.prototype.isLight=function(){return M4(this.rgba)>=.5},e.prototype.toHex=function(){return t=O4(this.rgba),r=t.r,o=t.g,n=t.b,s=(i=t.a)<1?Ck(jn(255*i)):"","#"+Ck(r)+Ck(o)+Ck(n)+s;var t,r,o,n,i,s},e.prototype.toRgb=function(){return O4(this.rgba)},e.prototype.toRgbString=function(){return t=O4(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 LZ(s1(this.rgba))},e.prototype.toHslString=function(){return t=LZ(s1(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=UZ(this.rgba),{h:jn(t.h),s:jn(t.s),v:jn(t.v),a:jn(t.a,3)};var t},e.prototype.invert=function(){return Io({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),Io(N4(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Io(N4(this.rgba,-t))},e.prototype.grayscale=function(){return Io(N4(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Io(jZ(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Io(jZ(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"?Io({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):jn(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=s1(this.rgba);return typeof t=="number"?Io({h:t,s:r.s,l:r.l,a:r.a}):jn(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Io(t).toHex()},e})(),Io=function(e){return e instanceof D4?e:new D4(e)},zZ=[],Tk=function(e){e.forEach(function(t){zZ.indexOf(t)<0&&(t(D4,F4),zZ.push(t))})};function aMe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(r=>{let o=Io(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 GZ(e){return`${e}{filter:none}`}function YZ(e,t){return`${e}{filter:url(#${t})}`}function Ek(e,t){let r=aMe(t);return` |
| 2 |
<svg |
| 3 |
xmlns:xlink="http://www.w3.org/1999/xlink" |
| 4 |
viewBox="0 0 0 0" |
| 5 |
width="0" |
| 6 |
height="0" |
| 7 |
focusable="false" |
| 8 |
role="none" |
| 9 |
aria-hidden="true" |
| 10 |
style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" |
| 11 |
> |
| 12 |
<defs> |
| 13 |
<filter id="${e}"> |
| 14 |
<!-- |
| 15 |
Use sRGB instead of linearRGB so transparency looks correct. |
| 16 |
Use perceptual brightness to convert to grayscale. |
| 17 |
--> |
| 18 |
<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix> |
| 19 |
<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --> |
| 20 |
<feComponentTransfer color-interpolation-filters="sRGB"> |
| 21 |
<feFuncR type="table" tableValues="${r.r.join(" ")}"></feFuncR> |
| 22 |
<feFuncG type="table" tableValues="${r.g.join(" ")}"></feFuncG> |
| 23 |
<feFuncB type="table" tableValues="${r.b.join(" ")}"></feFuncB> |
| 24 |
<feFuncA type="table" tableValues="${r.a.join(" ")}"></feFuncA> |
| 25 |
</feComponentTransfer> |
| 26 |
<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --> |
| 27 |
<feComposite in2="SourceGraphic" operator="in"></feComposite> |
| 28 |
</filter> |
| 29 |
</defs> |
| 30 |
</svg>`}function fm(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 L4(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function lMe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function B4(e,t="0"){let r=lMe(e);if(!r)return null;let o=L4(r?.top)||t,n=L4(r?.left)||t;return o===n?o:`${o} ${n}`}var qZ={backgroundSize:"cover",backgroundPosition:"50% 50%"};function KZ(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:qZ.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:qZ.backgroundPosition}),t}var ZZ={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 XZ={mobile:"480px",tablet:"782px"},QZ=/^(\d+|\d*\.\d+)(px|em|rem)$/,cMe=16;function uMe(e){return"mobile"in e||"tablet"in e}function dMe(e){return!e||typeof e!="object"?{}:uMe(e)?e:e.settings?.viewport??{}}function fMe(e){return typeof e=="string"&&QZ.test(e.trim())}function V4(e){if(typeof e=="number")return e;if(typeof e!="string")return;let t=e.trim().match(QZ);if(!t)return;let r=Number.parseFloat(t[1]);return t[2]==="px"?r:r*cMe}function j4(e){let t=dMe(e),r={},o={};Object.keys(XZ).forEach(l=>{let c=l,u=t[c],d=V4(u);d!==void 0&&fMe(u)&&(r[c]=u.trim(),o[c]=d)});let n=Object.keys(r);if(!n.length)return{...XZ};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 a1(e){let t=j4(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 pMe={button:"wp-element-button",caption:"wp-element-caption"},mMe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},eX={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},hMe={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]};function gMe(e="*",t={}){return u0.reduce((r,{path:o,cssVarInfix:n,classes:i})=>{if(!i)return r;let s=zt(t,o,[]);return["default","theme","custom"].forEach(l=>{s[l]&&s[l].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${fm(c)}-${u}`,m=e?`:where(${e})${f}`:f,h=`var(--wp--preset--${n}--${fm(c)})`;r+=`${m}{${d}: ${h} !important;}`})})}),r},"")}function vMe(e={}){return u0.filter(t=>t.path.at(-1)==="duotone").flatMap(t=>{let r=zt(e,t.path,{});return["default","theme"].filter(o=>r[o]).flatMap(o=>r[o].map(n=>Ek(`wp-duotone-${n.slug}`,n.colors))).join("")})}function tX(e={},t,r){let o=[];return Object.keys(e).forEach(n=>{let i=t+fm(n.replace("/","-")),s=e[n];if(s instanceof Object){let l=i+r;o=[...o,...tX(s,l,r)]}else o.push(`${i}: ${s}`)}),o}var bMe=(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},yMe=(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},wMe=(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=kk(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=kk(l);r[s]=[...r[s]||[],...c],delete t[o]}}),r};function kk(e={},t="",r,o={},n=!1){let i=Fu===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=zt(e,g);if(u==="--wp--style--root--padding"&&(typeof v=="string"||!r))return c;if(f&&typeof v!="string")Object.entries(f).forEach(b=>{let[_,y]=b;if(!zt(v,[y],!1))return;let w=_.startsWith("--")?_:fm(_);c.push(`${w}: ${(0,l1.getCSSValueFromRawStyle)(zt(v,[y]))}`)});else if(zt(e,g,!1)){let b=u.startsWith("--")?u:fm(u);c.push(`${b}: ${(0,l1.getCSSValueFromRawStyle)(zt(e,g))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=d0(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...KZ(e.background)}})),(0,l1.getCSSRules)(e).forEach(c=>{if(i&&(r||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:fm(c.key),d=d0(c.value,o);u==="font-size"&&(d=bk({name:"",slug:"",size:d},o?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function _Me({layoutDefinitions:e=ZZ,style:t,selector:r,hasBlockGapSupport:o,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",l=o?B4(t?.spacing?.blockGap):"";if(n&&(r===Fu?l=l||"0.5em":!o&&i&&(l=i)),l&&e&&(Object.values(e).forEach(({className:c,name:u,spacingStyles:d})=>{!o&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let m=[];if(f.rules&&Object.entries(f.rules).forEach(([h,g])=>{m.push(`${h}: ${g||l}`)}),m.length){let h="";o?h=r===Fu?`:root :where(.${c})${f?.selector||""}`:`:root :where(${r}-${c})${f?.selector||""}`:h=r===Fu?`:where(.${c}${f?.selector||""})`:`:where(${r}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),r===Fu&&o&&(s+=`${o1} { --wp--style--block-gap: ${l}; }`)),r===Fu&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(s+=`${r} .${u} { display:${d}; }`),f?.length&&f.forEach(m=>{let h=[];if(m.rules&&Object.entries(m.rules).forEach(([g,v])=>{h.push(`${g}: ${v}`)}),h.length){let g=`.${u}${m?.selector||""}`;s+=`${g} { ${h.join("; ")}; }`}})})}return s}var SMe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function xMe(e,t){return Pk(e,void 0,t)}function Pk(e,t,r){if(!e)return{};let o=Object.entries(e),n=t?eX[t]??[]:[],s=o.filter(([l])=>SMe.includes(l)||n.includes(l)||r[l]).map(([l,c])=>[l,JSON.parse(JSON.stringify(c))]);return Object.fromEntries(s)}function JZ(e){let{styles:t,selector:r,featureSelectors:o,name:n,elementName:i,mediaQuery:s,variationName:l}=e,c=n?eX[n]??[]:hMe[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 CMe(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 TMe=(e,t)=>{let r=[];if(!e?.styles)return r;let o=a1(e),n=xMe(e.styles,o);return n&&r.push({styles:n,selector:Fu,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:!pMe[i]})}),Object.entries(e.styles?.blocks??{}).forEach(([i,s])=>{let l=Pk(s,i,o),c=s,u=[],d=[];c?.variations&&Object.entries(c.variations).forEach(([f,m])=>{let h=m,g=Pk(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:xc(v,Ni.__EXPERIMENTAL_ELEMENTS[b]),elementName:b,isStyleVariation:!0})}),Object.entries(h?.blocks??{}).forEach(([b,_])=>{let y=typeof t!="string"?xc(v,t[b]?.selector):void 0,w=typeof t!="string"?xc(v,t[b]?.duotoneSelector):void 0,S=typeof t!="string"?vZ(v,t[b]?.featureSelectors??{}):void 0,x=Pk(_,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,I])=>{I&&Ni.__EXPERIMENTAL_ELEMENTS[C]&&u.push({styles:I,selector:xc(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},z4=(e,t)=>{let r=[];if(!e?.settings)return r;let o=s=>{let l={};return u0.forEach(({path:c})=>{let u=zt(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:o1}),Object.entries(e.settings?.blocks??{}).forEach(([s,l])=>{let c=l.custom;if(typeof t=="string"||!t[s])return;let u=o(l);(Object.keys(u).length>0||c)&&r.push({presets:u,custom:c,selector:t[s]?.selector,featureSelectors:t[s]?.featureSelectors})}),r};function EMe(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 PMe(e,t,{path:r,valueKey:o,valueFunc:n,cssVarInfix:i}){let s=zt(e,r,[]),l=[];for(let c of["default","theme","custom"])if(s[c])for(let u of s[c]){let d=fm(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 kMe=(e,t)=>{let r=z4(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 u0){let m=PMe(n,e.settings,f);if(m.length===0)continue;let h=EMe(l,f.path[0],c);u[h]||(u[h]=[]),u[h].push(...m)}let d=tX(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 RMe(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?yk(l,c):l;if(g&&typeof g!="string"){let R=wMe(g,f);R=bMe(R,t.settings,y),R=yMe(R,t.settings),Object.entries(R).forEach(([A,P])=>{if(P.length){let T=w?bZ(w,A):A;T=c?yk(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 A=kk(R);A.length&&(S+=`${d}{${A.join(";")};}`)}let C=v??x;!o&&(Fu===C||h)&&(S+=_Me({style:f,selector:C,hasBlockGapSupport:b??n,hasFallbackGapSupport:i,fallbackGapValue:m}));let k=kk(f,x,r,t,s);if(k?.length){let R=_?x:`:root :where(${x})`;S+=`${R}{${k.join(";")};}`}return f?.css&&(S+=rX(f.css,`:root :where(${x})`)),u&&S?`${u}{${S}}`:S}var AMe=(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=av(e),u=TMe(c,t),d=z4(c,t),f=c?.settings?.useRootPaddingAwareAlignments,{contentSize:m,wideSize:h}=c?.settings?.layout||{},g=l.marginReset||l.rootPadding||l.layoutStyles,v="";if(l.presets&&(m||h)&&(v+=`${o1} {`,v=m?v+` --wp--style--global--content-size: ${m};`:v,v=h?v+` --wp--style--global--wide-size: ${h};`:v,v+="}"),g&&(v+=":where(body) {margin: 0;",l.rootPadding&&f&&(v+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) } |
| 31 |
.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); } |
| 32 |
.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); } |
| 33 |
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; } |
| 34 |
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0; |
| 35 |
`),v+="}"),l.blockStyles){let b=a1(e);u.forEach(_=>{if(_.isStyleVariation&&!l.variationStyles)return;let y=CMe(_,b);[_,...y,...JZ(_),...y.flatMap(JZ)].forEach(w=>{v+=RMe(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=B4(c?.styles?.spacing?.blockGap)||"0.5em";v=v+`:root :where(.wp-site-blocks) > * { margin-block-start: ${b}; margin-block-end: 0; }`,v=v+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",v=v+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&d.forEach(({selector:b,presets:_})=>{(Fu===b||o1===b)&&(b="");let y=gMe(b,_);y.length>0&&(v+=y)}),v};function IMe(e,t){return z4(e,t).flatMap(({presets:o})=>vMe(o))}var OMe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let r={root:t};return Object.entries(mMe).forEach(([o,n])=>{let i=p0(e,o);i&&(r[n]=i)}),r},NMe=(e,t)=>{let{getBlockStyles:r}=(0,$Z.select)(Ni.store),o={};return e.forEach(n=>{let i=n.name,s=p0(n);if(!s)return;let l=p0(n,"filter.duotone");if(!l){let h=p0(n),g=(0,Ni.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof g=="string"&&h&&(l=xc(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=k4(v,s);f[v]=b});let m=OMe(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 MMe(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 rX(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(" ")?xc(t,f):yk(t,f),r+=`:root :where(${m})${d}{${c.trim()}}`}}),r}function cv(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=iv(e,"spacing.blockGap"),d=o??u!==null,f=n??!d;if(!e?.styles||!e?.settings)return[[],{}];let m=MMe(e),h=NMe(c),g=kMe(m,h),v=AMe(m,h,d,f,i,s,l),b=IMe(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 I=C??h[y.name].selector;_.push({css:rX(w.css,I),isGlobalStyles:!0})}}),[_,m.settings]}function Rk(e,t,r,{resolveRefs:o=!0}={}){if(!e?.styles?.blocks?.[t]?.variations?.[r])return;let n=s=>{Object.keys(s).forEach(l=>{let c=s[l];if(typeof c=="object"&&c!==null)if(c.ref!==void 0)if(typeof c.ref!="string"||c.ref.trim()==="")delete s[l];else{let u=zt(e,c.ref);u!=null?s[l]=u:delete s[l]}else n(c),Object.keys(c).length===0&&delete s[l]})},i=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[r]));return o&&n(i),i}var W4="default";function sX(e){let t=e?.viewport,r=e?.pseudoState;return(!t||t===W4)&&(!r||r===W4)}function FMe(e){return sX(e)?[]:[e.viewport,e.pseudoState].filter(t=>!!t&&t!==W4)}function DMe(e,t){let r=FMe(t);return r.length?zt(e,r):e}var LMe=new Set(["blocks","variations","css"]),H4=Object.freeze({value:{},sources:{}}),BMe={root:{layer:"root"},element:{layer:"element"},block:{layer:"block"},blockVariation:{layer:"blockVariation"}};function pm(e){let t=BMe[e];return t?{...t}:null}function mm(e,t){return!e||!t?null:{styles:e,source:t}}function VMe(e){return e.join(".")}function jMe(e){return{...e}}function aX(e){return e===""||e===null||typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}function U4(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&typeof e.ref=="string"}function hm(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t={};for(let r of Object.keys(e))if(!LMe.has(r)){if(r==="elements"){e.elements&&typeof e.elements=="object"&&(t.elements=e.elements);continue}aX(e[r])||(t[r]=e[r])}return Object.keys(t).length===0?null:t}var oX=new Set(["backgroundImage"]);function lX(e,t,r,o,n,i=[]){if(!t||typeof t!="object"||Array.isArray(t))return e;for(let s of Object.keys(t)){let l=t[s];if(aX(l))continue;if(U4(l)){if(l.ref.trim()==="")continue;let u=zt(r,l.ref);if(u==null||U4(u))continue;l=u}let c=[...i,s];if(!oX.has(s)&&l!==null&&typeof l=="object"&&!Array.isArray(l)&&!U4(l)){let u=e[s]&&typeof e[s]=="object"&&!Array.isArray(e[s])?e[s]:{};e[s]=lX({...u},l,r,o,n,c)}else e[s]=oX.has(s)&&l!==null&&typeof l=="object"&&!Array.isArray(l)?{...l}:l,o&&n&&(n[VMe(c)]=jMe(o))}return e}function Ak(e,t){if(!e)return null;let r=DMe(e,t);return r&&typeof r=="object"&&!Array.isArray(r)?r:null}var zMe=["color.background","color.gradient","background","spacing","dimensions","border","shadow","filter"];function HMe(e){return e.startsWith("elements.")?!1:zMe.some(t=>e===t||e.startsWith(`${t}.`))}function cX(e,t){if(!e||typeof e!="object")return;let[r,...o]=t;if(o.length===0){delete e[r];return}let n=e[r];n&&typeof n=="object"&&(cX(n,o),Object.keys(n).length===0&&delete e[r])}function UMe(e,t){for(let r of Object.keys(t))t[r].layer==="root"&&HMe(r)&&(cX(e,r.split(".")),delete t[r])}function WMe(e,t,r){let o=e?.background?.backgroundImage;if(!o)return;let n=d0(o,{...t,_links:r??void 0});n!==void 0&&(e.background.backgroundImage=n)}function nX(e,{blockName:t,variationName:r=null,elements:o=null,viewport:n=null,pseudoState:i=null}={}){if(!e||!e.styles||!t)return H4;let s=e.styles,l={viewport:n,pseudoState:i},c=s,u=s.blocks?.[t]??null,d=(o??[]).map(b=>s.elements?.[b]??null).filter(b=>!!b),f=r?Rk(e,t,r)??null:null,m=[mm(hm(c),pm("root")),...d.map(b=>mm(hm(b),pm("element"))),u?mm(hm(u),pm("block")):null,f?mm(hm(f),pm("blockVariation")):null];sX(l)||m.push(mm(hm(Ak(c,l)),pm("root")),...d.map(b=>mm(hm(Ak(b,l)),pm("element"))),u?mm(hm(Ak(u,l)),pm("block")):null,f?mm(hm(Ak(f,l)),pm("blockVariation")):null);let h=m.filter(Boolean);if(h.length===0)return H4;let g={},v=h.reduce((b,_)=>lX(b,_.styles,e,_.source,g),{});return UMe(v,g),WMe(v,e,e._links??null),{value:v,sources:g}}var GMe={},iX=new WeakMap;function uX(e,t={}){let r=e?.styles;if(!r||typeof r!="object")return nX(e,t);let o=iX.get(r);o||(o=new WeakMap,iX.set(r,o));let n=e?._links??GMe,i=o.get(n);i||(i=new Map,o.set(n,i));let s=`${t.elements?.join(",")??""}:${t.viewport??""}:${t.pseudoState??""}`,l=(t.blockName||"")+""+(t.variationName||"")+""+s;if(i.has(l))return i.get(l);let c=nX(e,t);return i.set(l,c),c}var dX=a(yf(),1),{lock:fX,unlock:Mft}=(0,dX.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/global-styles-engine");var Du={};fX(Du,{getResponsiveMediaQueries:a1,getViewportBreakpoints:j4,getViewportBreakpointValueInPixels:V4,getDuotoneFilter:Ek,getDuotoneStylesheet:YZ,getDuotoneUnsetStylesheet:GZ,resolveStyle:uX,getVariationStyle:Rk});function G4(e,t){if(!e||!t)return"";let r={settings:{},styles:{blocks:{[t]:e}}};try{let[o]=cv(r,[]);return o.map(n=>n.css).join(` |
| 36 |
`)}catch{return""}}var{getViewportBreakpoints:YMe,getViewportBreakpointValueInPixels:Ik}=Y(Du),qMe={Tablet:"tablet",Mobile:"mobile"},KMe="Desktop",ZMe="Tablet",XMe="Mobile",Ok={Desktop:"default",Tablet:"@tablet",Mobile:"@mobile"};function h0(e,t){let r=Ik(e);return r&&r<=Ik(m0("Mobile",t))?XMe:r&&r<=Ik(m0("Tablet",t))?ZMe:KMe}function m0(e,t){let r=qMe[e];if(r)return Ik(YMe(t)[r])}var{getTemplateInfo:QMe,getTemplatePartIcon:JMe}=Y(qr.privateApis),d1={},$Me=(0,Xt.createRegistrySelector)(e=>()=>e(qr.store).hasUndo()),e3e=(0,Xt.createRegistrySelector)(e=>()=>e(qr.store).hasRedo());function pX(e){return zn(e).status==="auto-draft"}function mX(e){return"content"in f1(e)}var Nk=(0,Xt.createRegistrySelector)(e=>t=>{let r=ra(t),o=oa(t);return e(qr.store).hasEditsForEntityRecord("postType",r,o)}),t3e=(0,Xt.createRegistrySelector)(e=>t=>{let r=e(qr.store).__experimentalGetDirtyEntityRecords(),{type:o,id:n}=zn(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)});function r3e(e){return!Nk(e)&&pX(e)}var zn=(0,Xt.createRegistrySelector)(e=>t=>{let r=oa(t),o=ra(t),n=e(qr.store).getRawEntityRecord("postType",o,r);return n||d1});function ra(e){return e.postType}function oa(e){return e.postId}function o3e(e){return e.templateId}function Y4(e){return zn(e)._links?.["version-history"]?.[0]?.count??0}function n3e(e){return zn(e)._links?.["predecessor-version"]?.[0]?.id??null}var f1=(0,Xt.createRegistrySelector)(e=>t=>{let r=ra(t),o=oa(t);return e(qr.store).getEntityRecordEdits("postType",r,o)||d1});function c1(e,t){switch(t){case"type":return ra(e);case"id":return oa(e);default:let r=zn(e);if(!r.hasOwnProperty(t))break;return hk(r[t])}}var i3e=(0,Xt.createSelector)((e,t)=>{let r=f1(e);return r.hasOwnProperty(t)?{...c1(e,t),...r[t]}:c1(e,t)},(e,t)=>[c1(e,t),f1(e)[t]]);function no(e,t){if(t==="content")return p1(e);let r=f1(e);return r.hasOwnProperty(t)?aZ.has(t)?i3e(e,t):r[t]:c1(e,t)}var hX=(0,Xt.createRegistrySelector)(e=>(t,r)=>{if(!cZ.includes(r)&&r!=="preview_link")return;let o=ra(t),n=oa(t),i=e(qr.store).getCurrentUser()?.id,s=e(qr.store).getAutosave(o,n,i);if(s)return hk(s[r])});function s3e(e){return no(e,"status")==="private"?"private":no(e,"password")?"password":"public"}function a3e(e){return zn(e).status==="pending"}function q4(e,t){let r=t||zn(e);return["publish","private"].indexOf(r.status)!==-1||r.status==="future"&&!(0,g0.isInTheFuture)(new Date(Number((0,g0.getDate)(r.date))-C4))}function l3e(e){return zn(e).status==="future"&&!q4(e)}function c3e(e){let t=zn(e);return t.type===El?Nk(e):Nk(e)||["publish","private","future"].indexOf(t.status)===-1}function gX(e){return v0(e)?!1:!!no(e,"title")||!!no(e,"excerpt")||!vX(e)}var vX=(0,Xt.createRegistrySelector)(e=>t=>{let r=oa(t),o=ra(t),n=e(qr.store).getEditedEntityRecord("postType",o,r);if(typeof n.content!="function")return!n.content;let i=no(t,"blocks");if(i.length===0)return!0;if(i.length>1)return!1;let s=i[0].name;return s!==(0,gm.getDefaultBlockName)()&&s!==(0,gm.getFreeformContentHandlerName)()?!1:!p1(t)}),u3e=(0,Xt.createRegistrySelector)(e=>t=>{if(!gX(t)||wX(t))return!1;let r=ra(t);if(!e(qr.store).getPostType(r)?.supports?.autosave)return!1;let n=oa(t),i=e(qr.store).hasFetchedAutosaves(r,n),s=e(qr.store).getCurrentUser()?.id,l=e(qr.store).getAutosave(r,n,s);return i?!l||mX(t)?!0:["title","excerpt","meta"].some(c=>hk(l[c])!==no(t,c)):!1});function d3e(e){let t=no(e,"date"),r=new Date(Number((0,g0.getDate)(t))-C4);return(0,g0.isInTheFuture)(r)}function f3e(e){let t=no(e,"date"),r=no(e,"modified"),o=zn(e).status;return o==="draft"||o==="auto-draft"||o==="pending"?t===r||t===null:!1}function p3e(e){return!!e.deleting.pending}function v0(e){return!!e.saving.pending}var m3e=(0,Xt.createRegistrySelector)(e=>t=>{let r=e(qr.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:n}=zn(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)}),h3e=(0,Xt.createRegistrySelector)(e=>t=>{let r=ra(t),o=oa(t);return!e(qr.store).getLastEntitySaveError("postType",r,o)}),g3e=(0,Xt.createRegistrySelector)(e=>t=>{let r=ra(t),o=oa(t);return!!e(qr.store).getLastEntitySaveError("postType",r,o)});function v3e(e){return v0(e)&&!!e.saving.options?.isAutosave}function b3e(e){return v0(e)&&!!e.saving.options?.isPreview}function y3e(e){if(e.saving.pending||v0(e))return;let t=hX(e,"preview_link");(!t||zn(e).status==="draft")&&(t=no(e,"link"),t&&(t=(0,u1.addQueryArgs)(t,{preview:!0})));let r=no(e,"featured_media");return t&&r?(0,u1.addQueryArgs)(t,{_thumbnail_id:r}):t}var w3e=(0,Xt.createRegistrySelector)(e=>()=>{let t=e(Mk.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}}),p1=(0,Xt.createRegistrySelector)(e=>t=>{let r=oa(t),o=ra(t),n=e(qr.store).getEditedEntityRecord("postType",o,r);if(n){if(typeof n.content=="function")return n.content(n);if(n.blocks)return(0,gm.__unstableSerializeAndClean)(n.blocks);if(n.content)return n.content}return""});function _3e(e){return v0(e)&&!q4(e)&&no(e,"status")==="publish"}function bX(e){let t=no(e,"permalink_template");return x4.test(t)}function S3e(e){let t=yX(e);if(!t)return null;let{prefix:r,postName:o,suffix:n}=t;return bX(e)?r+o+n:r}function x3e(e){return no(e,"slug")||(0,u1.cleanForSlug)(no(e,"title"))||oa(e)}function yX(e){let t=no(e,"permalink_template");if(!t)return null;let r=no(e,"slug")||no(e,"generated_slug"),[o,n]=t.split(x4);return{prefix:o,postName:r,suffix:n}}function C3e(e){return e.postLock.isLocked}function T3e(e){return Object.keys(e.postSavingLock).length>0}function wX(e){return Object.keys(e.postAutosavingLock).length>0}function E3e(e){return e.postLock.isTakeover}function P3e(e){return e.postLock.user}function k3e(e){return e.postLock.activePostLock}function R3e(e){return!!zn(e)._links?.hasOwnProperty("wp:action-unfiltered-html")}var A3e=(0,Xt.createRegistrySelector)(e=>()=>!!e(m1.store).get("core","isPublishSidebarEnabled")),I3e=(0,Xt.createSelector)(e=>no(e,"blocks")||(0,gm.parse)(p1(e)),e=>[no(e,"blocks"),p1(e)]);function _X(e,t){return e.removedPanels.includes(t)}var O3e=(0,Xt.createRegistrySelector)(e=>(t,r)=>{let o=e(m1.store).get("core","inactivePanels");return!_X(t,r)&&!o?.includes(r)}),N3e=(0,Xt.createRegistrySelector)(e=>(t,r)=>!!e(m1.store).get("core","openPanels")?.includes(r));function M3e(e){return(0,Lu.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),no(e,"selection")?.selectionStart}function F3e(e){return(0,Lu.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),no(e,"selection")?.selectionEnd}function D3e(e){return no(e,"selection")}function L3e(e){return!!e.postId}function K4(e){return e.editorSettings}function Fk(e){return e.renderingMode}var B3e=(0,Xt.createRegistrySelector)(e=>t=>{let r=Y(e(Mk.store));if(r.isZoomOut())return"Desktop";let n=t.canvasWidth,i=r.getSettings().__experimentalFeatures?.viewport;return h0(n,i)});function V3e(e){return e.listViewPanel}function j3e(e){return!!e.blockInserterPanel}var z3e=(0,Xt.createRegistrySelector)(e=>()=>e(m1.store).get("core","editorMode")??"visual");function H3e(){return(0,Lu.default)("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function U3e(){return(0,Lu.default)("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function at(e){return(0,Xt.createRegistrySelector)(t=>(r,...o)=>((0,Lu.default)("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(Mk.store)[e](...o)))}var W3e=at("getBlockName"),G3e=at("isBlockValid"),Y3e=at("getBlockAttributes"),q3e=at("getBlock"),K3e=at("getBlocks"),Z3e=at("getClientIdsOfDescendants"),X3e=at("getClientIdsWithDescendants"),Q3e=at("getGlobalBlockCount"),J3e=at("getBlocksByClientId"),$3e=at("getBlockCount"),e6e=at("getBlockSelectionStart"),t6e=at("getBlockSelectionEnd"),r6e=at("getSelectedBlockCount"),o6e=at("hasSelectedBlock"),n6e=at("getSelectedBlockClientId"),i6e=at("getSelectedBlock"),s6e=at("getBlockRootClientId"),a6e=at("getBlockHierarchyRootClientId"),l6e=at("getAdjacentBlockClientId"),c6e=at("getPreviousBlockClientId"),u6e=at("getNextBlockClientId"),d6e=at("getSelectedBlocksInitialCaretPosition"),f6e=at("getMultiSelectedBlockClientIds"),p6e=at("getMultiSelectedBlocks"),m6e=at("getFirstMultiSelectedBlockClientId"),h6e=at("getLastMultiSelectedBlockClientId"),g6e=at("isFirstMultiSelectedBlock"),v6e=at("isBlockMultiSelected"),b6e=at("isAncestorMultiSelected"),y6e=at("getMultiSelectedBlocksStartClientId"),w6e=at("getMultiSelectedBlocksEndClientId"),_6e=at("getBlockOrder"),S6e=at("getBlockIndex"),x6e=at("isBlockSelected"),C6e=at("hasSelectedInnerBlock"),T6e=at("isBlockWithinSelection"),E6e=at("hasMultiSelection"),P6e=at("isMultiSelecting"),k6e=at("isSelectionEnabled"),R6e=at("getBlockMode"),A6e=at("isTyping"),I6e=at("isCaretWithinFormattedText"),O6e=at("getBlockInsertionPoint"),N6e=at("isBlockInsertionPointVisible"),M6e=at("isValidTemplate"),F6e=at("getTemplate"),D6e=at("getTemplateLock"),L6e=at("canInsertBlockType"),B6e=at("getInserterItems"),V6e=at("hasInserterItems"),j6e=at("getBlockListSettings"),z6e=(0,Xt.createRegistrySelector)(e=>()=>((0,Lu.default)("select('core/editor').__experimentalGetDefaultTemplateTypes",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_types"}),e(qr.store).getCurrentTheme()?.default_template_types)),H6e=(0,Xt.createRegistrySelector)(e=>(0,Xt.createSelector)(()=>((0,Lu.default)("select('core/editor').__experimentalGetDefaultTemplatePartAreas",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_part_areas"}),(e(qr.store).getCurrentTheme()?.default_template_part_areas||[]).map(r=>({...r,icon:JMe(r.icon)}))))),U6e=(0,Xt.createRegistrySelector)(e=>(0,Xt.createSelector)((t,r)=>{(0,Lu.default)("select('core/editor').__experimentalGetDefaultTemplateType",{since:"6.8"});let o=e(qr.store).getCurrentTheme()?.default_template_types;return o?Object.values(o).find(n=>n.slug===r)??d1:d1})),W6e=(0,Xt.createRegistrySelector)(e=>(0,Xt.createSelector)((t,r)=>{if((0,Lu.default)("select('core/editor').__experimentalGetTemplateInfo",{since:"6.8"}),!r)return d1;let o=e(qr.store).getCurrentTheme(),n=o?.default_template_types||[],i=o?.default_template_part_areas||[];return QMe({template:r,templateAreas:i,templateTypes:n})})),G6e=(0,Xt.createRegistrySelector)(e=>t=>{let r=ra(t);return e(qr.store).getPostType(r)?.labels?.singular_name});function Y6e(e){return e.publishSidebarActive}var WG={};Yr(WG,{__experimentalTearDownEditor:()=>lrt,__unstableSaveForPreview:()=>brt,autosave:()=>vrt,clearSelectedBlock:()=>$rt,closePublishSidebar:()=>Urt,createUndoLevel:()=>_rt,disablePublishSidebar:()=>Crt,editPost:()=>frt,enablePublishSidebar:()=>xrt,enterFormattedText:()=>bot,exitFormattedText:()=>yot,hideInsertionPoint:()=>cot,insertBlock:()=>sot,insertBlocks:()=>aot,insertDefaultBlock:()=>wot,lockPostAutosaving:()=>Prt,lockPostSaving:()=>Trt,mergeBlocks:()=>fot,moveBlockToPosition:()=>iot,moveBlocksDown:()=>oot,moveBlocksUp:()=>not,multiSelect:()=>Jrt,openPublishSidebar:()=>Hrt,receiveBlocks:()=>Yrt,redo:()=>yrt,refreshPost:()=>hrt,removeBlock:()=>mot,removeBlocks:()=>pot,removeEditorPanel:()=>Frt,replaceBlock:()=>rot,replaceBlocks:()=>tot,resetBlocks:()=>Grt,resetEditorBlocks:()=>Rrt,resetPost:()=>crt,savePost:()=>prt,selectBlock:()=>Zrt,setDeviceType:()=>Ort,setEditedPost:()=>g_e,setIsInserterOpened:()=>Drt,setIsListViewOpened:()=>Lrt,setRenderingMode:()=>Irt,setTemplateValidity:()=>uot,setupEditor:()=>art,setupEditorState:()=>drt,showInsertionPoint:()=>lot,startMultiSelect:()=>Xrt,startTyping:()=>got,stopMultiSelect:()=>Qrt,stopTyping:()=>vot,switchEditorMode:()=>zrt,synchronizeTemplate:()=>dot,toggleBlockMode:()=>hot,toggleDistractionFree:()=>Brt,toggleEditorPanelEnabled:()=>Nrt,toggleEditorPanelOpened:()=>Mrt,togglePublishSidebar:()=>Wrt,toggleSelection:()=>eot,toggleSpotlightMode:()=>Vrt,toggleTopToolbar:()=>jrt,trashPost:()=>grt,undo:()=>wrt,unlockPostAutosaving:()=>krt,unlockPostSaving:()=>Ert,updateBlock:()=>qrt,updateBlockAttributes:()=>Krt,updateBlockListSettings:()=>_ot,updateEditorSettings:()=>Art,updatePost:()=>urt,updatePostLock:()=>Srt});var UG=a(na(),1),h_e=a(Bu(),1),fg=a(Ya(),1),sS=a(Pt(),1),nu=a(It(),1),Ys=a(ae(),1),Op=a(be(),1),aS=a(Vn(),1),nn=a(Dt(),1),yn=a(j(),1);function X4(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function TX(e,t){return window.sessionStorage.getItem(X4(e,t))}function EX(e,t,r,o,n){window.sessionStorage.setItem(X4(e,t),JSON.stringify({post_title:r,content:o,excerpt:n}))}function Dk(e,t){window.sessionStorage.removeItem(X4(e,t))}var qa=a(j(),1);function PX(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===El?(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 kX(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 RX(e){return[e.error.message&&e.error.code!=="unknown_error"?e.error.message:(0,qa.__)("Trashing failed"),{id:"editor-trash-fail"}]}var HG={};Yr(HG,{createTemplate:()=>qtt,hideBlockTypes:()=>Ztt,registerEntityAction:()=>Vtt,registerEntityField:()=>ztt,registerPostTypeSchema:()=>Gtt,removeTemplates:()=>Qtt,resetStylesNavigation:()=>trt,restoreRevision:()=>irt,revertTemplate:()=>Xtt,selectNote:()=>srt,setCanvasWidth:()=>zG,setCurrentRevisionId:()=>rrt,setCurrentTemplateId:()=>Ytt,setDefaultRenderingMode:()=>Jtt,setIsReady:()=>Utt,setRevisionPage:()=>ort,setShowRevisionDiff:()=>nrt,setShowStylebook:()=>ert,setStylesPath:()=>$tt,showBlockTypes:()=>Ktt,unregisterEntityAction:()=>jtt,unregisterEntityField:()=>Htt});var Ia=a(ae(),1),VG=a(be(),1),cr=a(j(),1),ic=a(It(),1),my=a(Dt(),1),p_e=a(bo(),1),m_e=a(Bu(),1),u3=a(Pt(),1),jG=a(Vt(),1),d3=a(an(),1);function Lk(e){return e?e.source===vk.custom&&(!!e?.plugin||e?.has_theme_file):!1}var I8={};Yr(I8,{buildRevisionsPageQuery:()=>vv,getCanvasHeight:()=>aFe,getCanvasWidth:()=>sFe,getCurrentRevision:()=>fFe,getCurrentRevisionId:()=>A8,getDefaultRenderingMode:()=>oFe,getEntityActions:()=>$6e,getEntityFields:()=>tFe,getInserter:()=>Z6e,getInserterSidebarToggleRef:()=>Q6e,getListViewToggleRef:()=>X6e,getPageRevisions:()=>cFe,getPostBlocksByName:()=>rFe,getPostIcon:()=>J6e,getPreviousRevision:()=>hFe,getRevisionPage:()=>R8,getRevisionsPerPage:()=>lFe,getSelectedNote:()=>pFe,getShowStylebook:()=>iFe,getStylesPath:()=>nFe,isCollaborationEnabledForCurrentPost:()=>gFe,isEntityReady:()=>eFe,isNoteFocused:()=>mFe,isRevisionsMode:()=>uFe,isShowingRevisionDiff:()=>dFe});var gv=a(be(),1),ia=a(K(),1);var Bk=a(U(),1),xn=(0,Bk.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,Bk.cloneElement)(e,{width:t,height:t,...r,ref:o}));var Vk=a(Se(),1),Q4=a(E(),1),J4=(0,Q4.jsx)(Vk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Q4.jsx)(Vk.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 jk=a(Se(),1),$4=a(E(),1),eB=(0,$4.jsx)(jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$4.jsx)(jk.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 zk=a(Se(),1),tB=a(E(),1),rB=(0,tB.jsx)(zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,tB.jsx)(zk.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 Hk=a(Se(),1),oB=a(E(),1),nB=(0,oB.jsx)(Hk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,oB.jsx)(Hk.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var Uk=a(Se(),1),iB=a(E(),1),sB=(0,iB.jsx)(Uk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,iB.jsx)(Uk.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(Se(),1),aB=a(E(),1),lB=(0,aB.jsx)(Wk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,aB.jsx)(Wk.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})});var Gk=a(Se(),1),cB=a(E(),1),uB=(0,cB.jsx)(Gk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,cB.jsx)(Gk.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 Yk=a(Se(),1),dB=a(E(),1),fB=(0,dB.jsx)(Yk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,dB.jsx)(Yk.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 qk=a(Se(),1),pB=a(E(),1),mB=(0,pB.jsx)(qk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,pB.jsx)(qk.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 Kk=a(Se(),1),hB=a(E(),1),_f=(0,hB.jsx)(Kk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,hB.jsx)(Kk.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 Zk=a(Se(),1),gB=a(E(),1),vB=(0,gB.jsx)(Zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,gB.jsx)(Zk.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 Xk=a(Se(),1),bB=a(E(),1),Qk=(0,bB.jsx)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,bB.jsx)(Xk.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 Jk=a(Se(),1),yB=a(E(),1),$k=(0,yB.jsx)(Jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,yB.jsx)(Jk.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 eR=a(Se(),1),wB=a(E(),1),Oo=(0,wB.jsx)(eR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,wB.jsx)(eR.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var tR=a(Se(),1),_B=a(E(),1),h1=(0,_B.jsx)(tR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_B.jsx)(tR.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var rR=a(Se(),1),SB=a(E(),1),xB=(0,SB.jsx)(rR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,SB.jsx)(rR.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var oR=a(Se(),1),CB=a(E(),1),Ar=(0,CB.jsx)(oR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,CB.jsx)(oR.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var nR=a(Se(),1),TB=a(E(),1),EB=(0,TB.jsx)(nR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,TB.jsx)(nR.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 iR=a(Se(),1),PB=a(E(),1),mr=(0,PB.jsx)(iR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,PB.jsx)(iR.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var sR=a(Se(),1),kB=a(E(),1),RB=(0,kB.jsx)(sR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,kB.jsx)(sR.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var aR=a(Se(),1),AB=a(E(),1),Mi=(0,AB.jsx)(aR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,AB.jsx)(aR.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 lR=a(Se(),1),IB=a(E(),1),g1=(0,IB.jsx)(lR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,IB.jsx)(lR.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 cR=a(Se(),1),OB=a(E(),1),NB=(0,OB.jsx)(cR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,OB.jsx)(cR.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 uR=a(Se(),1),MB=a(E(),1),FB=(0,MB.jsx)(uR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,MB.jsx)(uR.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 dR=a(Se(),1),DB=a(E(),1),LB=(0,DB.jsx)(dR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,DB.jsx)(dR.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 fR=a(Se(),1),BB=a(E(),1),VB=(0,BB.jsx)(fR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,BB.jsx)(fR.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"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 pR=a(Se(),1),jB=a(E(),1),zB=(0,jB.jsx)(pR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,jB.jsx)(pR.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 mR=a(Se(),1),HB=a(E(),1),uv=(0,HB.jsx)(mR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,HB.jsx)(mR.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 hR=a(Se(),1),UB=a(E(),1),WB=(0,UB.jsx)(hR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,UB.jsx)(hR.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 gR=a(Se(),1),GB=a(E(),1),v1=(0,GB.jsx)(gR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,GB.jsx)(gR.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 vR=a(Se(),1),YB=a(E(),1),bR=(0,YB.jsx)(vR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,YB.jsx)(vR.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 yR=a(Se(),1),qB=a(E(),1),KB=(0,qB.jsx)(yR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,qB.jsx)(yR.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 wR=a(Se(),1),ZB=a(E(),1),b0=(0,ZB.jsx)(wR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ZB.jsx)(wR.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 _R=a(Se(),1),XB=a(E(),1),dv=(0,XB.jsx)(_R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,XB.jsx)(_R.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 SR=a(Se(),1),QB=a(E(),1),Sf=(0,QB.jsx)(SR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,QB.jsx)(SR.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 xR=a(Se(),1),JB=a(E(),1),$B=(0,JB.jsx)(xR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,JB.jsx)(xR.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 CR=a(Se(),1),eV=a(E(),1),xf=(0,eV.jsx)(CR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,eV.jsx)(CR.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(Se(),1),tV=a(E(),1),ms=(0,tV.jsx)(TR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,tV.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 ER=a(Se(),1),rV=a(E(),1),oV=(0,rV.jsx)(ER.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,rV.jsx)(ER.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 PR=a(Se(),1),nV=a(E(),1),iV=(0,nV.jsx)(PR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,nV.jsx)(PR.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 kR=a(Se(),1),sV=a(E(),1),aV=(0,sV.jsx)(kR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,sV.jsx)(kR.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 RR=a(Se(),1),lV=a(E(),1),cV=(0,lV.jsx)(RR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,lV.jsx)(RR.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 AR=a(Se(),1),uV=a(E(),1),dV=(0,uV.jsx)(AR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,uV.jsx)(AR.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 IR=a(Se(),1),fV=a(E(),1),b1=(0,fV.jsx)(IR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,fV.jsx)(IR.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 OR=a(Se(),1),pV=a(E(),1),y1=(0,pV.jsx)(OR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,pV.jsx)(OR.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})});var NR=a(Se(),1),mV=a(E(),1),hV=(0,mV.jsx)(NR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,mV.jsx)(NR.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 MR=a(Se(),1),gV=a(E(),1),vV=(0,gV.jsx)(MR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,gV.jsx)(MR.Path,{d:"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 FR=a(Se(),1),bV=a(E(),1),yV=(0,bV.jsx)(FR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,bV.jsx)(FR.Path,{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 w1=a(Se(),1),_1=a(E(),1),S1=(0,_1.jsxs)(w1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,_1.jsx)(w1.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,_1.jsx)(w1.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 DR=a(Se(),1),wV=a(E(),1),Cc=(0,wV.jsx)(DR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,wV.jsx)(DR.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 LR=a(Se(),1),_V=a(E(),1),SV=(0,_V.jsx)(LR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_V.jsx)(LR.Path,{d:"M5 11.25h14v1.5H5z"})});var BR=a(Se(),1),xV=a(E(),1),CV=(0,xV.jsx)(BR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,xV.jsx)(BR.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 VR=a(Se(),1),TV=a(E(),1),x1=(0,TV.jsx)(VR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,TV.jsx)(VR.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var jR=a(Se(),1),EV=a(E(),1),PV=(0,EV.jsx)(jR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,EV.jsx)(jR.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 zR=a(Se(),1),kV=a(E(),1),y0=(0,kV.jsx)(zR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,kV.jsx)(zR.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 HR=a(Se(),1),RV=a(E(),1),yo=(0,RV.jsx)(HR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,RV.jsx)(HR.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var UR=a(Se(),1),AV=a(E(),1),IV=(0,AV.jsx)(UR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,AV.jsx)(UR.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(Se(),1),OV=a(E(),1),NV=(0,OV.jsx)(WR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,OV.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 GR=a(Se(),1),MV=a(E(),1),kl=(0,MV.jsx)(GR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,MV.jsx)(GR.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 YR=a(Se(),1),FV=a(E(),1),C1=(0,FV.jsx)(YR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,FV.jsx)(YR.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 T1=a(Se(),1),E1=a(E(),1),vm=(0,E1.jsxs)(T1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,E1.jsx)(T1.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,E1.jsx)(T1.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 qR=a(Se(),1),DV=a(E(),1),P1=(0,DV.jsx)(qR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,DV.jsx)(qR.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var KR=a(Se(),1),LV=a(E(),1),k1=(0,LV.jsx)(KR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,LV.jsx)(KR.Path,{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 ZR=a(Se(),1),BV=a(E(),1),VV=(0,BV.jsx)(ZR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,BV.jsx)(ZR.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 XR=a(Se(),1),jV=a(E(),1),Tc=(0,jV.jsx)(XR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,jV.jsx)(XR.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var QR=a(Se(),1),zV=a(E(),1),HV=(0,zV.jsx)(QR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,zV.jsx)(QR.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 JR=a(Se(),1),UV=a(E(),1),Rl=(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:"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 $R=a(Se(),1),WV=a(E(),1),fv=(0,WV.jsx)($R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,WV.jsx)($R.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 e2=a(Se(),1),GV=a(E(),1),pv=(0,GV.jsx)(e2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,GV.jsx)(e2.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 t2=a(Se(),1),YV=a(E(),1),qV=(0,YV.jsx)(t2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,YV.jsx)(t2.Path,{d:"M7 11.5h10V13H7z"})});var r2=a(Se(),1),KV=a(E(),1),R1=(0,KV.jsx)(r2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,KV.jsx)(r2.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 o2=a(Se(),1),ZV=a(E(),1),A1=(0,ZV.jsx)(o2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ZV.jsx)(o2.Path,{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 n2=a(Se(),1),XV=a(E(),1),bm=(0,XV.jsx)(n2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,XV.jsx)(n2.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 i2=a(Se(),1),QV=a(E(),1),JV=(0,QV.jsx)(i2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,QV.jsx)(i2.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 s2=a(Se(),1),$V=a(E(),1),mv=(0,$V.jsx)(s2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$V.jsx)(s2.Path,{d:"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(Se(),1),O1=a(E(),1),e8=(0,O1.jsxs)(I1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,O1.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,O1.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 a2=a(Se(),1),t8=a(E(),1),N1=(0,t8.jsx)(a2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t8.jsx)(a2.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 l2=a(Se(),1),r8=a(E(),1),o8=(0,r8.jsx)(l2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r8.jsx)(l2.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 c2=a(Se(),1),n8=a(E(),1),i8=(0,n8.jsx)(c2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n8.jsx)(c2.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 u2=a(Se(),1),s8=a(E(),1),a8=(0,s8.jsx)(u2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,s8.jsx)(u2.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})});var d2=a(Se(),1),l8=a(E(),1),c8=(0,l8.jsx)(d2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l8.jsx)(d2.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 f2=a(Se(),1),u8=a(E(),1),d8=(0,u8.jsx)(f2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,u8.jsx)(f2.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 p2=a(Se(),1),f8=a(E(),1),p8=(0,f8.jsx)(p2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,f8.jsx)(p2.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 m2=a(Se(),1),m8=a(E(),1),M1=(0,m8.jsx)(m2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,m8.jsx)(m2.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 h2=a(Se(),1),h8=a(E(),1),w0=(0,h8.jsx)(h2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,h8.jsx)(h2.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 g2=a(Se(),1),g8=a(E(),1),v2=(0,g8.jsx)(g2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,g8.jsx)(g2.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 b2=a(Se(),1),v8=a(E(),1),Cf=(0,v8.jsx)(b2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,v8.jsx)(b2.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 y2=a(Se(),1),b8=a(E(),1),y8=(0,b8.jsx)(y2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,b8.jsx)(y2.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 w2=a(Se(),1),w8=a(E(),1),hv=(0,w8.jsx)(w2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,w8.jsx)(w2.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 _2=a(Se(),1),_8=a(E(),1),F1=(0,_8.jsx)(_2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_8.jsx)(_2.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 S2=a(Se(),1),S8=a(E(),1),x8=(0,S8.jsx)(S2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S8.jsx)(S2.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 x2=a(Se(),1),C8=a(E(),1),T8=(0,C8.jsx)(x2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,C8.jsx)(x2.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 C2=a(Se(),1),E8=a(E(),1),P8=(0,E8.jsx)(C2.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,E8.jsx)(C2.Path,{d:"M 22 12 C 22 6.49 17.51 2 12 2 C 6.48 2 2 6.49 2 12 C 2 17.52 6.48 22 12 22 C 17.51 22 22 17.52 22 12 M 9.78 17.37 L 6.37 8.22 C 6.92 8.2 7.54 8.14 7.54 8.14 C 8.04 8.08 7.98 7.01 7.48 7.03 C 7.48 7.03 6.03 7.14 5.11 7.14 C 4.93 7.14 4.74 7.14 4.53 7.13 C 6.12 4.69 8.87 3.11 12 3.11 C 14.33 3.11 16.45 3.98 18.05 5.45 C 17.37 5.34 16.4 5.84 16.4 7.03 C 16.4 7.77 16.85 8.39 17.3 9.13 C 17.65 9.74 17.85 10.49 17.85 11.59 C 17.85 13.08 16.45 16.59 16.45 16.59 L 13.42 8.22 C 13.96 8.2 14.24 8.05 14.24 8.05 C 14.74 8 14.68 6.8 14.18 6.83 C 14.18 6.83 12.74 6.95 11.8 6.95 C 10.93 6.95 9.47 6.83 9.47 6.83 C 8.97 6.8 8.91 8.03 9.41 8.05 L 10.33 8.13 L 11.59 11.54 L 9.78 17.37 M 19.41 12 C 19.65 11.36 20.15 10.13 19.84 7.75 C 20.54 9.04 20.89 10.46 20.89 12 C 20.89 15.29 19.16 18.24 16.49 19.78 C 17.46 17.19 18.43 14.58 19.41 12 M 8.1 20.09 C 5.12 18.65 3.11 15.53 3.11 12 C 3.11 10.7 3.34 9.52 3.83 8.41 C 5.25 12.3 6.67 16.2 8.1 20.09 M 12.13 13.46 L 14.71 20.44 C 13.85 20.73 12.95 20.89 12 20.89 C 11.21 20.89 10.43 20.78 9.71 20.56 C 10.52 18.18 11.33 15.82 12.13 13.46 L 12.13 13.46"})});var hs=a(ae(),1),VX=a(Dt(),1);var NX=[];function MX(e,t,r){return e.actions[t]?.[r]??NX}function FX(e,t,r){return e.fields[t]?.[r]??NX}function DX(e,t,r){return e.isReady[t]?.[r]}var q6e={Mobile:8/5,Tablet:4/3},LX={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},{getTemplatePartIcon:K6e}=Y(hs.privateApis),k8=["post-only","template-locked"],Z6e=(0,ia.createRegistrySelector)(e=>(0,ia.createSelector)(t=>{if(typeof t.blockInserterPanel=="object")return t.blockInserterPanel;if(Fk(t)==="template-locked"){let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(gv.store),[s]=r("core/post-content");if(s){let l=o();return l&&l!==s&&n(l).includes(s)?LX:{rootClientId:s,insertionIndex:i(s).length,filterValue:void 0}}}return LX},t=>{let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(gv.store),[s]=r("core/post-content"),l=o();return[t.blockInserterPanel,Fk(t),s,l,l?n(l):void 0,s?i(s).length:void 0]}));function X6e(e){return e.listViewToggleRef}function Q6e(e){return e.inserterSidebarToggleRef}var BX={wp_block:w0,wp_navigation:NV,page:vm,post:x8},J6e=(0,ia.createRegistrySelector)(e=>(t,r,o)=>{{if(r==="wp_template_part"||r==="wp_template"){let s=(e(hs.store).getCurrentTheme()?.default_template_part_areas||[]).find(l=>o.area===l.area);return s?.icon?K6e(s.icon):Cc}if(BX[r])return BX[r];let n=e(hs.store).getPostType(r);return typeof n?.icon=="string"&&n.icon.startsWith("dashicons-")?n.icon.slice(10):vm}});function $6e(e,...t){return MX(e.dataviews,...t)}function eFe(e,...t){return DX(e.dataviews,...t)}function tFe(e,...t){return FX(e.dataviews,...t)}var rFe=(0,ia.createRegistrySelector)(e=>(0,ia.createSelector)((t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n,getBlockName:i}=e(gv.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(gv.store),i=o(r),s=i.map(l=>n(l));return[i,...s]})),oFe=(0,ia.createRegistrySelector)(e=>(t,r)=>{let{getPostType:o,getCurrentTheme:n,hasFinishedResolution:i}=e(hs.store),s=n(),l=o(r);if(!i("getPostType",[r])||!i("getCurrentTheme"))return;let c=s?.stylesheet,u=e(VX.store).get("core","renderingModes")?.[c]?.[r];if(k8.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(k8.includes(d))return d;let f=K4(t).defaultRenderingMode;return k8.includes(f)?f:"post-only"});function nFe(e){return e.stylesPath??"/"}function iFe(e){return e.showStylebook??!1}var sFe=(0,ia.createRegistrySelector)(e=>t=>{if(!Y(e(gv.store)).isZoomOut())return t.canvasWidth}),aFe=(0,ia.createRegistrySelector)(e=>t=>{let r=Y(e(gv.store));if(r.isZoomOut())return;let o=t.canvasWidth,n=r.getSettings().__experimentalFeatures?.viewport,i=h0(o,n);if(o!==m0(i,n))return;let s=q6e[i];if(s&&o>0)return Math.round(o*s)});function R8(e){return e.revisionPage}function vv(e,t){return{per_page:jX,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 jX=100;function lFe(){return jX}var cFe=(0,ia.createRegistrySelector)(e=>(t,r)=>{if(!r)return null;let{type:o,id:n}=zn(t);if(!o||!n)return null;let s=e(hs.store).getEntityConfig("postType",o)?.revisionKey||"id";return e(hs.store).getRevisions("postType",o,n,vv(s,r))});function uFe(e){return e.revisionId!==null}function dFe(e){return e.showRevisionDiff}function A8(e){return e.revisionId}var fFe=(0,ia.createRegistrySelector)(e=>t=>{let r=A8(t);if(!r)return;let o=R8(t);if(!o)return null;let{type:n,id:i}=zn(t),l=e(hs.store).getEntityConfig("postType",n)?.revisionKey||"id",c=e(hs.store).getRevisions("postType",n,i,vv(l,o));return c?c.find(u=>u[l]===r)??null:null});function pFe(e){return e.selectedNote?.noteId}function mFe(e){return!!e.selectedNote?.options?.focus}var hFe=(0,ia.createRegistrySelector)(e=>t=>{let r=A8(t);if(!r)return;let o=R8(t);if(!o)return null;let{type:n,id:i}=zn(t),l=e(hs.store).getEntityConfig("postType",n)?.revisionKey||"id",c=vv(l,o),u=e(hs.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=Y4(t),m=Math.ceil(f/c.per_page)||1;return d===u.length-1&&o<m?e(hs.store).getRevisions("postType",n,i,vv(l,o+1))?.[0]??null:null}),gFe=(0,ia.createRegistrySelector)(e=>t=>{if(!Y(e(hs.store)).isCollaborationSupported())return!1;let r=ra(t),o=oa(t),i=e(hs.store).getEntityConfig("postType",r)?.syncConfig;return!!(i&&i.supportsPersistence&&window._wpCollaborationEnabled&&i.shouldSync?.(`postType/${r}`,o)!==!1)});var c3=a(ae(),1),f_e=a(Vn(),1);var JX=a(j(),1);var gs=a(G(),1);var k2=a(Te(),1),YX=a(K(),1),_0=a(U(),1),qX=a(It(),1),KX=a(bo(),1),bv=a(j(),1);var GX=a(bo(),1);var T2=a(Vt(),1),HX=a(j(),1);function UX(e){return e.type==="wp_template"}function WX(e){return e.type==="wp_template_part"}function Tf(e){return e.type==="wp_template"||e.type==="wp_template_part"}function ft(e,t=(0,HX.__)("(no title)")){let r="";return typeof e.title=="string"?r=(0,T2.decodeEntities)(e.title):e.title&&"rendered"in e.title?r=(0,T2.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title&&(r=(0,T2.decodeEntities)(e.title.raw)),r||t}function E2(e){return e?[e.source,e.source].includes("custom")&&!(e.type==="wp_template"&&e?.plugin)&&!e.has_theme_file:!1}var P2=e=>typeof e!="object"?"":e.slug||(0,GX.cleanForSlug)(ft(e))||e.id.toString();var Hn=a(E(),1),ZX=({field:e,onChange:t,data:r})=>{let{id:o}=e,n=e.getValue({item:r})||P2(r),i=r.permalink_template||"",s=/%(?:postname|pagename)%/,[l,c]=i.split(s),u=l,d=c,f=s.test(i),m=(0,_0.useRef)(n),h=n||m.current,g=f?`${u}${h}${d}`:(0,KX.safeDecodeURIComponent)(r.link||"");(0,_0.useEffect)(()=>{n&&m.current===void 0&&(m.current=n)},[n]);let v=(0,_0.useCallback)(w=>t({[o]:w}),[o,t]),{createNotice:b}=(0,YX.useDispatch)(qX.store),_=(0,k2.useCopyToClipboard)(g,()=>{b("info",(0,bv.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),y="editor-post-url__slug-description-"+(0,k2.useInstanceId)(ZX);return(0,Hn.jsxs)("fieldset",{className:"fields-controls__slug",children:[f&&(0,Hn.jsxs)(gs.__experimentalVStack,{children:[(0,Hn.jsxs)(gs.__experimentalVStack,{spacing:"0px",children:[(0,Hn.jsx)("span",{children:(0,bv.__)("Customize the last part of the Permalink.")}),(0,Hn.jsx)(gs.ExternalLink,{href:"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink",children:(0,bv.__)("Learn more")})]}),(0,Hn.jsx)(gs.__experimentalInputControl,{prefix:(0,Hn.jsx)(gs.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,Hn.jsx)(gs.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Hn.jsx)(gs.Button,{size:"small",icon:v1,ref:_,label:(0,bv.__)("Copy")})}),label:(0,bv.__)("Link"),hideLabelFromVision:!0,value:n,autoComplete:"off",spellCheck:"false",type:"text",className:"fields-controls__slug-input",onChange:w=>{v(w)},onBlur:()=>{n===""&&v(m.current)},"aria-describedby":y}),(0,Hn.jsxs)("div",{className:"fields-controls__slug-help",children:[(0,Hn.jsx)("span",{className:"fields-controls__slug-help-visual-label",children:(0,bv.__)("Permalink:")}),(0,Hn.jsxs)(gs.ExternalLink,{className:"fields-controls__slug-help-link",href:g,children:[(0,Hn.jsx)("span",{className:"fields-controls__slug-help-prefix",children:u}),(0,Hn.jsx)("span",{className:"fields-controls__slug-help-slug",children:h}),(0,Hn.jsx)("span",{className:"fields-controls__slug-help-suffix",children:d})]})]})]}),!f&&(0,Hn.jsx)(gs.ExternalLink,{className:"fields-controls__slug-help",href:g,children:g})]})},XX=ZX;var R2=a(U(),1);var vFe=({item:e})=>{let t=P2(e),r=(0,R2.useRef)(t);return(0,R2.useEffect)(()=>{t&&r.current===void 0&&(r.current=t)},[t]),`${t||r.current}`},QX=vFe;var bFe={id:"slug",type:"text",label:(0,JX.__)("Slug"),Edit:XX,render:QX,filterBy:!1},O8=bFe;var N8=a(j(),1);function $X(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=$X(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function yFe(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=$X(e))&&(o&&(o+=" "),o+=t);return o}var J=yFe;var eQ=a(G(),1),tQ=a(j(),1);var D1=a(E(),1);function L1({item:e,className:t,children:r}){let o=ft(e);return(0,D1.jsxs)(eQ.__experimentalHStack,{className:J("fields-field__title",t),alignment:"center",justify:"flex-start",children:[(0,D1.jsx)("span",{children:o||(0,tQ.__)("(no title)")}),r]})}function A2({item:e}){return(0,D1.jsx)(L1,{item:e})}var wFe={type:"text",id:"title",label:(0,N8.__)("Title"),placeholder:(0,N8.__)("No title"),getValue:({item:e})=>ft(e),render:A2,enableHiding:!0,enableGlobalSearch:!0,filterBy:!1},I2=wFe;var D8=a(j(),1);var M8=a(j(),1),oQ=a(K(),1),nQ=a(ae(),1),iQ=a(G(),1);var rQ=a(yf(),1),{lock:_vt,unlock:ln}=(0,rQ.__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 F8=a(E(),1),{Badge:_Fe}=ln(iQ.privateApis);function sQ({item:e}){let{frontPageId:t,postsPageId:r}=(0,oQ.useSelect)(o=>{let{getEntityRecord:n}=o(nQ.store),i=n("root","site");return{frontPageId:i?.page_on_front,postsPageId:i?.page_for_posts}},[]);return(0,F8.jsx)(L1,{item:e,className:"fields-field__page-title",children:[t,r].includes(e.id)&&(0,F8.jsx)(_Fe,{children:e.id===t?(0,M8.__)("Homepage"):(0,M8.__)("Posts Page")})})}var SFe={type:"text",id:"title",label:(0,D8.__)("Title"),placeholder:(0,D8.__)("No title"),getValue:({item:e})=>ft(e),render:sQ,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},L8=SFe;var B8=a(j(),1);var xFe={id:"title",type:"text",label:(0,B8.__)("Template"),placeholder:(0,B8.__)("No title"),getValue:({item:e})=>ft(e),render:A2,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},B1=xFe;var dj=a(j(),1);var jre=a(j(),1);var zre=a(Al(),1);var Xee=a(U(),1);var yv=a(_e(),1);function O2({controlled:e,default:t,name:r,state:o="value"}){let{current:n}=yv.useRef(e!==void 0),[i,s]=yv.useState(t),l=n?e:i,c=yv.useCallback(u=>{n||s(u)},[]);return[l,c]}var CFe=a(_e(),1),V1={...CFe};var uQ=a(_e(),1),cQ={};function cn(e,t){let r=uQ.useRef(cQ);return r.current===cQ&&(r.current=e(t)),r}var V8=V1.useInsertionEffect,TFe=V8&&V8!==V1.useLayoutEffect?V8:e=>e();function De(e){let t=cn(EFe).current;return t.next=e,TFe(t.effect),t.trampoline}function EFe(){let e={next:void 0,callback:PFe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function PFe(){}var dQ=a(_e(),1),kFe=()=>{},Re=typeof document<"u"?dQ.useLayoutEffect:kFe;var ym=a(_e(),1);var N2=a(_e(),1),j8=N2.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function fQ(){return N2.useContext(j8)}var pQ=a(E(),1);function M2(e){let{children:t,elementsRef:r,labelsRef:o,onMapChange:n}=e,i=De(n),s=ym.useRef(0),l=cn(AFe).current,c=cn(RFe).current,[u,d]=ym.useState(0),f=ym.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=ym.useMemo(()=>{let _=new Map;return Array.from(c.keys()).filter(w=>w.isConnected).sort(IFe).forEach((w,S)=>{let x=c.get(w)??{};_.set(w,{...x,index:S})}),_},[c,u]);Re(()=>{if(typeof MutationObserver!="function"||g.size===0)return;let _=new MutationObserver(y=>{let w=new Set,S=x=>w.has(x)?w.delete(x):w.add(x);y.forEach(x=>{x.removedNodes.forEach(S),x.addedNodes.forEach(S)}),w.size===0&&(f.current+=1,d(f.current))});return g.forEach((y,w)=>{w.parentElement&&_.observe(w.parentElement,{childList:!0})}),()=>{_.disconnect()}},[g]),Re(()=>{f.current===u&&(r.current.length!==g.size&&(r.current.length=g.size),o&&o.current.length!==g.size&&(o.current.length=g.size),s.current=g.size),i(g)},[i,g,r,o,u]),Re(()=>()=>{r.current=[]},[r]),Re(()=>()=>{o&&(o.current=[])},[o]);let v=De(_=>(l.add(_),()=>{l.delete(_)}));Re(()=>{l.forEach(_=>_(g))},[l,g]);let b=ym.useMemo(()=>({register:m,unregister:h,subscribeMapChange:v,elementsRef:r,labelsRef:o,nextIndexRef:s}),[m,h,v,r,o,s]);return(0,pQ.jsx)(j8.Provider,{value:b,children:t})}function RFe(){return new Map}function AFe(){return new Set}function IFe(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 F2=a(_e(),1),OFe=F2.createContext(void 0);function wm(){return F2.useContext(OFe)?.direction??"ltr"}function NFe(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 MFe=NFe("https://base-ui.com/production-error","Base UI"),No=MFe;var wv=a(_e(),1);function Ef(e,t,r,o){let n=cn(hQ).current;return FFe(n,e,t,r,o)&&gQ(n,[e,t,r,o]),n.callback}function mQ(e){let t=cn(hQ).current;return DFe(t,e)&&gQ(t,e),t.callback}function hQ(){return{callback:null,cleanup:null,refs:[]}}function FFe(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function DFe(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function gQ(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 bQ=a(_e(),1);var vQ=a(_e(),1),LFe=parseInt(vQ.version,10);function S0(e){return LFe>=e}function z8(e){if(!bQ.isValidElement(e))return null;let t=e,r=t.props;return(S0(19)?r?.ref:t.ref)??null}function j1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Ec(){}var z1=Object.freeze([]),io=Object.freeze({});function yQ(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 wQ(e,t){return typeof e=="function"?e(t):e}function D2(e,t){return typeof e=="function"?e(t):e}var H8={};function hr(e,t,r,o,n){if(!r&&!o&&!n&&!e)return L2(t);let i=L2(e);return t&&(i=H1(i,t)),r&&(i=H1(i,r)),o&&(i=H1(i,o)),n&&(i=H1(i,n)),i}function _Q(e){if(e.length===0)return H8;if(e.length===1)return L2(e[0]);let t=L2(e[0]);for(let r=1;r<e.length;r+=1)t=H1(t,e[r]);return t}function L2(e){return U8(e)?{...xQ(e,H8)}:BFe(e)}function H1(e,t){return U8(t)?xQ(t,e):VFe(e,t)}function BFe(e){let t={...e};for(let r in t){let o=t[r];SQ(r,o)&&(t[r]=CQ(o))}return t}function VFe(e,t){if(!t)return e;for(let r in t){let o=t[r];switch(r){case"style":{e[r]=j1(e.style,o);break}case"className":{e[r]=W8(e.className,o);break}default:SQ(r,o)?e[r]=jFe(e[r],o):e[r]=o}}return e}function SQ(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 U8(e){return typeof e=="function"}function xQ(e,t){return U8(e)?e(t):e??H8}function jFe(e,t){return t?e?(...r)=>{let o=r[0];if(TQ(o)){let i=o;U1(i);let s=t(...r);return i.baseUIHandlerPrevented||e?.(...r),s}let n=t(...r);return e?.(...r),n}:CQ(t):e}function CQ(e){return e&&((...t)=>{let r=t[0];return TQ(r)&&U1(r),e(...t)})}function U1(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function W8(e,t){return t?e?t+" "+e:t:e}function TQ(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var G8=a(_e(),1);function Qt(e,t,r={}){let o=t.render,n=zFe(t,r);if(r.enabled===!1)return null;let i=r.state??io;return WFe(e,o,n,i)}function zFe(e,t={}){let{className:r,style:o,render:n}=e,{state:i=io,ref:s,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?wQ(r,i):void 0,f=u?D2(o,i):void 0,m=u?yQ(i,c):io,h=u&&l?HFe(l):void 0,g=u?j1(m,h)??{}:io;return typeof document<"u"&&(u?Array.isArray(s)?g.ref=mQ([g.ref,z8(n),...s]):g.ref=Ef(g.ref,z8(n),s):Ef(null,null)),u?(d!==void 0&&(g.className=W8(g.className,d)),f!==void 0&&(g.style=j1(g.style,f)),g):io}function HFe(e){return Array.isArray(e)?_Q(e):hr(void 0,e)}var UFe=Symbol.for("react.lazy");function WFe(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);let n=hr(r,t.props);n.ref=r.ref;let i=t;return i?.$$typeof===UFe&&(i=wv.Children.toArray(t)[0]),wv.cloneElement(i,n)}if(e&&typeof e=="string")return GFe(e,r);throw new Error(No(8))}function GFe(e,t){return e==="button"?(0,G8.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,G8.createElement)("img",{alt:"",...t,key:t.key}):wv.createElement(e,t)}var B2=a(_e(),1);var EQ=0;function YFe(e,t="mui"){let[r,o]=B2.useState(e),n=e||r;return B2.useEffect(()=>{r==null&&(EQ+=1,o(`${t}-${EQ}`))},[r,t]),n}var PQ=V1.useId;function _m(e,t){if(PQ!==void 0){let r=PQ();return e??(t?`${t}-${r}`:r)}return YFe(e,t)}function Sm(e){return _m(e,"base-ui")}var z2=a(_e(),1);var Ke={};Yr(Ke,{cancelOpen:()=>wDe,chipRemovePress:()=>rDe,clearPress:()=>tDe,closePress:()=>$Fe,closeWatcher:()=>pDe,decrementPress:()=>iDe,disabled:()=>SDe,drag:()=>vDe,escapeKey:()=>fDe,focusOut:()=>dDe,imperativeAction:()=>TDe,incrementPress:()=>nDe,initial:()=>CDe,inputBlur:()=>lDe,inputChange:()=>sDe,inputClear:()=>aDe,inputPaste:()=>cDe,inputPress:()=>uDe,itemPress:()=>JFe,keyboard:()=>hDe,linkPress:()=>eDe,listNavigation:()=>mDe,missing:()=>xDe,none:()=>qFe,outsidePress:()=>QFe,pointer:()=>gDe,scrub:()=>yDe,siblingOpen:()=>_De,swipe:()=>EDe,trackPress:()=>oDe,triggerFocus:()=>XFe,triggerHover:()=>ZFe,triggerPress:()=>KFe,wheel:()=>bDe,windowResize:()=>PDe});var qFe="none",KFe="trigger-press",ZFe="trigger-hover",XFe="trigger-focus",QFe="outside-press",JFe="item-press",$Fe="close-press",eDe="link-press",tDe="clear-press",rDe="chip-remove-press",oDe="track-press",nDe="increment-press",iDe="decrement-press",sDe="input-change",aDe="input-clear",lDe="input-blur",cDe="input-paste",uDe="input-press",dDe="focus-out",fDe="escape-key",pDe="close-watcher",mDe="list-navigation",hDe="keyboard",gDe="pointer",vDe="drag",bDe="wheel",yDe="scrub",wDe="cancel-open",_De="sibling-open",SDe="disabled",xDe="missing",CDe="initial",TDe="imperative-action",EDe="swipe",PDe="window-resize";function Ct(e,t,r,o){let n=!1,i=!1,s=o??io;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 q8=a(_e(),1);var kQ=a(_e(),1),kDe=[];function x0(e){kQ.useEffect(e,kDe)}var V2=null,Pbt=globalThis.requestAnimationFrame,Y8=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)}},j2=new Y8,vs=class e{static create(){return new e}static request(t){return j2.request(t)}static cancel(t){return j2.cancel(t)}currentId=V2;request(t){this.cancel(),this.currentId=j2.request(()=>{this.currentId=V2,t()})}cancel=()=>{this.currentId!==V2&&(j2.cancel(this.currentId),this.currentId=V2)};disposeEffect=()=>this.cancel};function C0(){let e=cn(vs.create).current;return x0(e.disposeEffect),e}function T0(e,t=!1,r=!1){let[o,n]=q8.useState(e&&t?"idle":void 0),[i,s]=q8.useState(e);return e&&!i&&(s(!0),n("starting")),!e&&i&&o!=="ending"&&!r&&n("ending"),!e&&!i&&o==="ending"&&n(void 0),Re(()=>{if(!e&&i&&o!=="ending"&&r){let l=vs.request(()=>{n("ending")});return()=>{vs.cancel(l)}}},[e,i,o,r]),Re(()=>{if(!e||t)return;let l=vs.request(()=>{n(void 0)});return()=>{vs.cancel(l)}},[t,e]),Re(()=>{if(!e||!t)return;e&&i&&o!=="idle"&&n("starting");let l=vs.request(()=>{n("idle")});return()=>{vs.cancel(l)}},[t,e,i,o]),{mounted:i,setMounted:s,transitionStatus:o}}function RQ(e){let{open:t,defaultOpen:r,onOpenChange:o,disabled:n}=e,[i,s]=O2({controlled:t,default:r,name:"Collapsible",state:"open"}),{mounted:l,setMounted:c,transitionStatus:u}=T0(i,!0,!0),d=Sm(),[f,m]=z2.useState(),h=f??d,g=De(v=>{let b=!i,_=Ct(Ke.triggerPress,v.nativeEvent);o(b,_),!_.isCanceled&&s(b)});return z2.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 H2=a(_e(),1),K8=H2.createContext(void 0);function U2(){let e=H2.useContext(K8);if(e===void 0)throw new Error(No(15));return e}var _v=a(_e(),1);var RDe=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function W2(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}=fQ(),m=_v.useRef(-1),[h,g]=_v.useState(i??(n===RDe.GuessFromOrder?()=>{if(m.current===-1){let _=f.current;f.current+=1,m.current=_}return m.current}:-1)),v=_v.useRef(null),b=_v.useCallback(_=>{if(v.current=_,h!==-1&&_!==null&&(u.current[h]=_,d)){let y=t!==void 0;d.current[h]=y?t:o?.current?.textContent??_.textContent}},[h,u,d,t,o]);return Re(()=>{if(i!=null)return;let _=v.current;if(_)return s(_,r),()=>{l(_)}},[i,s,l,r]),Re(()=>{if(i==null)return c(_=>{let y=v.current?_.get(v.current)?.index:null;y!=null&&g(y)})},[i,c,g]),{ref:b,index:h}}var Ka=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),ADe={[Ka.startingStyle]:""},IDe={[Ka.endingStyle]:""},xm={transitionStatus(e){return e==="starting"?ADe:e==="ending"?IDe:null}};var W1=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ka.startingStyle]="startingStyle",e[e.endingStyle=Ka.endingStyle]="endingStyle",e})({});var AQ=(function(e){return e.panelOpen="data-panel-open",e})({});var ODe={[W1.open]:""},NDe={[W1.closed]:""},IQ={open(e){return e?{[AQ.panelOpen]:""}:null}},OQ={open(e){return e?ODe:NDe}};var k0=a(_e(),1);function G2(){return typeof window<"u"}function xv(e){return Y2(e)?(e.nodeName||"").toLowerCase():"#document"}function Kr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kc(e){var t;return(t=(Y2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Y2(e){return G2()?e instanceof Node||e instanceof Kr(e).Node:!1}function lt(e){return G2()?e instanceof Element||e instanceof Kr(e).Element:!1}function wo(e){return G2()?e instanceof HTMLElement||e instanceof Kr(e).HTMLElement:!1}function E0(e){return!G2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Kr(e).ShadowRoot}function P0(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Un(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&n!=="inline"&&n!=="contents"}function NQ(e){return/^(table|td|th)$/.test(xv(e))}function G1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var MDe=/transform|translate|scale|rotate|perspective|filter/,FDe=/paint|layout|strict|content/,Sv=e=>!!e&&e!=="none",Z8;function q2(e){let t=lt(e)?Un(e):e;return Sv(t.transform)||Sv(t.translate)||Sv(t.scale)||Sv(t.rotate)||Sv(t.perspective)||!K2()&&(Sv(t.backdropFilter)||Sv(t.filter))||MDe.test(t.willChange||"")||FDe.test(t.contain||"")}function MQ(e){let t=Pc(e);for(;wo(t)&&!Rc(t);){if(q2(t))return t;if(G1(t))return null;t=Pc(t)}return null}function K2(){return Z8==null&&(Z8=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Z8}function Rc(e){return/^(html|body|#document)$/.test(xv(e))}function Un(e){return Kr(e).getComputedStyle(e)}function Y1(e){return lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pc(e){if(xv(e)==="html")return e;let t=e.assignedSlot||e.parentNode||E0(e)&&e.host||kc(e);return E0(t)?t.host:t}function FQ(e){let t=Pc(e);return Rc(t)?e.ownerDocument?e.ownerDocument.body:e.body:wo(t)&&P0(t)?t:FQ(t)}function Cm(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=FQ(e),i=n===((o=e.ownerDocument)==null?void 0:o.body),s=Kr(n);if(i){let l=Z2(s);return t.concat(s,s.visualViewport||[],P0(n)?n:[],l&&r?Cm(l):[])}else return t.concat(n,Cm(n,[],r))}function Z2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var X2=a(_e(),1),X8=X2.createContext(void 0);function Q2(e=!1){let t=X2.useContext(X8);if(t===void 0&&!e)throw new Error(No(16));return t}var DQ=a(_e(),1);function LQ(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:DQ.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 Cv(e={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:o=0,native:n=!0,composite:i}=e,s=k0.useRef(null),l=Q2(!0),c=i??l!==void 0,{props:u}=LQ({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:o,isNativeButton:n}),d=k0.useCallback(()=>{let h=s.current;Q8(h)&&c&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,c]);Re(d,[d]);let f=k0.useCallback((h={})=>{let{onClick:g,onMouseDown:v,onKeyUp:b,onKeyDown:_,onPointerDown:y,...w}=h;return hr({onClick(S){if(t){S.preventDefault();return}g?.(S)},onMouseDown(S){t||v?.(S)},onKeyDown(S){if(t||(U1(S),_?.(S),S.baseUIHandlerPrevented))return;let x=S.target===S.currentTarget,C=S.currentTarget,I=Q8(C),k=!n&&DDe(C),R=x&&(n?I:!k),A=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&&I?(C.click(),S.preventBaseUIHandler()):R&&(g?.(S),S.preventBaseUIHandler());return}R&&(!n&&(P||A)&&S.preventDefault(),!n&&A&&g?.(S))},onKeyUp(S){if(!t){if(U1(S),b?.(S),S.target===S.currentTarget&&n&&c&&Q8(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 Q8(e){return wo(e)&&e.tagName==="BUTTON"}function DDe(e){return!!(e?.tagName==="A"&&e?.href)}var bs=a(_e(),1);function Jt(e,t,r,o){return e.addEventListener(t,r,o),()=>{e.removeEventListener(t,r,o)}}function Fi(e){let t=cn(LDe,e).current;return t.next=e,Re(t.effect),t}function LDe(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Ko(e){return e?.ownerDocument||document}var zQ=a(_e(),1);var jQ=a(Vu(),1);function VQ(e){return e==null?e:"current"in e?e.current:e}function Tm(e,t=!1,r=!0){let o=C0();return De((n,i=null)=>{o.cancel();let s=VQ(e);if(s==null)return;let l=s,c=()=>{jQ.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=Ka.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 Em(e){let{enabled:t=!0,open:r,ref:o,onComplete:n}=e,i=De(n),s=Tm(o,r,!1);zQ.useEffect(()=>{if(!t)return;let l=new AbortController;return s(i,l.signal),()=>{l.abort()}},[t,r,i,s])}var q1={height:void 0,width:void 0};function UQ(e){let{externalRef:t,hiddenUntilFound:r,id:o,keepMounted:n,mounted:i,onOpenChange:s,open:l,setMounted:c,setOpen:u,transitionStatus:d}=e,f=bs.useRef(null),m=bs.useRef(null),[h,g]=bs.useState(q1),v=bs.useRef(q1),b=bs.useRef(!1),_=bs.useRef(l),y=bs.useRef(!1),[w,S]=bs.useState(!1),x=bs.useRef(null),C=Ef(t,f),I=Fi({mounted:i,open:l}),k=Tm(f,!1,!1),R=!l&&!i,A=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",B=De((O,L=!0)=>{L&&(v.current=O),g(O)}),F=De(()=>{x.current?.(),x.current=null}),V=De(O=>{F(),x.current=()=>{x.current=null,O()}}),z=De(()=>{l&&i&&m.current==="css-animation"&&(y.current=!0)});Re(()=>{!w||d==="starting"||S(!1)},[w,d]),bs.useEffect(()=>()=>{z(),F()},[z,F]),Re(()=>{let O=f.current;if(!O)return;!l&&x.current&&F();let L=BDe(O,P);if(m.current=L,l&&d==="idle"&&_.current&&L==="css-animation"){v.current=R0(O);return}if(l&&d==="starting"){let Z=b.current;if(b.current=!1,L==="none"){B(R0(O)),S(!0);return}if(L==="css-transition"){let Q=VDe(O);if(B(R0(O)),!Z)return Q;let ue=K1(O,"transition-duration","0s");return V(ue),S(!0),Q}if(L==="css-animation"){if(B(R0(O)),!Z){K1(O,"animation-name","none")();return}let Q=K1(O,"animation-name","none"),ue=K1(O,"animation-duration","0s");Q(),V(ue),S(!0);return}}if(!l&&i&&(d==="idle"||d==="starting")){if(_.current=!1,y.current=!1,L==="none"){B(q1,!1),c(!1);return}B(R0(O));return}if(d!=="ending")return;if(L==="none"){c(!1);return}let W=R0(O);if(!((W.height??0)>0||(W.width??0)>0)){c(!1);return}B(W),L==="css-animation"&&K1(O,"animation-name","none")()},[i,l,F,B,c,V,P,d]),Em({enabled:l&&i&&A==="idle",open:!0,ref:f,onComplete(){l&&B(q1,!1)}}),bs.useEffect(()=>{if(l||!i||A!=="ending"||!f.current)return;let L=new AbortController,W=-1;function q(){I.current.open||(c(!1),B(q1,!1))}return W=vs.request(()=>{L.signal.aborted||k(q,L.signal)}),()=>{vs.cancel(W),L.abort()}},[I,i,l,A,k,B,c]),Re(()=>{let O=f.current;!O||!r||!R||O.setAttribute("hidden","until-found")},[R,r]),bs.useEffect(function(){let L=f.current;if(!L)return;function W(q){let Z=Ct(Ke.none,q);s(!0,Z),!Z.isCanceled&&(b.current=!0,u(!0))}return Jt(L,"beforematch",W)},[s,u]);let D=n||r||i||l;return{height:T.height,props:{...M?{[W1.startingStyle]:""}:void 0,hidden:R,id:o},ref:C,shouldPreventOpenAnimation:P,shouldRender:D,transitionStatus:A,width:T.width}}function R0(e){return{height:e.scrollHeight,width:e.scrollWidth}}function BDe(e,t=!1){let r=Kr(e).getComputedStyle(e),o=(r.animationName.split(",").map(i=>i.trim()).some(i=>i!==""&&i!=="none")||t)&&HQ(r.animationDuration),n=HQ(r.transitionDuration);return o&&n||n?"css-transition":o?"css-animation":"none"}function HQ(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function K1(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 VDe(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=vs.request(r);return()=>{vs.cancel(o),r()}}var WQ=a(_e(),1);function GQ(e){let t=WQ.useRef(!0);t.current&&(t.current=!1,e())}var Pf={};Yr(Pf,{engine:()=>r7,env:()=>n7,os:()=>e7,screenReader:()=>o7});var e7={};Yr(e7,{android:()=>KQ,apple:()=>$8,ios:()=>J8,linux:()=>WDe,mac:()=>ZQ,windows:()=>UDe});function jDe(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:zDe,platform:HDe,maxTouchPoints:YQ}=jDe(),Tv=zDe.toLowerCase(),Ev=HDe.toLowerCase();var J8=/^i(os$|p)/.test(Ev)||Ev==="macintel"&&YQ>1,qQ="android",KQ=Ev===qQ||Tv.includes(qQ),ZQ=!J8&&Ev.startsWith("mac"),UDe=Ev.startsWith("win"),WDe=!KQ&&/^(linux|chrome os)/.test(Ev),$8=ZQ||J8;var r7={};Yr(r7,{blink:()=>YDe,gecko:()=>GDe,webkit:()=>t7});var t7=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),GDe=!t7&&Tv.includes("firefox"),YDe=!t7&&Tv.includes("chrom");var o7={};Yr(o7,{voiceOver:()=>qDe});var qDe=$8;var n7={};Yr(n7,{jsdom:()=>KDe});var KDe=/jsdom|happydom/.test(Tv);var Z1=0,Za=class e{static create(){return new e}currentId=Z1;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Z1,r()},t)}isStarted(){return this.currentId!==Z1}clear=()=>{this.currentId!==Z1&&(clearTimeout(this.currentId),this.currentId=Z1)};disposeEffect=()=>this.clear};function Ac(){let e=cn(Za.create).current;return x0(e.disposeEffect),e}var Di=a(_e(),1);function XQ(e){return"nativeEvent"in e}function kf(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function QQ(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var i7="data-base-ui-focusable";var s7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function A0(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&&E0(r)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Wn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Pm(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 J2(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 JQ(e){return e.matches("html,body")}function $Q(e){return wo(e)&&e.matches(s7)}function a7(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${s7}`)!=null}function eJ(e){if(!e||Pf.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ZDe(e,t){return t!=null&&!kf(t)?0:typeof e=="function"?e():e}function Rf(e,t,r){let o=ZDe(e,r);return typeof o=="number"?o:o?.[t]}function l7(e){return typeof e=="function"?e():e}function $2(e,t){return t||e==="click"||e==="mousedown"}function tJ(e){return e?.includes("mouse")&&e!=="mousedown"}var rJ=a(E(),1),oJ=Di.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Za,currentIdRef:{current:null},currentContextRef:{current:null}});function XDe(e,t){e.current=t.current}function c7(e){let{children:t,delay:r,timeoutMs:o=0}=e,n=Di.useRef(r),i=Di.useRef(r),s=Di.useRef(null),l=Di.useRef(null),c=Ac();return Re(()=>{if(i.current=r,!s.current){n.current=r;return}n.current={open:Rf(n.current,"open"),close:Rf(r,"close")}},[r,s,n,i]),(0,rJ.jsx)(oJ.Provider,{value:Di.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:i,currentIdRef:s,timeoutMs:o,currentContextRef:l,timeout:c}),[o,c]),children:t})}function u7(e,t={open:!1}){let{open:r}=t,o="rootStore"in e?e.rootStore:e,n=o.useState("floatingId"),i=Di.useContext(oJ),{currentIdRef:s,delayRef:l,timeoutMs:c,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeout:m}=i,[h,g]=Di.useState(!1),v=Di.useRef(r),b=Di.useRef(!1);return Re(()=>{v.current=r},[r]),Re(()=>()=>{b.current=!0},[]),Re(()=>{function _(){b.current||g(!1),d.current?.setIsInstantPhase(!1),s.current=null,d.current=null,l.current=u.current,m.clear()}if(s.current&&!r&&s.current===n){if(g(!1),c){let y=n;return m.start(c,()=>{o.select("open")||s.current&&s.current!==y||_()}),()=>{(v.current||s.current!==y)&&m.clear()}}_()}},[r,n,s,l,c,u,d,m,o]),Re(()=>{if(!r)return;let _=d.current,y=s.current;m.clear(),d.current={onOpenChange:o.setOpen,setIsInstantPhase:g},s.current=n,l.current={open:0,close:Rf(u.current,"close")},y!==null&&y!==n?(g(!0),_?.setIsInstantPhase(!0),_?.onOpenChange(!1,Ct(Ke.none))):(g(!1),_?.setIsInstantPhase(!1))},[r,n,o,s,l,u,d,m]),Re(()=>()=>{if(s.current===n){if(d.current=null,!v.current)return;s.current=null,XDe(l,u),m.clear()}},[d,s,l,n,u,m]),Di.useMemo(()=>({hasProvider:f,delayRef:l,isInstantPhase:h}),[f,l,h])}function Ic(...e){return()=>{for(let t=0;t<e.length;t+=1){let r=e[t];r&&r()}}}var sJ=["top","right","bottom","left"];var km=Math.min,ys=Math.max,Rm=Math.round,Q1=Math.floor,Oc=e=>({x:e,y:e}),QDe={left:"right",right:"left",bottom:"top",top:"bottom"};function J1(e,t,r){return ys(e,km(t,r))}function Nc(e,t){return typeof e=="function"?e(t):e}function ui(e){return e.split("-")[0]}function Mc(e){return e.split("-")[1]}function tA(e){return e==="x"?"y":"x"}function $1(e){return e==="y"?"height":"width"}function sa(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function eC(e){return tA(sa(e))}function aJ(e,t,r){r===void 0&&(r=!1);let o=Mc(e),n=eC(e),i=$1(n),s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=X1(s)),[s,X1(s)]}function lJ(e){let t=X1(e);return[eA(e),t,eA(t)]}function eA(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var nJ=["left","right"],iJ=["right","left"],JDe=["top","bottom"],$De=["bottom","top"];function eLe(e,t,r){switch(e){case"top":case"bottom":return r?t?iJ:nJ:t?nJ:iJ;case"left":case"right":return t?JDe:$De;default:return[]}}function cJ(e,t,r,o){let n=Mc(e),i=eLe(ui(e),r==="start",o);return n&&(i=i.map(s=>s+"-"+n),t&&(i=i.concat(i.map(eA)))),i}function X1(e){let t=ui(e);return QDe[t]+e.slice(t.length)}function tLe(e){return{top:0,right:0,bottom:0,left:0,...e}}function rA(e){return typeof e!="number"?tLe(e):{top:e,right:e,bottom:e,left:e}}function Pv(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 tC(e,t){return t<0||t>=e.length}function d7(e,t){return kv(e.current,{disabledIndices:t})}function f7(e,t){return kv(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function kv(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&&rC(e,i,o));return i}function rC(e,t,r){if(typeof r=="function"?r(t):r?.includes(t)??!1)return!0;let n=e[t];return n?oLe(n)?!r&&(n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"):!0:!1}function rLe(e){return e.visibility==="hidden"||e.visibility==="collapse"}function oLe(e,t=e?Un(e):null){return!e||!e.isConnected||!t||rLe(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}function Af(e,t,r=!0){return e.filter(n=>n.parentId===t).flatMap(n=>[...!r||n.context?.open?[n]:[],...Af(e,n.id,r)])}function I0(e){return`data-base-ui-${e}`}var Xa=a(_e(),1),fJ=a(Vu(),1);var uJ={style:{transition:"none"}};var nLe="data-base-ui-swipe-ignore",iLe="data-swipe-ignore",y0t=`[${nLe}]`,w0t=`[${iLe}]`;var dJ={fallbackAxisSide:"end"};var pJ=a(E(),1),sLe=Xa.createContext(null),aLe=()=>Xa.useContext(sLe),lLe=I0("portal");function p7(e={}){let{ref:t,container:r,componentProps:o=io,elementProps:n}=e,i=_m(),l=aLe()?.portalNode,[c,u]=Xa.useState(null),[d,f]=Xa.useState(null),m=De(b=>{b!==null&&f(b)}),h=Xa.useRef(null);Re(()=>{if(r===null){h.current&&(h.current=null,f(null),u(null));return}if(i==null)return;let b=(r&&(Y2(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=Qt("div",o,{ref:[t,m],props:[{id:i,[lLe]:""},n]});return{portalNode:d,portalSubtree:c&&g?fJ.createPortal(g,c):null}}var Rv=a(_e(),1);function mJ(){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 cLe=a(E(),1),uLe=Rv.createContext(null),dLe=Rv.createContext(null),O0=()=>Rv.useContext(uLe)?.id||null,Am=e=>{let t=Rv.useContext(dLe);return e??t};var aa=a(_e(),1);function fLe(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 hJ(e){return e!=null&&e.clientX!=null}function m7(e,t={}){let{enabled:r=!0,axis:o="both"}=t,n="rootStore"in e?e.rootStore:e,i=n.useState("open"),s=n.useState("floatingElement"),l=n.useState("domReferenceElement"),c=n.context.dataRef,u=aa.useRef(!1),d=aa.useRef(null),[f,m]=aa.useState(),[h,g]=aa.useState([]),v=De(S=>{n.set("positionReference",S)}),b=De((S,x,C)=>{u.current||c.current.openEvent&&!hJ(c.current.openEvent)||n.set("positionReference",fLe(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=kf(f)?s:i;aa.useEffect(()=>{if(!r){v(l);return}if(!y)return;function S(){d.current?.(),d.current=null}let x=Kr(s);function C(I){let k=Wn(I);tr(s,k)?S():b(I.clientX,I.clientY)}return!c.current.openEvent||hJ(c.current.openEvent)?d.current=Jt(x,"mousemove",C):v(l),S},[y,r,s,c,l,n,b,v,h]),aa.useEffect(()=>()=>{n.set("positionReference",null)},[n]),aa.useEffect(()=>{r&&!s&&(u.current=!1)},[r,s]),aa.useEffect(()=>{!r&&i&&(u.current=!0)},[r,i]);let w=aa.useMemo(()=>{function S(x){m(x.pointerType)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:_,onMouseEnter:_}},[_]);return aa.useMemo(()=>r?{reference:w,trigger:w}:{},[r,w])}var la=a(_e(),1);function pLe(){return!1}function mLe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function h7(e,t={}){let{enabled:r=!0,escapeKey:o=!0,outsidePress:n=!0,outsidePressEvent:i="sloppy",referencePress:s=pLe,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=Am(c),g=De(typeof n=="function"?n:()=>!1),v=typeof n=="function"?g:n,b=v!==!1,_=De(()=>i),{escapeKey:y,outsidePress:w}=mLe(l),S=la.useRef(!1),x=la.useRef(!1),C=la.useRef(!1),I=la.useRef(!1),k=la.useRef(""),R=la.useRef(null),A=Ac(),P=Ac(),T=De(()=>{P.clear(),m.current.insideReactTree=!1}),M=De(q=>{let Z=m.current.floatingContext?.nodeId;return(h?Af(h.nodesRef.current,Z):[]).some(ue=>ue.context?.open&&!ue.context.dataRef.current[q])}),B=De(q=>J2(q,u.select("floatingElement"))||J2(q,u.select("domReferenceElement"))),F=De(q=>{s()&&u.setOpen(!1,Ct(Ke.triggerPress,q.nativeEvent))}),V=De(q=>{if(!d||!r||!o||q.key!=="Escape"||I.current||!y&&M("__escapeKeyBubbles"))return;let Z=XQ(q)?q.nativeEvent:q,Q=Ct(Ke.escapeKey,Z);u.setOpen(!1,Q),Q.isCanceled||q.preventDefault(),!y&&!Q.isPropagationAllowed&&q.stopPropagation()}),z=De(()=>{m.current.insideReactTree=!0,P.start(0,T)}),D=De(q=>{if(!d||!r||q.button!==0)return;let Z=Wn(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)});la.useEffect(()=>{if(!d||!r)return;m.current.__escapeKeyBubbles=y,m.current.__outsidePressBubbles=w;let q=new Za,Z=new Za;function Q(){q.clear(),I.current=!0}function ue(){q.start(Pf.engine.webkit?5:0,()=>{I.current=!1})}function te(){C.current=!0,Z.start(0,()=>{C.current=!1})}function de(){S.current=!1,x.current=!1}function pe(){let X=k.current,ge=X==="pen"||!X?"mouse":X,Ue=_(),Ye=typeof Ue=="function"?Ue():Ue;return typeof Ye=="string"?Ye:Ye[ge]}function $(X){let ge=pe();return ge==="intentional"&&X.type!=="click"||ge==="sloppy"&&X.type==="click"}function ee(X){let ge=m.current.floatingContext?.nodeId,Ue=h&&Af(h.nodesRef.current,ge).some(Ye=>J2(X,Ye.context?.elements.floating));return B(X)||Ue}function fe(X){if($(X)){X.type!=="click"&&!B(X)&&(Z.clear(),C.current=!1),T();return}if(m.current.insideReactTree){T();return}let ge=Wn(X),Ue=`[${I0("inert")}]`,Ye=lt(ge)?ge.getRootNode():null,st=Array.from((E0(Ye)?Ye:Ko(u.select("floatingElement"))).querySelectorAll(Ue)),St=u.context.triggerElements;if(ge&&(St.hasElement(ge)||St.hasMatchingElement(xt=>tr(xt,ge))))return;let dt=lt(ge)?ge:null;for(;dt&&!Rc(dt);){let xt=Pc(dt);if(Rc(xt)||!lt(xt))break;dt=xt}if(!(st.length&<(ge)&&!JQ(ge)&&!tr(ge,u.select("floatingElement"))&&st.every(xt=>!tr(dt,xt)))){if(wo(ge)&&!("touches"in X)){let xt=Rc(ge),Kt=Un(ge),Xe=/auto|scroll/,ds=xt||Xe.test(Kt.overflowX),Wa=xt||Xe.test(Kt.overflowY),kr=ds&&ge.clientWidth>0&&ge.scrollWidth>ge.clientWidth,Ai=Wa&&ge.clientHeight>0&&ge.scrollHeight>ge.clientHeight,sn=Kt.direction==="rtl",vt=Ai&&(sn?X.offsetX<=ge.offsetWidth-ge.clientWidth:X.offsetX>ge.clientWidth),Ft=kr&&X.offsetY>ge.clientHeight;if(vt||Ft)return}if(!ee(X)){if(pe()==="intentional"&&C.current){Z.clear(),C.current=!1;return}typeof v=="function"&&!v(X)||M("__outsidePressBubbles")||(u.setOpen(!1,Ct(Ke.outsidePress,X)),T())}}}function ve(X){pe()!=="sloppy"||X.pointerType==="touch"||!u.select("open")||!r||B(X)||fe(X)}function we(X){if(pe()!=="sloppy"||!u.select("open")||!r||B(X))return;let ge=X.touches[0];ge&&(R.current={startTime:Date.now(),startX:ge.clientX,startY:ge.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{R.current&&(R.current.dismissOnTouchEnd=!1,R.current.dismissOnMouseDown=!1)}))}function oe(X,ge){let Ue=Wn(X);if(!Ue)return;let Ye=Jt(Ue,X.type,()=>{ge(X),Ye()})}function re(X){k.current="touch",oe(X,we)}function ce(X){A.clear(),X.type==="pointerdown"&&(k.current=X.pointerType),!(X.type==="mousedown"&&R.current&&!R.current.dismissOnMouseDown)&&oe(X,ge=>{ge.type==="pointerdown"?ve(ge):fe(ge)})}function ie(X){if(!S.current)return;let ge=x.current;if(de(),pe()==="intentional"){if(X.type==="pointercancel"){ge&&te();return}if(!ee(X)){if(ge){te();return}typeof v=="function"&&!v(X)||(Z.clear(),C.current=!0,T())}}}function le(X){if(pe()!=="sloppy"||!R.current||B(X))return;let ge=X.touches[0];if(!ge)return;let Ue=Math.abs(ge.clientX-R.current.startX),Ye=Math.abs(ge.clientY-R.current.startY),st=Math.sqrt(Ue*Ue+Ye*Ye);st>5&&(R.current.dismissOnTouchEnd=!0),st>10&&(fe(X),A.clear(),R.current=null)}function Oe(X){oe(X,le)}function ke(X){pe()!=="sloppy"||!R.current||B(X)||(R.current.dismissOnTouchEnd&&fe(X),A.clear(),R.current=null)}function Me(X){oe(X,ke)}let Ne=Ko(f),Fe=Ic(o&&Ic(Jt(Ne,"keydown",V),Jt(Ne,"compositionstart",Q),Jt(Ne,"compositionend",ue)),b&&Ic(Jt(Ne,"click",ce,!0),Jt(Ne,"pointerdown",ce,!0),Jt(Ne,"pointerup",ie,!0),Jt(Ne,"pointercancel",ie,!0),Jt(Ne,"mousedown",ce,!0),Jt(Ne,"mouseup",ie,!0),Jt(Ne,"touchstart",re,!0),Jt(Ne,"touchmove",Oe,!0),Jt(Ne,"touchend",Me,!0)));return()=>{Fe(),q.clear(),Z.clear(),de(),C.current=!1}},[m,f,o,b,v,d,r,y,w,V,T,_,M,B,h,u,A]),la.useEffect(T,[v,T]);let L=la.useMemo(()=>({onKeyDown:V,onPointerDown:F,onClick:F}),[V,F]),W=la.useMemo(()=>({onKeyDown:V,onPointerDown:O,onMouseDown:O,onClickCapture:z,onMouseDownCapture(q){z(),D(q)},onPointerDownCapture(q){z(),D(q)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[V,z,D,O]);return la.useMemo(()=>r?{reference:L,floating:W,trigger:L}:{},[r,L,W])}var Li=a(_e(),1);function gJ(e,t,r){let{reference:o,floating:n}=e,i=sa(t),s=eC(t),l=$1(s),c=ui(t),u=i==="y",d=o.x+o.width/2-n.width/2,f=o.y+o.height/2-n.height/2,m=o[l]/2-n[l]/2,h;switch(c){case"top":h={x:d,y:o.y-n.height};break;case"bottom":h={x:d,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-n.width,y:f};break;default:h={x:o.x,y:o.y}}switch(Mc(t)){case"start":h[s]-=m*(r&&u?-1:1);break;case"end":h[s]+=m*(r&&u?-1:1);break}return h}async function yJ(e,t){var r;t===void 0&&(t={});let{x:o,y:n,platform:i,rects:s,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=Nc(t,e),g=rA(h),b=l[m?f==="floating"?"reference":"floating":f],_=Pv(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=Pv(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 hLe=50,wJ=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:yJ},c=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:f}=gJ(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<hLe&&(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}=gJ(u,m,c)),v=-1)}return{x:d,y:f,placement:m,strategy:n,middlewareData:g}};var _J=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;let{placement:n,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...b}=Nc(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let _=ui(n),y=sa(l),w=ui(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),x=m||(w||!v?[X1(l)]:lJ(l)),C=g!=="none";!m&&C&&x.push(...cJ(l,v,g,S));let I=[l,...x],k=await c.detectOverflow(t,b),R=[],A=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&R.push(k[_]),f){let B=aJ(n,s,S);R.push(k[B[0]],k[B[1]])}if(A=[...A,{placement:n,overflows:R}],!R.every(B=>B<=0)){var P,T;let B=(((P=i.flip)==null?void 0:P.index)||0)+1,F=I[B];if(F&&(!(f==="alignment"?y!==sa(F):!1)||A.every(D=>sa(D.placement)===y?D.overflows[0]>0:!0)))return{data:{index:B,overflows:A},reset:{placement:F}};let V=(T=A.filter(z=>z.overflows[0]<=0).sort((z,D)=>z.overflows[1]-D.overflows[1])[0])==null?void 0:T.placement;if(!V)switch(h){case"bestFit":{var M;let z=(M=A.filter(D=>{if(C){let O=sa(D.placement);return O===y||O==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(O=>O>0).reduce((O,L)=>O+L,0)]).sort((D,O)=>D[1]-O[1])[0])==null?void 0:M[0];z&&(V=z);break}case"initialPlacement":V=l;break}if(n!==V)return{reset:{placement:V}}}return{}}}};function vJ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bJ(e){return sJ.some(t=>e[t]>=0)}var SJ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r,platform:o}=t,{strategy:n="referenceHidden",...i}=Nc(e,t);switch(n){case"referenceHidden":{let s=await o.detectOverflow(t,{...i,elementContext:"reference"}),l=vJ(s,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:bJ(l)}}}case"escaped":{let s=await o.detectOverflow(t,{...i,altBoundary:!0}),l=vJ(s,r.floating);return{data:{escapedOffsets:l,escaped:bJ(l)}}}default:return{}}}}};var xJ=new Set(["left","top"]);async function gLe(e,t){let{placement:r,platform:o,elements:n}=e,i=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=ui(r),l=Mc(r),c=sa(r)==="y",u=xJ.has(s)?-1:1,d=i&&c?-1:1,f=Nc(t,e),{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(h=l==="end"?g*-1:g),c?{x:h*d,y:m*u}:{x:m*u,y:h*d}}var CJ=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 gLe(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}}}}},TJ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:n,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:_=>{let{x:y,y:w}=_;return{x:y,y:w}}},...u}=Nc(e,t),d={x:r,y:o},f=await i.detectOverflow(t,u),m=sa(ui(n)),h=tA(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=J1(w,g,S)}if(l){let _=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=v+f[_],S=v-f[y];v=J1(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}}}}}},EJ=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:o,placement:n,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Nc(e,t),d={x:r,y:o},f=sa(n),m=tA(f),h=d[m],g=d[f],v=Nc(l,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){let w=m==="y"?"height":"width",S=i.reference[m]-i.floating[w]+b.mainAxis,x=i.reference[m]+i.reference[w]-b.mainAxis;h<S?h=S:h>x&&(h=x)}if(u){var _,y;let w=m==="y"?"width":"height",S=xJ.has(ui(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}}}},PJ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:n,rects:i,platform:s,elements:l}=t,{apply:c=()=>{},...u}=Nc(e,t),d=await s.detectOverflow(t,u),f=ui(n),m=Mc(n),h=sa(n)==="y",{width:g,height:v}=i.floating,b,_;f==="top"||f==="bottom"?(b=f,_=m===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(_=f,b=m==="end"?"top":"bottom");let y=v-d.top-d.bottom,w=g-d.left-d.right,S=km(v-d[b],y),x=km(g-d[_],w),C=!t.middlewareData.shift,I=S,k=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(k=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(I=y),C&&!m){let A=ys(d.left,0),P=ys(d.right,0),T=ys(d.top,0),M=ys(d.bottom,0);h?k=g-2*(A!==0||P!==0?A+P:ys(d.left,d.right)):I=v-2*(T!==0||M!==0?T+M:ys(d.top,d.bottom))}await c({...t,availableWidth:k,availableHeight:I});let R=await s.getDimensions(l.floating);return g!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function IJ(e){let t=Un(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=wo(e),i=n?e.offsetWidth:r,s=n?e.offsetHeight:o,l=Rm(r)!==i||Rm(o)!==s;return l&&(r=i,o=s),{width:r,height:o,$:l}}function v7(e){return lt(e)?e:e.contextElement}function N0(e){let t=v7(e);if(!wo(t))return Oc(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:i}=IJ(t),s=(i?Rm(r.width):r.width)/o,l=(i?Rm(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var vLe=Oc(0);function OJ(e){let t=Kr(e);return!K2()||!t.visualViewport?vLe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bLe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Kr(e)?!1:t}function Av(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=v7(e),s=Oc(1);t&&(o?lt(o)&&(s=N0(o)):s=N0(e));let l=bLe(i,r,o)?OJ(i):Oc(0),c=(n.left+l.x)/s.x,u=(n.top+l.y)/s.y,d=n.width/s.x,f=n.height/s.y;if(i){let m=Kr(i),h=o&<(o)?Kr(o):o,g=m,v=Z2(g);for(;v&&o&&h!==g;){let b=N0(v),_=v.getBoundingClientRect(),y=Un(v),w=_.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,S=_.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,f*=b.y,c+=w,u+=S,g=Kr(v),v=Z2(g)}}return Pv({width:d,height:f,x:c,y:u})}function oA(e,t){let r=Y1(e).scrollLeft;return t?t.left+r:Av(kc(e)).left+r}function NJ(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-oA(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function yLe(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,i=n==="fixed",s=kc(o),l=t?G1(t.floating):!1;if(o===s||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=Oc(1),d=Oc(0),f=wo(o);if((f||!f&&!i)&&((xv(o)!=="body"||P0(s))&&(c=Y1(o)),f)){let h=Av(o);u=N0(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}let m=s&&!f&&!i?NJ(s,c):Oc(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:r.y*u.y-c.scrollTop*u.y+d.y+m.y}}function wLe(e){return Array.from(e.getClientRects())}function _Le(e){let t=kc(e),r=Y1(e),o=e.ownerDocument.body,n=ys(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=ys(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+oA(e),l=-r.scrollTop;return Un(o).direction==="rtl"&&(s+=ys(t.clientWidth,o.clientWidth)-n),{width:n,height:i,x:s,y:l}}var kJ=25;function SLe(e,t){let r=Kr(e),o=kc(e),n=r.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,c=0;if(n){i=n.width,s=n.height;let d=K2();(!d||d&&t==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}let u=oA(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<=kJ&&(i-=g)}else u<=kJ&&(i+=u);return{width:i,height:s,x:l,y:c}}function xLe(e,t){let r=Av(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,i=wo(e)?N0(e):Oc(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,c=n*i.x,u=o*i.y;return{width:s,height:l,x:c,y:u}}function RJ(e,t,r){let o;if(t==="viewport")o=SLe(e,r);else if(t==="document")o=_Le(kc(e));else if(lt(t))o=xLe(t,r);else{let n=OJ(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Pv(o)}function MJ(e,t){let r=Pc(e);return r===t||!lt(r)||Rc(r)?!1:Un(r).position==="fixed"||MJ(r,t)}function CLe(e,t){let r=t.get(e);if(r)return r;let o=Cm(e,[],!1).filter(l=>lt(l)&&xv(l)!=="body"),n=null,i=Un(e).position==="fixed",s=i?Pc(e):e;for(;lt(s)&&!Rc(s);){let l=Un(s),c=q2(s);!c&&l.position==="fixed"&&(n=null),(i?!c&&!n:!c&&l.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||P0(s)&&!c&&MJ(e,s))?o=o.filter(d=>d!==s):n=l,s=Pc(s)}return t.set(e,o),o}function TLe(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,s=[...r==="clippingAncestors"?G1(t)?[]:CLe(t,this._c):[].concat(r),o],l=RJ(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=RJ(t,s[m],n);c=ys(h.top,c),u=km(h.right,u),d=km(h.bottom,d),f=ys(h.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function ELe(e){let{width:t,height:r}=IJ(e);return{width:t,height:r}}function PLe(e,t,r){let o=wo(t),n=kc(t),i=r==="fixed",s=Av(e,!0,i,t),l={scrollLeft:0,scrollTop:0},c=Oc(0);function u(){c.x=oA(n)}if(o||!o&&!i)if((xv(t)!=="body"||P0(n))&&(l=Y1(t)),o){let h=Av(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?NJ(n,l):Oc(0),f=s.left+l.scrollLeft-c.x-d.x,m=s.top+l.scrollTop-c.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function g7(e){return Un(e).position==="static"}function AJ(e,t){if(!wo(e)||Un(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return kc(e)===r&&(r=r.ownerDocument.body),r}function FJ(e,t){let r=Kr(e);if(G1(e))return r;if(!wo(e)){let n=Pc(e);for(;n&&!Rc(n);){if(lt(n)&&!g7(n))return n;n=Pc(n)}return r}let o=AJ(e,t);for(;o&&NQ(o)&&g7(o);)o=AJ(o,t);return o&&Rc(o)&&g7(o)&&!q2(o)?r:o||MQ(e)||r}var kLe=async function(e){let t=this.getOffsetParent||FJ,r=this.getDimensions,o=await r(e.floating);return{reference:PLe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function RLe(e){return Un(e).direction==="rtl"}var b7={convertOffsetParentRelativeRectToViewportRelativeRect:yLe,getDocumentElement:kc,getClippingRect:TLe,getOffsetParent:FJ,getElementRects:kLe,getClientRects:wLe,getDimensions:ELe,getScale:N0,isElement:lt,isRTL:RLe};function DJ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ALe(e,t){let r=null,o,n=kc(e);function i(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();let u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:h}=u;if(l||t(),!m||!h)return;let g=Q1(f),v=Q1(n.clientWidth-(d+m)),b=Q1(n.clientHeight-(f+h)),_=Q1(d),w={rootMargin:-g+"px "+-v+"px "+-b+"px "+-_+"px",threshold:ys(0,km(1,c))||1},S=!0;function x(C){let I=C[0].intersectionRatio;if(I!==c){if(!S)return s();I?s(!1,I):o=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!DJ(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 oC(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=v7(e),d=n||i?[...u?Cm(u):[],...t?Cm(t):[]]:[];d.forEach(_=>{n&&_.addEventListener("scroll",r,{passive:!0}),i&&_.addEventListener("resize",r)});let f=u&&l?ALe(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?Av(e):null;c&&b();function b(){let _=Av(e);v&&!DJ(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 LJ=CJ;var BJ=TJ,VJ=_J,jJ=PJ,zJ=SJ;var HJ=EJ,nA=(e,t,r)=>{let o=new Map,n={platform:b7,...r},i={...n.platform,_c:o};return wJ(e,t,{...n,platform:i})};var un=a(_e(),1),WJ=a(_e(),1),GJ=a(Vu(),1),OLe=typeof document<"u",NLe=function(){},iA=OLe?WJ.useLayoutEffect:NLe;function sA(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(!sA(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)&&!sA(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function YJ(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function UJ(e,t){let r=YJ(e);return Math.round(t*r)/r}function y7(e){let t=un.useRef(e);return iA(()=>{t.current=e}),t}function qJ(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);sA(m,o)||h(o);let[g,v]=un.useState(null),[b,_]=un.useState(null),y=un.useCallback(D=>{D!==C.current&&(C.current=D,v(D))},[]),w=un.useCallback(D=>{D!==I.current&&(I.current=D,_(D))},[]),S=i||g,x=s||b,C=un.useRef(null),I=un.useRef(null),k=un.useRef(d),R=c!=null,A=y7(c),P=y7(n),T=y7(u),M=un.useCallback(()=>{if(!C.current||!I.current)return;let D={placement:t,strategy:r,middleware:m};P.current&&(D.platform=P.current),nA(C.current,I.current,D).then(O=>{let L={...O,isPositioned:T.current!==!1};B.current&&!sA(k.current,L)&&(k.current=L,GJ.flushSync(()=>{f(L)}))})},[m,t,r,P,T]);iA(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(D=>({...D,isPositioned:!1})))},[u]);let B=un.useRef(!1);iA(()=>(B.current=!0,()=>{B.current=!1}),[]),iA(()=>{if(S&&(C.current=S),x&&(I.current=x),S&&x){if(A.current)return A.current(S,x,M);M()}},[S,x,M,A,R]);let F=un.useMemo(()=>({reference:C,floating:I,setReference:y,setFloating:w}),[y,w]),V=un.useMemo(()=>({reference:S,floating:x}),[S,x]),z=un.useMemo(()=>{let D={position:r,left:0,top:0};if(!V.floating)return D;let O=UJ(V.floating,d.x),L=UJ(V.floating,d.y);return l?{...D,transform:"translate("+O+"px, "+L+"px)",...YJ(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:L}},[r,l,V.floating,d.x,d.y]);return un.useMemo(()=>({...d,update:M,refs:F,elements:V,floatingStyles:z}),[d,M,F,V,z])}var w7=(e,t)=>{let r=LJ(e);return{name:r.name,fn:r.fn,options:[e,t]}},_7=(e,t)=>{let r=BJ(e);return{name:r.name,fn:r.fn,options:[e,t]}},S7=(e,t)=>({fn:HJ(e).fn,options:[e,t]}),x7=(e,t)=>{let r=VJ(e);return{name:r.name,fn:r.fn,options:[e,t]}},C7=(e,t)=>{let r=jJ(e);return{name:r.name,fn:r.fn,options:[e,t]}};var T7=(e,t)=>{let r=zJ(e);return{name:r.name,fn:r.fn,options:[e,t]}};var D0=a(_e(),1),u$=a(Vu(),1);var l$=a(_e(),1);var jt=(e,t,r,o,n,i,...s)=>{if(s.length>0)throw new Error(No(1));let l;if(e&&t&&r&&o&&n&&i)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f),g=r(c,u,d,f),v=o(c,u,d,f),b=n(c,u,d,f);return i(m,h,g,v,b,u,d,f)};else if(e&&t&&r&&o&&n)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f),g=r(c,u,d,f),v=o(c,u,d,f);return n(m,h,g,v,u,d,f)};else if(e&&t&&r&&o)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f),g=r(c,u,d,f);return o(m,h,g,u,d,f)};else if(e&&t&&r)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f);return r(m,h,u,d,f)};else if(e&&t)l=(c,u,d,f)=>{let m=e(c,u,d,f);return t(m,u,d,f)};else if(e)l=e;else throw new Error("Missing arguments");return l};var i$=a(_e(),1),A7=a(nC(),1),s$=a(e$(),1);var t$=a(_e(),1);var P7=[],k7;function r$(){return k7}function o$(e){P7.push(e)}function R7(e){let t=(r,o)=>{let n=cn(QLe).current,i;try{k7=n;for(let s of P7)s.before(n);i=e(r,o);for(let s of P7)s.after(n);n.didInitialize=!0}finally{k7=void 0}return i};return t.displayName=e.displayName||e.name,t}function n$(e){return t$.forwardRef(R7(e))}function QLe(){return{didInitialize:!1}}var JLe=S0(19),$Le=JLe?t4e:r4e;function lA(e,t,r,o,n){return $Le(e,t,r,o,n)}function e4e(e,t,r,o,n){let i=i$.useCallback(()=>t(e.getSnapshot(),r,o,n),[e,t,r,o,n]);return(0,A7.useSyncExternalStore)(e.subscribe,i,i)}o$({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,A7.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function t4e(e,t,r,o,n){let i=r$();if(!i)return e4e(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 r4e(e,t,r,o,n){return(0,s$.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,r,o,n))}var cA=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 lA(this,t,r,o,n)}};var Iv=a(_e(),1);var F0=class extends cA{constructor(t,r={},o){super(t),this.context=r,this.selectors=o}useSyncedValue(t,r){Iv.useDebugValue(t);let o=this;Re(()=>{o.state[t]!==r&&o.set(t,r)},[o,t,r])}useSyncedValueWithCleanup(t,r){let o=this;Re(()=>(o.state[t]!==r&&o.set(t,r),()=>{o.set(t,void 0)}),[o,t,r])}useSyncedValues(t){let r=this,o=Object.values(t);Re(()=>{r.update(t)},[r,...o])}useControlledProp(t,r){Iv.useDebugValue(t);let o=this,n=r!==void 0;Re(()=>{n&&!Object.is(o.state[t],r)&&o.setState({...o.state,[t]:r})},[o,t,r,n])}select(t,r,o,n){let i=this.selectors[t];return i(this.state,r,o,n)}useState(t,r,o,n){return Iv.useDebugValue(t),lA(this,this.selectors[t],r,o,n)}useContextCallback(t,r){Iv.useDebugValue(t);let o=De(r??Ec);this.context[t]=o}useStateSetter(t){let r=Iv.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 uA=a(_e(),1);function a$(){let[,e]=uA.useState({});return uA.useCallback(()=>{e({})},[])}var o4e={open:jt(e=>e.open),transitionStatus:jt(e=>e.transitionStatus),domReferenceElement:jt(e=>e.domReferenceElement),referenceElement:jt(e=>e.positionReference??e.referenceElement),floatingElement:jt(e=>e.floatingElement),floatingId:jt(e=>e.floatingId)},ju=class extends F0{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:mJ(),nested:o,triggerElements:i},o4e),this.syncOnly=r}syncOpenEvent=(t,r)=>{(!t||!this.state.open||r!=null&&QQ(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 c$(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=l$.useRef(null);o===void 0&&m.current===null&&(m.current=new ju({open:l,transitionStatus:void 0,referenceElement:c,floatingElement:u,triggerElements:d,onOpenChange:f,floatingId:n,syncOnly:!0,nested:i}));let h=o??m.current;return t.useSyncedValue("floatingId",n),Re(()=>{let g={open:l,floatingId:n,referenceElement:c,floatingElement:u};lt(c)&&(g.domReferenceElement=c),h.state.positionReference===h.state.referenceElement&&(g.positionReference=c),h.update(g)},[l,n,c,u,h]),h.context.onOpenChange=f,h.context.nested=i,h}var d$={tabIndex:-1,[i7]:""};function f$(e,t,r=!1){let o=_m(),n=O0()!=null,i=D0.useRef(null);e===void 0&&i.current===null&&(i.current=t(o,n));let s=e??i.current;return c$({popupStore:s,treatPopupAsFloatingElement:r,floatingRootContext:s.state.floatingRootContext,floatingId:o,nested:n,onOpenChange:s.setOpen}),{store:s,internalStore:i.current}}function n4e(e,t){let r=D0.useRef(null),o=D0.useRef(null);return D0.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 i4e(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 s4e(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function p$(e,t,r,o={}){let n=r.reason,i=n===Ke.triggerHover,s=t&&n===Ke.triggerFocus,l=!t&&(n===Ke.triggerPress||n===Ke.escapeKey),c=s4e(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),i4e(d,t,r.trigger,c()),e.update(d)};i?u$.flushSync(u):u()}function m$(e,t,r,o){GQ(()=>{t===void 0&&e.state.open===!1&&r&&(e.state={...e.state,open:!0,activeTriggerId:o,preventUnmountingOnClose:!1})})}function h$(e,t,r,o){let n=r.useState("isMountedByTrigger",e),i=n4e(e,r),s=De(l=>{if(i(l),!l)return;let c=r.select("open"),u=r.select("activeTriggerId");if(u===e){r.update({activeTriggerElement:l,...c?o:null});return}u==null&&c&&r.update({activeTriggerId:e,activeTriggerElement:l,...o})});return Re(()=>{n&&r.update({activeTriggerElement:t.current,...o})},[n,r,t,...Object.values(o)]),{registerTrigger:s,isMountedByThisTrigger:n}}function g$(e,t={}){let{closeOnActiveTriggerUnmount:r=!1}=t,o=e.useState("open"),n=e.useState("triggerCount");Re(()=>{if(!o){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let i=e.context.triggerElements.size,s={};e.state.triggerCount!==i&&(s.triggerCount=i);let l=e.select("activeTriggerId"),c=null;if(l){let u=e.context.triggerElements.getById(l);u?u!==e.state.activeTriggerElement&&(s.activeTriggerElement=u):c=l}if(!c&&!l&&i===1){let u=e.context.triggerElements.entries().next();if(!u.done){let[d,f]=u.value;s.activeTriggerId=d,s.activeTriggerElement=f}}(s.triggerCount!==void 0||s.activeTriggerId!==void 0||s.activeTriggerElement!==void 0)&&e.update(s),c&&r&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===c&&!e.context.triggerElements.getById(c)){let u=Ct(Ke.none);e.setOpen(!1,u),u.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,n,r])}function v$(e,t,r){let{mounted:o,setMounted:n,transitionStatus:i}=T0(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 Em({enabled:o&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:i}}function b$(e,t){e.useSyncedValues(t),Re(()=>()=>{e.update({activeTriggerProps:io,inactiveTriggerProps:io,popupProps:io})},[e])}var Im=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 y$(){return new ju({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Im,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function _$(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:y$(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:io,inactiveTriggerProps:io,popupProps:io}}function S$(e,t,r=!1){return new ju({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:r,onOpenChange:void 0})}var iC=jt(e=>e.triggerIdProp??e.activeTriggerId),I7=jt(e=>e.openProp??e.open),w$=jt(e=>(e.popupElement?.id??e.floatingId)||void 0);function x$(e,t){return t!==void 0&&I7(e)&&iC(e)===t}function a4e(e,t){return x$(e,t)?!0:t!==void 0&&I7(e)&&iC(e)==null&&e.triggerCount===1}var C$={open:I7,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:iC,activeTriggerElement:jt(e=>e.mounted?e.activeTriggerElement:null),popupId:w$,isTriggerActive:jt((e,t)=>t!==void 0&&iC(e)===t),isOpenedByTrigger:jt((e,t)=>x$(e,t)),isMountedByTrigger:jt((e,t)=>t!==void 0&&iC(e)===t&&e.mounted),triggerProps:jt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:jt((e,t)=>a4e(e,t)?w$(e):void 0),popupProps:jt(e=>e.popupProps),popupElement:jt(e=>e.popupElement),positionerElement:jt(e=>e.positionerElement)};function T$(e){let{open:t=!1,onOpenChange:r,elements:o={}}=e,n=_m(),i=O0()!=null,s=cn(()=>new ju({open:t,transitionStatus:void 0,onOpenChange:r,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new Im,floatingId:n,syncOnly:!1,nested:i})).current;return Re(()=>{let l={open:t,floatingId:n};o.reference!==void 0&&(l.referenceElement=o.reference,l.domReferenceElement=lt(o.reference)?o.reference:null),o.floating!==void 0&&(l.floatingElement=o.floating),s.update(l)},[t,n,o.reference,o.floating,s]),s.context.onOpenChange=r,s.context.nested=i,s}function O7(e={}){let{nodeId:t,externalTree:r}=e,o=T$(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]=Li.useState(null),[m,h]=Li.useState(void 0),[g,v]=Li.useState(void 0),b=Li.useRef(null),_=Am(r),y=Li.useMemo(()=>({reference:i,floating:s,domReference:l}),[i,s,l]),w=qJ({...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=Li.useCallback(T=>{let M=lt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;f(M),w.refs.setReference(M)},[w.refs]),I=Li.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=Li.useCallback(T=>{v(T),w.refs.setFloating(T)},[w.refs]),R=Li.useMemo(()=>({...w.refs,setReference:I,setFloating:k,setPositionReference:C,domReference:b}),[w.refs,I,k,C]),A=Li.useMemo(()=>({...w.elements,domReference:l}),[w.elements,l]),P=Li.useMemo(()=>({...w,dataRef:n.context.dataRef,open:c,onOpenChange:n.setOpen,events:n.context.events,floatingId:u,refs:R,elements:A,nodeId:t,rootStore:n}),[w,R,A,t,n,c,u]);return Re(()=>{l&&(b.current=l)},[l]),Re(()=>{n.context.dataRef.current.floatingContext=P;let T=_?.nodesRef.current.find(M=>M.id===t);T&&(T.context=P)}),Li.useMemo(()=>({...w,context:P,refs:R,elements:A,rootStore:n}),[w,R,A,P,n])}var zu=a(_e(),1);var N7=Pf.os.mac&&Pf.engine.webkit;function M7(e,t={}){let{enabled:r=!0,delay:o}=t,n="rootStore"in e?e.rootStore:e,{events:i,dataRef:s}=n.context,l=zu.useRef(!1),c=zu.useRef(null),u=zu.useRef(!0),d=Ac();zu.useEffect(()=>{let m=n.select("domReferenceElement");if(!r)return;let h=Kr(m);function g(){let _=n.select("domReferenceElement");!n.select("open")&&wo(_)&&_===A0(Ko(_))&&(l.current=!0)}function v(){u.current=!0}function b(){u.current=!1}return Ic(Jt(h,"blur",g),N7&&Jt(h,"keydown",v,!0),N7&&Jt(h,"pointerdown",b,!0))},[n,r]),zu.useEffect(()=>{if(!r)return;function m(h){if(h.reason===Ke.triggerPress||h.reason===Ke.escapeKey){let g=n.select("domReferenceElement");lt(g)&&(c.current=g,l.current=!0)}}return i.on("openchange",m),()=>{i.off("openchange",m)}},[i,r,n]);let f=zu.useMemo(()=>{function m(){l.current=!1,c.current=null}return{onMouseLeave(){m()},onFocus(h){let g=h.currentTarget;if(l.current){if(c.current===g)return;m()}let v=Wn(h.nativeEvent);if(lt(v)){if(N7&&!h.relatedTarget){if(!u.current&&!$Q(v))return}else if(!eJ(v))return}let b=Pm(h.relatedTarget,n.context.triggerElements),{nativeEvent:_,currentTarget:y}=h,w=typeof o=="function"?o():o;if(n.select("open")&&b||w===0||w===void 0){n.setOpen(!0,Ct(Ke.triggerFocus,_,y));return}d.start(w,()=>{l.current||n.setOpen(!0,Ct(Ke.triggerFocus,_,y))})},onBlur(h){m();let g=h.relatedTarget,v=h.nativeEvent,b=lt(g)&&g.hasAttribute(I0("focus-guard"))&&g.getAttribute("data-type")==="outside";d.start(0,()=>{let _=n.select("domReferenceElement"),y=A0(Ko(_));!g&&y===_||tr(s.current.floatingContext?.refs.floating.current,y)||tr(_,y)||b||Pm(g??y,n.context.triggerElements)||n.setOpen(!1,Ct(Ke.triggerFocus,v))})}}},[s,o,n,d]);return zu.useMemo(()=>r?{reference:f,trigger:f}:{},[r,f])}var D7=a(_e(),1);var F7=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 Za,this.restTimeout=new Za,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},dA=new WeakMap;function L0(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&dA.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),dA.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function fA(e,t){let{scopeElement:r,referenceElement:o,floatingElement:n}=t,i=dA.get(r);i&&i!==e&&L0(i),L0(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=r,e.pointerEventsReferenceElement=o,e.pointerEventsFloatingElement=n,dA.set(r,e),r.style.pointerEvents="none",o.style.pointerEvents="auto",n.style.pointerEvents="auto"}function B0(e){let t=e.context.dataRef.current,r=cn(()=>t.hoverInteractionState??F7.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=r),x0(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function L7(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=Am(),f=O0(),m=B0(i),h=Ac(),g=De(()=>$2(u.current.openEvent?.type,m.interactedInside)),v=De(()=>tJ(u.current.openEvent?.type)),b=De(()=>{L0(m)});Re(()=>{s||(m.pointerType=void 0,m.restTimeoutPending=!1,m.interactedInside=!1,b())},[s,m,b]),D7.useEffect(()=>b,[b]),Re(()=>{if(r&&s&&m.handleCloseOptions?.blockPointerEvents&&v()&<(c)&&l){let _=c,y=l,w=Ko(l),S=d?.nodesRef.current.find(k=>k.id===f)?.context?.elements.floating;S&&(S.style.pointerEvents="");let x=m.pointerEventsScopeElement!==y?m.pointerEventsScopeElement:null,C=S!==y?S:null,I=m.handleCloseOptions?.getScope?.()??x??C??_.closest("[data-rootownerid]")??w.body;return fA(m,{scopeElement:I,referenceElement:_,floatingElement:y}),()=>{b()}}},[r,s,c,l,m,v,d,f,b]),D7.useEffect(()=>{if(!r)return;function _(){return!!(d&&f&&Af(d.nodesRef.current,f).length>0)}function y(k){let R=Rf(o,"close",m.pointerType),A=()=>{i.setOpen(!1,Ct(Ke.triggerHover,k)),d?.events.emit("floating.closed",k)};R?m.openChangeTimeout.start(R,A):(m.openChangeTimeout.clear(),A())}function w(k){let R=Wn(k);if(!a7(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(Pm(k.relatedTarget,i.context.triggerElements))return;let R=u.current.floatingContext?.nodeId??n,A=k.relatedTarget;if(!(d&&R&<(A)&&Af(d.nodesRef.current,R,!1).some(T=>tr(T.context?.elements.floating,A)))){if(m.handler){m.handler(k);return}b(),v()&&!g()&&y(k)}}function C(k){!d||!f||_()||h.start(0,()=>{d.events.off("floating.closed",C),i.setOpen(!1,Ct(Ke.triggerHover,k)),d.events.emit("floating.closed",k)})}let I=l;return Ic(I&&Jt(I,"mouseenter",S),I&&Jt(I,"mouseleave",x),I&&Jt(I,"pointerdown",w,!0),()=>{d?.events.off("floating.closed",C)})},[r,l,i,u,o,n,v,g,b,m,d,f,h])}var Om=a(_e(),1),E$=a(Vu(),1);var l4e={current:null};function B7(e,t={}){let{enabled:r=!0,delay:o=0,handleClose:n=null,mouseOnly:i=!1,restMs:s=0,move:l=!0,triggerElementRef:c=l4e,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,_=Am(u),y=B0(g),w=Om.useRef(!1),S=Fi(n),x=Fi(o),C=Fi(s),I=Fi(r),k=Fi(h),R=Fi(m),A=De(()=>$2(v.current.openEvent?.type,y.interactedInside)),P=De(()=>k.current?.()!==!1),T=De((F,V,z)=>{let D=g.context.triggerElements;if(D.hasElement(V))return!F||!tr(F,V);if(!lt(z))return!1;let O=z;return D.hasMatchingElement(L=>tr(L,O))&&(!F||!tr(F,O))}),M=De(()=>{if(!y.handler)return;Ko(g.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0}),B=De(()=>{L0(y)});return d&&(y.handleCloseOptions=S.current?.__options),Om.useEffect(()=>M,[M]),Om.useEffect(()=>{if(!r)return;function F(V){V.open?w.current=!1:(w.current=V.reason===Ke.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]),Om.useEffect(()=>{if(!r)return;function F(O,L=!0){let W=Rf(x.current,"close",y.pointerType);W?y.openChangeTimeout.start(W,()=>{g.setOpen(!1,Ct(Ke.triggerHover,O)),_?.events.emit("floating.closed",O)}):L&&(y.openChangeTimeout.clear(),g.setOpen(!1,Ct(Ke.triggerHover,O)),_?.events.emit("floating.closed",O))}let V=c.current??(d?g.select("domReferenceElement"):null);if(!lt(V))return;function z(O){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,i&&!kf(y.pointerType))return;let L=l7(C.current),W=Rf(x.current,"open",y.pointerType),q=Wn(O),Z=O.currentTarget??null,Q=g.select("domReferenceElement"),ue=Z;if(lt(q)&&!g.context.triggerElements.hasElement(q)){for(let oe of g.context.triggerElements.elements())if(tr(oe,q)){ue=oe;break}}lt(Z)&<(Q)&&!g.context.triggerElements.hasElement(Z)&&tr(Z,Q)&&(ue=Q);let te=ue==null?!1:T(Q,ue,q),de=g.select("open"),pe=R.current?.()??g.select("transitionStatus")==="ending",$=!de&&pe&&w.current,ee=!te&<(ue)&<(Q)&&tr(Q,ue)&&$,fe=L>0&&!W,ve=te&&(de||$)||ee,we=!de||te;if(ve){P()&&g.setOpen(!0,Ct(Ke.triggerHover,O,ue));return}fe||(W?y.openChangeTimeout.start(W,()=>{we&&P()&&g.setOpen(!0,Ct(Ke.triggerHover,O,ue))}):we&&P()&&g.setOpen(!0,Ct(Ke.triggerHover,O,ue)))}function D(O){if(A()){B();return}M();let L=g.select("domReferenceElement"),W=Ko(L);y.restTimeout.clear(),y.restTimeoutPending=!1;let q=v.current.floatingContext??f?.();if(Pm(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(){B(),M(),I.current&&!A()&&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?Ic(Jt(V,"mousemove",z,{once:!0}),Jt(V,"mouseenter",z),Jt(V,"mouseleave",D)):Ic(Jt(V,"mouseenter",z),Jt(V,"mouseleave",D))},[M,B,v,x,g,r,S,y,d,T,A,i,l,C,c,_,I,f,R,P]),Om.useMemo(()=>{if(!r)return;function F(V){y.pointerType=V.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove(V){let{nativeEvent:z}=V,D=V.currentTarget,O=g.select("domReferenceElement"),L=g.select("open"),W=T(O,D,V.target);if(i&&!kf(y.pointerType))return;if(L&&W&&y.handleCloseOptions?.blockPointerEvents){let Q=g.select("floatingElement");if(Q){let ue=y.handleCloseOptions?.getScope?.()??D.ownerDocument.body;fA(y,{scopeElement:ue,referenceElement:D,floatingElement:Q})}}let q=l7(C.current);if(L&&!W||q===0||!W&&y.restTimeoutPending&&V.movementX**2+V.movementY**2<2)return;y.restTimeout.clear();function Z(){if(y.restTimeoutPending=!1,A())return;let Q=g.select("open");!y.blockMouseMove&&(!Q||W)&&P()&&g.setOpen(!0,Ct(Ke.triggerHover,z,D))}y.pointerType==="touch"?E$.flushSync(()=>{Z()}):W&&L?Z():(y.restTimeoutPending=!0,y.restTimeout.start(q,Z))}}},[r,y,A,T,i,g,C,P])}var P$=.1,c4e=P$*P$,Cr=.5;function pA(e,t,r,o,n,i){return o>=t!=i>=t&&e<=(n-r)*(t-o)/(i-o)+r}function mA(e,t,r,o,n,i,s,l,c,u){let d=!1;return pA(e,t,r,o,n,i)&&(d=!d),pA(e,t,n,i,s,l)&&(d=!d),pA(e,t,s,l,c,u)&&(d=!d),pA(e,t,c,u,r,o)&&(d=!d),d}function u4e(e,t,r){return e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height}function hA(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 V7(e={}){let{blockPointerEvents:t=!1}=e,r=new Za,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,I=w-g,k=C*C+I*I,R=x*x*c4e;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:I}=w,k=Wn(w),R=w.type==="mouseleave",A=tr(x,k),P=tr(S,k);if(A&&(m=!0,!R))return;if(P&&(m=!1,!R)){m=!0;return}if(R&<(w.relatedTarget)&&tr(x,w.relatedTarget))return;function T(){return!!(d&&Af(d.nodesRef.current,u).length>0)}function M(){T()||_()}if(T())return;let B=S.getBoundingClientRect(),F=x.getBoundingClientRect(),V=n>F.right-F.width/2,z=i>F.bottom-F.height/2,D=F.width>B.width,O=F.height>B.height,L=(D?B:F).left,W=(D?B:F).right,q=(O?B:F).top,Z=(O?B:F).bottom;if(f==="top"&&i>=B.bottom-1||f==="bottom"&&i<=B.top+1||f==="left"&&n>=B.right-1||f==="right"&&n<=B.left+1){M();return}let Q=!1;switch(f){case"top":Q=hA(C,I,L,B.top+1,W,F.bottom-1);break;case"bottom":Q=hA(C,I,L,F.top+1,W,B.bottom-1);break;case"left":Q=hA(C,I,F.right-1,Z,B.left+1,q);break;case"right":Q=hA(C,I,B.right-1,Z,F.left+1,q);break;default:}if(Q)return;if(m&&!u4e(C,I,B)){M();return}if(!R&&b(C,I)){M();return}let ue=!1;switch(f){case"top":{let te=D?Cr/2:Cr*4,de=D||V?n+te:n-te,pe=D?n-te:V?n+te:n-te,$=i+Cr+1,ee=V||D?F.bottom-Cr:F.top,fe=V?D?F.bottom-Cr:F.top:F.bottom-Cr;ue=mA(C,I,de,$,pe,$,F.left,ee,F.right,fe);break}case"bottom":{let te=D?Cr/2:Cr*4,de=D||V?n+te:n-te,pe=D?n-te:V?n+te:n-te,$=i-Cr,ee=V||D?F.top+Cr:F.bottom,fe=V?D?F.top+Cr:F.bottom:F.top+Cr;ue=mA(C,I,de,$,pe,$,F.left,ee,F.right,fe);break}case"left":{let te=O?Cr/2:Cr*4,de=O||z?i+te:i-te,pe=O?i-te:z?i+te:i-te,$=n+Cr+1,ee=z||O?F.right-Cr:F.left,fe=z?O?F.right-Cr:F.left:F.right-Cr;ue=mA(C,I,ee,F.top,fe,F.bottom,$,de,$,pe);break}case"right":{let te=O?Cr/2:Cr*4,de=O||z?i+te:i-te,pe=O?i-te:z?i+te:i-te,$=n-Cr,ee=z||O?F.left+Cr:F.right,fe=z?O?F.left+Cr:F.right:F.left+Cr;ue=mA(C,I,$,de,$,pe,ee,F.top,fe,F.bottom);break}default:}ue?m||r.start(40,M):M()}};return o.__options={...e,blockPointerEvents:t},o}var j7=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ka.startingStyle]="startingStyle",e[e.endingStyle=Ka.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),sC=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),d4e={[sC.popupOpen]:""},BSt={[sC.popupOpen]:"",[sC.pressed]:""},f4e={[j7.open]:""},p4e={[j7.closed]:""},m4e={[j7.anchorHidden]:""},k$={open(e){return e?d4e:null}};var V0={open(e){return e?f4e:p4e},anchorHidden(e){return e?m4e:null}};var j0="ArrowUp",z0="ArrowDown",aC="ArrowLeft",lC="ArrowRight",cC="Home",uC="End";var z7=new Set([aC,lC]),A$=new Set([aC,lC,cC,uC]),H7=new Set([j0,z0]),I$=new Set([j0,z0,cC,uC]),U7=new Set([...z7,...H7]),O$=new Set([...U7,cC,uC]),h4e="Shift",g4e="Control",v4e="Alt",b4e="Meta",N$=new Set([h4e,g4e,v4e,b4e]);function y4e(e){return wo(e)&&e.tagName==="INPUT"}function W7(e){return!!(y4e(e)&&e.selectionStart!=null||wo(e)&&e.tagName==="TEXTAREA")}function G7(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=R$(e,t,"left"),u=gA(e),d=gA(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=R$(e,t,"top"),u=gA(e),d=gA(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 R$(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 gA(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 vA(e){return S0(19)?e:e?"true":void 0}var Qa=a(_e(),1);var w4e=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:n,rects:i,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:d=0,offsetParent:f="real"}=Nc(e,t)||{};if(u==null)return{};let m=rA(d),h={x:r,y:o},g=eC(n),v=$1(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],I=f==="real"?await s.getOffsetParent?.(u):l.floating,k=l.floating[S]||i.floating[v];(!k||!await s.isElement?.(I))&&(k=l.floating[S]||i.floating[v]);let R=x/2-C/2,A=k/2-b[v]/2-1,P=Math.min(m[y],A),T=Math.min(m[w],A),M=P,B=k-b[v]-T,F=k/2-b[v]/2+R,V=J1(M,F,B),z=!c.arrow&&Mc(n)!=null&&F!==V&&i.reference[v]/2-(F<M?P:T)-b[v]/2<0,D=z?F<M?F-M:F-B:0;return{[g]:h[g]+D,data:{[g]:V,centerOffset:F-V-D,...z&&{alignmentOffset:D}},reset:z}}}),M$=(e,t)=>({...w4e(e),options:[e,t]});var _4e=T7().fn,F$={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 _4e(e)).data?.referenceHidden||i}}}};var dC={sideX:"left",sideY:"top"},D$={name:"adaptiveOrigin",async fn(e){let{x:t,y:r,rects:{floating:o},elements:{floating:n},platform:i,strategy:s,placement:l}=e,c=Kr(n),u=c.getComputedStyle(n);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:r,data:dC};let f=await i.getOffsetParent?.(n),m={width:0,height:0};if(s==="fixed"&&c?.visualViewport)m={width:c.visualViewport.width,height:c.visualViewport.height};else if(f===c){let y=Ko(n);m={width:y.documentElement.clientWidth,height:y.documentElement.clientHeight}}else await i.isElement?.(f)&&(m=await i.getDimensions(f));let h=ui(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":dC.sideX,_=h==="top"?"bottom":dC.sideY;return{x:g,y:v,data:{sideX:b,sideY:_}}}};function V$(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 L$(e,t,r){let{rects:o,placement:n}=e;return{side:V$(t,ui(n),r),align:Mc(n)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function j$(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,I]=Qa.useState(null);!v&&C!==null&&I(null);let k=b.side||"flip",R=b.align||"flip",A=b.fallbackAxisSide||"end",P=typeof t=="function"?t:void 0,T=De(P),M=P?T:t,B=Fi(t),F=Fi(v),z=wm()==="rtl",D=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":z?"left":"right","inline-start":z?"right":"left"}[o],O=i==="center"?D:`${D}-${i}`,L=c,W=1,q=o==="bottom"?W:0,Z=o==="top"?W:0,Q=o==="right"?W:0,ue=o==="left"?W:0;typeof L=="number"?L={top:L+q,right:L+ue,bottom:L+Z,left:L+Q}:L&&(L={top:(L.top||0)+q,right:(L.right||0)+ue,bottom:(L.bottom||0)+Z,left:(L.left||0)+Q});let te={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:L},de=Qa.useRef(null),pe=Fi(n),$=Fi(s),ee=typeof n!="function"?n:0,fe=typeof s!="function"?s:0,ve=[];m&&ve.push(m),ve.push(w7(vt=>{let Ft=L$(vt,o,z),ne=typeof pe.current=="function"?pe.current(Ft):pe.current,xe=typeof $.current=="function"?$.current(Ft):$.current;return{mainAxis:ne,crossAxis:xe,alignmentAxis:xe}},[ee,fe,z,o]));let we=R==="none"&&k!=="shift",oe=!we&&(u||_||k==="shift"),re=k==="none"?null:x7({...te,padding:{top:L.top+W,right:L.right+W,bottom:L.bottom+W,left:L.left+W},mainAxis:!_&&k==="flip",crossAxis:R==="flip"?"alignment":!1,fallbackAxisSideDirection:A}),ce=we?null:_7(vt=>{let Ft=Ko(vt.elements.floating).documentElement;return{...te,rootBoundary:_?{x:0,y:0,width:Ft.clientWidth,height:Ft.clientHeight}:void 0,mainAxis:R!=="none",crossAxis:oe,limiter:u||_?void 0:S7(ne=>{if(!de.current)return{};let{width:xe,height:H}=de.current.getBoundingClientRect(),Pe=sa(ui(ne.placement)),Bt=Pe==="y"?xe:H,Ee=Pe==="y"?L.left+L.right:L.top+L.bottom;return{offset:Bt/2+Ee/2}})}},[te,u,_,L,R]);k==="shift"||R==="shift"||i==="center"?ve.push(ce,re):ve.push(re,ce),ve.push(C7({...te,apply({elements:{floating:vt},availableWidth:Ft,availableHeight:ne,rects:xe}){if(!F.current)return;let H=vt.style;H.setProperty("--available-width",`${Ft}px`),H.setProperty("--available-height",`${ne}px`);let Pe=Kr(vt).devicePixelRatio||1,{x:Bt,y:Ee,width:Ro,height:Ie}=xe.reference,pr=(Math.round((Bt+Ro)*Pe)-Math.round(Bt*Pe))/Pe,me=(Math.round((Ee+Ie)*Pe)-Math.round(Ee*Pe))/Pe;H.setProperty("--anchor-width",`${pr}px`),H.setProperty("--anchor-height",`${me}px`)}}),M$(vt=>({element:de.current||Ko(vt.elements.floating).createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(vt){let{elements:Ft,middlewareData:ne,placement:xe,rects:H,y:Pe}=vt,Bt=ui(xe),Ee=sa(Bt),Ro=de.current,Ie=ne.arrow?.x||0,pr=ne.arrow?.y||0,me=Ro?.clientWidth||0,he=Ro?.clientHeight||0,Js=Ie+me/2,Wt=pr+he/2,He=Math.abs(ne.shift?.y||0),Ce=H.reference.height/2,it=typeof n=="function"?n(L$(vt,o,z)):n,ht=He>it,bt={top:`${Js}px calc(100% + ${it}px)`,bottom:`${Js}px ${-it}px`,left:`calc(100% + ${it}px) ${Wt}px`,right:`${-it}px ${Wt}px`}[Bt],Rr=`${Js}px ${H.reference.y+Ce-Pe}px`;return Ft.floating.style.setProperty("--transform-origin",oe&&Ee==="y"&&ht?Rr:bt),{}}},F$,w),Re(()=>{!v&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[v,g]);let ie=Qa.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:le,elements:Oe,x:ke,y:Me,middlewareData:Ne,update:Fe,placement:X,context:ge,isPositioned:Ue,floatingStyles:Ye}=O7({rootContext:g,open:h?v:void 0,placement:O,middleware:ve,strategy:r,whileElementsMounted:h?void 0:(...vt)=>oC(...vt,ie),nodeId:y,externalTree:x}),{sideX:st,sideY:St}=Ne.adaptiveOrigin||dC,dt=Ue?r:"fixed",xt=Qa.useMemo(()=>{let vt=w?{position:dt,[st]:ke,[St]:Me}:{position:dt,...Ye};return Ue||(vt.opacity=0),vt},[w,dt,st,ke,St,Me,Ye,Ue]),Kt=Qa.useRef(null);Re(()=>{if(!v)return;let vt=B.current,Ft=typeof vt=="function"?vt():vt,xe=(B$(Ft)?Ft.current:Ft)||null||null;xe!==Kt.current&&(le.setPositionReference(xe),Kt.current=xe)},[v,le,M,B]),Qa.useEffect(()=>{if(!v)return;let vt=B.current;typeof vt!="function"&&B$(vt)&&vt.current!==Kt.current&&(le.setPositionReference(vt.current),Kt.current=vt.current)},[v,le,M,B]),Qa.useEffect(()=>{if(h&&v&&Oe.reference&&Oe.floating)return oC(Oe.reference,Oe.floating,Fe,ie)},[h,v,Oe,Fe,ie]);let Xe=ui(X),ds=V$(o,Xe,z),Wa=Mc(X)||"center",kr=!!Ne.hide?.referenceHidden;Re(()=>{S&&v&&Ue&&I(Xe)},[S,v,Ue,Xe]);let Ai=Qa.useMemo(()=>({position:"absolute",top:Ne.arrow?.y,left:Ne.arrow?.x}),[Ne.arrow]),sn=Ne.arrow?.centerOffset!==0;return Qa.useMemo(()=>({positionerStyles:xt,arrowStyles:Ai,arrowRef:de,arrowUncentered:sn,side:ds,align:Wa,physicalSide:Xe,anchorHidden:kr,refs:le,context:ge,isPositioned:Ue,update:Fe}),[xt,Ai,de,sn,ds,Wa,Xe,kr,le,ge,Ue,Fe])}function B$(e){return e!=null&&"current"in e}function bA(e){return e==="starting"?uJ:io}function z$(e,t,{styles:r,transitionStatus:o,props:n,refs:i,hidden:s,inert:l=!1}){let c={...r};return l&&(c.pointerEvents="none"),Qt("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:c},bA(o),n],stateAttributesMapping:V0})}var H$=a(_e(),1);var Y7=H$.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}=Cv({disabled:i,focusableWhenDisabled:s,native:l});return Qt("button",t,{state:{disabled:i},ref:[r,f],props:[u,d]})});var Nm={};Yr(Nm,{Panel:()=>K$,Root:()=>W$,Trigger:()=>Y$});var fC=a(_e(),1);var yA={...OQ,...xm};var U$=a(E(),1),W$=fC.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=RQ({open:c,defaultOpen:i,onOpenChange:f,disabled:s}),h=fC.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),g=fC.useMemo(()=>({...m,onOpenChange:f,state:h}),[m,f,h]),v=Qt("div",t,{state:h,ref:r,props:d,stateAttributesMapping:yA});return(0,U$.jsx)(K8.Provider,{value:g,children:v})});var G$=a(_e(),1);var S4e={...IQ,...xm},Y$=G$.forwardRef(function(t,r){let{panelId:o,open:n,handleTrigger:i,state:s,disabled:l}=U2(),{className:c,disabled:u=l,render:d,nativeButton:f=!0,style:m,...h}=t,{getButtonProps:g,buttonRef:v}=Cv({disabled:u,focusableWhenDisabled:!0,native:f});return Qt("button",t,{state:s,ref:[r,v],props:[{"aria-controls":n?o:void 0,"aria-expanded":n,onClick:i},h,g],stateAttributesMapping:S4e})});var q$=a(_e(),1);var q7=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var K$=q$.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}=U2(),w=n??!1,S=i??!1;Re(()=>{if(l)return v(l),()=>{v(void 0)}},[l,v]);let{height:x,props:C,ref:I,shouldPreventOpenAnimation:k,shouldRender:R,transitionStatus:A,width:P}=UQ({externalRef:r,hiddenUntilFound:w,id:h,keepMounted:S,mounted:d,onOpenChange:f,open:m,setMounted:g,setOpen:b,transitionStatus:y}),T={..._,transitionStatus:A},M=D2(c,T),B=Qt("div",{...t,style:void 0},{state:T,ref:I,props:[C,{style:{[q7.collapsiblePanelHeight]:x===void 0?"auto":`${x}px`,[q7.collapsiblePanelWidth]:P===void 0?"auto":`${P}px`}},u,M?{style:M}:void 0,k?{style:{animationName:"none"}}:void 0],stateAttributesMapping:yA});return R?B:null});var Z$=a(_e(),1);function X$(e={}){let{highlightItemOnHover:t,highlightedIndex:r,onHighlightedIndexChange:o}=Q2(),{ref:n,index:i}=W2(e),s=r===i,l=Z$.useRef(null),c=Ef(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 Bi=a(_e(),1),ree=a(Vu(),1);var Q$=a(_e(),1);function J$(e){let[t,r]=Q$.useState({current:e,previous:null});return e!==t.current&&r({current:e,previous:t.current}),t.previous}var U0=a(_e(),1);function H0(e){let t=Un(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=wo(e),i=n?e.offsetWidth:r,s=n?e.offsetHeight:o;return(Rm(r)!==i||Rm(o)!==s)&&(r=i,o=s),{width:r,height:o}}function eee(e){let{popupElement:t,positionerElement:r,content:o,mounted:n,onMeasureLayout:i,onMeasureLayoutComplete:s,side:l,direction:c}=e,u=Tm(t,!0,!1),d=C0(),f=U0.useRef(null),m=U0.useRef(!0),h=U0.useRef(Ec),g=De(i),v=De(s),b=U0.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"}:io},[l,c]);Re(()=>{if(!n){h.current=Ec,m.current=!0,f.current=null;return}if(!t||!r)return;h.current=$$(t,b),K7(t,"auto");let _=_A(t,"position","static"),y=_A(t,"transform","none"),w=_A(t,"scale","1"),S=$$(r,{"--available-width":"max-content","--available-height":"max-content"});function x(){_(),y(),S()}function C(){x(),w()}if(g?.(),m.current||f.current===null){wA(r,"max-content");let A=H0(t);return f.current=A,wA(r,A),C(),v?.(null,A),m.current=!1,()=>{h.current(),h.current=Ec}}wA(r,"max-content");let I=f.current,k=H0(t);f.current=k,K7(t,I),C(),v?.(I,k),wA(r,k);let R=new AbortController;return d.request(()=>{K7(t,k),u(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},R.signal)}),()=>{R.abort(),d.cancel(),h.current(),h.current=Ec}},[o,t,r,u,d,n,g,v,b])}function _A(e,t,r){let o=e.style.getPropertyValue(t);return e.style.setProperty(t,r),()=>{e.style.setProperty(t,o)}}function $$(e,t){let r=[];for(let[o,n]of Object.entries(t))r.push(_A(e,o,n));return r.length?()=>{r.forEach(o=>o())}:Ec}function K7(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 wA(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 W0=a(E(),1);function oee(e){let{store:t,side:r,cssVars:o,children:n}=e,i=wm(),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=J$(c?s:null),g=T4e(l,u),v=Bi.useRef(null),[b,_]=Bi.useState(null),[y,w]=Bi.useState(null),S=Bi.useRef(null),x=Bi.useRef(null),C=Tm(S,!0,!1),I=C0(),[k,R]=Bi.useState(null),[A,P]=Bi.useState(!1);Re(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);let T=De(()=>{S.current?.style.setProperty("animation","none"),S.current?.style.setProperty("transition","none"),x.current?.style.setProperty("display","none")}),M=De(D=>{S.current?.style.removeProperty("animation"),S.current?.style.removeProperty("transition"),x.current?.style.removeProperty("display"),D&&R(D)}),B=Bi.useRef(null);Re(()=>{(!c||!d)&&(B.current=null)},[c,d]),Re(()=>{if(s&&h&&s!==h&&B.current!==s&&v.current){_(v.current),P(!0);let D=C4e(h,s);w(D),I.request(()=>{ree.flushSync(()=>{P(!1)}),C(()=>{_(null),R(null),v.current=null})}),B.current=s}},[s,h,b,C,I]),Re(()=>{let D=S.current;if(!D)return;let O=Ko(D).createElement("div");for(let L of Array.from(D.childNodes))O.appendChild(L.cloneNode(!0));v.current=O});let F=b!=null,V;F?V=(0,W0.jsxs)(Bi.Fragment,{children:[(0,W0.jsx)("div",{"data-previous":!0,inert:vA(!0),ref:x,style:{...k?{[o.popupWidth]:`${k.width}px`,[o.popupHeight]:`${k.height}px`}:null,position:"absolute"},"data-ending-style":A?void 0:""},"previous"),(0,W0.jsx)("div",{"data-current":!0,ref:S,"data-starting-style":A?"":void 0,children:n},g)]}):V=(0,W0.jsx)("div",{"data-current":!0,ref:S,children:n},g),Re(()=>{let D=x.current;!D||!b||D.replaceChildren(...Array.from(b.childNodes))},[b]),eee({popupElement:f,positionerElement:m,mounted:d,content:u,onMeasureLayout:T,onMeasureLayoutComplete:M,side:r,direction:i});let z={activationDirection:x4e(y),transitioning:F};return{children:V,state:z}}function x4e(e){if(e)return`${tee(e.horizontal,5,"right","left")} ${tee(e.vertical,5,"down","up")}`}function tee(e,t,r,o){return e>t?r:e<-t?o:""}function C4e(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 T4e(e,t){let[r,o]=Bi.useState(0),n=Bi.useRef(e),i=Bi.useRef(t),s=Bi.useRef(!1);return Re(()=>{let l=n.current,c=i.current,u=e!==l,d=t!==c;u?(o(f=>f+1),s.current=!d):s.current&&d&&(o(f=>f+1),s.current=!1),n.current=e,i.current=t},[e,t]),`${e??"current"}-${r}`}function nee(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}var SA=a(_e(),1),E4e=SA.createContext(void 0),P4e={disableStyleElements:!1};function iee(){return SA.useContext(E4e)??P4e}var aee=a(_e(),1);var G0=a(_e(),1);var xA="data-composite-item-active";var k4e=[];function see(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=k4e}=e,[h,g]=G0.useState(0),v=o!=null,b=G0.useRef(null),_=Ef(b,c),y=G0.useRef([]),w=G0.useRef(!1),S=s??h,x=De((A,P=!1)=>{if((l??g)(A),P){let T=y.current[A];G7(b.current,T,i,r)}}),C=De(A=>{if(A.size===0||w.current)return;w.current=!0;let P=Array.from(A.keys()),T=P.find(B=>B?.hasAttribute(xA))??null,M=T?P.indexOf(T):-1;if(M!==-1)x(M);else if(rC(P,S,f)){let B=kv(P,{disabledIndices:f});tC(P,B)||x(B)}G7(b.current,T,i,r)});Re(()=>{if(f==null||s!=null||!w.current)return;let A=y.current;if(rC(A,S,f)){let P=kv(A,{disabledIndices:f});tC(A,P)||x(P)}},[f,s,S,y,x]);let I=De((A,P,T)=>n?n(A,P,T,y):T),k=De(A=>{let P=u?O$:U7;if(!P.has(A.key)||R4e(A,m)||!b.current)return;let M=i==="rtl",B=M?aC:lC,F={horizontal:B,vertical:z0,both:B}[r],V=M?lC:aC,z={horizontal:V,vertical:j0,both:V}[r],D=Wn(A.nativeEvent);if(D!=null&&W7(D)&&!nee(D)){let ue=D.selectionStart,te=D.selectionEnd,de=D.value??"";if(ue==null||A.shiftKey||ue!==te||A.key!==z&&ue<de.length||A.key!==F&&ue>0)return}let O=S,L=d7(y,f),W=f7(y,f);o!=null&&(O=o({disabledIndices:f,elementsRef:y,event:A,highlightedIndex:S,loopFocus:t,maxIndex:W,minIndex:L,onLoop:I,orientation:r,rtl:M}));let q={horizontal:[B],vertical:[z0],both:[B,z0]}[r],Z={horizontal:[V],vertical:[j0],both:[V,j0]}[r],Q=v?P:{horizontal:u?A$:z7,vertical:u?I$:H7,both:P}[r];u&&(A.key===cC?O=L:A.key===uC&&(O=W)),O===S&&(q.includes(A.key)||Z.includes(A.key))&&(t&&O===W&&q.includes(A.key)?(O=L,n&&(O=n(A,S,O,y))):t&&O===L&&Z.includes(A.key)?(O=W,n&&(O=n(A,S,O,y))):O=kv(y.current,{startingIndex:O,decrement:Z.includes(A.key),disabledIndices:f})),O!==S&&!tC(y.current,O)&&(d&&A.stopPropagation(),Q.has(A.key)&&A.preventDefault(),x(O,!0),queueMicrotask(()=>{y.current[O]?.focus()}))});return{props:{ref:_,onFocus(A){let P=b.current,T=Wn(A.nativeEvent);!P||T==null||!W7(T)||T.setSelectionRange(0,T.value.length??0)},onKeyDown:k},highlightedIndex:S,onHighlightedIndexChange:x,elementsRef:y,disabledIndices:f,onMapChange:C,relayKeyboardEvent:k}}function R4e(e,t){for(let r of N$.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}var Z7=a(E(),1);function lee(e){let{render:t,className:r,style:o,refs:n=z1,props:i=z1,state:s=io,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,I=wm(),{props:k,highlightedIndex:R,onHighlightedIndexChange:A,elementsRef:P,onMapChange:T,relayKeyboardEvent:M}=see({grid:f,loopFocus:m,onLoop:h,orientation:d,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:_,stopEventPropagation:b,enableHomeAndEndKeys:g,direction:I,disabledIndices:y,modifierKeys:w}),B=Qt(x,e,{state:s,ref:n,props:[k,...i,C],stateAttributesMapping:l}),F=aee.useMemo(()=>({highlightedIndex:R,onHighlightedIndexChange:A,highlightItemOnHover:S,relayKeyboardEvent:M}),[R,A,S,M]);return(0,Z7.jsx)(X8.Provider,{value:F,children:(0,Z7.jsx)(M2,{elementsRef:P,onMapChange:V=>{v?.(V),T(V)},children:B})})}var CA=a(_e(),1),cee=a(Vu(),1);var uee=a(E(),1),dee=CA.forwardRef(function(t,r){let{children:o,container:n,className:i,render:s,style:l,...c}=t,{portalNode:u,portalSubtree:d}=p7({container:n,ref:r,componentProps:t,elementProps:c});return!d&&!u?null:(0,uee.jsxs)(CA.Fragment,{children:[d,u&&cee.createPortal(o,u)]})});var fee=a(nC(),1);function A4e(){return Ec}function I4e(){return!1}function O4e(){return!0}function pee(){return(0,fee.useSyncExternalStore)(A4e,I4e,O4e)}var Dc={};Yr(Dc,{Indicator:()=>yee,List:()=>See,Panel:()=>_ee,Root:()=>gee,Tab:()=>vee});var Zo=a(_e(),1);var TA=a(_e(),1),X7=TA.createContext(void 0);function Mm(){let e=TA.useContext(X7);if(e===void 0)throw new Error(No(64));return e}var mee=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});var Hu={tabActivationDirection:e=>({[mee.activationDirection]:e})};var Q7=a(E(),1),gee=Zo.forwardRef(function(t,r){let{className:o,defaultValue:n=0,onValueChange:i,orientation:s="horizontal",render:l,value:c,style:u,...d}=t,f=t.defaultValue!==void 0,m=Zo.useRef([]),[h,g]=Zo.useState(()=>new Map),[v,b]=O2({controlled:c,default:n,name:"Tabs",state:"value"}),_=c!==void 0,[y,w]=Zo.useState(()=>new Map),S=Zo.useRef(void 0),x=Zo.useCallback($=>{if($===void 0)return null;for(let[ee,fe]of y.entries())if(fe!=null&&$===(fe.value??fe.index))return ee;return null},[y]),[C,I]=Zo.useState(()=>({previousValue:v,tabActivationDirection:"none"})),{previousValue:k,tabActivationDirection:R}=C,A=R,P=!1;k!==v&&(A=hee(k,v,s,y),P=k!=null&&v!=null&&x(v)==null);let T=P?k:v,M=k!==T||R!==A;Re(()=>{M&&I({previousValue:T,tabActivationDirection:A})},[T,M,A]);let B=De(($,ee)=>{let fe=hee(v,$,s,y);ee.activationDirection=fe,i?.($,ee),!ee.isCanceled&&b($)}),F=De(($,ee)=>{i?.($,Ct(ee,void 0,void 0,{activationDirection:"none"}))}),V=De(($,ee)=>{g(fe=>{if(fe.get($)===ee)return fe;let ve=new Map(fe);return ve.set($,ee),ve})}),z=De(($,ee)=>{g(fe=>{if(!fe.has($)||fe.get($)!==ee)return fe;let ve=new Map(fe);return ve.delete($),ve})}),D=Zo.useCallback($=>h.get($),[h]),O=Zo.useCallback($=>{for(let ee of y.values())if($===ee?.value)return ee?.id},[y]),L=Zo.useMemo(()=>({getTabElementBySelectedValue:x,getTabIdByPanelValue:O,getTabPanelIdByValue:D,onValueChange:B,orientation:s,registerMountedTabPanel:V,setTabMap:w,unregisterMountedTabPanel:z,tabActivationDirection:A,value:v}),[x,O,D,B,s,V,w,z,A,v]),W=Zo.useMemo(()=>{for(let $ of y.values())if($!=null&&$.value===v)return $},[y,v]),q=Zo.useMemo(()=>{for(let $ of y.values())if($!=null&&!$.disabled)return $.value},[y]),Z=Zo.useRef(!f),Q=Zo.useRef(n),ue=Zo.useRef(f),te=Zo.useRef(!1);Re(()=>{if(_)return;function $(we,oe){b(we),I(re=>re.previousValue===we&&re.tabActivationDirection==="none"?re:{previousValue:we,tabActivationDirection:"none"}),F(we,oe),Z.current=!1}if(y.size===0){te.current&&v!==null&&!S.current?.isConnected&&$(null,Ke.missing);return}te.current=!0,S.current=y.keys().next().value;let ee=W?.disabled,fe=W==null&&v!==null;if(!ee&&v===Q.current&&(ue.current=!1),ue.current&&ee&&v===Q.current)return;let ve=Z.current;if(ee||fe){let we=q??null;if(v===we){Z.current=!1;return}let oe=Ke.missing;ve?oe=Ke.initial:ee&&(oe=Ke.disabled),$(we,oe);return}ve&&W!=null&&(F(v,Ke.initial),Z.current=!1)},[q,_,F,W,b,y,v]);let pe=Qt("div",t,{state:{orientation:s,tabActivationDirection:A},ref:r,props:d,stateAttributesMapping:Hu});return(0,Q7.jsx)(X7.Provider,{value:L,children:(0,Q7.jsx)(M2,{elementsRef:m,children:pe})})});function hee(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 If=a(_e(),1);var EA=a(_e(),1),J7=EA.createContext(void 0);function PA(){let e=EA.useContext(J7);if(e===void 0)throw new Error(No(65));return e}var vee=If.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}=Mm(),{activateOnFocus:v,highlightedTabIndex:b,onTabActivation:_,registerTabResizeObserverElement:y,setHighlightedTabIndex:w,tabsListElement:S}=PA(),x=Sm(l),C=If.useMemo(()=>({disabled:n,id:x,value:s}),[n,x,s]),{compositeProps:I,compositeRef:k,index:R}=X$({metadata:C}),A=s===f,P=If.useRef(!1),T=If.useRef(null);Re(()=>{let Z=T.current;if(Z)return y(Z)},[y]),Re(()=>{if(P.current){P.current=!1;return}if(!(A&&R>-1&&b!==R))return;let Z=S;if(Z!=null){let Q=A0(Ko(Z));if(Q&&tr(Z,Q))return}n||w(R)},[A,R,b,w,n,S]);let{getButtonProps:M,buttonRef:B}=Cv({disabled:n,native:c,focusableWhenDisabled:!0}),F=m(s),V=If.useRef(!1),z=If.useRef(!1);function D(Z){A||n||_(s,Ct(Ke.none,Z.nativeEvent,void 0,{activationDirection:"none"}))}function O(Z){A||(R>-1&&!n&&w(R),!n&&v&&(!V.current||V.current&&z.current)&&_(s,Ct(Ke.none,Z.nativeEvent,void 0,{activationDirection:"none"})))}function L(Z){if(A||n)return;V.current=!0;function Q(){V.current=!1,z.current=!1}(!Z.button||Z.button===0)&&(z.current=!0,Ko(Z.currentTarget).addEventListener("pointerup",Q,{once:!0}))}return Qt("button",t,{state:{disabled:n,active:A,orientation:h,tabActivationDirection:g},ref:[r,B,k,T],props:[I,{role:"tab","aria-controls":F,"aria-selected":A,id:x,onClick:D,onFocus:O,onPointerDown:L,[xA]:A?"":void 0,onKeyDownCapture(){P.current=!0}},d,M],stateAttributesMapping:Hu})});var Y0=a(_e(),1);var bee='!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 Ov=(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 kA=a(E(),1),N4e={...Hu,activeTabPosition:()=>null,activeTabSize:()=>null},yee=Y0.forwardRef(function(t,r){let{className:o,render:n,renderBeforeHydration:i=!1,style:s,...l}=t,{nonce:c}=iee(),{getTabElementBySelectedValue:u,orientation:d,tabActivationDirection:f,value:m}=Mm(),{tabsListElement:h,registerIndicatorUpdateListener:g}=PA(),v=pee(),b=a$();Y0.useEffect(()=>g(b),[g,b]);let _=0,y=0,w=0,S=0,x=0,C=0,I=!1;if(m!=null&&h!=null){let B=u(m);if(B!=null){I=!0;let{width:F,height:V}=H0(B),{width:z,height:D}=H0(h),O=B.getBoundingClientRect(),L=h.getBoundingClientRect(),W=z>0?L.width/z:1,q=D>0?L.height/D:1;if(Math.abs(W)>Number.EPSILON&&Math.abs(q)>Number.EPSILON){let Q=O.left-L.left,ue=O.top-L.top;_=Q/W+h.scrollLeft-h.clientLeft,w=ue/q+h.scrollTop-h.clientTop}else _=B.offsetLeft,w=B.offsetTop;x=F,C=V,y=h.scrollWidth-_-x,S=h.scrollHeight-w-C}}let k=I?{left:_,right:y,top:w,bottom:S}:null,R=I?{width:x,height:C}:null,A=I?{[Ov.activeTabLeft]:`${_}px`,[Ov.activeTabRight]:`${y}px`,[Ov.activeTabTop]:`${w}px`,[Ov.activeTabBottom]:`${S}px`,[Ov.activeTabWidth]:`${x}px`,[Ov.activeTabHeight]:`${C}px`}:void 0,P=I&&x>0&&C>0,M=Qt("span",t,{state:{orientation:d,activeTabPosition:k,activeTabSize:R,tabActivationDirection:f},ref:r,props:[{role:"presentation",style:A,hidden:!P},l,{suppressHydrationWarning:!0}],stateAttributesMapping:N4e});return m==null?null:(0,kA.jsxs)(Y0.Fragment,{children:[M,v&&i&&(0,kA.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:bee},suppressHydrationWarning:!0})]})});var q0=a(_e(),1);var wee=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=Ka.startingStyle]="startingStyle",e[e.endingStyle=Ka.endingStyle]="endingStyle",e})({});var M4e={...Hu,...xm},_ee=q0.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}=Mm(),v=Sm(),b=q0.useMemo(()=>({id:v,value:n}),[v,n]),{ref:_,index:y}=W2({metadata:b}),w=n===u,{mounted:S,transitionStatus:x,setMounted:C}=T0(w),I=!S,k=d(n),R={hidden:I,orientation:f,tabActivationDirection:m,transitionStatus:x},A=q0.useRef(null),P=Qt("div",t,{state:R,ref:[r,_,A],props:[{"aria-labelledby":k,hidden:I,id:v,role:"tabpanel",tabIndex:w?0:-1,inert:vA(!w),[wee.index]:y},c],stateAttributesMapping:M4e});return Em({open:w,ref:A,onComplete(){w||C(!1)}}),Re(()=>{if(!(I&&!s)&&v!=null)return h(n,v),()=>{g(n,v)}},[I,s,n,v,h,g]),s||S?P:null});var Fc=a(_e(),1);var $7=a(E(),1),See=Fc.forwardRef(function(t,r){let{activateOnFocus:o=!1,className:n,loopFocus:i=!0,render:s,style:l,...c}=t,{onValueChange:u,orientation:d,value:f,setTabMap:m,tabActivationDirection:h}=Mm(),[g,v]=Fc.useState(0),[b,_]=Fc.useState(null),y=Fc.useRef(new Set),w=Fc.useRef(new Set),S=Fc.useRef(null);Re(()=>{if(typeof ResizeObserver>"u")return;let P=new ResizeObserver(()=>{y.current.forEach(T=>{T()})});return S.current=P,b&&P.observe(b),w.current.forEach(T=>{P.observe(T)}),()=>{P.disconnect(),S.current=null}},[b]);let x=De(P=>(y.current.add(P),()=>{y.current.delete(P)})),C=De(P=>(w.current.add(P),S.current?.observe(P),()=>{w.current.delete(P),S.current?.unobserve(P)})),I=De((P,T)=>{P!==f&&u(P,T)}),k={orientation:d,tabActivationDirection:h},R={"aria-orientation":d==="vertical"?"vertical":void 0,role:"tablist"},A=Fc.useMemo(()=>({activateOnFocus:o,highlightedTabIndex:g,registerIndicatorUpdateListener:x,registerTabResizeObserverElement:C,onTabActivation:I,setHighlightedTabIndex:v,tabsListElement:b}),[o,g,x,C,I,v,b]);return(0,$7.jsx)(J7.Provider,{value:A,children:(0,$7.jsx)(lee,{render:s,className:n,style:l,state:k,refs:[r,_],props:[R,c],stateAttributesMapping:Hu,highlightedIndex:g,enableHomeAndEndKeys:!0,loopFocus:i,orientation:d,onHighlightedIndexChange:v,onMapChange:m,disabledIndices:z1})})});var ca={};Yr(ca,{Arrow:()=>Bee,Handle:()=>pC,Popup:()=>Dee,Portal:()=>Oee,Positioner:()=>Mee,Provider:()=>Vee,Root:()=>Cee,Trigger:()=>Ree,Viewport:()=>Hee,createHandle:()=>Uee});var Uu=a(_e(),1);var RA=a(_e(),1),e9=RA.createContext(void 0);function Il(e){let t=RA.useContext(e9);if(t===void 0&&!e)throw new Error(No(72));return t}var xee=a(_e(),1);var F4e={...C$,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)},K0=class e extends F0{constructor(t,r,o=!1){let n=new Im,i={...D4e(),...t};i.floatingRootContext=S$(n,r,o),super(i,{popupRef:xee.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},F4e)}setOpen=(t,r)=>{p$(this,t,r,{extraState:{openChangeReason:r.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,Ct(Ke.triggerPress,t))}static useStore(t,r){return f$(t,(n,i)=>new e(r,n,i)).store}};function D4e(){return{..._$(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var AA=a(E(),1),Cee=R7(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=K0.useStore(d?.store,{open:o,openProp:n,activeTriggerId:m,triggerIdProp:f});m$(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),g$(g,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:S,transitionStatus:x}=v$(b,g),C=g.useState("isInstantPhase"),I=g.useState("instantType"),k=g.useState("lastOpenChangeReason"),R=Uu.useRef(null);Re(()=>{v&&r&&g.setOpen(!1,Ct(Ke.disabled))},[v,r,g]),Re(()=>{x==="ending"&&k===Ke.none||x!=="ending"&&C?(I!=="delay"&&(R.current=I),g.set("instantType","delay")):R.current!==null&&(g.set("instantType",R.current),R.current=null)},[x,C,k,I,g]),Re(()=>{b&&_==null&&g.set("payload",void 0)},[g,_,b]);let A=Uu.useCallback(()=>{g.setOpen(!1,Ct(Ke.imperativeAction))},[g]);Uu.useImperativeHandle(l,()=>({unmount:S,close:A}),[S,A]);let P=b||y||!r&&s!=="none";return(0,AA.jsxs)(e9.Provider,{value:g,children:[P&&(0,AA.jsx)(L4e,{store:g,disabled:r,trackCursorAxis:s}),typeof h=="function"?h({payload:w}):h]})});function L4e({store:e,disabled:t,trackCursorAxis:r}){let o=e.useState("floatingRootContext"),n=h7(o,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),i=m7(o,{enabled:!t&&r!=="none",axis:r==="none"?void 0:r}),s=Uu.useMemo(()=>hr(i.reference,n.reference),[i.reference,n.reference]),l=Uu.useMemo(()=>hr(i.trigger,n.trigger),[i.trigger,n.trigger]),c=Uu.useMemo(()=>hr(d$,i.floating,n.floating),[i.floating,n.floating]);return b$(e,{activeTriggerProps:s,inactiveTriggerProps:l,popupProps:c}),null}var OA=a(_e(),1);var IA=a(_e(),1),t9=IA.createContext(void 0);function Tee(){return IA.useContext(t9)}var Eee=(function(e){return e[e.popupOpen=sC.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});var kee="data-base-ui-tooltip-trigger";function Pee(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 B4e(e){let t=e;for(;t;){if(t.hasAttribute(kee))return t;let r=t.parentElement;if(r){t=r;continue}let o=t.getRootNode();t="host"in o&<(o.host)?o.host:null}return null}var Ree=n$(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=Il(!0),v=s?.store??g;if(!v)throw new Error(No(82));let b=Sm(m),_=v.useState("isTriggerActive",b),y=v.useState("isOpenedByTrigger",b),w=v.useState("floatingRootContext"),S=OA.useRef(null),x=u??600,C=f??0,{registerTrigger:I,isMountedByThisTrigger:k}=h$(b,S,v,{payload:l,closeOnClick:d,closeDelay:C}),R=Tee(),{delayRef:A,isInstantPhase:P,hasProvider:T}=u7(w,{open:y}),M=B0(w);v.useSyncedValue("isInstantPhase",P);let B=v.useState("disabled"),F=c??B,V=Fi(F),z=v.useState("trackCursorAxis"),D=v.useState("disableHoverablePopup"),O=OA.useRef(!1),L=Ac(),W=OA.useRef(void 0);function q(){let ve=R?.delay,we=typeof A.current=="object"?A.current.open:void 0,oe=x;return T&&(we!==0?oe=u??ve??x:oe=0),oe}function Z(ve){let we=S.current;if(!we||!ve)return!1;let oe=B4e(ve);return oe!==null&&oe!==we&&tr(we,oe)}function Q(ve){let we=Z(ve);return O.current=we,we&&(M.openChangeTimeout.clear(),M.restTimeout.clear(),M.restTimeoutPending=!1,L.clear()),we}let ue=B7(w,{enabled:!F,mouseOnly:!0,move:!1,handleClose:!D&&z!=="both"?V7():null,restMs:q,delay(){let ve=typeof A.current=="object"?A.current.close:void 0,we=C;return f==null&&T&&(we=ve),{close:we}},triggerElementRef:S,isActiveTrigger:_,isClosing:()=>v.select("transitionStatus")==="ending",shouldOpen(){return!O.current}}),te=M7(w,{enabled:!F}).reference,de=ve=>{let we=O.current,oe=Pee(ve),re=Q(oe),ce=S.current,ie=ce&&oe&&tr(ce,oe);if(re&&v.select("open")&&v.select("lastOpenChangeReason")===Ke.triggerHover){v.setOpen(!1,Ct(Ke.triggerHover,ve));return}if(we&&!re&&ie&&!V.current&&!v.select("open")&&ce&&kf(W.current)){let le=()=>{!O.current&&!V.current&&!v.select("open")&&v.setOpen(!0,Ct(Ke.triggerHover,ve,ce))},Oe=q();Oe===0?(L.clear(),le()):L.start(Oe,le)}},pe=v.useState("triggerProps",k);return Qt("button",t,{state:{open:y},ref:[r,I,S],props:[ue,te,k||z!=="none"?pe:void 0,{onMouseOver(ve){de(ve.nativeEvent)},onFocus(ve){Z(Pee(ve.nativeEvent))&&ve.preventBaseUIHandler()},onMouseLeave(){O.current=!1,L.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,[Eee.triggerDisabled]:F?"":void 0,[kee]:F?void 0:""},h],stateAttributesMapping:k$})});var Iee=a(_e(),1);var NA=a(_e(),1),r9=NA.createContext(void 0);function Aee(){let e=NA.useContext(r9);if(e===void 0)throw new Error(No(70));return e}var o9=a(E(),1),Oee=Iee.forwardRef(function(t,r){let{keepMounted:o=!1,...n}=t;return Il().useState("mounted")||o?(0,o9.jsx)(r9.Provider,{value:o,children:(0,o9.jsx)(dee,{ref:r,...n})}):null});var FA=a(_e(),1);var MA=a(_e(),1),n9=MA.createContext(void 0);function Z0(){let e=MA.useContext(n9);if(e===void 0)throw new Error(No(71));return e}var Nee=a(E(),1),Mee=FA.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=dJ,style:_,...y}=t,w=Il(),S=Aee(),x=w.useState("open"),C=w.useState("mounted"),I=w.useState("trackCursorAxis"),k=w.useState("disableHoverablePopup"),R=w.useState("floatingRootContext"),A=w.useState("instantType"),P=w.useState("transitionStatus"),T=w.useState("hasViewport"),M=j$({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?D$:void 0}),B=FA.useMemo(()=>({open:x,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:I!=="none"?"tracking-cursor":A}),[x,M.side,M.align,M.anchorHidden,I,A]),F=z$(t,B,{styles:M.positionerStyles,transitionStatus:P,props:y,refs:[r,w.useStateSetter("positionerElement")],hidden:!C,inert:!x||I==="both"||k});return(0,Nee.jsx)(n9.Provider,{value:M,children:F})});var Fee=a(_e(),1);var V4e={...V0,...xm},Dee=Fee.forwardRef(function(t,r){let{render:o,className:n,style:i,...s}=t,l=Il(),{side:c,align:u}=Z0(),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");Em({open:d,ref:l.context.popupRef,onComplete(){d&&l.context.onOpenChangeComplete?.(!0)}}),L7(g,{enabled:!v,closeDelay:b});let _=l.useStateSetter("popupElement");return Qt("div",t,{state:{open:d,side:c,align:u,instant:f,transitionStatus:m},ref:[r,l.context.popupRef,_],props:[h,bA(m),s],stateAttributesMapping:V4e})});var Lee=a(_e(),1);var Bee=Lee.forwardRef(function(t,r){let{render:o,className:n,style:i,...s}=t,l=Il(),{arrowRef:c,side:u,align:d,arrowUncentered:f,arrowStyles:m}=Z0(),h=l.useState("open"),g=l.useState("instantType");return Qt("div",t,{state:{open:h,side:u,align:d,uncentered:f,instant:g},ref:[r,c],props:[{style:m,"aria-hidden":!0},s],stateAttributesMapping:V0})});var i9=a(_e(),1);var s9=a(E(),1),Vee=function(t){let{delay:r,closeDelay:o,timeout:n=400}=t,i=i9.useMemo(()=>({delay:r,closeDelay:o}),[r,o]),s=i9.useMemo(()=>({open:r,close:o}),[r,o]);return(0,s9.jsx)(t9.Provider,{value:i,children:(0,s9.jsx)(c7,{delay:s,timeoutMs:n,children:t.children})})};var zee=a(_e(),1);var jee=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});var j4e={activationDirection:e=>e?{"data-activation-direction":e}:null},Hee=zee.forwardRef(function(t,r){let{render:o,className:n,style:i,children:s,...l}=t,c=Il(),u=Z0(),d=c.useState("instantType"),{children:f,state:m}=oee({store:c,side:u.side,cssVars:jee,children:s}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:d};return Qt("div",t,{state:h,ref:r,props:[l,{children:f}],stateAttributesMapping:j4e})});var pC=class{constructor(){this.store=new K0}open(t){let r=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!r)throw new Error(No(81,t));this.store.setOpen(!0,Ct(Ke.imperativeAction,void 0,r))}close(){this.store.setOpen(!1,Ct(Ke.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Uee(){return new pC}function dn(e){return Qt(e.defaultTagName??"div",e,e)}var Yee=a(U(),1),a9="data-wp-hash";function l9(){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 z4e(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${a9}]`))if(r.getAttribute(a9)===t)return!0;return!1}function qee(e,t,r){if(!e.head)return;let o=l9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(z4e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(a9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function H4e(e){let t=l9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)qee(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function Kee(e,t){let r=l9();r.styles.set(e,t);for(let o of r.documents.keys())qee(o,e,t)}typeof process>"u",Kee("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 Wee={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",Kee("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 Gee={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},ws=(0,Yee.forwardRef)(function({variant:t="body-md",render:r,className:o,...n},i){return dn({render:r,defaultTagName:"span",ref:i,props:hr(n,{className:J(Wee.text,Gee.heading,Gee.p,Wee[t],o)})})});var Jee=a(E(),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"&&W4e(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 Qee(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 W4e(e){let t=u9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Qee(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=u9();r.styles.set(e,t);for(let o of r.documents.keys())Qee(o,e,t)}typeof process>"u",G4e("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 Zee={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"},mC=(0,Xee.forwardRef)(function({intent:t="none",className:r,...o},n){return(0,Jee.jsx)(ws,{ref:n,className:J(Zee.badge,Zee[`is-${t}-intent`],r),...o,variant:"body-sm"})});var $ee=a(na(),1),DA=a(U(),1),ete=a(j(),1),rte=a(E(),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"&&q4e(document)),e.__wpStyleRuntime}function Y4e(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 tte(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(Y4e(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 q4e(e){let t=f9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)tte(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 LA(e,t){let r=f9();r.styles.set(e,t);for(let o of r.documents.keys())tte(o,e,t)}typeof process>"u",LA("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 hC={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",LA("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",LA("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 Z4e={"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",LA("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 X4e={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},ote=(0,DA.forwardRef)(function({tone:t="brand",variant:r="solid",size:o="default",className:n,focusableWhenDisabled:i=!0,disabled:s,loading:l,loadingAnnouncement:c=(0,ete.__)("Loading"),children:u,...d},f){let m=J(X4e.button,K4e["box-sizing"],Z4e["outset-ring--focus-except-active"],r!=="unstyled"&&hC.button,hC[`is-${t}`],hC[`is-${r}`],hC[`is-${o}`],l&&hC["is-loading"],n);return(0,DA.useEffect)(()=>{l&&c&&(0,$ee.speak)(c)},[l,c]),(0,rte.jsx)(Y7,{ref:f,className:m,focusableWhenDisabled:i,disabled:s??l,...d,children:u})});var ate=a(U(),1);var nte=a(U(),1),ite=a(Se(),1),ste=a(E(),1),Of=(0,nte.forwardRef)(function({icon:t,size:r=24,...o},n){return(0,ste.jsx)(ite.SVG,{ref:n,...t.props,...o,width:r,height:r})});var cte=a(E(),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"&&J4e(document)),e.__wpStyleRuntime}function Q4e(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 lte(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(Q4e(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 J4e(e){let t=m9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)lte(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 $4e(e,t){let r=m9();r.styles.set(e,t);for(let o of r.documents.keys())lte(o,e,t)}typeof process>"u",$4e("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 eBe={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"},h9=(0,ate.forwardRef)(function({className:t,icon:r,...o},n){return(0,cte.jsx)(Of,{ref:n,icon:r,className:J(eBe.icon,t),size:24,...o})});h9.displayName="Button.Icon";var ute=Object.assign(ote,{Icon:h9});var Wu={};Yr(Wu,{Content:()=>jA,FullBleed:()=>wte,Header:()=>VA,Root:()=>BA,Title:()=>Ste});var dte=a(U(),1),g9="data-wp-hash";function v9(){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[${g9}]`))if(r.getAttribute(g9)===t)return!0;return!1}function fte(e,t,r){if(!e.head)return;let o=v9(),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(g9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function rBe(e){let t=v9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)fte(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 pte(e,t){let r=v9();r.styles.set(e,t);for(let o of r.documents.keys())fte(o,e,t)}typeof process>"u",pte("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var oBe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",pte("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 nBe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},BA=(0,dte.forwardRef)(function({render:t,...r},o){let n=J(nBe.root,oBe["box-sizing"]);return dn({defaultTagName:"div",render:t,ref:o,props:hr({className:n},r)})});var mte=a(U(),1),b9="data-wp-hash";function y9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&sBe(document)),e.__wpStyleRuntime}function iBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${b9}]`))if(r.getAttribute(b9)===t)return!0;return!1}function hte(e,t,r){if(!e.head)return;let o=y9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(iBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(b9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function sBe(e){let t=y9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)hte(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 aBe(e,t){let r=y9();r.styles.set(e,t);for(let o of r.documents.keys())hte(o,e,t)}typeof process>"u",aBe("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 lBe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},VA=(0,mte.forwardRef)(function({render:t,...r},o){return dn({defaultTagName:"div",render:t,ref:o,props:hr({className:lBe.header},r)})});var gte=a(U(),1),w9="data-wp-hash";function _9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&uBe(document)),e.__wpStyleRuntime}function cBe(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 vte(e,t,r){if(!e.head)return;let o=_9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(cBe(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 uBe(e){let t=_9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)vte(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 dBe(e,t){let r=_9();r.styles.set(e,t);for(let o of r.documents.keys())vte(o,e,t)}typeof process>"u",dBe("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 fBe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},jA=(0,gte.forwardRef)(function({render:t,...r},o){return dn({defaultTagName:"div",render:t,ref:o,props:hr({className:fBe.content},r)})});var bte=a(U(),1),S9="data-wp-hash";function x9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&mBe(document)),e.__wpStyleRuntime}function pBe(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 yte(e,t,r){if(!e.head)return;let o=x9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(pBe(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 mBe(e){let t=x9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)yte(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=x9();r.styles.set(e,t);for(let o of r.documents.keys())yte(o,e,t)}typeof process>"u",hBe("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 gBe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},wte=(0,bte.forwardRef)(function({render:t,...r},o){return dn({defaultTagName:"div",render:t,ref:o,props:hr({className:gBe.fullbleed},r)})});var _te=a(U(),1);var C9=a(E(),1),vBe=(0,C9.jsx)("div",{}),Ste=(0,_te.forwardRef)(function({render:t=vBe,children:r,...o},n){return(0,C9.jsx)(ws,{ref:n,variant:"heading-lg",render:t,...o,children:r})});var xte=a(U(),1),Cte=a(E(),1),T9=(0,xte.forwardRef)(function(t,r){return(0,Cte.jsx)(Nm.Panel,{ref:r,...t})});var Tte=a(U(),1),Ete=a(E(),1),E9=(0,Tte.forwardRef)(function(t,r){return(0,Ete.jsx)(Nm.Root,{ref:r,...t})});var Pte=a(U(),1),kte=a(E(),1),P9=(0,Pte.forwardRef)(function(t,r){return(0,kte.jsx)(Nm.Trigger,{ref:r,...t})});var Nv={};Yr(Nv,{Content:()=>Vte,Header:()=>Mte,HeaderDescription:()=>Dte,Root:()=>Ate});var Rte=a(U(),1);var R9=a(E(),1),Ate=(0,Rte.forwardRef)(function({render:t,...r},o){return(0,R9.jsx)(E9,{ref:o,render:(0,R9.jsx)(BA,{render:t}),...r})});var Q0=a(U(),1);var Ite=a(U(),1),zA=(0,Ite.createContext)({setDescriptionId:()=>{}});var Nf=a(E(),1),A9="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"&&yBe(document)),e.__wpStyleRuntime}function bBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${A9}]`))if(r.getAttribute(A9)===t)return!0;return!1}function Nte(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(bBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(A9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function yBe(e){let t=I9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Nte(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function O9(e,t){let r=I9();r.styles.set(e,t);for(let o of r.documents.keys())Nte(o,e,t)}typeof process>"u",O9("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 X0={"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",O9("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 Ote={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",O9("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 wBe={"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"},Mte=(0,Q0.forwardRef)(function({children:t,className:r,render:o,...n},i){let[s,l]=(0,Q0.useState)(),c=(0,Q0.useMemo)(()=>({setDescriptionId:l}),[l]);return dn({defaultTagName:"div",render:o,ref:i,props:hr(n,{className:J(Ote.heading,X0["heading-wrapper"],r),children:(0,Nf.jsx)(zA.Provider,{value:c,children:(0,Nf.jsxs)(P9,{className:X0.header,render:(0,Nf.jsx)(VA,{}),nativeButton:!1,"aria-describedby":s,children:[(0,Nf.jsx)("div",{className:X0["header-content"],children:t}),(0,Nf.jsx)("div",{className:J(X0["header-trigger-positioner"]),children:(0,Nf.jsx)("div",{className:J(X0["header-trigger-wrapper"],Ote.div,wBe["outset-ring--focus-parent-visible"]),children:(0,Nf.jsx)(Of,{icon:h1,className:X0["header-trigger"]})})})]})})})})});var Fm=a(U(),1);var Fte=a(E(),1),Dte=(0,Fm.forwardRef)(function({children:t,className:r,...o},n){let i=(0,Fm.useId)(),{setDescriptionId:s}=(0,Fm.useContext)(zA);return(0,Fm.useEffect)(()=>(s(i),()=>s(void 0)),[i,s]),(0,Fte.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:r,...o,children:t})});var Lte=a(U(),1);var F9=a(E(),1),M9="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"&&SBe(document)),e.__wpStyleRuntime}function _Be(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${M9}]`))if(r.getAttribute(M9)===t)return!0;return!1}function Bte(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(_Be(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(M9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function SBe(e){let t=D9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Bte(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function xBe(e,t){let r=D9();r.styles.set(e,t);for(let o of r.documents.keys())Bte(o,e,t)}typeof process>"u",xBe("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 N9={"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"},Vte=(0,Lte.forwardRef)(function({className:t,render:r,children:o,hiddenUntilFound:n=!0,...i},s){return(0,F9.jsx)(T9,{ref:s,className:l=>J(N9.content,l.open&&l.transitionStatus==="idle"&&N9["overflow-visible"],t),hiddenUntilFound:n,...i,children:(0,F9.jsx)(jA,{className:N9["content-inner"],render:r,children:o})})});var jte=a(U(),1);function L9(e,t,r){return(0,jte.cloneElement)(e??t,{children:r})}var CBe=a(B9(),1);var Hte=a(yf(),1),{lock:mkt,unlock:Ute}=(0,Hte.__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 TBe(){let e=CBe;if(e.ThemeProvider)return e.ThemeProvider;if(!e.privateApis)throw new Error("@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`.");return Ute(e.privateApis).ThemeProvider}var Wte=TBe();var Gte=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"&&PBe(document)),e.__wpStyleRuntime}function EBe(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 Yte(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(EBe(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 PBe(e){let t=j9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Yte(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=j9();r.styles.set(e,t);for(let o of r.documents.keys())Yte(o,e,t)}typeof process>"u",kBe("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var RBe={stack:"_19ce0419607e1896__stack"},ABe={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},se=(0,Gte.forwardRef)(function({direction:t,gap:r,align:o,justify:n,wrap:i,render:s,...l},c){let u={gap:r&&ABe[r],alignItems:o,justifyContent:n,flexDirection:t,flexWrap:i};return dn({render:s,ref:c,props:hr(l,{style:u,className:RBe.stack})})});var Ze={};Yr(Ze,{Popup:()=>ire,Portal:()=>HA,Positioner:()=>UA,Provider:()=>fre,Root:()=>ure,Trigger:()=>lre});var ore=a(U(),1);var Qte=a(U(),1);var H9="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"&&OBe(document)),e.__wpStyleRuntime}function IBe(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 Kte(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(IBe(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 OBe(e){let t=U9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Kte(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 NBe(e,t){let r=U9();r.styles.set(e,t);for(let o of r.documents.keys())Kte(o,e,t)}typeof process>"u",NBe("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 qte={slot:"_11fc52b637ff8a7e__slot"},Zte="data-wp-compat-overlay-slot";function MBe(){return typeof document>"u"?null:document}function FBe(){let e;try{e=window.top?.wp}catch{}let t=e??window.wp;return typeof t?.components=="object"&&t.components!==null}var Gu=null;function z9(e){return e.setAttribute("aria-hidden","false"),e}function DBe(e){let t=e.createElement("div");return t.setAttribute(Zte,""),qte.slot&&t.classList.add(qte.slot),e.body.appendChild(t),t}function Xte(){if(typeof window>"u"||!FBe()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=MBe();if(!e||!e.body)return;if(Gu&&Gu.ownerDocument===e&&Gu.isConnected)return z9(Gu);let t=e.querySelector(`[${Zte}]`);return t instanceof HTMLDivElement?(Gu=z9(t),Gu):(Gu?.isConnected&&Gu.remove(),Gu=z9(DBe(e)),Gu)}var Jte=a(E(),1),HA=(0,Qte.forwardRef)(function({container:t,...r},o){return(0,Jte.jsx)(ca.Portal,{container:t??Xte(),...r,ref:o})});var $te=a(U(),1),rre=a(E(),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"&&BBe(document)),e.__wpStyleRuntime}function LBe(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 ere(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(LBe(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 BBe(e){let t=G9();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 tre(e,t){let r=G9();r.styles.set(e,t);for(let o of r.documents.keys())ere(o,e,t)}typeof process>"u",tre("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var VBe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",tre("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 jBe={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},UA=(0,$te.forwardRef)(function({align:t="center",className:r,side:o="top",sideOffset:n=4,...i},s){return(0,rre.jsx)(ca.Positioner,{ref:s,align:t,side:o,sideOffset:n,...i,className:J(VBe["box-sizing"],jBe.positioner,r)})});var gC=a(E(),1),Y9="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"&&HBe(document)),e.__wpStyleRuntime}function zBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${Y9}]`))if(r.getAttribute(Y9)===t)return!0;return!1}function nre(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(zBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(Y9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function HBe(e){let t=q9();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 UBe(e,t){let r=q9();r.styles.set(e,t);for(let o of r.documents.keys())nre(o,e,t)}typeof process>"u",UBe("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 WBe={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},GBe={background:"#1e1e1e"},ire=(0,ore.forwardRef)(function({portal:t,positioner:r,children:o,className:n,...i},s){let l=(0,gC.jsx)(Wte,{color:GBe,children:(0,gC.jsx)(ca.Popup,{ref:s,className:J(WBe.popup,n),...i,children:o})}),c=L9(r,(0,gC.jsx)(UA,{}),l);return L9(t,(0,gC.jsx)(HA,{}),c)});var sre=a(U(),1),are=a(E(),1),lre=(0,sre.forwardRef)(function(t,r){return(0,are.jsx)(ca.Trigger,{ref:r,...t})});var cre=a(E(),1);function ure(e){return(0,cre.jsx)(ca.Root,{...e})}var dre=a(E(),1);function fre({...e}){return(0,dre.jsx)(ca.Provider,{...e})}var Dm=a(U(),1);function pre(e){let t=(0,Dm.useRef)(e);t.current=e;let r=(0,Dm.useRef)(null),o=(0,Dm.useRef)(!1),n=(0,Dm.useCallback)(()=>{o.current||(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t.current(),r.current=null},0))},[]);return(0,Dm.useEffect)(()=>(o.current=!1,()=>{o.current=!0,r.current&&clearTimeout(r.current)}),[]),n}var mre=a(U(),1),K9="data-wp-hash";function Z9(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&qBe(document)),e.__wpStyleRuntime}function YBe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${K9}]`))if(r.getAttribute(K9)===t)return!0;return!1}function hre(e,t,r){if(!e.head)return;let o=Z9(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(YBe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(K9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function qBe(e){let t=Z9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)hre(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function KBe(e,t){let r=Z9();r.styles.set(e,t);for(let o of r.documents.keys())hre(o,e,t)}typeof process>"u",KBe("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 ZBe={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},Gt=(0,mre.forwardRef)(function({render:t,...r},o){return dn({render:t,ref:o,props:hr({className:ZBe["visually-hidden"]},r,{"data-visually-hidden":""})})});var gre=a(U(),1),vre=a(j(),1),J0=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"&&QBe(document)),e.__wpStyleRuntime}function XBe(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 bre(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(XBe(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 QBe(e){let t=Q9();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)bre(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 GA(e,t){let r=Q9();r.styles.set(e,t);for(let o of r.documents.keys())bre(o,e,t)}typeof process>"u",GA("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var JBe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",GA("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 $Be={"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",GA("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 WA={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",GA("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var eVe={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},J9=(0,gre.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:hr(l,{className:J(eVe.a,JBe["box-sizing"],$Be["outset-ring--focus-except-active"],r!=="unstyled"&&WA.link,r!=="unstyled"&&WA[`is-${o}`],r==="unstyled"&&WA["is-unstyled"],s),target:n?"_blank":void 0,children:(0,J0.jsxs)(J0.Fragment,{children:[t,n&&(0,J0.jsx)("span",{className:WA["link-icon"],role:"img","aria-label":(0,vre.__)("(opens in a new tab)")})]})})})});var wre=a(U(),1),$9="data-wp-hash";function ej(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&rVe(document)),e.__wpStyleRuntime}function tVe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${$9}]`))if(r.getAttribute($9)===t)return!0;return!1}function _re(e,t,r){if(!e.head)return;let o=ej(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(tVe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute($9,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function rVe(e){let t=ej();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)_re(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function Sre(e,t){let r=ej();r.styles.set(e,t);for(let o of r.documents.keys())_re(o,e,t)}typeof process>"u",Sre("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var oVe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",Sre("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 yre={skeleton:"b20cc1690085c2f0__skeleton",pulse:"_9b143194fdb45f93__pulse","skeleton-pulse":"e2b9fe0690281bc8__skeleton-pulse"},tj=(0,wre.forwardRef)(function({render:t,...r},o){return dn({render:t,ref:o,props:hr({className:J(yre.skeleton,yre.pulse,oVe["box-sizing"]),"aria-hidden":!0},r)})});var Cn={};Yr(Cn,{List:()=>Ere,Panel:()=>Mre,Root:()=>Dre,Tab:()=>Vre});var Mv=a(U(),1);var Cre=a(Te(),1),YA=a(E(),1),rj="data-wp-hash";function oj(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&iVe(document)),e.__wpStyleRuntime}function nVe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${rj}]`))if(r.getAttribute(rj)===t)return!0;return!1}function Tre(e,t,r){if(!e.head)return;let o=oj(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(nVe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(rj,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function iVe(e){let t=oj();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Tre(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function sVe(e,t){let r=oj();r.styles.set(e,t);for(let o of r.documents.keys())Tre(o,e,t)}typeof process>"u",sVe("54ae3f4680",`@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--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) |
| 37 |
&[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] |
| 38 |
[role=tab]:is([aria-selected=true]) |
| 39 |
&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}`);var vC={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"},xre=1,Ere=(0,Mv.forwardRef)(function({children:t,variant:r="default",className:o,activateOnFocus:n,...i},s){let[l,c]=(0,Mv.useState)(null),[u,d]=(0,Mv.useState)({first:!1,last:!1,isScrolling:!1});(0,Mv.useEffect)(()=>{if(!l)return;let m=()=>{let{scrollWidth:y,clientWidth:w,scrollLeft:S}=l,x=Math.max(y-w,0),I=(l.dir||(typeof window<"u"?window.getComputedStyle(l).direction:"ltr"))==="rtl"&&S<0?-S:S,k={first:I>xre,last:I<x-xre,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,Cre.useMergeRefs)([s,m=>c(m)]);return(0,YA.jsxs)(Dc.List,{ref:f,activateOnFocus:n,"data-select-on-move":n?"true":"false",className:J(vC.tablist,u.first&&vC["is-overflowing-first"],u.last&&vC["is-overflowing-last"],vC[`is-${r}-variant`],o),...i,tabIndex:i.tabIndex??(u.isScrolling?-1:void 0),children:[t,(0,YA.jsx)(Dc.Indicator,{className:vC.indicator})]})});var Are=a(U(),1);var Vi=a(U(),1);var bC=a(E(),1),qA=!1,nj=qA?(0,Vi.createContext)(null):null;function aVe(){let e=(0,Vi.useContext)(nj);(0,Vi.useEffect)(()=>{if(e)return e.registerTab()},[e])}function lVe(){}var Pre=qA?aVe:lVe;function cVe(){let e=(0,Vi.useContext)(nj);(0,Vi.useEffect)(()=>{if(e)return e.registerPanel()},[e])}function uVe(){}var kre=qA?cVe:uVe;function dVe({children:e}){let t=(0,Vi.useRef)(0),r=(0,Vi.useRef)(0),o=pre(()=>{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,Vi.useCallback)(()=>(t.current+=1,o(),()=>{t.current-=1,o()}),[o]),i=(0,Vi.useCallback)(()=>(r.current+=1,o(),()=>{r.current-=1,o()}),[o]),s=(0,Vi.useMemo)(()=>({registerTab:n,registerPanel:i}),[n,i]);return(0,bC.jsx)(nj.Provider,{value:s,children:e})}function fVe({children:e}){return(0,bC.jsx)(bC.Fragment,{children:e})}var Rre=qA?dVe:fVe;var Nre=a(E(),1),ij="data-wp-hash";function sj(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&mVe(document)),e.__wpStyleRuntime}function pVe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${ij}]`))if(r.getAttribute(ij)===t)return!0;return!1}function Ire(e,t,r){if(!e.head)return;let o=sj(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(pVe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(ij,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function mVe(e){let t=sj();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Ire(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function Ore(e,t){let r=sj();r.styles.set(e,t);for(let o of r.documents.keys())Ire(o,e,t)}typeof process>"u",Ore("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 hVe={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",Ore("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 gVe={"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"},Mre=(0,Are.forwardRef)(function({className:t,...r},o){return kre(),(0,Nre.jsx)(Dc.Panel,{ref:o,className:J(hVe.div,gVe["outset-ring--focus-visible"],t),...r})});var Fre=a(U(),1);var aj=a(E(),1),Dre=(0,Fre.forwardRef)(function({...t},r){return(0,aj.jsx)(Rre,{children:(0,aj.jsx)(Dc.Root,{ref:r,...t})})});var Lre=a(U(),1);var yC=a(E(),1),cj="data-wp-hash";function uj(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&bVe(document)),e.__wpStyleRuntime}function vVe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${cj}]`))if(r.getAttribute(cj)===t)return!0;return!1}function Bre(e,t,r){if(!e.head)return;let o=uj(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(vVe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(cj,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function bVe(e){let t=uj();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)Bre(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 yVe(e,t){let r=uj();r.styles.set(e,t);for(let o of r.documents.keys())Bre(o,e,t)}typeof process>"u",yVe("54ae3f4680",`@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--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) |
| 40 |
&[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] |
| 41 |
[role=tab]:is([aria-selected=true]) |
| 42 |
&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}`);var lj={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"},Vre=(0,Lre.forwardRef)(function({className:t,children:r,...o},n){return Pre(),(0,yC.jsxs)(Dc.Tab,{ref:n,className:J(lj.tab,t),...o,children:[(0,yC.jsx)("span",{className:lj["tab-children"],children:r}),(0,yC.jsx)(Of,{icon:mr,className:lj["tab-chevron"]})]})});var Lc=a(E(),1),{PATTERN_TYPES:wVe}=ln(zre.privateApis);function Hre({item:e}){let t=(0,jre.__)("This pattern cannot be edited.");return(0,Lc.jsx)(L1,{item:e,className:"fields-field__pattern-title",children:e.type===wVe.theme&&(0,Lc.jsxs)(Lc.Fragment,{children:[(0,Lc.jsx)(Gt,{children:t}),(0,Lc.jsxs)(Ze.Root,{children:[(0,Lc.jsx)(Ze.Trigger,{render:(0,Lc.jsx)(xn,{icon:PV,size:24})}),(0,Lc.jsx)(Ze.Popup,{children:t})]})]})})}var _Ve={type:"text",id:"title",label:(0,dj.__)("Title"),placeholder:(0,dj.__)("No title"),getValue:({item:e})=>ft(e),render:Hre,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},wC=_Ve;var fj=a(Vt(),1),pj=a(j(),1);var Wre=a(E(),1);function Ure(e){return typeof e.excerpt=="string"?(0,fj.decodeEntities)(e.excerpt):(0,fj.decodeEntities)(e.excerpt?.raw||"")}var SVe={id:"excerpt",type:"text",label:(0,pj.__)("Description"),placeholder:(0,pj.__)("Add a description"),getValue:({item:e})=>Ure(e),render:({item:e})=>{let t=Ure(e);return t?(0,Wre.jsx)(ws,{children:t}):null},Edit:{control:"textarea",rows:4},enableSorting:!1,enableHiding:!1,filterBy:!1,enableGlobalSearch:!0},mj=SVe;var Fv=a(j(),1),Yre=a(Al(),1);var qre=a(E(),1),{PATTERN_SYNC_TYPES:$0,PATTERN_TYPES:xVe}=ln(Yre.privateApis),Gre=[{value:$0.full,label:(0,Fv._x)("Synced","pattern (singular)"),description:(0,Fv.__)("Patterns that are kept in sync across the site.")},{value:$0.unsynced,label:(0,Fv._x)("Not synced","pattern (singular)"),description:(0,Fv.__)("Patterns that can be changed freely without affecting the site.")}];function CVe(e){return e.type&&e.type!==xVe.user||e.meta?.wp_pattern_sync_status===$0.unsynced?$0.unsynced:e.wp_pattern_sync_status||$0.full}var TVe={id:"sync-status",type:"text",label:(0,Fv.__)("Sync status"),readOnly:!0,enableSorting:!1,enableHiding:!0,elements:Gre,filterBy:{operators:["is"],isPrimary:!0},render:({item:e})=>{let t=CVe(e);return(0,qre.jsx)("span",{className:`fields-field__pattern-sync-status fields-field__pattern-sync-status-${t}`,children:Gre.find(({value:r})=>r===t)?.label})}},hj=TVe;var rz=a(j(),1);var Tr=a(G(),1),Uv=a(KA(),1),$j=a(ae(),1),BC=a(K(),1),Zr=a(U(),1),xs=a(j(),1);var Xoe=a(na(),1),uw=a(Mf(),1),Qoe=a(It(),1);var vj=SC(),pt=e=>_C(e,vj),bj=SC();pt.write=e=>_C(e,bj);var ZA=SC();pt.onStart=e=>_C(e,ZA);var yj=SC();pt.onFrame=e=>_C(e,yj);var wj=SC();pt.onFinish=e=>_C(e,wj);var ew=[];pt.setTimeout=(e,t)=>{let r=pt.now()+t,o=()=>{let i=ew.findIndex(s=>s.cancel==o);~i&&ew.splice(i,1),Bm-=~i?1:0},n={time:r,handler:e,cancel:o};return ew.splice(Xre(r),0,n),Bm+=1,Qre(),n};var Xre=e=>~(~ew.findIndex(t=>t.time>e)||~ew.length);pt.cancel=e=>{ZA.delete(e),yj.delete(e),wj.delete(e),vj.delete(e),bj.delete(e)};pt.sync=e=>{gj=!0,pt.batchedUpdates(e),gj=!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=()=>{ZA.delete(r),t=null},o};var _j=typeof window<"u"?window.requestAnimationFrame:()=>{};pt.use=e=>_j=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"):$re()};var Lm=-1,Bm=0,gj=!1;function _C(e,t){gj?(t.delete(e),e(0)):(t.add(e),Qre())}function Qre(){Lm<0&&(Lm=0,pt.frameLoop!=="demand"&&_j(Jre))}function EVe(){Lm=-1}function Jre(){~Lm&&(_j(Jre),pt.batchedUpdates($re))}function $re(){let e=Lm;Lm=pt.now();let t=Xre(Lm);if(t&&(eoe(ew.splice(0,t),r=>r.handler()),Bm-=t),!Bm){EVe();return}ZA.flush(),vj.flush(e?Math.min(64,Lm-e):16.667),yj.flush(),bj.flush(),wj.flush()}function SC(){let e=new Set,t=e;return{add(r){Bm+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return Bm-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,Bm-=t.size,eoe(t,o=>o(r)&&e.add(o)),Bm+=e.size,t=e)}}}function eoe(e,t){e.forEach(r=>{try{t(r)}catch(o){pt.catch(o)}})}var Nl=a(_e());function eI(){}var soe=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),Ae={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Yu(e,t){if(Ae.arr(e)){if(!Ae.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var Mr=(e,t)=>e.forEach(t);function Ml(e,t,r){if(Ae.arr(e)){for(let o=0;o<e.length;o++)t.call(r,e[o],`${o}`);return}for(let o in e)e.hasOwnProperty(o)&&t.call(r,e[o],o)}var ua=e=>Ae.und(e)?[]:Ae.arr(e)?e:[e];function nw(e,t){if(e.size){let r=Array.from(e);e.clear(),Mr(r,t)}}var iw=(e,...t)=>nw(e,r=>r(...t)),Pj=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),kj,aoe,Vm=null,loe=!1,Rj=eI,PVe=e=>{e.to&&(aoe=e.to),e.now&&(pt.now=e.now),e.colors!==void 0&&(Vm=e.colors),e.skipAnimation!=null&&(loe=e.skipAnimation),e.createStringInterpolator&&(kj=e.createStringInterpolator),e.requestAnimationFrame&&pt.use(e.requestAnimationFrame),e.batchedUpdates&&(pt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Rj=e.willAdvance),e.frameLoop&&(pt.frameLoop=e.frameLoop)},Ja=Object.freeze({__proto__:null,get createStringInterpolator(){return kj},get to(){return aoe},get colors(){return Vm},get skipAnimation(){return loe},get willAdvance(){return Rj},assign:PVe}),xC=new Set,Ol=[],Sj=[],JA=0,sw={get idle(){return!xC.size&&!Ol.length},start(e){JA>e.priority?(xC.add(e),pt.onStart(kVe)):(coe(e),pt(Tj))},advance:Tj,sort(e){if(JA)pt.onFrame(()=>sw.sort(e));else{let t=Ol.indexOf(e);~t&&(Ol.splice(t,1),uoe(e))}},clear(){Ol=[],xC.clear()}};function kVe(){xC.forEach(coe),xC.clear(),pt(Tj)}function coe(e){Ol.includes(e)||uoe(e)}function uoe(e){Ol.splice(RVe(Ol,t=>t.priority>e.priority),0,e)}function Tj(e){let t=Sj;for(let r=0;r<Ol.length;r++){let o=Ol[r];JA=o.priority,o.idle||(Rj(o),o.advance(e),o.idle||t.push(o))}return JA=0,Sj=Ol,Sj.length=0,Ol=t,Ol.length>0}function RVe(e,t){let r=e.findIndex(t);return r<0?e.length:r}var doe={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Bc="[-+]?\\d*\\.?\\d+",$A=Bc+"%";function tI(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var AVe=new RegExp("rgb"+tI(Bc,Bc,Bc)),IVe=new RegExp("rgba"+tI(Bc,Bc,Bc,Bc)),OVe=new RegExp("hsl"+tI(Bc,$A,$A)),NVe=new RegExp("hsla"+tI(Bc,$A,$A,Bc)),MVe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,FVe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,DVe=/^#([0-9a-fA-F]{6})$/,LVe=/^#([0-9a-fA-F]{8})$/;function BVe(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=DVe.exec(e))?parseInt(t[1]+"ff",16)>>>0:Vm&&Vm[e]!==void 0?Vm[e]:(t=AVe.exec(e))?(tw(t[1])<<24|tw(t[2])<<16|tw(t[3])<<8|255)>>>0:(t=IVe.exec(e))?(tw(t[1])<<24|tw(t[2])<<16|tw(t[3])<<8|ooe(t[4]))>>>0:(t=MVe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=LVe.exec(e))?parseInt(t[1],16)>>>0:(t=FVe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=OVe.exec(e))?(toe(roe(t[1]),XA(t[2]),XA(t[3]))|255)>>>0:(t=NVe.exec(e))?(toe(roe(t[1]),XA(t[2]),XA(t[3]))|ooe(t[4]))>>>0:null}function xj(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 toe(e,t,r){let o=r<.5?r*(1+t):r+t-r*t,n=2*r-o,i=xj(n,o,e+1/3),s=xj(n,o,e),l=xj(n,o,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(l*255)<<8}function tw(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function roe(e){return(parseFloat(e)%360+360)%360/360}function ooe(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function XA(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function noe(e){let t=BVe(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 jm=(e,t,r)=>{if(Ae.fun(e))return e;if(Ae.arr(e))return jm({range:e,output:t,extrapolate:r});if(Ae.str(e.output[0]))return kj(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=jVe(u,i);return VVe(u,i[d],i[d+1],n[d],n[d+1],c,s,l,o.map)}};function VVe(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 jVe(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function Ej(){return Ej=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},Ej.apply(this,arguments)}var rw=Symbol.for("FluidValue.get"),Dv=Symbol.for("FluidValue.observers"),_s=e=>!!(e&&e[rw]),di=e=>e&&e[rw]?e[rw]():e,Aj=e=>e[Dv]||null;function zVe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Lv(e,t){let r=e[Dv];r&&r.forEach(o=>{zVe(o,t)})}var ow=class{constructor(t){if(this[rw]=void 0,this[Dv]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");HVe(this,t)}},HVe=(e,t)=>foe(e,rw,t);function zm(e,t){if(e[rw]){let r=e[Dv];r||foe(e,Dv,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Hm(e,t){let r=e[Dv];if(r&&r.has(t)){let o=r.size-1;o?r.delete(t):e[Dv]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var foe=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),QA=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,UVe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ioe=new RegExp(`(${QA.source})(%|[a-z]+)`,"i"),WVe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,rI=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,poe=e=>{let[t,r]=GVe(e);if(!t||Pj())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&&rI.test(r))return poe(r);if(r)return r}return e},GVe=e=>{let t=rI.exec(e);if(!t)return[,];let[,r,o]=t;return[r,o]},Cj,YVe=(e,t,r,o,n)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(o)}, ${n})`,oI=e=>{Cj||(Cj=Vm?new RegExp(`(${Object.keys(Vm).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>di(i).replace(rI,poe).replace(UVe,noe).replace(Cj,noe)),r=t.map(i=>i.match(QA).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=>jm(Ej({},e,{output:i})));return i=>{var s;let l=!ioe.test(t[0])&&((s=t.find(u=>ioe.test(u)))==null?void 0:s.replace(QA,"")),c=0;return t[0].replace(QA,()=>`${n[c++](i)}${l||""}`).replace(WVe,YVe)}},moe="react-spring: ",hoe=e=>{let t=e,r=!1;if(typeof t!="function")throw new TypeError(`${moe}once requires a function parameter`);return(...o)=>{r||(t(...o),r=!0)}},qVe=hoe(console.warn);function goe(){qVe(`${moe}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var i2t=hoe(console.warn);function aw(e){return Ae.str(e)&&(e[0]=="#"||/\d/.test(e)||!Pj()&&rI.test(e)||e in(Vm||{}))}var CC=Pj()?Nl.useEffect:Nl.useLayoutEffect,KVe=()=>{let e=(0,Nl.useRef)(!1);return CC(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ij(){let e=(0,Nl.useState)()[1],t=KVe();return()=>{t.current&&e(Math.random())}}function voe(e,t){let[r]=(0,Nl.useState)(()=>({inputs:t,result:e()})),o=(0,Nl.useRef)(),n=o.current,i=n;return i?t&&i.inputs&&ZVe(t,i.inputs)||(i={inputs:t,result:e()}):i=r,(0,Nl.useEffect)(()=>{o.current=i,n==r&&(r.inputs=r.result=void 0)},[i]),i.result}function ZVe(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 Oj=e=>(0,Nl.useEffect)(e,XVe),XVe=[];var MC=a(_e()),FC=a(_e());var _oe=a(_e()),Ff=a(_e()),TC=Symbol.for("Animated:node"),QVe=e=>!!e&&e[TC]===e,Vc=e=>e&&e[TC],aI=(e,t)=>soe(e,TC,t),EC=e=>e&&e[TC]&&e[TC].getPayload(),nI=class{constructor(){this.payload=void 0,aI(this,this)}getPayload(){return this.payload||[]}},Bv=class e extends nI{constructor(t){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=t,Ae.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return Ae.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){let{done:t}=this;this.done=!1,Ae.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Vv=class e extends Bv{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=jm({output:[t,t]})}static create(t){return new e(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(Ae.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=jm({output:[this.getValue(),t]})),this._value=0,super.reset()}},iI={dependencies:null},jv=class extends nI{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let r={};return Ml(this.source,(o,n)=>{QVe(o)?r[n]=o.getValue(t):_s(o)?r[n]=di(o):t||(r[n]=o)}),r}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&Mr(this.payload,t=>t.reset())}_makePayload(t){if(t){let r=new Set;return Ml(t,this._addToPayload,r),Array.from(r)}}_addToPayload(t){iI.dependencies&&_s(t)&&iI.dependencies.add(t);let r=EC(t);r&&Mr(r,o=>this.add(o))}},Nj=class e extends jv{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(JVe)),!0)}};function JVe(e){return(aw(e)?Vv:Bv).create(e)}function lI(e){let t=Vc(e);return t?t.constructor:Ae.arr(e)?Nj:aw(e)?Vv:Bv}function sI(){return sI=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},sI.apply(this,arguments)}var boe=(e,t)=>{let r=!Ae.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ff.forwardRef)((o,n)=>{let i=(0,Ff.useRef)(null),s=r&&(0,Ff.useCallback)(g=>{i.current=e8e(n,g)},[n]),[l,c]=$Ve(o,t),u=Ij(),d=()=>{let g=i.current;if(r&&!g)return;(g?t.applyAnimatedValues(g,l.getValue(!0)):!1)===!1&&u()},f=new Mj(d,c),m=(0,Ff.useRef)();CC(()=>(m.current=f,Mr(c,g=>zm(g,f)),()=>{m.current&&(Mr(m.current.deps,g=>Hm(g,m.current)),pt.cancel(m.current.update))})),(0,Ff.useEffect)(d,[]),Oj(()=>()=>{let g=m.current;Mr(g.deps,v=>Hm(v,g))});let h=t.getComponentProps(l.getValue());return _oe.createElement(e,sI({},h,{ref:s}))})},Mj=class{constructor(t,r){this.update=t,this.deps=r}eventObserved(t){t.type=="change"&&pt.write(this.update)}};function $Ve(e,t){let r=new Set;return iI.dependencies=r,e.style&&(e=sI({},e,{style:t.createAnimatedStyle(e.style)})),e=new jv(e),iI.dependencies=null,[e,r]}function e8e(e,t){return e&&(Ae.fun(e)?e(t):e.current=t),t}var yoe=Symbol.for("AnimatedComponent"),Soe=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=n=>new jv(n),getComponentProps:o=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:o},i=s=>{let l=woe(s)||"Anonymous";return Ae.str(s)?s=i[s]||(i[s]=boe(s,n)):s=s[yoe]||(s[yoe]=boe(s,n)),s.displayName=`Animated(${l})`,s};return Ml(e,(s,l)=>{Ae.arr(e)&&(l=woe(s)),i[l]=i(s)}),{animated:i}},woe=e=>Ae.str(e)?e:e&&Ae.str(e.displayName)?e.displayName:Ae.fun(e)&&e.name||null;function Ss(){return Ss=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},Ss.apply(this,arguments)}function zv(e,...t){return Ae.fun(e)?e(...t):e}var AC=(e,t)=>e===!0||!!(t&&e&&(Ae.fun(e)?e(t):ua(e).includes(t))),Moe=(e,t)=>Ae.obj(e)?t&&e[t]:e,Foe=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,t8e=e=>e,Doe=(e,t=t8e)=>{let r=r8e;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));let o={};for(let n of r){let i=t(e[n],n);Ae.und(i)||(o[n]=i)}return o},r8e=["config","onProps","onStart","onChange","onPause","onResume","onRest"],o8e={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 n8e(e){let t={},r=0;if(Ml(e,(o,n)=>{o8e[n]||(t[n]=o,r++)}),r)return t}function Loe(e){let t=n8e(e);if(t){let r={to:t};return Ml(e,(o,n)=>n in t||(r[n]=o)),r}return Ss({},e)}function IC(e){return e=di(e),Ae.arr(e)?e.map(IC):aw(e)?Ja.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Lj(e){return Ae.fun(e)||Ae.arr(e)&&Ae.obj(e[0])}var i8e={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}},dI=1.70158,cI=dI*1.525,xoe=dI+1,Coe=2*Math.PI/3,Toe=2*Math.PI/4.5,uI=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,s8e={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=>xoe*e*e*e-dI*e*e,easeOutBack:e=>1+xoe*Math.pow(e-1,3)+dI*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((cI+1)*2*e-cI)/2:(Math.pow(2*e-2,2)*((cI+1)*(e*2-2)+cI)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Coe),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Coe)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Toe))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Toe)/2+1,easeInBounce:e=>1-uI(1-e),easeOutBounce:uI,easeInOutBounce:e=>e<.5?(1-uI(1-2*e))/2:(1+uI(2*e-1))/2},Bj=Ss({},i8e.default,{mass:1,damping:1,easing:s8e.linear,clamp:!1}),Vj=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,Bj)}};function a8e(e,t,r){r&&(r=Ss({},r),Eoe(r,t),t=Ss({},r,t)),Eoe(e,t),Object.assign(e,t);for(let s in Bj)e[s]==null&&(e[s]=Bj[s]);let{mass:o,frequency:n,damping:i}=e;return Ae.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*o,e.friction=4*Math.PI*i*o/n),e}function Eoe(e,t){if(!Ae.und(t.decay))e.duration=void 0;else{let r=!Ae.und(t.tension)||!Ae.und(t.friction);(r||!Ae.und(t.frequency)||!Ae.und(t.damping)||!Ae.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var Poe=[],jj=class{constructor(){this.changed=!1,this.values=Poe,this.toValues=null,this.fromValues=Poe,this.to=void 0,this.from=void 0,this.config=new Vj,this.immediate=!1}};function Boe(e,{key:t,props:r,defaultProps:o,state:n,actions:i}){return new Promise((s,l)=>{var c;let u,d,f=AC((c=r.cancel)!=null?c:o?.cancel,t);if(f)g();else{Ae.und(r.pause)||(n.paused=AC(r.pause,t));let v=o?.pause;v!==!0&&(v=n.paused||AC(v,t)),u=zv(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&&!Ja.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(Ss({},r,{callId:e,cancel:f}),s)}catch(v){l(v)}}})}var qj=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?lw(e.get()):t.every(r=>r.noop)?Voe(e.get()):jc(e.get(),t.every(r=>r.finished)),Voe=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),jc=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),lw=e=>({value:e,cancelled:!0,finished:!1});function joe(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=Doe(t,(b,_)=>_==="onRest"?void 0:b),d,f,m=new Promise((b,_)=>(d=b,f=_)),h=b=>{let _=n<=(r.cancelId||0)&&lw(o)||n!==r.asyncId&&jc(o,!1);if(_)throw b.result=_,f(b),b},g=(b,_)=>{let y=new fI,w=new pI;return(async()=>{if(Ja.skipAnimation)throw OC(r),w.result=jc(o,!1),f(w),w;h(y);let S=Ae.obj(b)?Ss({},b):Ss({},_,{to:b});S.parentId=n,Ml(u,(C,I)=>{Ae.und(S[I])&&(S[I]=C)});let x=await o.start(S);return h(y),r.paused&&await new Promise(C=>{r.resumeQueue.add(C)}),x})()},v;if(Ja.skipAnimation)return OC(r),jc(o,!1);try{let b;Ae.arr(e)?b=(async _=>{for(let y of _)await g(y)})(e):b=Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([b.then(d),m]),v=jc(o.get(),!0,!1)}catch(b){if(b instanceof fI)v=b.result;else if(b instanceof pI)v=b.result;else throw b}finally{n==r.asyncId&&(r.asyncId=i,r.asyncTo=i?l:void 0,r.promise=i?c:void 0)}return Ae.fun(s)&&pt.batchedUpdates(()=>{s(v,o,o.item)}),v})()}function OC(e,t){nw(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var fI=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}},pI=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},zj=e=>e instanceof NC,l8e=1,NC=class extends ow{constructor(...t){super(...t),this.id=l8e++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){let t=Vc(this);return t&&t.getValue()}to(...t){return Ja.to(this,t)}interpolate(...t){return goe(),Ja.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){Lv(this,{type:"change",parent:this,value:t,idle:r})}_onPriorityChange(t){this.idle||sw.sort(this),Lv(this,{type:"priority",parent:this,priority:t})}},Hv=Symbol.for("SpringPhase"),zoe=1,Hj=2,Uj=4,Fj=e=>(e[Hv]&zoe)>0,Um=e=>(e[Hv]&Hj)>0,PC=e=>(e[Hv]&Uj)>0,koe=(e,t)=>t?e[Hv]|=Hj|zoe:e[Hv]&=~Hj,Roe=(e,t)=>t?e[Hv]|=Uj:e[Hv]&=~Uj,Wj=class extends NC{constructor(t,r){if(super(),this.key=void 0,this.animation=new jj,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Ae.und(t)||!Ae.und(r)){let o=Ae.obj(t)?Ss({},t):Ss({},r,{from:t});Ae.und(o.default)&&(o.default=!0),this.start(o)}}get idle(){return!(Um(this)||this._state.asyncTo)||PC(this)}get goal(){return di(this.animation.to)}get velocity(){let t=Vc(this);return t instanceof Bv?t.lastVelocity||0:t.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return Fj(this)}get isAnimating(){return Um(this)}get isPaused(){return PC(this)}get isDelayed(){return this._state.delayed}advance(t){let r=!0,o=!1,n=this.animation,{config:i,toValues:s}=n,l=EC(n.to);!l&&_s(n.to)&&(s=ua(di(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==Vv?1:l?l[f].lastPosition:s[f],h=n.immediate,g=m;if(!h){if(g=d.lastPosition,i.tension<=0){d.done=!0;return}let v=d.elapsedTime+=t,b=n.fromValues[f],_=d.v0!=null?d.v0:d.v0=Ae.arr(i.velocity)?i.velocity[f]:i.velocity,y,w=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(Ae.und(i.duration))if(i.decay){let S=i.decay===!0?.998:i.decay,x=Math.exp(-(1-S)*v);g=b+_/(1-S)*(1-x),h=Math.abs(d.lastPosition-g)<=w,y=_*x}else{y=d.lastVelocity==null?_:d.lastVelocity;let S=i.restVelocity||w/10,x=i.clamp?0:i.bounce,C=!Ae.und(x),I=b==m?d.v0>0:b<m,k,R=!1,A=1,P=Math.ceil(t/A);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==I,R&&(y=-y*x,g=m));let M=-i.tension*1e-6*(g-m),B=-i.friction*.001*y,F=(M+B)/i.mass;y=y+F*A,g=g+y*A}}else{let S=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,v=d.elapsedTime+=t)),S=(i.progress||0)+v/this._memoizedDuration,S=S>1?1:S<0?0:S,d.durationProgress=S),g=b+i.easing(S)*(m-b),y=(g-d.lastPosition)/t,h=S==1}d.lastVelocity=y,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),h=!0)}l&&!l[f].done&&(h=!1),h?d.done=!0:r=!1,d.setValue(g,i.round)&&(o=!0)});let c=Vc(this),u=c.getValue();if(r){let d=di(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(Um(this)){let{to:t,config:r}=this.animation;pt.batchedUpdates(()=>{this._onStart(),r.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,r){let o;return Ae.und(t)?(o=this.queue||[],this.queue=[]):o=[Ae.obj(t)?t:Ss({},r,{to:t})],Promise.all(o.map(n=>this._update(n))).then(n=>qj(this,n))}stop(t){let{to:r}=this.animation;return this._focus(this.get()),OC(this._state,t&&this._lastCallId),pt.batchedUpdates(()=>this._stop(r,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){let r=this.key||"",{to:o,from:n}=t;o=Ae.obj(o)?o[r]:o,(o==null||Lj(o))&&(o=void 0),n=Ae.obj(n)?n[r]:n,n==null&&(n=void 0);let i={to:o,from:n};return Fj(this)||(t.reverse&&([o,n]=[n,o]),n=di(n),Ae.und(n)?Vc(this)||this._set(o):this._set(n)),i}_update(t,r){let o=Ss({},t),{key:n,defaultProps:i}=this;o.default&&Object.assign(i,Doe(o,(c,u)=>/^on/.test(u)?Moe(c,n):c)),Ioe(this,o,"onProps"),RC(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 Boe(++this._lastCallId,{key:n,props:o,defaultProps:i,state:l,actions:{pause:()=>{PC(this)||(Roe(this,!0),iw(l.pauseQueue),RC(this,"onPause",jc(this,kC(this,this.animation.to)),this))},resume:()=>{PC(this)&&(Roe(this,!1),Um(this)&&this._resume(),iw(l.resumeQueue),RC(this,"onResume",jc(this,kC(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(o.loop&&c.finished&&!(r&&c.noop)){let u=Hoe(o);if(u)return this._update(u,!0)}return c})}_merge(t,r,o){if(r.cancel)return this.stop(!0),o(lw(this));let n=!Ae.und(t.to),i=!Ae.und(t.from);if(n||i)if(r.callId>this._lastToId)this._lastToId=r.callId;else return o(lw(this));let{key:s,defaultProps:l,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!r.default||Ae.und(f))&&(f=m),r.reverse&&([f,m]=[m,f]);let h=!Yu(m,d);h&&(c.from=m),m=di(m);let g=!Yu(f,u);g&&this._focus(f);let v=Lj(r.to),{config:b}=c,{decay:_,velocity:y}=b;(n||i)&&(b.velocity=0),r.config&&!v&&a8e(b,zv(r.config,s),r.config!==l.config?zv(l.config,s):void 0);let w=Vc(this);if(!w||Ae.und(f))return o(jc(this,!0));let S=Ae.und(r.reset)?i&&!r.default:!Ae.und(m)&&AC(r.reset,s),x=S?m:this.get(),C=IC(f),I=Ae.num(C)||Ae.arr(C)||aw(C),k=!v&&(!I||AC(l.immediate||r.immediate,s));if(g){let T=lI(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,A=_s(f),P=!1;if(!A){let T=S||!Fj(this)&&h;(g||T)&&(P=Yu(IC(x),C),A=!P),(!Yu(c.immediate,k)&&!k||!Yu(b.decay,_)||!Yu(b.velocity,y))&&(A=!0)}if(P&&Um(this)&&(c.changed&&!S?A=!0:A||this._stop(u)),!v&&((A||_s(u))&&(c.values=w.getPayload(),c.toValues=_s(f)?null:R==Vv?[1]:ua(C)),c.immediate!=k&&(c.immediate=k,!k&&!S&&this._set(u)),A)){let{onRest:T}=c;Mr(c8e,B=>Ioe(this,r,B));let M=jc(this,kC(this,u));iw(this._pendingCalls,M),this._pendingCalls.add(o),c.changed&&pt.batchedUpdates(()=>{c.changed=!S,T?.(M,this),S?zv(l.onRest,M):c.onStart==null||c.onStart(M,this)})}S&&this._set(x),v?o(joe(r.to,r,this._state,this)):A?this._start():Um(this)&&!g?this._pendingCalls.add(o):o(Voe(x))}_focus(t){let r=this.animation;t!==r.to&&(Aj(this)&&this._detach(),r.to=t,Aj(this)&&this._attach())}_attach(){let t=0,{to:r}=this.animation;_s(r)&&(zm(r,this),zj(r)&&(t=r.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;_s(t)&&Hm(t,this)}_set(t,r=!0){let o=di(t);if(!Ae.und(o)){let n=Vc(this);if(!n||!Yu(o,n.getValue())){let i=lI(o);!n||n.constructor!=i?aI(this,i.create(o)):n.setValue(o),n&&pt.batchedUpdates(()=>{this._onChange(o,r)})}}return Vc(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,RC(this,"onStart",jc(this,kC(this,t.to)),this))}_onChange(t,r){r||(this._onStart(),zv(this.animation.onChange,t,this)),zv(this.defaultProps.onChange,t,this),super._onChange(t,r)}_start(){let t=this.animation;Vc(this).reset(di(t.to)),t.immediate||(t.fromValues=t.values.map(r=>r.lastPosition)),Um(this)||(koe(this,!0),PC(this)||this._resume())}_resume(){Ja.skipAnimation?this.finish():sw.start(this)}_stop(t,r){if(Um(this)){koe(this,!1);let o=this.animation;Mr(o.values,i=>{i.done=!0}),o.toValues&&(o.onChange=o.onPause=o.onResume=void 0),Lv(this,{type:"idle",parent:this});let n=r?lw(this.get()):jc(this.get(),kC(this,t??o.to));iw(this._pendingCalls,n),o.changed&&(o.changed=!1,RC(this,"onRest",n,this))}}};function kC(e,t){let r=IC(t),o=IC(e.get());return Yu(o,r)}function Hoe(e,t=e.loop,r=e.to){let o=zv(t);if(o){let n=o!==!0&&Loe(o),i=(n||e).reverse,s=!n||n.reset;return Gj(Ss({},e,{loop:t,default:!1,pause:void 0,to:!i||Lj(r)?r:void 0,from:s?e.from:void 0,reset:s},n))}}function Gj(e){let{to:t,from:r}=e=Loe(e),o=new Set;return Ae.obj(t)&&Aoe(t,o),Ae.obj(r)&&Aoe(r,o),e.keys=o.size?Array.from(o):null,e}function Aoe(e,t){Ml(e,(r,o)=>r!=null&&t.add(o))}var c8e=["onStart","onRest","onChange","onPause","onResume"];function Ioe(e,t,r){e.animation[r]=t[r]!==Foe(t,r)?Moe(t[r],e.key):void 0}function RC(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 u8e=["onStart","onChange","onRest"],d8e=1,mI=class{constructor(t,r){this.id=d8e++,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(Ss({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){let t={};return this.each((r,o)=>t[o]=r.get()),t}set(t){for(let r in t){let o=t[r];Ae.und(o)||this.springs[r].set(o)}}update(t){return t&&this.queue.push(Gj(t)),this}start(t){let{queue:r}=this;return t?r=ua(t).map(Gj):this.queue=[],this._flush?this._flush(this,r):(Woe(this,r),f8e(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){let o=this.springs;Mr(ua(r),n=>o[n].stop(!!t))}else OC(this._state,this._lastAsyncId),this.each(o=>o.stop(!!t));return this}pause(t){if(Ae.und(t))this.start({pause:!0});else{let r=this.springs;Mr(ua(t),o=>r[o].pause())}return this}resume(t){if(Ae.und(t))this.start({pause:!1});else{let r=this.springs;Mr(ua(t),o=>r[o].resume())}return this}each(t){Ml(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,nw(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&&nw(r,([c,u])=>{u.value=l,c(u,this,this._item)}),s&&(this._started=!1,nw(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 f8e(e,t){return Promise.all(t.map(r=>Uoe(e,r))).then(r=>qj(e,r))}async function Uoe(e,t,r){let{keys:o,to:n,from:i,loop:s,onRest:l,onResolve:c}=t,u=Ae.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=Ae.arr(n)||Ae.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Mr(u8e,v=>{let b=t[v];if(Ae.fun(b)){let _=e._events[v];t[v]=({finished:y,cancelled:w})=>{let S=_.get(b);S?(y||(S.finished=!1),w&&(S.cancelled=!0)):_.set(b,{value:null,finished:y||!1,cancelled:w||!1})},u&&(u[v]=t[v])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,iw(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||Foe(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(Boe(++e._lastAsyncId,{props:t,state:f,actions:{pause:eI,resume:eI,start(v,b){h?(OC(f,e._lastAsyncId),b(lw(e))):(v.onRest=l,b(joe(d,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});let g=qj(e,await Promise.all(m));if(s&&g.finished&&!(r&&g.noop)){let v=Hoe(t,s,n);if(v)return Woe(e,[v]),Uoe(e,v,!0)}return c&&pt.batchedUpdates(()=>c(g,e,e.item)),g}function p8e(e,t){let r=new Wj;return r.key=e,t&&zm(r,t),r}function m8e(e,t,r){t.keys&&Mr(t.keys,o=>{(e[o]||(e[o]=r(o)))._prepareNode(t)})}function Woe(e,t){Mr(t,r=>{m8e(e.springs,r,o=>p8e(o,e))})}function h8e(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 g8e=["children"],Kj=e=>{let{children:t}=e,r=h8e(e,g8e),o=(0,FC.useContext)(hI),n=r.pause||!!o.pause,i=r.immediate||!!o.immediate;r=voe(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=hI;return MC.createElement(s,{value:r},t)},hI=v8e(Kj,{});Kj.Provider=hI.Provider;Kj.Consumer=hI.Consumer;function v8e(e,t){return Object.assign(e,MC.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Ooe;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(Ooe||(Ooe={}));var Yj=class extends NC{constructor(t,r){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=jm(...r);let o=this._get(),n=lI(o);aI(this,n.create(o))}advance(t){let r=this._get(),o=this.get();Yu(r,o)||(Vc(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&Noe(this._active)&&Dj(this)}_get(){let t=Ae.arr(this.source)?this.source.map(di):ua(di(this.source));return this.calc(...t)}_start(){this.idle&&!Noe(this._active)&&(this.idle=!1,Mr(EC(this),t=>{t.done=!1}),Ja.skipAnimation?(pt.batchedUpdates(()=>this.advance()),Dj(this)):sw.start(this))}_attach(){let t=1;Mr(ua(this.source),r=>{_s(r)&&zm(r,this),zj(r)&&(r.idle||this._active.add(r),t=Math.max(t,r.priority+1))}),this.priority=t,this._start()}_detach(){Mr(ua(this.source),t=>{_s(t)&&Hm(t,this)}),this._active.clear(),Dj(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=ua(this.source).reduce((r,o)=>Math.max(r,(zj(o)?o.priority:0)+1),0))}};function b8e(e){return e.idle!==!1}function Noe(e){return!e.size||Array.from(e).every(b8e)}function Dj(e){e.idle||(e.idle=!0,Mr(EC(e),t=>{t.done=!0}),Lv(e,{type:"idle",parent:e}))}Ja.assign({createStringInterpolator:oI,to:(e,t)=>new Yj(e,t)});var h2t=sw.advance;var Yoe=a(Vu());function Jj(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 y8e=["style","children","scrollTop","scrollLeft"],qoe=/^--/;function w8e(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!qoe.test(e)&&!(DC.hasOwnProperty(e)&&DC[e])?t+"px":(""+t).trim()}var Goe={};function _8e(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=Jj(o,y8e),u=Object.values(c),d=Object.keys(c).map(f=>r||e.hasAttribute(f)?f:Goe[f]||(Goe[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=w8e(f,n[f]);qoe.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 DC={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},S8e=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),x8e=["Webkit","Ms","Moz","O"];DC=Object.keys(DC).reduce((e,t)=>(x8e.forEach(r=>e[S8e(r,t)]=e[t]),e),DC);var C8e=["x","y","z"],T8e=/^(matrix|translate|scale|rotate|skew)/,E8e=/^(translate)/,P8e=/^(rotate|skew)/,Zj=(e,t)=>Ae.num(e)&&e!==0?e+t:e,gI=(e,t)=>Ae.arr(e)?e.every(r=>gI(r,t)):Ae.num(e)?e===t:parseFloat(e)===t,Xj=class extends jv{constructor(t){let{x:r,y:o,z:n}=t,i=Jj(t,C8e),s=[],l=[];(r||o||n)&&(s.push([r||0,o||0,n||0]),l.push(c=>[`translate3d(${c.map(u=>Zj(u,"px")).join(",")})`,gI(c,0)])),Ml(i,(c,u)=>{if(u==="transform")s.push([c||""]),l.push(d=>[d,d===""]);else if(T8e.test(u)){if(delete i[u],Ae.und(c))return;let d=E8e.test(u)?"px":P8e.test(u)?"deg":"";s.push(ua(c)),l.push(u==="rotate3d"?([f,m,h,g])=>[`rotate3d(${f},${m},${h},${Zj(g,d)})`,gI(g,0)]:f=>[`${u}(${f.map(m=>Zj(m,d)).join(",")})`,gI(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new Qj(s,l)),super(i)}},Qj=class extends ow{constructor(t,r){super(),this._value=null,this.inputs=t,this.transforms=r}get(){return this._value||(this._value=this._get())}_get(){let t="",r=!0;return Mr(this.inputs,(o,n)=>{let i=di(o[0]),[s,l]=this.transforms[n](Ae.arr(i)?i:o.map(di));t+=" "+s,r=r&&l}),r?"none":t}observerAdded(t){t==1&&Mr(this.inputs,r=>Mr(r,o=>_s(o)&&zm(o,this)))}observerRemoved(t){t==0&&Mr(this.inputs,r=>Mr(r,o=>_s(o)&&Hm(o,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Lv(this,t)}},k8e=["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"],R8e=["scrollTop","scrollLeft"];Ja.assign({batchedUpdates:Yoe.unstable_batchedUpdates,createStringInterpolator:oI,colors:doe});var A8e=Soe(k8e,{applyAnimatedValues:_8e,createAnimatedStyle:e=>new Xj(e),getComponentProps:e=>Jj(e,R8e)}),x2t=A8e.animated;var LC=a(U(),1);function Koe(e){return{top:e.offsetTop,left:e.offsetLeft}}function Zoe(e){let t=(0,LC.useRef)(null),r=(0,LC.useRef)(void 0);return t.current&&(r.current=Koe(t.current)),(0,LC.useLayoutEffect)(()=>{let o=r.current;if(!o||!t.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=new mI({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=Koe(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:I8e}=ln(uw.privateApis);function Joe({children:e,index:t,className:r}){let o=Zoe(t);return(0,Be.jsx)("div",{ref:o,className:r,children:e})}function cw(e){return Array.isArray(e)?e:e?[e]:[]}function O8e({render:e,multiple:t,...r}){let[o,n]=(0,Zr.useState)(!1);return window.__experimentalDataViewsMediaModal?(0,Be.jsxs)(Be.Fragment,{children:[e&&e({open:()=>n(!0)}),o&&(0,Be.jsx)(I8e,{...r,multiple:t,isOpen:o,onClose:()=>{n(!1),r.onClose?.()},onSelect:i=>{n(!1),r.onSelect?.(i)}})]}):(0,Be.jsx)(uw.MediaUpload,{...r,render:e,multiple:t?"add":void 0})}function ez({open:e,children:t,label:r,showTooltip:o=!1,onFilesDrop:n,attachment:i,isUploading:s=!1}){let l=i&&(0,Uv.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)(Ze.Root,{children:[(0,Be.jsx)(Ze.Trigger,{render:c}),(0,Be.jsx)(Ze.Popup,{children:r})]}):c}var N8e=["application/zip","application/x-zip-compressed","application/x-rar-compressed","application/x-7z-compressed","application/x-tar","application/x-gzip"];function M8e({attachment:e}){return(0,Be.jsx)(Tr.__experimentalTruncate,{className:"fields__media-edit-filename",children:e.title.rendered})}function $oe(e){return(0,Be.jsx)(ez,{...e,children:(0,Be.jsx)("span",{className:"fields__media-edit-placeholder",children:e.label})})}function ene({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?Ar:RB,label:s?(0,xs.__)("Move left"):(0,xs.__)("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?mr:h1,label:s?(0,xs.__)("Move right"):(0,xs.__)("Move down"),size:"small",disabled:o||t===r-1,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"down")}})]})}function tne({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:fB}):r.startsWith("video")?(0,Be.jsx)(Tr.Icon,{icon:T8}):N8e.includes(r)?(0,Be.jsx)(Tr.Icon,{icon:eB}):(0,Be.jsx)(Tr.Icon,{icon:oV})}function F8e({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,Uv.isBlobURL)(u.source_url),h=u.id;return(0,Be.jsxs)(Joe,{index:d,className:J("fields__media-edit-expanded-item",{"has-preview-image":f}),children:[(0,Be.jsx)(ez,{open:()=>{c(h),i()},label:m?(0,xs.__)("Replace"):(0,xs.sprintf)((0,xs.__)("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)(tne,{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)(ene,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"horizontal"}),(0,Be.jsx)(Tr.Button,{__next40pxDefaultSize:!0,icon:Mi,label:(0,xs.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})})]},u.id)}),(r||!e?.length)&&(0,Be.jsx)($oe,{open:()=>{c(void 0),i()},label:t,onFilesDrop:s,isUploading:l})]})}function D8e({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,Uv.isBlobURL)(u.source_url),m=r&&e.length>1,h=u.id;return(0,Be.jsxs)(Joe,{index:d,className:"fields__media-edit-compact",children:[(0,Be.jsx)(ez,{open:()=>{c(h),i()},label:(0,xs.__)("Replace"),showTooltip:!0,onFilesDrop:s,attachment:u,isUploading:l,children:(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(tne,{attachment:u}),!f&&(0,Be.jsx)(M8e,{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)(ene,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"vertical"}),(0,Be.jsx)(Tr.Button,{__next40pxDefaultSize:!0,icon:Mi,label:(0,xs.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})]},u.id)})})}),(r||!e?.length)&&(0,Be.jsx)($oe,{open:()=>{c(void 0),i()},label:t,onFilesDrop:s,isUploading:l})]})}function rne({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,Zr.useState)(!1),f=(0,Zr.useRef)(null),[m,h]=(0,Zr.useState)(void 0);(0,Zr.useEffect)(()=>{let D=f.current,O=()=>{d(!0)};return D?.addEventListener("invalid",O),()=>D?.removeEventListener("invalid",O)},[]);let g=(0,BC.useSelect)(D=>{if(!c)return null;let L=cw(c).toSorted((q,Z)=>q-Z),{getEntityRecords:W}=D($j.store);return W("postType","attachment",{include:L})},[c]),v=(0,Zr.useRef)(null);g!==null&&(v.current=g);let b=g;if(g===null&&v.current&&c){let D=new Set(v.current.map(O=>O.id));cw(c).every(O=>D.has(O))&&(b=v.current)}let _=(0,Zr.useMemo)(()=>{if(!b)return null;let D=cw(c),O=new Map(b.map(L=>[L.id,L]));return D.map(L=>O.get(L)).filter(L=>L!==void 0)},[b,c]),{createErrorNotice:y}=(0,BC.useDispatch)(Qoe.store),{receiveEntityRecords:w}=(0,BC.useDispatch)($j.store),[S,x]=(0,Zr.useState)(),C=(0,Zr.useRef)(void 0),[I,k]=(0,Zr.useState)(!1),[R,A]=(0,Zr.useState)([]);(0,Zr.useEffect)(()=>{I&&(k(!1),C.current?.())},[I]);let P=(0,Zr.useCallback)(D=>r(t.setValue({item:e,value:D})),[e,t,r]),T=(0,Zr.useCallback)(D=>{let L=cw(c).filter(W=>W!==D);d(!0),P(L.length?L:void 0)},[c,P]),M=(0,Zr.useCallback)((D,O)=>{if(!_)return;let L=_.map(Z=>Z.id),W=L.indexOf(D),q=O==="up"?W-1:W+1;[L[W],L[q]]=[L[q],L[W]],P(L)},[_,P]),B=(0,Zr.useCallback)((D,O)=>{x(O),(0,uw.uploadMedia)({allowedTypes:n?.length?n:void 0,filesList:D,onFileChange(L){let W=L.filter(Q=>(0,Uv.isBlobURL)(Q.url)).map(Q=>Q.url);if(A(W),W.length)return;w("postType","attachment",[],void 0,!0);let q=L.map(Q=>Q.id);if(!i){P(q[0]),x(void 0);return}let Z=cw(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(L){x(void 0),A([]),y(L.message,{type:"snackbar"})},multiple:!!i})},[n,c,i,y,P,w]),F=t.placeholder||(i?(0,xs.__)("Choose files"):(0,xs.__)("Choose file")),V=(0,Zr.useMemo)(()=>{if(!R.length)return _;let D=[..._||[]],O=R.map(L=>({id:L,source_url:L,mime_type:(0,Uv.getBlobTypeByURL)(L)}));if(S!==void 0){let L=D.findIndex(W=>W.id===S);D.splice(L,1,...O)}else D.push(...O);return D},[_,S,R]);(0,Zr.useEffect)(()=>{if(!u)return;let D=f.current;if(D)if(l){let O=l?.custom;h(O),O?.type==="invalid"?D.setCustomValidity(O.message||(0,xs.__)("Invalid")):D.setCustomValidity("")}else D.setCustomValidity(""),h(void 0)},[u,t.isValid,l]),(0,Zr.useEffect)(()=>{u&&m?.message&&(0,Xoe.speak)(m.message)},[u,m?.message]);let z=(0,Zr.useCallback)(D=>{u||(!D.relatedTarget||!D.currentTarget.contains(D.relatedTarget))&&d(!0)},[u]);return(0,Be.jsxs)("div",{onBlur:z,children:[(0,Be.jsx)("fieldset",{className:"fields__media-edit","data-field-id":t.id,children:(0,Be.jsx)(O8e,{onSelect:D=>{if(!i){P(D.id),x(void 0);return}let O=Array.isArray(D)?D.map(W=>W.id):[D.id],L=cw(c);if(!L.length)P(O);else if(S===void 0){let W=L.filter(Z=>O.includes(Z)),q=O.filter(Z=>!L.includes(Z));P([...W,...q])}else if(D.id!==S){let W=L.filter(q=>q!==D.id);P(W.map(q=>q===S?D.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:D})=>{C.current=D;let O=s?F8e:D8e;return(0,Be.jsxs)(Tr.__experimentalVStack,{spacing:2,children:[t.label&&(o?(0,Be.jsx)(Gt,{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:V,addButtonLabel:F,multiple:i,removeItem:T,moveItem:M,open:()=>k(!0),onFilesDrop:B,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)(Gt,{children:(0,Be.jsx)("input",{type:"text",ref:f,value:c??"",tabIndex:-1,"aria-hidden":"true",onChange:()=>{}})}),m&&(0,Be.jsxs)("p",{className:J("components-validated-control__indicator",{"is-invalid":m.type==="invalid","is-valid":m.type==="valid"}),children:[(0,Be.jsx)(Tr.Icon,{className:"components-validated-control__indicator-icon",icon:xf,size:16,fill:"currentColor"}),m.message]})]})}var tz=a(E(),1),one=({item:e,config:t})=>{let r=e?._embedded?.["wp:featuredmedia"]?.[0],o=r?.source_url;return o?(0,tz.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,tz.jsx)("span",{className:"fields-controls__featured-image-placeholder"})};var nne=a(E(),1),L8e={id:"featured_media",type:"media",label:(0,rz.__)("Featured Image"),placeholder:(0,rz.__)("Set featured image"),Edit:e=>(0,nne.jsx)(rne,{...e,isExpanded:!0}),render:one,setValue:({value:e})=>({featured_media:e??0}),enableSorting:!1,filterBy:!1},oz=L8e;var une=a(j(),1);var jC=a(U(),1),yI=a(ae(),1),iz=a(G(),1),sz=a(K(),1),az=a(j(),1);var nz=a(K(),1),Fl=a(ae(),1);function vI(e){let t=e.type,r=e?.available_templates??{},o=Object.keys(r).length>0;return(0,nz.useSelect)(n=>{let i=!!n(Fl.store).getCurrentTheme()?.is_block_theme;if(!n(Fl.store).getPostType(t)?.viewable)return null;let l=i&&(n(Fl.store).canUser("create",{kind:"postType",name:"wp_template"})??!1),c=o||l,u=c?!!n(Fl.store).canUser("read",{kind:"postType",name:"wp_template"}):!1;return(!i||!u)&&c?"classic":i&&u?"block-theme":null},[t,o])}function B8e(e,t){return t?e==="page"?`${e}-${t}`:`single-${e}-${t}`:e==="page"?"page":`single-${e}`}var VC="";function bI(e,t,r){return(0,nz.useSelect)(o=>{if(!e||!t)return VC;let n=String(t),i=ln(o(Fl.store)).getHomePage();if(e==="page"&&i?.postType==="page"&&i?.postId===n){let f=o(Fl.store).getEntityRecords("postType","wp_template",{per_page:-1})?.find(m=>m.slug==="front-page");if(f)return ft(f)}let s=ln(o(Fl.store)).getPostsPageId();if(e==="page"&&s===n){let d=o(Fl.store).getDefaultTemplateId({slug:"home"});if(!d)return VC;let f=o(Fl.store).getEntityRecord("postType","wp_template",d);return f?ft(f):VC}let l=B8e(e,r),c=o(Fl.store).getDefaultTemplateId({slug:l});if(!c)return VC;let u=o(Fl.store).getEntityRecord("postType","wp_template",c);return u?ft(u):VC},[e,t,r])}var wI=a(E(),1),V8e=[];function j8e({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,jC.useMemo)(()=>Object.entries(e?.available_templates??{}).map(([l,c])=>({label:c,value:l})),[e]),s=(0,sz.useSelect)(l=>{let{getHomePage:c,getPostsPageId:u}=ln(l(yI.store)),d=String(o),f=u()===d,m=e.type==="page"&&c()?.postId===d;return!f&&!m},[o,e.type]);return(0,wI.jsx)(iz.SelectControl,{label:(0,az.__)("Template"),hideLabelFromVision:!0,value:n,options:i,onChange:r,disabled:!s})}function z8e({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,sz.useSelect)(f=>{let m=f(yI.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:o})??V8e,{getHomePage:h,getPostsPageId:g}=ln(f(yI.store)),v=String(n),b=g()===v,_=o==="page"&&h()?.postId===v;return{templates:m,canSwitchTemplate:!b&&!_}},[n,o]),c=bI(o,n,i),u=t.getValue({item:e}),d=(0,jC.useMemo)(()=>{let f=s.map(m=>({label:ft(m),value:m.slug}));return[{label:c,value:""},...f]},[s,c]);return(0,wI.jsx)(iz.SelectControl,{label:(0,az.__)("Template"),hideLabelFromVision:!0,value:u,options:d,onChange:r,disabled:!l})}var ine=({data:e,field:t,onChange:r})=>{let o=(0,jC.useCallback)(s=>r({[t.id]:s}),[t.id,r]),n=vI(e);return!n||!["block-theme","classic"].includes(n)?null:(0,wI.jsx)(n==="classic"?j8e:z8e,{data:e,field:t,onChange:o})};var sne=a(K(),1),ane=a(ae(),1),lne=a(j(),1);var Wv=a(E(),1);function H8e({item:e,field:t}){let r=t.getValue({item:e}),o=e?.available_templates??{},n=r&&o[r]?o[r]:(0,lne.__)("Default template");return(0,Wv.jsx)(Wv.Fragment,{children:n})}function U8e({item:e,field:t}){let r=e.type,o=e.slug,n=e.id,i=t.getValue({item:e}),s=bI(r,n,o),l=(0,sne.useSelect)(c=>{if(!i)return;let d=c(ane.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,Wv.jsx)(Wv.Fragment,{children:l??s})}var cne=({item:e,field:t})=>{let r=vI(e);return!r||!["block-theme","classic"].includes(r)?null:(0,Wv.jsx)(r==="classic"?H8e:U8e,{item:e,field:t})};var W8e={id:"template",type:"text",label:(0,une.__)("Template"),Edit:ine,render:cne,enableSorting:!1,filterBy:!1},lz=W8e;var Tne=a(j(),1);var cz=a(dw(),1),SI=a(G(),1),uz=a(K(),1),Lf=a(U(),1),dz=a(ae(),1),vne=a(Te(),1),bne=a(Vt(),1),Wm=a(j(),1),yne=a(bo(),1);var mne=a(Vt(),1),hne=a(j(),1);function zC(e){return typeof e.title=="object"&&"rendered"in e.title&&e.title.rendered?(0,mne.decodeEntities)(e.title.rendered):`#${e?.id} (${(0,hne.__)("no title")})`}var Df=a(E(),1);function Z8e(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 gne=(e,t)=>{let r=(0,cz.default)(e||"").toLowerCase(),o=(0,cz.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function X8e({data:e,onChangeControl:t}){let[r,o]=(0,Lf.useState)(""),n=e.parent,i=e.id,s=e.type,{parentPostTitle:l,pageItems:c,isHierarchical:u}=(0,uz.useSelect)(h=>{let{getEntityRecord:g,getEntityRecords:v,getPostType:b}=h(dz.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?zC(w):"",pageItems:y?v("postType",s,S):null}},[r,n,i,s]),d=(0,Lf.useMemo)(()=>{let h=(_,y=0)=>_.map(x=>[{value:x.id,label:"\u2014 ".repeat(y)+(0,bne.decodeEntities)(x.name),rawName:x.name},...h(x.children||[],y+1)]).sort(([x],[C])=>{let I=gne(x.rawName,r),k=gne(C.rawName,r);return I>=k?1:-1}).flat();if(!c)return[];let g=c.map(_=>({id:_.id,parent:_.parent??null,name:zC(_)}));r||(g=Z8e(g));let v=h(g),b=v.find(_=>_.value===n);return n&&l&&!b&&v.unshift({value:n,label:l,rawName:""}),v.map(_=>({..._,value:_.value.toString()}))},[c,r,l,n]);if(!u)return null;let f=h=>{o(h)},m=h=>{if(h)return t(parseInt(h,10)??0);t(0)};return(0,Df.jsx)(SI.ComboboxControl,{label:(0,Wm.__)("Parent"),help:(0,Wm.__)("Choose a parent page."),value:n?.toString(),options:d,onFilterValueChange:(0,vne.debounce)(h=>f(h),300),onChange:m,hideLabelFromVision:!0})}var wne=({data:e,field:t,onChange:r})=>{let{id:o}=t,n=(0,uz.useSelect)(s=>s(dz.store).getEntityRecord("root","__unstableBase")?.home,[]),i=(0,Lf.useCallback)(s=>r({[o]:s}),[o,r]);return(0,Df.jsx)("fieldset",{className:"fields-controls__parent",children:(0,Df.jsxs)("div",{children:[(0,Lf.createInterpolateElement)((0,Wm.sprintf)((0,Wm.__)('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,yne.filterURLForDisplay)(n).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,Df.jsx)("wbr",{})}),(0,Df.jsx)("p",{children:(0,Lf.createInterpolateElement)((0,Wm.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,Df.jsx)(SI.ExternalLink,{href:(0,Wm.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"),children:void 0})})}),(0,Df.jsx)(X8e,{data:e,onChangeControl:i})]})})};var _ne=a(K(),1),Sne=a(ae(),1),xne=a(j(),1);var fw=a(E(),1),Cne=({item:e})=>{let t=(0,_ne.useSelect)(r=>{let{getEntityRecord:o}=r(Sne.store);return e?.parent?o("postType",e.type,e.parent):null},[e.parent,e.type]);return t?(0,fw.jsx)(fw.Fragment,{children:zC(t)}):(0,fw.jsx)(fw.Fragment,{children:(0,xne.__)("None")})};var Q8e={id:"parent",type:"text",label:(0,Tne.__)("Parent"),Edit:wne,render:Cne,enableSorting:!0,filterBy:!1},fz=Q8e;var kne=a(j(),1);var mw=a(G(),1),Ene=a(U(),1),HC=a(j(),1),pw=a(E(),1);function J8e({data:e,onChange:t,field:r}){let[o,n]=(0,Ene.useState)(!!r.getValue({item:e})),i=s=>{n(s),s||t({password:""})};return(0,pw.jsxs)(mw.__experimentalVStack,{as:"fieldset",spacing:4,className:"fields-controls__password",children:[(0,pw.jsx)(mw.CheckboxControl,{label:(0,HC.__)("Password protected"),help:(0,HC.__)("Only visible to those who know the password"),checked:o,onChange:i}),o&&(0,pw.jsx)("div",{className:"fields-controls__password-input",children:(0,pw.jsx)(mw.TextControl,{label:(0,HC.__)("Password"),onChange:s=>t({password:s}),value:r.getValue({item:e})||"",placeholder:(0,HC.__)("Use a secure password"),type:"text",maxLength:255})})]})}var Pne=J8e;var $8e={id:"password",type:"text",label:(0,kne.__)("Password"),Edit:Pne,enableSorting:!1,enableHiding:!1,isVisible:e=>e.status!=="private",filterBy:!1},pz=$8e;var Ane=a(j(),1);var CI=a(G(),1);var Dl=a(j(),1),e7e=[{value:"draft",label:(0,Dl.__)("Draft"),icon:b0,description:(0,Dl.__)("Not ready to publish.")},{value:"future",label:(0,Dl.__)("Scheduled"),icon:bm,description:(0,Dl.__)("Publish automatically on a chosen date.")},{value:"pending",label:(0,Dl.__)("Pending Review"),icon:k1,description:(0,Dl.__)("Waiting for review before publishing.")},{value:"private",label:(0,Dl.__)("Private"),icon:C1,description:(0,Dl.__)("Only visible to site admins and editors.")},{value:"publish",label:(0,Dl.__)("Published"),icon:fv,description:(0,Dl.__)("Visible to everyone.")},{value:"trash",label:(0,Dl.__)("Trash"),icon:Cf}],xI=e7e;var hw=a(E(),1);function t7e({item:e,field:t}){let r=t.getValue({item:e}),o=xI.find(({value:s})=>s===r),n=o?.label||r,i=o?.icon;return(0,hw.jsxs)(CI.__experimentalHStack,{alignment:"left",spacing:0,children:[i&&(0,hw.jsx)("div",{className:"fields-controls__status-icon",children:(0,hw.jsx)(CI.Icon,{icon:i})}),(0,hw.jsx)("span",{children:n})]})}var Rne=t7e;var r7e="isAny",o7e={label:(0,Ane.__)("Status"),id:"status",type:"text",elements:xI,getValue:({item:e})=>e.status==="auto-draft"?"draft":e.status,render:Rne,Edit:"radio",enableSorting:!1,filterBy:{operators:[r7e]}},mz=o7e;var gw=a(j(),1),n7e={id:"comment_status",label:(0,gw.__)("Comments"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,gw.__)("Open"),description:(0,gw.__)("Visitors can add new comments and replies.")},{value:"closed",label:(0,gw.__)("Closed"),description:(0,gw.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}]},hz=n7e;var Bf=a(j(),1),TI=a(G(),1),gz=a(E(),1);function i7e({data:e,onChange:t}){let r=e?.ping_status??"open",o=n=>{t({...e,ping_status:n?"open":"closed"})};return(0,gz.jsx)(TI.CheckboxControl,{label:(0,Bf.__)("Enable pingbacks & trackbacks"),checked:r==="open",onChange:o,help:(0,gz.jsx)(TI.ExternalLink,{href:(0,Bf.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,Bf.__)("Learn more about pingbacks & trackbacks")})})}var s7e={id:"ping_status",label:(0,Bf.__)("Trackbacks & Pingbacks"),type:"text",Edit:i7e,enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,Bf.__)("Allow"),description:(0,Bf.__)("Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")},{value:"closed",label:(0,Bf.__)("Don't allow"),description:(0,Bf.__)("Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")}]},vz=s7e;var vw=a(j(),1),a7e={id:"discussion",label:(0,vw.__)("Discussion"),type:"text",render:({item:e})=>{let t=e.comment_status==="open",r=e.ping_status==="open";return t&&r?(0,vw.__)("Open"):t&&!r?(0,vw.__)("Comments only"):!t&&r?(0,vw.__)("Pings only"):(0,vw.__)("Closed")},filterBy:!1},bz=a7e;var One=a(j(),1);var Ku=a(j(),1),WC=a(U(),1),Gm=a(an(),1),qu=a(E(),1),UC=e=>(0,Gm.dateI18n)((0,Gm.getSettings)().formats.datetimeAbbreviated,(0,Gm.getDate)(e)),l7e=({item:e})=>{if(["draft","private"].includes(e.status??""))return(0,WC.createInterpolateElement)((0,Ku.sprintf)((0,Ku.__)("<span>Modified: <time>%s</time></span>"),UC(e.date??null)),{span:(0,qu.jsx)("span",{}),time:(0,qu.jsx)("time",{})});if(e.status==="future")return(0,WC.createInterpolateElement)((0,Ku.sprintf)((0,Ku.__)("<span>Scheduled: <time>%s</time></span>"),UC(e.date??null)),{span:(0,qu.jsx)("span",{}),time:(0,qu.jsx)("time",{})});if(e.status==="publish")return(0,WC.createInterpolateElement)((0,Ku.sprintf)((0,Ku.__)("<span>Published: <time>%s</time></span>"),UC(e.date??null)),{span:(0,qu.jsx)("span",{}),time:(0,qu.jsx)("time",{})});let n=(0,Gm.getDate)(e.modified??null)>(0,Gm.getDate)(e.date??null)?e.modified:e.date;return e.status==="pending"?(0,WC.createInterpolateElement)((0,Ku.sprintf)((0,Ku.__)("<span>Modified: <time>%s</time></span>"),UC(n??null)),{span:(0,qu.jsx)("span",{}),time:(0,qu.jsx)("time",{})}):(0,qu.jsx)("time",{children:UC(e.date??null)})},Ine=l7e;var c7e={id:"date",type:"datetime",label:(0,One.__)("Date"),render:Ine,filterBy:{operators:["before","after"]}},yz=c7e;var Nne=a(j(),1),u7e={id:"scheduled_date",type:"datetime",label:(0,Nne.__)("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},wz=u7e;var Lne=a(j(),1);var EI=a(j(),1),Mne=a(an(),1),Fne=a(E(),1);function Dne({item:e}){return e.modified?(0,Fne.jsx)(ws,{children:(0,EI.sprintf)((0,EI.__)("Last edited %s."),(0,Mne.humanTimeDiff)(e.modified))}):null}var d7e={id:"last_edited_date",type:"datetime",label:(0,Lne.__)("Last edited"),render:Dne,getValue:({item:e})=>e.modified,isVisible:e=>!!e.modified,readOnly:!0,enableHiding:!1,enableSorting:!1,filterBy:!1},_z=d7e;var Une=a(j(),1),Wne=a(K(),1),Gne=a(ae(),1);var Bne=a(j(),1),Vne=a(U(),1);var PI=a(G(),1),jne=a(K(),1),zne=a(ae(),1),Ym=a(E(),1);function f7e({item:e}){let t=e?.author,r=e?._embedded?.author?.[0]?.id,o=!!(t&&(!r||t!==r)),n=(0,jne.useSelect)(u=>{if(!o)return null;let{getEntityRecord:d}=u(zne.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,Vne.useState)(!1);return(0,Ym.jsxs)(PI.__experimentalHStack,{alignment:"left",spacing:0,children:[!!s&&(0,Ym.jsx)("div",{className:J("fields-controls__author-avatar",{"is-loaded":l}),children:(0,Ym.jsx)("img",{onLoad:()=>c(!0),alt:(0,Bne.__)("Author avatar"),src:s})}),!s&&(0,Ym.jsx)("div",{className:"fields-controls__author-icon",children:(0,Ym.jsx)(PI.Icon,{icon:uv})}),(0,Ym.jsx)("span",{className:"fields-controls__author-name",children:i})]})}var Hne=f7e;var p7e={label:(0,Une.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,Wne.resolveSelect)(Gne.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:Hne,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"]}},GC=p7e;var xz=a(j(),1),Kne=a(K(),1),Zne=a(ae(),1);var Yne=a(U(),1),qne=a(K(),1),kI=a(ae(),1);var qm=a(E(),1);function m7e(e){switch(e){case"theme":return Cc;case"plugin":return VV;case"site":return hV;default:return uv}}function Sz({item:e}){let[t,r]=(0,Yne.useState)(!1),o=e.original_source,n=m7e(o),i=e.author_text,s=e.author,l=(0,qne.useSelect)(c=>{if(o==="site"){let d=c(kI.store).getEntityRecord("root","__unstableBase")?.site_logo;return d?c(kI.store).getEntityRecord("postType","attachment",d)?.source_url:void 0}if(!(o!=="user"||!s))return c(kI.store).getUser(s)?.avatar_urls?.[48]},[o,s]);return(0,qm.jsxs)(se,{direction:"row",align:"center",children:[l&&(0,qm.jsx)("div",{className:J("fields-controls__author-avatar",{"is-loaded":t}),children:(0,qm.jsx)("img",{onLoad:()=>r(!0),alt:"",src:l})}),!l&&(0,qm.jsx)("div",{className:"fields-controls__author-icon",children:(0,qm.jsx)(Of,{icon:n})}),(0,qm.jsx)("span",{className:"fields-controls__author-name",children:i})]})}async function Xne(e){let t=await(0,Kne.resolveSelect)(Zne.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 Cz={label:(0,xz.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:Sz,getElements:()=>Xne("wp_template")},Tz={label:(0,xz.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:Sz,enableSorting:!1,filterBy:{isPrimary:!0},getElements:()=>Xne("wp_template_part")};var Qne=a(j(),1),h7e={id:"notesCount",label:(0,Qne.__)("Notes"),type:"integer",enableSorting:!1,filterBy:!1},Ez=h7e;var Pz=a(Vt(),1),bw=a(j(),1),RI=a(G(),1),kz=a(E(),1),g7e={id:"excerpt",type:"text",label:(0,bw.__)("Excerpt"),placeholder:(0,bw.__)("Add an excerpt"),description:(0,kz.jsx)(RI.ExternalLink,{href:(0,bw.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,bw.__)("Learn more about manual excerpts")}),render:({item:e})=>{let t;return typeof e.excerpt=="string"?t=e.excerpt?(0,Pz.decodeEntities)(e.excerpt):(0,bw.__)("Add an excerpt"):t=(0,Pz.decodeEntities)(e.excerpt?.raw||""),(0,kz.jsx)(RI.__experimentalText,{align:"left",numberOfLines:3,truncate:!0,children:t})},Edit:{control:"textarea",rows:4},enableSorting:!1,filterBy:!1},Rz=g7e;var Az=a(Vt(),1),AI=a(j(),1);var Jne=a(E(),1),$ne=e=>e.source==="custom"&&!e.has_theme_file&&e.is_custom,eie=({item:e})=>(0,Az.decodeEntities)(e.description||""),tie=({item:e})=>{let{description:t}=e;return t&&(0,Jne.jsx)(ws,{children:(0,Az.decodeEntities)(t)})},v7e={id:"description",type:"text",label:(0,AI.__)("Description"),placeholder:(0,AI.__)("Add a description"),getValue:eie,render:tie,Edit:{control:"textarea",rows:4},isVisible:$ne,enableSorting:!1,filterBy:!1,enableGlobalSearch:!0},Iz={id:"description_readonly",type:"text",label:(0,AI.__)("Description"),getValue:eie,render:tie,readOnly:!0,isVisible:e=>!$ne(e)&&!!e.description,enableSorting:!1,enableHiding:!1,filterBy:!1},Oz=v7e;var Ll=a(j(),1),rie=a(K(),1),oie=a(ae(),1),b7e=[{id:"aside",caption:(0,Ll.__)("Aside")},{id:"audio",caption:(0,Ll.__)("Audio")},{id:"chat",caption:(0,Ll.__)("Chat")},{id:"gallery",caption:(0,Ll.__)("Gallery")},{id:"image",caption:(0,Ll.__)("Image")},{id:"link",caption:(0,Ll.__)("Link")},{id:"quote",caption:(0,Ll.__)("Quote")},{id:"standard",caption:(0,Ll.__)("Standard")},{id:"status",caption:(0,Ll.__)("Status")},{id:"video",caption:(0,Ll.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0}),y7e={id:"format",label:(0,Ll.__)("Format"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,getElements:async()=>{let e=await(0,rie.resolveSelect)(oie.store).getThemeSupports();return b7e.filter(t=>e?.formats?.includes(t.id)).map(t=>({value:t.id,label:t.caption}))}},Nz=y7e;var cie=a(j(),1);var YC=a(G(),1),da=a(j(),1),iie=a(yw(),1),sie=a(an(),1),aie=a(U(),1),qC=a(E(),1),w7e=189;function lie({item:e}){let t="";typeof e.content=="string"?t=e.content:typeof e.content=="function"&&(t=e.content(e));let r=(0,da._x)("words","Word count type. Do not translate!"),o=(0,aie.useMemo)(()=>t?(0,iie.count)(t,r):0,[t,r]),n=e.modified;if(!o&&!n)return null;let i;if(o){let s=Math.round(o/w7e),l=(0,da.sprintf)((0,da._n)("%s word","%s words",o),o.toLocaleString()),c=s<=1?(0,da.__)("1 minute"):(0,da.sprintf)((0,da._n)("%s minute","%s minutes",s),s.toLocaleString());i=(0,da.sprintf)((0,da.__)("%1$s, %2$s read time."),l,c)}return(0,qC.jsxs)(YC.__experimentalVStack,{spacing:1,children:[i&&(0,qC.jsx)(YC.__experimentalText,{variant:"muted",children:i}),n&&(0,qC.jsx)(YC.__experimentalText,{variant:"muted",children:(0,da.sprintf)((0,da.__)("Last edited %s."),(0,sie.humanTimeDiff)(n))})]})}var _7e={label:(0,cie.__)("Post content information"),id:"post-content-info",type:"text",readOnly:!0,render:lie,enableSorting:!1,enableHiding:!1,filterBy:!1},Mz=_7e;var Fz=a(j(),1),S7e={id:"sticky",type:"boolean",label:(0,Fz.__)("Sticky"),description:(0,Fz.__)("Pin this post to the top of the blog."),enableSorting:!1,enableHiding:!1,isVisible:e=>!!e._links?.["wp:action-sticky"],filterBy:!1},Dz=S7e;var Lz=a(j(),1),x7e={id:"posts_per_page",type:"integer",label:(0,Lz.__)("Posts per page"),description:(0,Lz.__)("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},Bz=x7e;var Km=a(j(),1),C7e={id:"default_comment_status",type:"text",label:(0,Km.__)("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,Km.__)("Comments open"):(0,Km.__)("Comments closed"),elements:[{value:"open",label:(0,Km.__)("Open"),description:(0,Km.__)("Visitors can add new comments and replies.")},{value:"",label:(0,Km.__)("Closed"),description:(0,Km.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}],enableSorting:!1,enableHiding:!1,filterBy:!1},Vz=C7e;var jz=a(j(),1),T7e={id:"posts_page_title",type:"text",label:(0,jz.__)("Blog title"),description:(0,jz.__)("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},zz=T7e;var uie=a(j(),1),E7e={id:"view-post",label:(0,uie._x)("View","verb"),isPrimary:!0,icon:ms,isEligible(e){return e.status!=="trash"},callback(e,{onActionPerformed:t}){let r=e[0];window.open(r?.link,"_blank"),t&&t(e)}},Hz=E7e;var Uz=a(K(),1),die=a(ae(),1),Zm=a(j(),1),fie=a(It(),1),pie=a(U(),1),jf=a(G(),1),Vf=a(E(),1);function P7e(e){return typeof e.menu_order=="number"&&Number.isInteger(e.menu_order)}function k7e({items:e,closeModal:t,onActionPerformed:r}){let[o,n]=(0,pie.useState)(e[0]),{editEntityRecord:i,saveEditedEntityRecord:s}=(0,Uz.useDispatch)(die.store),{createSuccessNotice:l,createErrorNotice:c}=(0,Uz.useDispatch)(fie.store),u=P7e(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,Zm.__)("Order updated."),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,Zm.__)("An error occurred while updating the order");c(g,{type:"snackbar"})}}return(0,Vf.jsx)("form",{onSubmit:d,children:(0,Vf.jsxs)(jf.__experimentalVStack,{spacing:"5",children:[(0,Vf.jsx)("div",{children:(0,Zm.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,Vf.jsx)(jf.__experimentalInputControl,{label:(0,Zm.__)("Order"),type:"number",value:typeof o.menu_order=="number"&&Number.isInteger(o.menu_order)?String(o.menu_order):"",onChange:f=>{let m=parseInt(f,10);n({...o,menu_order:isNaN(m)?void 0:m})}}),(0,Vf.jsxs)(jf.__experimentalHStack,{justify:"right",children:[(0,Vf.jsx)(jf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,Zm.__)("Cancel")}),(0,Vf.jsx)(jf.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!u,children:(0,Zm.__)("Save")})]})]})})}var R7e={id:"order-pages",label:(0,Zm.__)("Order"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:k7e},Wz=R7e;var Gz=a(K(),1),mie=a(ae(),1),ji=a(j(),1),hie=a(It(),1),Yz=a(U(),1),Hf=a(G(),1);var zf=a(E(),1),A7e={id:"duplicate-post",label:(0,ji._x)("Duplicate","action label"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,Yz.useState)({...e[0],title:(0,ji.sprintf)((0,ji._x)("%s (Copy)","post"),ft(e[0]))}),[i,s]=(0,Yz.useState)(!1),{saveEntityRecord:l}=(0,Gz.useDispatch)(mie.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Gz.useDispatch)(hie.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,ji.__)("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,ji.sprintf)((0,ji.__)('"%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,ji.__)("An error occurred while duplicating the page.");u(y,{type:"snackbar"})}finally{s(!1),t?.()}}return(0,zf.jsx)("form",{onSubmit:d,children:(0,zf.jsxs)(Hf.__experimentalVStack,{spacing:3,children:[typeof o.id=="string"&&(0,zf.jsx)("div",{children:(0,ji.__)("You are about to duplicate a bundled template. Changes will not be live until you activate the new template.")}),(0,zf.jsx)(Hf.__experimentalInputControl,{label:(0,ji.__)("Title"),placeholder:(0,ji.__)("No title"),value:ft(o),onChange:f=>n(m=>({...m,title:f||(0,ji.__)("No title")}))}),(0,zf.jsxs)(Hf.__experimentalHStack,{spacing:2,justify:"end",children:[(0,zf.jsx)(Hf.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,ji.__)("Cancel")}),(0,zf.jsx)(Hf.Button,{variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,__next40pxDefaultSize:!0,children:(0,ji._x)("Duplicate","action label")})]})]})})}},qz=A7e;var Kz=a(K(),1),gie=a(ae(),1),Gv=a(j(),1),vie=a(U(),1),bie=a(Al(),1),Uf=a(G(),1),yie=a(It(),1);var Xm=a(E(),1),{PATTERN_TYPES:I7e}=ln(bie.privateApis),O7e={id:"rename-post",label:(0,Gv.__)("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)?UX(e)&&!window?.__experimentalTemplateActivate?E2(e)&&e.is_custom&&e.permissions?.update:WX(e)?e.source==="custom"&&!e?.has_theme_file&&e.permissions?.update:e.type===I7e.user&&e.permissions?.update:e.permissions?.update},RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o]=e,[n,i]=(0,vie.useState)(()=>ft(o,"")),{editEntityRecord:s,saveEditedEntityRecord:l}=(0,Kz.useDispatch)(gie.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Kz.useDispatch)(yie.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,Gv.__)("Name updated"),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,Gv.__)("An error occurred while updating the name");u(g,{type:"snackbar"})}}return(0,Xm.jsx)("form",{onSubmit:d,children:(0,Xm.jsxs)(Uf.__experimentalVStack,{spacing:"5",children:[(0,Xm.jsx)(Uf.TextControl,{label:(0,Gv.__)("Name"),value:n,onChange:i,required:!0}),(0,Xm.jsxs)(Uf.__experimentalHStack,{justify:"right",children:[(0,Xm.jsx)(Uf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,Gv.__)("Cancel")}),(0,Xm.jsx)(Uf.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Gv.__)("Save")})]})]})})}},Zz=O7e;var zi=a(K(),1),Yv=a(ae(),1),fn=a(j(),1),Qm=a(It(),1),wie=a(U(),1),II=a(Pt(),1),Wf=a(G(),1),_ie=a(bo(),1),Sie=a(Bu(),1);var qv=a(E(),1),N7e=e=>e?e.source==="custom"&&(!!e?.plugin||e?.has_theme_file):!1,M7e=async(e,{allowUndo:t=!0}={})=>{let r="edit-site-template-reverted";if((0,zi.dispatch)(Qm.store).removeNotice(r),!N7e(e)){(0,zi.dispatch)(Qm.store).createErrorNotice((0,fn.__)("This template is not revertable."),{type:"snackbar"});return}try{let o=(0,zi.select)(Yv.store).getEntityConfig("postType",e.type);if(!o){(0,zi.dispatch)(Qm.store).createErrorNotice((0,fn.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let n=(0,_ie.addQueryArgs)(`${o.baseURL}/${e.id}`,{context:"edit",source:e.origin}),i=await(0,Sie.default)({path:n});if(!i){(0,zi.dispatch)(Qm.store).createErrorNotice((0,fn.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let s=({blocks:u=[]})=>(0,II.__unstableSerializeAndClean)(u),l=(0,zi.select)(Yv.store).getEditedEntityRecord("postType",e.type,e.id);(0,zi.dispatch)(Yv.store).editEntityRecord("postType",e.type,e.id,{content:s,blocks:l.blocks,source:"custom"},{undoIgnore:!0});let c=(0,II.parse)(i?.content?.raw);if((0,zi.dispatch)(Yv.store).editEntityRecord("postType",e.type,i.id,{content:s,blocks:c,source:"theme"}),t){let u=()=>{(0,zi.dispatch)(Yv.store).editEntityRecord("postType",e.type,l.id,{content:s,blocks:l.blocks,source:"custom"})};(0,zi.dispatch)(Qm.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,zi.dispatch)(Qm.store).createErrorNotice(n,{type:"snackbar"})}},F7e={id:"reset-post",label:(0,fn.__)("Reset"),isEligible:e=>window?.__experimentalTemplateActivate?e.type==="wp_template_part"&&e?.source==="custom"&&e?.has_theme_file:Tf(e)&&e?.source==="custom"&&(!!(e.type==="wp_template"&&e?.plugin)||e?.has_theme_file),icon:_f,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,wie.useState)(!1),{saveEditedEntityRecord:i}=(0,zi.useDispatch)(Yv.store),{createSuccessNotice:s,createErrorNotice:l}=(0,zi.useDispatch)(Qm.store),c=async()=>{try{for(let u of e)await M7e(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,qv.jsxs)(Wf.__experimentalVStack,{spacing:"5",children:[(0,qv.jsx)(Wf.__experimentalText,{children:(0,fn.__)("Reset to default and clear all customizations?")}),(0,qv.jsxs)(Wf.__experimentalHStack,{justify:"right",children:[(0,qv.jsx)(Wf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,fn.__)("Cancel")}),(0,qv.jsx)(Wf.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0),await c(),r?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,fn.__)("Reset")})]})]})}},Xz=F7e;var OI=a(j(),1),xie=a(Al(),1);var Cie=a(E(),1),{CreatePatternModalContents:D7e,useDuplicatePatternProps:L7e}=ln(xie.privateApis),B7e={id:"duplicate-pattern",label:(0,OI._x)("Duplicate","action label"),isEligible:e=>e.type!=="wp_template_part",modalHeader:(0,OI._x)("Duplicate pattern","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=L7e({pattern:r,onSuccess:()=>t?.()});return(0,Cie.jsx)(D7e,{onClose:t,confirmLabel:(0,OI._x)("Duplicate","action label"),...o})}},Qz=B7e;var Jm=function(){return Jm=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},Jm.apply(this,arguments)};function Tie(e){return e.toLowerCase()}var V7e=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],j7e=/[^A-Z0-9]+/gi;function NI(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,o=r===void 0?V7e:r,n=t.stripRegexp,i=n===void 0?j7e:n,s=t.transform,l=s===void 0?Tie:s,c=t.delimiter,u=c===void 0?" ":c,d=Eie(Eie(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 Eie(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(o,n){return o.replace(n,r)},e)}function Pie(e){return e.charAt(0).toUpperCase()+e.substr(1)}function z7e(e){return Pie(e.toLowerCase())}function MI(e,t){return t===void 0&&(t={}),NI(e,Jm({delimiter:" ",transform:z7e},t))}function kie(e,t){return t===void 0&&(t={}),NI(e,Jm({delimiter:"."},t))}function Kv(e,t){return t===void 0&&(t={}),kie(e,Jm({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 _w=e=>new DataView(new ArrayBuffer(e)),Gf=e=>new Uint8Array(e.buffer||e),ww=e=>new TextEncoder().encode(String(e)),Zv=e=>Math.min(4294967295,Number(e)),Rie=e=>Math.min(65535,Number(e));function H7e(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:ww(e)};if(e instanceof Blob)return{isFile:1,t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t,i:Gf(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:Iie(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function Iie(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=U7e(n.value);r.enqueue(i),o+=i.byteLength}}},cancel(r){t.throw?.(r)}})}function U7e(e){return typeof e=="string"?ww(e):e instanceof Uint8Array?e:Gf(e)}function Oie(e,t,r){let[o,n]=(function(i){return i?i instanceof Uint8Array?[i,1]:ArrayBuffer.isView(i)||i instanceof ArrayBuffer?[Gf(i),1]:[ww(i),0]:[void 0,0]})(t);if(e instanceof File)return{o:Jz(o||ww(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:Jz(o||ww(c)),u:BigInt(u),l:n}}return o=Jz(o,e!==void 0||r!==void 0),typeof e=="string"?{o,u:BigInt(ww(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:W7e(e,r),l:n}}function W7e(e,t){return t>-1?BigInt(t):e?void 0:0n}function Jz(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 Nie=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);Nie[e]=t}function Aie(e,t=0){t^=-1;for(var r=0,o=e.length;r<o;r++)t=t>>>8^Nie[255&t^e[r]];return(-1^t)>>>0}function Mie(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 G7e({o:e,l:t},r){return 8*(!t||(r??(function(o){try{Y7e.decode(o)}catch{return 0}return 1})(e)))}var Y7e=new TextDecoder("utf8",{fatal:1});function q7e(e,t=0){let r=_w(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|t),Mie(e.t,r,10),r.setUint16(26,e.o.length,1),Gf(r)}async function*K7e(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=Aie(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=Aie(o,e.m),e.u+=BigInt(o.length),yield o}}}function Z7e(e,t){let r=_w(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)),Gf(r)}function X7e(e,t,r=0,o=0){let n=_w(46);return n.setUint32(0,1347092738),n.setUint32(4,755182848),n.setUint16(8,2048|r),Mie(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),Gf(n)}function Q7e(e,t,r){let o=_w(r);return o.setUint16(0,1,1),o.setUint16(2,r-4,1),16&r&&(o.setBigUint64(4,e.u,1),o.setBigUint64(12,e.u,1)),o.setBigUint64(r-8,t,1),Gf(o)}function Fie(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var J7e=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 Oie(...Fie(r)[0])})(e));function Die(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(J7e(t.metadata))),new Response($7e(e,t),{headers:r})}function $7e(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]=Fie(i.value);return{done:0,value:Object.assign(H7e(...l),Oie(...s))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}})(e);return Iie((async function*(o,n){let i=[],s=0n,l=0n,c=0;for await(let f of o){let m=G7e(f,n.buffersAreUTF8);yield q7e(f,m),yield new Uint8Array(f.o),f.isFile&&(yield*K7e(f));let h=f.u>=0xffffffffn,g=12*(s>=0xffffffffn)|28*h;yield Z7e(f,h),i.push(X7e(f,s,m,g)),i.push(f.o),g&&i.push(Q7e(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=_w(76);f.setUint32(0,1347094022),f.setBigUint64(4,BigInt(44),1),f.setUint32(12,755182848),f.setBigUint64(24,l,1),f.setBigUint64(32,l,1),f.setBigUint64(40,u,1),f.setBigUint64(48,s,1),f.setUint32(56,1347094023),f.setBigUint64(64,s+u,1),f.setUint32(72,1,1),yield Gf(f)}let d=_w(22);d.setUint32(0,1347093766),d.setUint16(8,Rie(l),1),d.setUint16(10,Rie(l),1),d.setUint32(12,Zv(u),1),d.setUint32(16,Zv(s),1),yield Gf(d)})(r,t),r)}var $z=a(KA(),1),eH=a(j(),1);function Lie(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 e9e={id:"export-pattern",label:(0,eH.__)("Export as JSON"),icon:KB,supportsBulk:!0,isEligible:e=>e.type==="wp_block",callback:async e=>{if(e.length===1)return(0,$z.downloadBlob)(`${Kv(ft(e[0])||e[0].slug)}.json`,Lie(e[0]),"application/json");let t={},r=e.map(o=>{let n=Kv(ft(o)||o.slug);return t[n]=(t[n]||0)+1,{name:`${n+(t[n]>1?"-"+(t[n]-1):"")}.json`,lastModified:new Date,input:Lie(o)}});return(0,$z.downloadBlob)((0,eH.__)("patterns-export")+".zip",await Die(r).blob(),"application/zip")}},tH=e9e;var Bie=a(bo(),1),FI=a(j(),1),t9e={id:"view-post-revisions",context:"list",label(e){let t=e[0]._links?.["version-history"]?.[0]?.count??0;return(0,FI.sprintf)((0,FI.__)("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,Bie.addQueryArgs)("revision.php",{revision:r?._links?.["predecessor-version"]?.[0]?.id});document.location.href=o,t&&t(e)}},rH=t9e;var Vie=a(ae(),1),Tn=a(j(),1),jie=a(It(),1);var zie=a(U(),1),oH=a(K(),1),Yf=a(G(),1),Hie=a(Vt(),1);var Xv=a(E(),1),r9e={id:"permanently-delete",label:(0,Tn.__)("Permanently delete"),supportsBulk:!0,icon:Cf,isEligible(e){if(Tf(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,zie.useState)(!1),{createSuccessNotice:i,createErrorNotice:s}=(0,oH.useDispatch)(jie.store),{deleteEntityRecord:l}=(0,oH.useDispatch)(Vie.store);return(0,Xv.jsxs)(Yf.__experimentalVStack,{spacing:"5",children:[(0,Xv.jsx)(Yf.__experimentalText,{children:e.length>1?(0,Tn.sprintf)((0,Tn._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,Tn.sprintf)((0,Tn.__)('Are you sure you want to permanently delete "%s"?'),(0,Hie.decodeEntities)(ft(e[0])))}),(0,Xv.jsxs)(Yf.__experimentalHStack,{justify:"right",children:[(0,Xv.jsx)(Yf.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Tn.__)("Cancel")}),(0,Xv.jsx)(Yf.Button,{variant:"primary",onClick:async()=>{n(!0);let c=await Promise.allSettled(e.map(u=>l("postType",u.type,u.id,{force:!0},{throwOnError:!0})));if(c.every(({status:u})=>u==="fulfilled")){let u;c.length===1?u=(0,Tn.sprintf)((0,Tn.__)('"%s" permanently deleted.'),ft(e[0])):u=(0,Tn.__)("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,Tn.__)("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,Tn.__)("An error occurred while permanently deleting the items."):d.size===1?u=(0,Tn.sprintf)((0,Tn.__)("An error occurred while permanently deleting the items: %s"),[...d][0]):u=(0,Tn.sprintf)((0,Tn.__)("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,Tn.__)("Delete permanently")})]})]})}},nH=r9e;var Uie=a(ae(),1),Cs=a(j(),1),Wie=a(It(),1);var o9e={id:"restore",label:(0,Cs.__)("Restore"),isPrimary:!0,icon:_f,supportsBulk:!0,isEligible(e){return!Tf(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(Wie.store),{editEntityRecord:i,saveEditedEntityRecord:s}=t.dispatch(Uie.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,Cs.sprintf)((0,Cs.__)('"%s" has been restored.'),ft(e[0])):e[0].type==="page"?c=(0,Cs.sprintf)((0,Cs.__)("%d pages have been restored."),e.length):c=(0,Cs.sprintf)((0,Cs.__)("%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,Cs.__)("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,Cs.__)("An error occurred while restoring the posts."):u.size===1?c=(0,Cs.sprintf)((0,Cs.__)("An error occurred while restoring the posts: %s"),[...u][0]):c=(0,Cs.sprintf)((0,Cs.__)("Some errors occurred while restoring the posts: %s"),[...u].join(","))}n(c,{type:"snackbar"})}}},iH=o9e;var sH=a(K(),1),Gie=a(ae(),1),Xo=a(j(),1),Yie=a(It(),1),qie=a(U(),1),qf=a(G(),1);var Qv=a(E(),1),n9e={id:"move-to-trash",label:(0,Xo._x)("Trash","verb"),isPrimary:!0,icon:Cf,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,qie.useState)(!1),{createSuccessNotice:i,createErrorNotice:s}=(0,sH.useDispatch)(Yie.store),{deleteEntityRecord:l}=(0,sH.useDispatch)(Gie.store);return(0,Qv.jsxs)(qf.__experimentalVStack,{spacing:"5",children:[(0,Qv.jsx)(qf.__experimentalText,{children:e.length===1?(0,Xo.sprintf)((0,Xo.__)('Are you sure you want to move "%s" to the trash?'),ft(e[0])):(0,Xo.sprintf)((0,Xo._n)("Are you sure you want to move %d item to the trash ?","Are you sure you want to move %d items to the trash ?",e.length),e.length)}),(0,Qv.jsxs)(qf.__experimentalHStack,{justify:"right",children:[(0,Qv.jsx)(qf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,Xo.__)("Cancel")}),(0,Qv.jsx)(qf.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0);let c=await Promise.allSettled(e.map(u=>l("postType",u.type,u.id.toString(),{},{throwOnError:!0})));if(c.every(({status:u})=>u==="fulfilled")){let u;c.length===1?u=(0,Xo.sprintf)((0,Xo.__)('"%s" moved to the trash.'),ft(e[0])):u=(0,Xo.sprintf)((0,Xo._n)("%d item moved to the trash.","%d items moved to the trash.",e.length),e.length),i(u,{type:"snackbar",id:"move-to-trash-action"})}else{let u;if(c.length===1){let d=c[0];d.reason?.message?u=d.reason.message:u=(0,Xo.__)("An error occurred while moving the item to the trash.")}else{let d=new Set,f=c.filter(({status:m})=>m==="rejected");for(let m of f){let h=m;h.reason?.message&&d.add(h.reason.message)}d.size===0?u=(0,Xo.__)("An error occurred while moving the items to the trash."):d.size===1?u=(0,Xo.sprintf)((0,Xo.__)("An error occurred while moving the item to the trash: %s"),[...d][0]):u=(0,Xo.sprintf)((0,Xo.__)("Some errors occurred while moving the items to the trash: %s"),[...d].join(","))}s(u,{type:"snackbar"})}r&&r(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,Xo._x)("Trash","verb")})]})]})}},aH=n9e;var gr=a(j(),1),Qie=a(U(),1),Kf=a(G(),1),Jie=a(Al(),1),cH=a(Vt(),1);var Kie=a(It(),1),Zie=a(ae(),1),lH=a(K(),1);function i9e(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 Xie=async(e,t,r)=>{let{createSuccessNotice:o,createErrorNotice:n}=(0,lH.dispatch)(Kie.store),{deleteEntityRecord:i}=(0,lH.dispatch)(Zie.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=i9e(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 Jv=a(E(),1),{PATTERN_TYPES:s9e}=ln(Jie.privateApis),a9e={id:"delete-post",label:(0,gr.__)("Delete"),isPrimary:!0,icon:Cf,isEligible(e){return Tf(e)?E2(e):e.type===s9e.user},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,Qie.useState)(!1),i=e.every(s=>Tf(s)&&s?.has_theme_file);return(0,Jv.jsxs)(Kf.__experimentalVStack,{spacing:"5",children:[(0,Jv.jsx)(Kf.__experimentalText,{children:e.length>1?(0,gr.sprintf)((0,gr._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,gr.sprintf)((0,gr._x)('Delete "%s"?',"template part"),ft(e[0]))}),(0,Jv.jsxs)(Kf.__experimentalHStack,{justify:"right",children:[(0,Jv.jsx)(Kf.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,gr.__)("Cancel")}),(0,Jv.jsx)(Kf.Button,{variant:"primary",onClick:async()=>{n(!0),await Xie(e,{success:{messages:{getMessage:l=>i?(0,gr.sprintf)((0,gr.__)('"%s" reset.'),(0,cH.decodeEntities)(ft(l))):(0,gr.sprintf)((0,gr._x)('"%s" deleted.',"template part"),(0,cH.decodeEntities)(ft(l))),getBatchMessage:()=>i?(0,gr.__)("Items reset."):(0,gr.__)("Items deleted.")}},error:{messages:{getMessage:l=>l.size===1?[...l][0]:i?(0,gr.__)("An error occurred while reverting the item."):(0,gr.__)("An error occurred while deleting the item."),getBatchMessage:l=>l.size===0?i?(0,gr.__)("An error occurred while reverting the items."):(0,gr.__)("An error occurred while deleting the items."):l.size===1?i?(0,gr.sprintf)((0,gr.__)("An error occurred while reverting the items: %s"),[...l][0]):(0,gr.sprintf)((0,gr.__)("An error occurred while deleting the items: %s"),[...l][0]):i?(0,gr.sprintf)((0,gr.__)("Some errors occurred while reverting the items: %s"),[...l].join(",")):(0,gr.sprintf)((0,gr.__)("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,gr.__)("Delete")})]})]})}},uH=a9e;var cse=a(K(),1),Zf=a(j(),1),use=a(It(),1),dse=a(U(),1),fse=a(Pt(),1);var Hi=a(G(),1),sse=a(Te(),1),LI=a(ae(),1),xw=a(K(),1),DI=a(U(),1),Sw=a(j(),1);var ase=a(It(),1),lse=a(Pt(),1);var $ie=a(K(),1),ese=a(ae(),1),tse=()=>(0,$ie.useSelect)(e=>e(ese.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),[])??[],rse=(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}`},ose=e=>Kv(e).replace(/[^\w-]+/g,"")||"wp-custom-part";var En=a(E(),1);function nse(e,t){return`fields-create-template-part-modal__area-option-${e}-${t}`}function ise(e,t){return`fields-create-template-part-modal__area-option-description-${e}-${t}`}function Cw({modalTitle:e,...t}){let r=(0,xw.useSelect)(o=>o(LI.store).getPostType("wp_template_part")?.labels?.add_new_item,[]);return(0,En.jsx)(Hi.Modal,{title:e||r,onRequestClose:t.closeModal,overlayClassName:"fields-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,En.jsx)(dH,{...t})})}var l9e=e=>e==="header"?vV:e==="footer"?cV:e==="sidebar"?i8:e==="navigation-overlay"?IV:M1;function dH({defaultArea:e="uncategorized",blocks:t=[],confirmLabel:r=(0,Sw.__)("Add"),closeModal:o,onCreate:n,onError:i,defaultTitle:s=""}){let{createErrorNotice:l}=(0,xw.useDispatch)(ase.store),{saveEntityRecord:c}=(0,xw.useDispatch)(LI.store),u=tse(),[d,f]=(0,DI.useState)(s),[m,h]=(0,DI.useState)(e),[g,v]=(0,DI.useState)(!1),b=(0,sse.useInstanceId)(Cw),_=(0,xw.useSelect)(w=>w(LI.store).getCurrentTheme()?.default_template_part_areas,[]);async function y(){if(!(!d||g))try{v(!0);let w=rse(d,u),S=ose(w),x=await c("postType","wp_template_part",{slug:S,title:w,content:(0,lse.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,Sw.__)("An error occurred while creating the template part.");l(S,{type:"snackbar"}),i?.()}finally{v(!1)}}return(0,En.jsx)("form",{onSubmit:async w=>{w.preventDefault(),await y()},children:(0,En.jsxs)(Hi.__experimentalVStack,{spacing:"4",children:[(0,En.jsx)(Hi.TextControl,{label:(0,Sw.__)("Name"),value:d,onChange:f,required:!0}),(0,En.jsxs)("fieldset",{className:"fields-create-template-part-modal__area-fieldset",children:[(0,En.jsx)(Hi.BaseControl.VisualLabel,{as:"legend",children:(0,Sw.__)("Area")}),(0,En.jsx)("div",{className:"fields-create-template-part-modal__area-radio-group",children:(_??[]).map(w=>{let S=l9e(w.icon);return(0,En.jsxs)("div",{className:"fields-create-template-part-modal__area-radio-wrapper",children:[(0,En.jsx)("input",{type:"radio",id:nse(w.area,b),name:`fields-create-template-part-modal__area-${b}`,value:w.area,checked:m===w.area,onChange:()=>{h(w.area)},"aria-describedby":ise(w.area,b)}),(0,En.jsx)(Hi.Icon,{icon:S,className:"fields-create-template-part-modal__area-radio-icon"}),(0,En.jsx)("label",{htmlFor:nse(w.area,b),className:"fields-create-template-part-modal__area-radio-label",children:w.label}),(0,En.jsx)(Hi.Icon,{icon:Oo,className:"fields-create-template-part-modal__area-radio-checkmark"}),(0,En.jsx)("p",{className:"fields-create-template-part-modal__area-radio-description",id:ise(w.area,b),children:w.description})]},w.area)})})]}),(0,En.jsxs)(Hi.__experimentalHStack,{justify:"right",children:[(0,En.jsx)(Hi.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{o()},children:(0,Sw.__)("Cancel")}),(0,En.jsx)(Hi.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!d||g,isBusy:g,children:r})]})]})})}var pse=a(E(),1),c9e={id:"duplicate-template-part",label:(0,Zf._x)("Duplicate","action label"),isEligible:e=>e.type==="wp_template_part",modalHeader:(0,Zf._x)("Duplicate template part","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=(0,dse.useMemo)(()=>r.blocks??(0,fse.parse)(typeof r.content=="string"?r.content:r.content.raw,{__unstableSkipMigrationLogs:!0}),[r.content,r.blocks]),{createSuccessNotice:n}=(0,cse.useDispatch)(use.store);function i(s){n((0,Zf.sprintf)((0,Zf._x)('"%s" duplicated.',"template part"),ft(s)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()}return(0,pse.jsx)(dH,{blocks:o,defaultArea:r.area,defaultTitle:(0,Zf.sprintf)((0,Zf._x)("%s (Copy)","template part"),ft(r)),onCreate:i,onError:t,confirmLabel:(0,Zf._x)("Duplicate","action label"),closeModal:t??(()=>{})})}},fH=c9e;var KC=a(j(),1),mse=a(G(),1);var $m=a(E(),1),u9e={id:"alt_text",type:"text",label:(0,KC.__)("Alt text"),isVisible:e=>e?.media_type==="image",render:({item:e})=>e?.alt_text||"-",Edit:({field:e,onChange:t,data:r})=>(0,$m.jsx)(mse.TextareaControl,{label:e.label,value:r.alt_text||"",onChange:o=>t({alt_text:o}),help:(0,$m.jsxs)($m.Fragment,{children:[(0,$m.jsx)(J9,{href:(0,KC.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),openInNewTab:!0,children:(0,KC.__)("Describe the purpose of the image.")}),(0,$m.jsx)("br",{}),(0,KC.__)("Leave empty if decorative.")]}),rows:2}),enableSorting:!1,filterBy:!1},pH=u9e;var yse=a(j(),1);var VI=a(U(),1),mH=a(j(),1);function BI(e){return e?typeof e=="string"?e:typeof e=="object"&&(e.rendered||e.raw)||"":""}var jI=a(E(),1);function hse({item:e}){let[t,r]=(0,VI.useState)(null),o=e.post,n=e._embedded?.["wp:attached-to"]?.[0]?.id,i=e._embedded?.["wp:attached-to"]?.[0]?.title;return(0,VI.useEffect)(()=>{o&&o===n&&r(BI(i)||(0,mH.__)("(no title)")),o||r((0,mH.__)("(Unattached)"))},[o,n,i]),(0,jI.jsx)(jI.Fragment,{children:t})}var zI=a(ae(),1),HI=a(G(),1),hH=a(j(),1),$v=a(U(),1),gse=a(Te(),1),vse=a(K(),1);var gH=a(E(),1);function bse({data:e,onChange:t}){let r=e.post&&e?._embedded?.["wp:attached-to"]?.[0]?[{label:BI(e._embedded?.["wp:attached-to"]?.[0]?.title),value:e.post.toString()}]:[],[o,n]=(0,$v.useState)(r),[i,s]=(0,$v.useState)([]),[l,c]=(0,$v.useState)(!1),[u,d]=(0,$v.useState)(e?.post?.toString()??null),f=(0,vse.useSelect)(b=>b(zI.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,zI.__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,$v.createInterpolateElement)((0,hH.__)("Search for a post or page to attach this media to or <button>detach current</button>."),{button:(0,gH.jsx)(HI.Button,{__next40pxDefaultSize:!0,onClick:m,variant:"link",accessibleWhenDisabled:!0,disabled:!u})});return(0,gH.jsx)(HI.ComboboxControl,{className:"dataviews-media-field__attached-to",isLoading:l,label:(0,hH.__)("Attached to"),help:v,value:u,options:o,onFilterValueChange:(0,gse.debounce)(b=>h(b),300),onChange:g,hideLabelFromVision:!0})}var d9e={id:"attached_to",type:"text",label:(0,yse.__)("Attached to"),Edit:bse,render:hse,enableSorting:!1,filterBy:!1},vH=d9e;var Sse=a(j(),1),xse=a(K(),1),Cse=a(ae(),1);var wse=a(j(),1),Tw=a(U(),1);var UI=a(G(),1),eh=a(E(),1);function _se({item:e}){let t=e?._embedded?.author?.[0],r=t?.name,o=t?.avatar_urls?.[48],[n,i]=(0,Tw.useState)("loading");(0,Tw.useEffect)(()=>{i("loading")},[o]);let s=(0,Tw.useCallback)(c=>{c?.complete&&i("instant")},[]),l=()=>{n==="loading"&&i("loaded")};return(0,eh.jsxs)(UI.__experimentalHStack,{alignment:"left",spacing:0,children:[!!o&&(0,eh.jsx)("div",{className:J("media-author-field__avatar",{"is-loading":n==="loading","is-loaded":n==="loaded"}),children:(0,eh.jsx)("img",{ref:s,onLoad:l,alt:(0,wse.__)("Author avatar"),src:o})}),!o&&(0,eh.jsx)("div",{className:"media-author-field__icon",children:(0,eh.jsx)(UI.Icon,{icon:uv})}),(0,eh.jsx)("span",{className:"media-author-field__name",children:r})]})}var f9e={label:(0,Sse.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,xse.resolveSelect)(Cse.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),render:_se,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},bH=f9e;var Tse=a(j(),1),Ese=a(G(),1);function th(e){return e?typeof e=="string"?e:typeof e=="object"&&"raw"in e&&e.raw||"":""}var Pse=a(E(),1),p9e={id:"caption",type:"text",label:(0,Tse.__)("Caption"),getValue:({item:e})=>th(e?.caption),render:({item:e})=>th(e?.caption)||"-",Edit:({field:e,onChange:t,data:r})=>(0,Pse.jsx)(Ese.TextareaControl,{label:e.label,value:th(r.caption)||"",onChange:o=>t({caption:o}),rows:2}),enableSorting:!1,filterBy:!1},yH=p9e;var kse=a(j(),1),m9e={id:"date",type:"datetime",label:(0,kse.__)("Date added"),filterBy:{operators:["before","after"]},readOnly:!0},wH=m9e;var Rse=a(j(),1),Ase=a(G(),1);var _H=a(E(),1),h9e={id:"description",type:"text",label:(0,Rse.__)("Description"),getValue:({item:e})=>th(e?.description),render:({item:e})=>(0,_H.jsx)("div",{children:th(e?.description)||"-"}),Edit:({field:e,onChange:t,data:r})=>(0,_H.jsx)(Ase.TextareaControl,{label:e.label,value:th(r.description)||"",onChange:o=>t({description:o}),rows:5}),enableSorting:!1,filterBy:!1},SH=h9e;var Mse=a(j(),1),Fse=a(bo(),1);var Ise=a(U(),1),Ose=a(bo(),1);var eb=a(E(),1),g9e=15;function Nse({item:e}){let t=(0,Ise.useMemo)(()=>e?.source_url?(0,Ose.getFilename)(e.source_url):null,[e?.source_url]);return t?t.length<=g9e?(0,eb.jsx)("span",{className:"dataviews-media-field__filename",children:t}):(0,eb.jsxs)(Ze.Root,{children:[(0,eb.jsx)(Ze.Trigger,{render:(0,eb.jsx)("span",{className:"dataviews-media-field__filename",children:t})}),(0,eb.jsx)(Ze.Popup,{children:t})]}):""}var v9e={id:"filename",type:"text",label:(0,Mse.__)("File name"),getValue:({item:e})=>(0,Fse.getFilename)(e?.source_url||""),render:Nse,enableSorting:!1,filterBy:!1,readOnly:!0},xH=v9e;var Ui=a(j(),1),Lse=1024,Bse=1024*Lse,Vse=1024*Bse,jse=1024*Vse,zse=1024*jse,Hse=1024*zse,Use=1024*Hse,b9e=1024*Use;function Dse(e,t,r=2){return(0,Ui.sprintf)((0,Ui._x)("%1$s %2$s","file size"),e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r}),t)}function y9e(e,t=2){if(e===0)return Dse(0,(0,Ui._x)("B","unit symbol"),t);let r={[(0,Ui._x)("YB","unit symbol")]:b9e,[(0,Ui._x)("ZB","unit symbol")]:Use,[(0,Ui._x)("EB","unit symbol")]:Hse,[(0,Ui._x)("PB","unit symbol")]:zse,[(0,Ui._x)("TB","unit symbol")]:jse,[(0,Ui._x)("GB","unit symbol")]:Vse,[(0,Ui._x)("MB","unit symbol")]:Bse,[(0,Ui._x)("KB","unit symbol")]:Lse,[(0,Ui._x)("B","unit symbol")]:1};for(let[o,n]of Object.entries(r))if(e>=n)return Dse(e/n,o,t);return""}var w9e={id:"filesize",type:"text",label:(0,Ui.__)("File size"),getValue:({item:e})=>e?.media_details?.filesize?y9e(e?.media_details?.filesize):"",isVisible:e=>!!e?.media_details?.filesize,enableSorting:!1,filterBy:!1,readOnly:!0},CH=w9e;var Ew=a(j(),1),_9e={id:"media_dimensions",type:"text",label:(0,Ew.__)("Dimensions"),getValue:({item:e})=>e?.media_details?.width&&e?.media_details?.height?(0,Ew.sprintf)((0,Ew._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},TH=_9e;var Wse=a(j(),1),S9e={id:"mime_type",type:"text",label:(0,Wse.__)("File type"),getValue:({item:e})=>e?.mime_type||"",render:({item:e})=>e?.mime_type||"-",enableSorting:!1,filterBy:!1,readOnly:!0},EH=S9e;var u_e=a(j(),1);var a_e=a(j(),1),BG=a(be(),1),l_e=a(K(),1),FE=a(ae(),1);var ml=a(U(),1),ug=a(K(),1),FG=a(j(),1),Ip=a(ae(),1),iS=a(be(),1),r_e=a(It(),1),o_e=a(Al(),1),n_e=a(Pt(),1),i_e=a(bo(),1);var Gse=a(U(),1),Pw=a(K(),1),Yse=a(Te(),1),qse=a(be(),1);var WI=a(E(),1);function x9e(e,t,r){if(!r)return t;let o=e.get(t);return o||(o=(0,Pw.createRegistry)({"core/block-editor":qse.storeConfig},t),o.registerStore("core/editor",ZC),e.set(t,o)),o}var C9e=(0,Yse.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...r})=>{let o=(0,Pw.useRegistry)(),[n]=(0,Gse.useState)(()=>new WeakMap),i=x9e(n,o,t);return i===o?(0,WI.jsx)(e,{registry:o,...r}):(0,WI.jsx)(Pw.RegistryProvider,{value:i,children:(0,WI.jsx)(e,{registry:i,...r})})},"withRegistryProvider"),Kse=C9e;var ig=a(U(),1),ay=a(K(),1),Ra=a(ae(),1),C0e=a(j(),1),T0e=a(Dt(),1),E0e=a(Te(),1),P0e=a(Pt(),1),BM=a(be(),1);var GI=a(U(),1),Zse=a(E(),1),Xse=(0,GI.createContext)(void 0);function Qse({value:e,onChange:t,settings:r={},children:o}){let n={media:e,onChange:t,fields:r.fields||[]};return(0,Zse.jsx)(Xse.Provider,{value:n,children:o})}function kw(){let e=(0,GI.useContext)(Xse);if(!e)throw new Error("useMediaEditorContext must be used within MediaEditorProvider");return e}var Jse=a(G(),1),$se=a(U(),1),YI=a(j(),1);function tb(e){return e?e.startsWith("image/")?{type:"image"}:e.startsWith("video/")?{type:"video"}:e.startsWith("audio/")?{type:"audio"}:{type:"application"}:{type:"application"}}var Gn=a(E(),1);function T9e({mediaType:e,mediaUrl:t,altText:r,displayTitle:o,mimeType:n,onLoad:i,onError:s,loadingState:l}){switch(e.type){case"image":return(0,Gn.jsx)("img",{className:l==="loaded"?"loaded":"",src:t,alt:r||"",onLoad:i,onError:s});case"video":return(0,Gn.jsx)("video",{src:t,controls:!0,onError:s,children:o});case"audio":return(0,Gn.jsx)("audio",{src:t,controls:!0,onError:s,children:o});default:return(0,Gn.jsxs)("div",{className:"media-editor-preview__file-info",children:[(0,Gn.jsx)("p",{className:"media-editor-preview__file-name",children:o}),(0,Gn.jsx)("p",{className:"media-editor-preview__mime-type",children:n}),(0,Gn.jsx)("a",{href:t,target:"_blank",rel:"noopener",className:"media-editor-preview__download-link",children:(0,YI.__)("View file")})]})}}function eae(e){let[t,r]=(0,$se.useState)("loading"),{media:o}=kw(),{source_url:n,mime_type:i,alt_text:s,title:l}=o||{},c=tb(i);if(!n)return(0,Gn.jsx)("div",{className:"media-editor-preview media-editor-preview--empty",children:(0,Gn.jsx)("p",{children:(0,YI.__)("No media file available.")})});if(t==="error")return(0,Gn.jsxs)("div",{className:"media-editor-preview media-editor-preview--error",children:[(0,Gn.jsx)("p",{children:(0,YI.__)("Failed to load media file.")}),(0,Gn.jsx)("p",{className:"media-editor-preview__url",children:n})]});let u=typeof l=="string"?l:l?.rendered||l?.raw;return(0,Gn.jsxs)("div",{...e,className:`media-editor-preview media-editor-preview--${c.type}`,children:[c.type==="image"&&t==="loading"&&(0,Gn.jsx)("div",{className:"media-editor-preview__spinner",children:(0,Gn.jsx)(Jse.Spinner,{})}),(0,Gn.jsx)(T9e,{mediaType:c,mediaUrl:n,altText:s,displayTitle:u,mimeType:i,onLoad:()=>r("loaded"),onError:()=>r("error"),loadingState:t})]})}var QI=a(U(),1);var PH=a(j(),1);var so="isAny",ao="isNone",Wi="isAll",Yn="isNotAll",Ts="between",Es="inThePast",fa="over",_o="is",So="isNot",rh="lessThan",oh="greaterThan",nh="lessThanOrEqual",ih="greaterThanOrEqual",sh="before",ah="after",lh="beforeInc",ch="afterInc",Zu="contains",Xu="notContains",Qu="startsWith",uh="on",dh="notOn",qI=["asc","desc"],tae={asc:"\u2191",desc:"\u2193"},KI={asc:"ascending",desc:"descending"},ZI={asc:(0,PH.__)("Sort ascending"),desc:(0,PH.__)("Sort descending")},rae={asc:lB,desc:rB},XI="table",oae="grid",nae="list",iae="activity",sae="pickerGrid",aae="pickerTable",lae="pickerActivity";var cae=(0,QI.createContext)({view:{type:XI},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,QI.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInitiallyLoaded:!1,config:{perPageSizes:[]},intersectionObserver:null});cae.displayName="DataViewsContext";var et=cae;var td=a(j(),1);var ib=a(j(),1),aO=a(G(),1),el=a(U(),1),Rae=a(Mo(),1);var dae=a(G(),1),fae=a(j(),1),pae=a(E(),1),kH="dataviews-selection-checkbox";function fh({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,fae.__)("(no title)");return(0,pae.jsx)(dae.CheckboxControl,{className:kH,"aria-label":d,"aria-disabled":i,checked:u,onChange:()=>{i||t(c?e.filter(f=>l!==f):[...e,l])},...s})}var rb=a(G(),1),vae=a(j(),1),Aw=a(U(),1);var bae=a(K(),1),RH=a(Te(),1);var mae=a(yf(),1),{lock:hae,unlock:_t}=(0,mae.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/dataviews");var Fr=a(E(),1),{Menu:Rw,kebabCase:E9e}=_t(rb.privateApis);function P9e({action:e,onClick:t,items:r,variant:o}){let n=typeof e.label=="string"?e.label:e.label(r);return(0,Fr.jsx)(rb.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",variant:o,onClick:t,children:n})}function k9e({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Fr.jsx)(Rw.Item,{disabled:e.disabled,onClick:t,children:(0,Fr.jsx)(Rw.ItemLabel,{children:o})})}function XC({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t),n=typeof e.modalHeader=="function"?e.modalHeader(t):e.modalHeader;return(0,Fr.jsx)(rb.Modal,{title:n||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${E9e(e.id)}`,children:(0,Fr.jsx)(e.RenderModal,{items:t,closeModal:r})})}function AH({actions:e,item:t,registry:r,setActiveModalAction:o}){let{primaryActions:n,regularActions:i}=(0,Aw.useMemo)(()=>e.reduce((l,c)=>((c.isPrimary?l.primaryActions:l.regularActions).push(c),l),{primaryActions:[],regularActions:[]}),[e]),s=l=>l.map(c=>(0,Fr.jsx)(k9e,{action:c,onClick:()=>{if("RenderModal"in c){o(c);return}c.callback([t],{registry:r})},items:[t]},c.id));return(0,Fr.jsxs)(Rw.Group,{children:[s(n),s(i)]})}function Iw({item:e,actions:t,isCompact:r}){let o=(0,bae.useRegistry)(),{primaryActions:n,eligibleActions:i}=(0,Aw.useMemo)(()=>{let l=t.filter(u=>!u.isEligible||u.isEligible(e));return{primaryActions:l.filter(u=>u.isPrimary),eligibleActions:l}},[t,e]),s=(0,RH.useViewportMatch)("medium","<");return r?(0,Fr.jsx)(gae,{item:e,actions:i,isSmall:!0,registry:o}):(0,Fr.jsxs)(se,{direction:"row",justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,Fr.jsx)(IH,{item:e,actions:n,registry:o}),(n.length<i.length||s)&&(0,Fr.jsx)(gae,{item:e,actions:i,registry:o})]})}function gae({item:e,actions:t,isSmall:r,registry:o}){let[n,i]=(0,Aw.useState)(null);return(0,Fr.jsxs)(Fr.Fragment,{children:[(0,Fr.jsxs)(Rw,{placement:"bottom-end",children:[(0,Fr.jsx)(Rw.TriggerButton,{render:(0,Fr.jsx)(rb.Button,{size:r?"small":"compact",icon:yo,label:(0,vae.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,Fr.jsx)(Rw.Popover,{children:(0,Fr.jsx)(AH,{actions:t,item:e,registry:o,setActiveModalAction:i})})]}),!!n&&(0,Fr.jsx)(XC,{action:n,items:[e],closeModal:()=>i(null)})]})}function IH({item:e,actions:t,registry:r,buttonVariant:o}){let[n,i]=(0,Aw.useState)(null);return(0,RH.useViewportMatch)("medium","<")||!Array.isArray(t)||t.length===0?null:(0,Fr.jsxs)(Fr.Fragment,{children:[t.map(l=>(0,Fr.jsx)(P9e,{action:l,onClick:()=>{if("RenderModal"in l){i(l);return}l.callback([e],{registry:r})},items:[e],variant:o},l.id)),!!n&&(0,Fr.jsx)(XC,{action:n,items:[e],closeModal:()=>i(null)})]})}var $I=a(G(),1),JI=a(j(),1),ob=a(U(),1),R9e=a(K(),1);var A9e=a(Te(),1);var ph=a(j(),1);function yae(e,t,r,o=!1){return e>0?(0,ph.sprintf)((0,ph._n)("%d Item selected","%d Items selected",e),e):o||r<=t?(0,ph.sprintf)((0,ph._n)("%d Item","%d Items",r),r):(0,ph.sprintf)((0,ph._n)("%1$d of %2$d Item","%1$d of %2$d Items",r),t,r)}var QC=a(E(),1);function Ow(e,t){return e.some(r=>r.supportsBulk&&(!r.isEligible||r.isEligible(t)))}function eO(e,t){return(0,ob.useMemo)(()=>Ow(e,t),[e,t])}function tO(e,t){return(0,ob.useMemo)(()=>t.some(r=>Ow(e,r)),[e,t])}function rO({selection:e,onChangeSelection:t,data:r,actions:o,getItemId:n,disableSelectAll:i=!1}){let s=(0,ob.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,QC.jsx)($I.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:c,disabled:!c,onChange:()=>{t([])},"aria-label":(0,JI.__)("Deselect all")}):(0,QC.jsx)($I.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,JI.__)("Deselect all"):(0,JI.__)("Select all")})}var Xf=a(j(),1);var Qf=a(G(),1),mh=a(U(),1);function oO(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:vr}=_t(Qf.privateApis);function I9e({children:e}){return mh.Children.toArray(e).filter(Boolean).map((t,r)=>(0,Ot.jsxs)(mh.Fragment,{children:[r>0&&(0,Ot.jsx)(vr.Separator,{}),t]},r))}var O9e=(0,mh.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,mh.useContext)(et);if(!y)return null;g=y.enableHiding!==!1,v=y.enableSorting!==!1;let S=y.header;if(_=!!y.filterBy&&y.filterBy?.operators||[],b=!r.filters?.some(k=>t===k.field)&&!!(y.hasElements||y.Edit)&&y.filterBy!==!1&&!y.filterBy?.isPrimary,!v&&!l&&!g&&!b)return S;let x=oO(r,o).filter(k=>!f.includes(k.id)),C=(c||u)&&!!x.length,I=(0,Xf.isRTL)();return(0,Ot.jsxs)(vr,{children:[(0,Ot.jsxs)(vr.TriggerButton,{render:(0,Ot.jsx)(Qf.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:d,variant:"tertiary"}),children:[S,r.sort&&h&&(0,Ot.jsx)("span",{"aria-hidden":"true",children:tae[r.sort.direction]})]}),(0,Ot.jsx)(vr.Popover,{style:{minWidth:"240px"},children:(0,Ot.jsxs)(I9e,{children:[v&&(0,Ot.jsx)(vr.Group,{children:qI.map(k=>{let R=r.sort&&h&&r.sort.direction===k,A=`${t}-${k}`;return(0,Ot.jsx)(vr.RadioItem,{name:"view-table-sorting",value:A,checked:R,onChange:()=>{n({...r,sort:{field:t,direction:k},showLevels:!1})},children:(0,Ot.jsx)(vr.ItemLabel,{children:ZI[k]})},A)})}),b&&(0,Ot.jsx)(vr.Group,{children:(0,Ot.jsx)(vr.Item,{prefix:(0,Ot.jsx)(Qf.Icon,{icon:y1}),onClick:()=>{s(t),w(!0),n({...r,page:1,filters:[...r.filters||[],{field:t,value:void 0,operator:_[0]}]})},children:(0,Ot.jsx)(vr.ItemLabel,{children:(0,Xf.__)("Add filter")})})}),(l||g||C)&&y&&(0,Ot.jsxs)(vr.Group,{children:[l&&(0,Ot.jsx)(vr.Item,{prefix:(0,Ot.jsx)(Qf.Icon,{icon:nB}),disabled:I?m>=f.length-1:m<1,onClick:()=>{let k=I?m+1:m-1,R=[...f];R.splice(m,1),R.splice(k,0,t),n({...r,fields:R})},children:(0,Ot.jsx)(vr.ItemLabel,{children:(0,Xf.__)("Move left")})}),l&&(0,Ot.jsx)(vr.Item,{prefix:(0,Ot.jsx)(Qf.Icon,{icon:sB}),disabled:I?m<1:m>=f.length-1,onClick:()=>{let k=I?m-1:m+1,R=[...f];R.splice(m,1),R.splice(k,0,t),n({...r,fields:R})},children:(0,Ot.jsx)(vr.ItemLabel,{children:(0,Xf.__)("Move right")})}),c&&!!x.length&&(0,Ot.jsxs)(vr,{children:[(0,Ot.jsx)(vr.SubmenuTriggerItem,{children:(0,Ot.jsx)(vr.ItemLabel,{children:(0,Xf.__)("Insert left")})}),(0,Ot.jsx)(vr.Popover,{children:x.map(k=>{let R=I?m+1:m;return(0,Ot.jsx)(vr.Item,{onClick:()=>{n({...r,fields:[...f.slice(0,R),k.id,...f.slice(R)]})},children:(0,Ot.jsx)(vr.ItemLabel,{children:k.label})},k.id)})})]}),u&&!!x.length&&(0,Ot.jsxs)(vr,{children:[(0,Ot.jsx)(vr.SubmenuTriggerItem,{children:(0,Ot.jsx)(vr.ItemLabel,{children:(0,Xf.__)("Insert right")})}),(0,Ot.jsx)(vr.Popover,{children:x.map(k=>{let R=I?m:m+1;return(0,Ot.jsx)(vr.Item,{onClick:()=>{n({...r,fields:[...f.slice(0,R),k.id,...f.slice(R)]})},children:(0,Ot.jsx)(vr.ItemLabel,{children:k.label})},k.id)})})]}),g&&y&&(0,Ot.jsx)(vr.Item,{prefix:(0,Ot.jsx)(Qf.Icon,{icon:F1}),onClick:()=>{i(y),n({...r,fields:f.filter(k=>k!==t)})},children:(0,Ot.jsx)(vr.ItemLabel,{children:(0,Xf.__)("Hide column")})})]})]})})]})}),N9e=O9e,Nw=N9e;var wae=a(U(),1),OH=a(E(),1);function M9e({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 hh({item:e,isItemClickable:t,onClickItem:r,renderItemLink:o,className:n,children:i,...s}){if(!t(e))return(0,OH.jsx)("div",{className:n,...s,children:i});if(o){let c=o({item:e,className:`${n} ${n}--clickable`,...s,children:i});return(0,wae.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=M9e({item:e,isItemClickable:t,onClickItem:r,className:n});return(0,OH.jsx)("div",{...l,...s,children:i})}var Ju=a(E(),1);function F9e({item:e,level:t,titleField:r,mediaField:o,descriptionField:n,onClickItem:i,renderItemLink:s,isItemClickable:l}){return(0,Ju.jsxs)(se,{direction:"row",gap:"md",align:"flex-start",justify:"flex-start",children:[o&&(0,Ju.jsx)(hh,{item:e,isItemClickable:l,onClickItem:i,renderItemLink:s,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":l(e)&&(i||s)&&r?r.getValue?.({item:e}):void 0,children:(0,Ju.jsx)(o.render,{item:e,field:o,config:{sizes:"32px"}})}),(0,Ju.jsxs)(se,{direction:"column",align:"flex-start",className:"dataviews-view-table__primary-column-content",children:[r&&(0,Ju.jsxs)(hh,{item:e,isItemClickable:l,onClickItem:i,renderItemLink:s,className:"dataviews-view-table__cell-content-wrapper dataviews-title-field",children:[t!==void 0&&t>0&&(0,Ju.jsxs)("span",{className:"dataviews-view-table__level",children:[Array(t).fill("\u2014").join(" "),"\xA0"]}),(0,Ju.jsx)(r.render,{item:e,field:r})]}),n&&(0,Ju.jsx)(n.render,{item:e,field:n})]})]})}var nO=F9e;var nb=a(U(),1),_ae=a(j(),1),D9e=e=>(0,_ae.isRTL)()?Math.abs(e.scrollLeft)<=1:e.scrollLeft+e.clientWidth>=e.scrollWidth-1;function Sae({scrollContainerRef:e,enabledHorizontal:t=!1}){let[r,o]=(0,nb.useState)(!1),[n,i]=(0,nb.useState)(!1),s=(0,nb.useCallback)(()=>{let l=e.current;l&&(t&&o(D9e(l)),i(l.scrollTop>0))},[e,t]);return(0,nb.useEffect)(()=>{if(typeof window>"u"||!e.current)return()=>{};let l=e.current;return s(),l.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{l.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[e,t,s]),{isHorizontalScrollEnd:r,isVerticallyScrolled:n}}function pa(e,t){return e.reduce((r,o)=>{let n=t.getValue({item:o});return r.has(n)||r.set(n,[]),r.get(n)?.push(o),r},new Map)}var JC=a(U(),1),Cae=a(Mo(),1);function xae(e,t,r){return e.slice(Math.min(t,r),Math.max(t,r)+1)}function L9e({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?[]:xae(o,c,u),f=n.filter(m=>!d.includes(m));return[...new Set([...f,...xae(o,c,i)])]}function B9e({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 Bl({data:e,getItemId:t,isItemSelectable:r,selection:o,onChangeSelection:n,selectionMode:i,shouldSelectOnClick:s}){let l=i==="multi",c=i!=="single-required",u=(0,JC.useRef)(null),d=_=>{u.current={anchorId:_,lastTargetId:null}},f=(0,JC.useRef)(!1);(0,JC.useEffect)(()=>{let _=()=>{f.current=!0};return document.addEventListener("touchstart",_,{once:!0}),()=>document.removeEventListener("touchstart",_)},[]);let m=e.filter(r).map(t),h=new Set(m),v=m.length>0&&l;return{getSelectionProps:_=>{let y=h.has(_);return{...s&&{onClick:()=>{c&&o.includes(_)?n(o.filter(w=>_!==w)):n(l?[...o,_]:[_]),d(_)}},onMouseDown:w=>{w.button===0&&w.shiftKey&&v&&w.preventDefault()},onClickCapture:w=>{if(!v)return;let S=(0,Cae.isAppleOS)()?w.metaKey:w.ctrlKey,x=w.target instanceof Element&&!!w.target.closest(`.${kH}`);if(!S&&!w.shiftKey){y&&x&&d(_);return}if(!(f.current||document.getSelection()?.type==="Range")&&(w.stopPropagation(),x||w.preventDefault(),!!y))if(w.shiftKey){let C=u.current;(!C||!h.has(C.anchorId))&&(C={anchorId:B9e({targetId:_,orderedIds:m,selection:o})??_,lastTargetId:null}),n(L9e({anchorId:C.anchorId,targetId:_,lastTargetId:C.lastTargetId,orderedIds:m,selection:o})),u.current={anchorId:C.anchorId,lastTargetId:_}}else n(o.includes(_)?o.filter(C=>_!==C):[...o,_]),d(_)}}}}}var gh=a(G(),1),Eae=a(j(),1),Pae=a(U(),1);var $a=a(E(),1);function Tae({field:e,isVisible:t,onToggleVisibility:r}){return(0,$a.jsx)(gh.__experimentalItem,{onClick:e.enableHiding?r:void 0,children:(0,$a.jsxs)(se,{direction:"row",gap:"sm",justify:"flex-start",align:"center",children:[(0,$a.jsx)("div",{style:{height:24,width:24},children:t&&(0,$a.jsx)(gh.Icon,{icon:Oo})}),(0,$a.jsx)("span",{className:"dataviews-view-config__label",children:e.label})]})})}function V9e(e){return!!e}function iO({showLabel:e=!0}){let{view:t,fields:r,onChangeView:o}=(0,Pae.useContext)(et),n=oO(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})=>V9e(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,$a.jsxs)(se,{direction:"column",className:"dataviews-field-control",children:[e&&(0,$a.jsx)(gh.BaseControl.VisualLabel,{children:(0,Eae.__)("Properties")}),(0,$a.jsx)(se,{direction:"column",className:"dataviews-view-config__properties",children:(0,$a.jsxs)(gh.__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,$a.jsx)(Tae,{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,$a.jsx)(Tae,{field:b,isVisible:v,onToggleVisibility:()=>{o({...t,fields:v?u.filter(_=>_!==g.id):[...u,g.id]})}},g.id)})]})})]})}var sO=a(U(),1);function $u(e,t={delay:400}){let[r,o]=(0,sO.useState)(!1);return(0,sO.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 Aae(e,t){if(e)return e;if(t==="integer"||t==="number")return"end"}function j9e({item:e,fields:t,column:r,align:o}){let n=t.find(s=>s.id===r);if(!n)return null;let i=J("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,gt.jsx)("div",{className:i,children:(0,gt.jsx)(n.render,{item:e,field:n})})}function kae({hasBulkActions:e,item:t,level:r,actions:o,fields:n,id:i,view:s,titleField:l,mediaField:c,descriptionField:u,selection:d,getItemId:f,isItemClickable:m,onClickItem:h,renderItemLink:g,onChangeSelection:v,onMouseDown:b,onClickCapture:_,isActionsColumnSticky:y,posinset:w}){let{paginationInfo:S}=(0,el.useContext)(et),x=eO(o,t),C=x&&d.includes(i),{showTitle:I=!0,showMedia:k=!0,showDescription:R=!0,infiniteScrollEnabled:A}=s,P=s.fields??[],T=l&&I||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":A?S.totalItems:void 0,"aria-posinset":w,role:A?"article":void 0,onClickCapture:_,onMouseDown:M=>{let B=(0,Rae.isAppleOS)()?M.metaKey:M.ctrlKey;M.button===0&&B&&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)(fh,{item:t,selection:d,onChangeSelection:v,getItemId:f,titleField:l,disabled:!x})})}),T&&(0,gt.jsx)("td",{children:(0,gt.jsx)(nO,{item:t,level:r,titleField:I?l:void 0,mediaField:k?c:void 0,descriptionField:R?u:void 0,isItemClickable:m,onClickItem:h,renderItemLink:g})}),P.map(M=>{let{width:B,maxWidth:F,minWidth:V,align:z}=s.layout?.styles?.[M]??{},D=n.find(L=>L.id===M),O=Aae(z,D?.type);return(0,gt.jsx)("td",{style:{width:B,maxWidth:F,minWidth:V},children:(0,gt.jsx)(j9e,{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)(Iw,{item:t,actions:o})})]})}function z9e({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,el.useContext)(et),_=$u(i),y=h.groupBy?.field?r.find(ee=>ee.id===h.groupBy?.field):null,w=y?pa(t,y):null,S=w?Array.from(w.values()).flat():t,{getSelectionProps:x}=Bl({data:S,getItemId:o,isItemSelectable:ee=>Ow(e,ee),selection:c,onChangeSelection:l,selectionMode:"multi",shouldSelectOnClick:!1}),C=(0,el.useRef)(new Map),I=(0,el.useRef)(void 0),[k,R]=(0,el.useState)(),[A,P]=(0,el.useState)(null);(0,el.useEffect)(()=>{I.current&&(I.current.focus(),I.current=void 0)});let T=(0,el.useId)(),{isHorizontalScrollEnd:M,isVerticallyScrolled:B}=Sae({scrollContainerRef:b,enabledHorizontal:!!e?.length}),F=tO(e,t);if(k){I.current=k,R(void 0);return}let V=ee=>{let fe=C.current.get(ee.id),ve=fe?C.current.get(fe.fallback):void 0;R(ve?.node)},z=ee=>{ee.preventDefault(),ee.stopPropagation();let fe={getBoundingClientRect:()=>({x:ee.clientX,y:ee.clientY,top:ee.clientY,left:ee.clientX,right:ee.clientX,bottom:ee.clientY,width:0,height:0,toJSON:()=>({})})};window.requestAnimationFrame(()=>{P(fe)})},D=!!t?.length,O=r.find(ee=>ee.id===h.titleField),L=r.find(ee=>ee.id===h.mediaField),W=r.find(ee=>ee.id===h.descriptionField),{showTitle:q=!0,showMedia:Z=!0,showDescription:Q=!0}=h,ue=O&&q||L&&Z||W&&Q,te=h.fields??[],de=(ee,fe)=>ve=>{ve?C.current.set(ee,{node:ve,fallback:te[fe>0?fe-1:1]}):C.current.delete(ee)},pe=h.infiniteScrollEnabled&&!w,$=(0,ib.isRTL)();return D?(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsxs)("table",{className:J("dataviews-view-table",g,{[`has-${h.layout?.density}-density`]:h.layout?.density&&["compact","comfortable"].includes(h.layout.density),"has-bulk-actions":F,"is-refreshing":!pe&&_}),"aria-busy":i,"aria-describedby":T,role:pe?"feed":void 0,inert:!pe&&i?"true":void 0,children:[(0,gt.jsxs)("colgroup",{children:[F&&(0,gt.jsx)("col",{className:"dataviews-view-table__col-checkbox"}),ue&&(0,gt.jsx)("col",{className:"dataviews-view-table__col-first-data"}),te.map((ee,fe)=>(0,gt.jsx)("col",{className:J(`dataviews-view-table__col-${ee}`,{"dataviews-view-table__col-expand":!ue&&fe===te.length-1})},`col-${ee}`)),!!e?.length&&(0,gt.jsx)("col",{className:"dataviews-view-table__col-actions"})]}),A&&(0,gt.jsx)(aO.Popover,{anchor:A,onClose:()=>P(null),placement:"bottom-start",children:(0,gt.jsx)(iO,{showLabel:!1})}),(0,gt.jsx)("thead",{className:J({"dataviews-view-table__thead--stuck":B}),onContextMenu:z,children:(0,gt.jsxs)("tr",{className:"dataviews-view-table__row",children:[F&&(0,gt.jsx)("th",{className:"dataviews-view-table__checkbox-column",scope:"col",onContextMenu:z,children:(0,gt.jsx)(rO,{selection:c,onChangeSelection:l,data:t,actions:e,getItemId:o})}),ue&&(0,gt.jsx)("th",{scope:"col",children:O&&(0,gt.jsx)(Nw,{ref:de(O.id,0),fieldId:O.id,view:h,fields:r,onChangeView:s,onHide:V,setOpenedFilter:u,canMove:!1,canInsertLeft:$?h.layout?.enableMoving??!0:!1,canInsertRight:$?!1:h.layout?.enableMoving??!0})}),te.map((ee,fe)=>{let{width:ve,maxWidth:we,minWidth:oe,align:re}=h.layout?.styles?.[ee]??{},ce=r.find(Oe=>Oe.id===ee),ie=Aae(re,ce?.type),le=h.layout?.enableMoving??!0;return(0,gt.jsx)("th",{style:{width:ve,maxWidth:we,minWidth:oe,textAlign:ie},"aria-sort":h.sort?.direction&&h.sort?.field===ee?KI[h.sort.direction]:void 0,scope:"col",children:(0,gt.jsx)(Nw,{ref:de(ee,fe),fieldId:ee,view:h,fields:r,onChangeView:s,onHide:V,setOpenedFilter:u,canMove:le,canInsertLeft:le,canInsertRight:le})},ee)}),!!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,ib.__)("Actions")})})]})}),D&&y&&w?Array.from(w.entries()).map(([ee,fe])=>(0,gt.jsxs)("tbody",{children:[(0,gt.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,gt.jsx)("td",{colSpan:te.length+(ue?1:0)+(F?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:h.groupBy?.showLabel===!1?ee:(0,ib.sprintf)((0,ib.__)("%1$s: %2$s"),y.label,ee)})}),fe.map((ve,we)=>{let oe=o(ve)||we.toString();return(0,gt.jsx)(kae,{item:ve,level:h.showLevels&&typeof n=="function"?n(ve):void 0,hasBulkActions:F,actions:e,fields:r,id:oe,view:h,titleField:O,mediaField:L,descriptionField:W,selection:c,getItemId:o,onChangeSelection:l,...x(oe),onClickItem:d,renderItemLink:m,isItemClickable:f,isActionsColumnSticky:!M},o(ve))})]},`group-${ee}`)):(0,gt.jsx)("tbody",{children:D&&t.map((ee,fe)=>{let ve=o(ee)||fe.toString();return(0,gt.jsx)(kae,{item:ee,level:h.showLevels&&typeof n=="function"?n(ee):void 0,hasBulkActions:F,actions:e,fields:r,id:ve,view:h,titleField:O,mediaField:L,descriptionField:W,selection:c,getItemId:o,onChangeSelection:l,...x(ve),onClickItem:d,renderItemLink:m,isItemClickable:f,isActionsColumnSticky:!M,posinset:pe?fe+1:void 0},o(ee))})})]}),pe&&i&&(0,gt.jsx)("div",{className:"dataviews-loading",id:T,children:(0,gt.jsx)("p",{className:"dataviews-loading-more",children:(0,gt.jsx)(aO.Spinner,{})})})]}):(0,gt.jsx)("div",{className:J("dataviews-no-results",{"is-refreshing":_}),id:T,children:v})}var Iae=z9e;var Dae=a(G(),1),fO=a(j(),1);var ma=a(G(),1);var eT=a(j(),1),Fae=a(Te(),1),bh=a(U(),1);var H9e=a(G(),1),U9e=a(j(),1),lO=a(U(),1);var W9e=a(E(),1),G9e=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}],Y9e=G9e[2].value;function cO(){let e=(0,lO.useContext)(et),t=e.view;return(0,lO.useMemo)(()=>{let r=e.containerWidth,o=32,n=t.layout?.previewSize??Y9e,i=Math.floor((r+o)/(n+o));return Math.max(1,i)},[e.containerWidth,t.layout?.previewSize])}var Oae=a(U(),1);var Nae=a(E(),1),$C=(0,Oae.forwardRef)(({className:e,previewSize:t,...r},o)=>(0,Nae.jsx)("div",{ref:o,className:J("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...r}));var uO=a(U(),1);function vh(e,t){let{intersectionObserver:r}=(0,uO.useContext)(et);(0,uO.useEffect)(()=>{let o=e.current;if(!(!o||t===void 0||!r))return r.observe(o),()=>{r.unobserve(o)}},[e,r,t])}function dO(e,t,r){let n=!!e?.length&&t?e[0].position:void 0;return n&&r?(n-1)%r:0}var kt=a(E(),1),{Badge:q9e}=_t(ma.privateApis);function K9e(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 Mae=(0,bh.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:I=!0}=t,k=eO(u,c),R=l(c),A=(0,bh.useRef)(null),P=(0,bh.useCallback)(L=>{A.current=L,typeof S=="function"?S(L):S&&(S.current=L)},[S]);vh(A,_);let T=(0,Fae.useInstanceId)(e),M=r.includes(R),B=(0,kt.jsx)("span",{className:"dataviews-view-grid__media-placeholder"}),F=C&&d?.render,V=F?(0,kt.jsx)(d.render,{item:c,field:d,config:b}):B,z=x&&f?.render?(0,kt.jsx)(f.render,{item:c,field:f}):null,D,O;return i(c)&&n&&(z?(D={"aria-labelledby":`dataviews-view-grid__title-field-${T}`},O={id:`dataviews-view-grid__title-field-${T}`}):D={"aria-label":(0,eT.__)("Navigate to item")}),(0,kt.jsxs)(se,{direction:"column",...w,ref:P,"aria-setsize":y,"aria-posinset":_,className:J(w.className,"dataviews-view-grid__row__gridcell","dataviews-view-grid__card",{"is-selected":k&&M}),children:[(0,kt.jsx)(hh,{item:c,isItemClickable:i,onClickItem:n,renderItemLink:s,className:J("dataviews-view-grid__media",{"dataviews-view-grid__media--placeholder":!F}),...D,children:V}),v&&(0,kt.jsx)(fh,{item:c,selection:r,onChangeSelection:o,getItemId:l,titleField:f,disabled:!k}),!!u?.length&&(0,kt.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,kt.jsx)(Iw,{item:c,actions:u,isCompact:!0})}),x&&(0,kt.jsx)("div",{className:"dataviews-view-grid__title-actions",children:(0,kt.jsx)(hh,{item:c,isItemClickable:i,onClickItem:n,renderItemLink:s,className:"dataviews-view-grid__title-field dataviews-title-field",...O,title:f?.getValueFormatted({item:c,field:f})||void 0,children:z})}),(0,kt.jsxs)(se,{direction:"column",gap:"xs",children:[I&&m?.render&&(0,kt.jsx)(m.render,{item:c,field:m}),!!g?.length&&(0,kt.jsx)(se,{direction:"row",className:"dataviews-view-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:g.map(L=>(0,kt.jsx)(q9e,{className:"dataviews-view-grid__field-value",children:(0,kt.jsx)(L.render,{item:c,field:L})},L.id))}),!!h?.length&&(0,kt.jsx)(se,{direction:"column",className:"dataviews-view-grid__fields",gap:"xs",children:h.map(L=>(0,kt.jsx)(ma.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsxs)(Ze.Root,{children:[(0,kt.jsx)(Ze.Trigger,{render:(0,kt.jsx)(ma.FlexItem,{className:"dataviews-view-grid__field-name",children:L.header})}),(0,kt.jsx)(Ze.Popup,{children:L.label})]}),(0,kt.jsx)(ma.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,kt.jsx)(L.render,{item:c,field:L})})]})},L.id))})]})]})});function NH({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,bh.useContext)(et),_=cO(),y=tO(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:I,badgeFields:k}=C.reduce((T,M)=>{let B=s.find(V=>V.id===M);if(!B)return T;let F=i.layout?.badgeFields?.includes(M)?"badgeFields":"regularFields";return T[F].push(B),T},{regularFields:[],badgeFields:[]}),R="900px",A=Math.ceil(e.length/_),P=dO(e,t,_);return(0,kt.jsxs)(kt.Fragment,{children:[t&&(0,kt.jsxs)(ma.Composite,{render:(0,kt.jsx)($C,{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,kt.jsx)(ma.Composite.Item,{render:B=>(0,kt.jsx)(se,{...B,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),B=g(M),F=T.position;return(0,kt.jsx)(ma.Composite.Item,{render:V=>(0,kt.jsx)(Mae,{...V,id:M,role:"article",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:T,actions:h,onMouseDown:z=>{V.onMouseDown?.(z),B.onMouseDown(z)},onClickCapture:z=>{V.onClickCapture?.(z),B.onClickCapture(z)},mediaField:S,titleField:w,descriptionField:x,regularFields:I,badgeFields:k,hasBulkActions:y,posinset:F,setsize:v.totalItems,config:{sizes:R}})},M)})]}),!t&&(0,kt.jsx)(ma.Composite,{role:"grid",className:J("dataviews-view-grid",r,{[`has-${i.layout?.density}-density`]:i.layout?.density&&["compact","comfortable"].includes(i.layout.density)}),focusWrap:!0,"aria-busy":n,"aria-rowcount":A,ref:b,inert:o,children:K9e(e,_).map((T,M)=>(0,kt.jsx)(ma.Composite.Row,{render:(0,kt.jsx)("div",{role:"row","aria-rowindex":M+1,"aria-label":(0,eT.sprintf)((0,eT.__)("Row %d"),M+1),className:"dataviews-view-grid__row",style:{gridTemplateColumns:`repeat( ${_}, minmax(0, 1fr) )`}}),children:T.map(B=>{let F=m(B),V=g(F);return(0,kt.jsx)(ma.Composite.Item,{render:z=>(0,kt.jsx)(Mae,{...z,id:F,role:"gridcell",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:B,actions:h,onMouseDown:D=>{z.onMouseDown?.(D),V.onMouseDown(D)},onClickCapture:D=>{z.onClickCapture?.(D),V.onClickCapture(D)},mediaField:S,titleField:w,descriptionField:x,regularFields:I,badgeFields:k,hasBulkActions:y,config:{sizes:R}})},F)})},M))})]})}var tl=a(E(),1);function Z9e({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,onClickItem:s,isItemClickable:l,renderItemLink:c,selection:u,view:d,className:f,empty:m}){let h=$u(!!n),g=!!t?.length,v=d.groupBy?.field?r.find(x=>x.id===d.groupBy?.field):null,b=v?pa(t,v):null,_=d.infiniteScrollEnabled&&!b,y=b?Array.from(b.values()).flat():t,{getSelectionProps:w}=Bl({data:y,getItemId:o,isItemSelectable:x=>Ow(e,x),selection:u,onChangeSelection:i,selectionMode:"multi",shouldSelectOnClick:!1});if(!g)return(0,tl.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,tl.jsxs)(tl.Fragment,{children:[g&&v&&b&&(0,tl.jsx)(se,{direction:"column",gap:"lg",children:Array.from(b.entries()).map(([x,C])=>(0,tl.jsxs)(se,{direction:"column",gap:"sm",children:[(0,tl.jsx)("h3",{className:"dataviews-view-grid__group-header",children:d.groupBy?.showLabel===!1?x:(0,fO.sprintf)((0,fO.__)("%1$s: %2$s"),v.label,x)}),(0,tl.jsx)(NH,{...S,data:C,isInfiniteScroll:!1})]},x))}),!b&&(0,tl.jsx)(NH,{...S,data:t,isInfiniteScroll:!!_}),_&&n&&(0,tl.jsx)("p",{className:"dataviews-loading-more",children:(0,tl.jsx)(Dae.Spinner,{})})]})}var Lae=Z9e;var pO=a(Te(),1),Gi=a(G(),1),Fo=a(U(),1),tT=a(j(),1);var LH=a(K(),1);var rt=a(E(),1),{Menu:MH}=_t(Gi.privateApis);function FH(e){return`${e}-item-wrapper`}function X9e(e,t){return`${e}-primary-action-${t}`}function DH(e){return`${e}-dropdown`}function Q9e({idPrefix:e,primaryAction:t,item:r}){let o=(0,LH.useRegistry)(),[n,i]=(0,Fo.useState)(!1),s=X9e(e,t.id),l=typeof t.label=="string"?t.label:t.label([r]);return"RenderModal"in t?(0,rt.jsx)("div",{role:"gridcell",children:(0,rt.jsx)(Gi.Composite.Item,{id:s,render:(0,rt.jsx)(Gi.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:l,size:"small",onClick:()=>i(!0)}),children:n&&(0,rt.jsx)(XC,{action:t,items:[r],closeModal:()=>i(!1)})})},t.id):(0,rt.jsx)("div",{role:"gridcell",children:(0,rt.jsx)(Gi.Composite.Item,{id:s,render:(0,rt.jsx)(Gi.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([r],{registry:o})},children:l})})},t.id)}function Bae({view:e,actions:t,idPrefix:r,isSelected:o,item:n,titleField:i,mediaField:s,descriptionField:l,selectionProps:c,otherFields:u,onDropdownTriggerKeyDown:d,posinset:f}){let{showTitle:m=!0,showMedia:h=!0,showDescription:g=!0,infiniteScrollEnabled:v}=e,b=(0,Fo.useRef)(null),_=`${r}-label`,y=`${r}-description`,w=(0,LH.useRegistry)(),[S,x]=(0,Fo.useState)(!1),[C,I]=(0,Fo.useState)(null),k=({type:D})=>{x(D==="mouseenter")},{paginationInfo:R}=(0,Fo.useContext)(et);(0,Fo.useEffect)(()=>{o&&b.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},[o]);let{primaryAction:A,eligibleActions:P}=(0,Fo.useMemo)(()=>{let D=t.filter(L=>!L.isEligible||L.isEligible(n));return{primaryAction:D.filter(L=>L.isPrimary)[0],eligibleActions:D}},[t,n]),T=A&&t.length===1,M=h&&s?.render?(0,rt.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,rt.jsx)(s.render,{item:n,field:s,config:{sizes:"52px"}})}):null,B=m&&i?.render?(0,rt.jsx)(i.render,{item:n,field:i}):null,F=g&&l?.render,V=!!M&&!F&&!u.length,z=P?.length>0&&(0,rt.jsxs)(se,{direction:"row",gap:"md",className:"dataviews-view-list__item-actions",children:[A&&(0,rt.jsx)(Q9e,{idPrefix:r,primaryAction:A,item:n}),!T&&(0,rt.jsxs)("div",{role:"gridcell",children:[(0,rt.jsxs)(MH,{placement:"bottom-end",children:[(0,rt.jsx)(MH.TriggerButton,{render:(0,rt.jsx)(Gi.Composite.Item,{id:DH(r),render:(0,rt.jsx)(Gi.Button,{size:"small",icon:yo,label:(0,tT.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:d})})}),(0,rt.jsx)(MH.Popover,{children:(0,rt.jsx)(AH,{actions:P,item:n,registry:w,setActiveModalAction:I})})]}),!!C&&(0,rt.jsx)(XC,{action:C,items:[n],closeModal:()=>I(null)})]})]});return(0,rt.jsx)(Gi.Composite.Row,{ref:b,render:(0,rt.jsx)("div",{"aria-posinset":f,"aria-setsize":v?R.totalItems:void 0}),role:v?"article":"row",className:J({"is-selected":o,"is-hovered":S}),onMouseEnter:k,onMouseLeave:k,children:(0,rt.jsxs)(se,{direction:"row",className:"dataviews-view-list__item-wrapper",children:[(0,rt.jsx)("div",{role:"gridcell",children:(0,rt.jsx)(Gi.Composite.Item,{id:FH(r),"aria-pressed":o,"aria-labelledby":_,"aria-describedby":y,className:"dataviews-view-list__item",...c})}),(0,rt.jsxs)(se,{direction:"row",gap:"md",justify:"start",align:V?"center":"flex-start",style:{flex:1,minWidth:0},children:[M,(0,rt.jsxs)(se,{direction:"column",gap:"xs",className:"dataviews-view-list__field-wrapper",children:[(0,rt.jsxs)(se,{direction:"row",align:"center",children:[(0,rt.jsx)("div",{className:"dataviews-title-field dataviews-view-list__title-field",id:_,children:B}),z]}),F&&(0,rt.jsx)("div",{className:"dataviews-view-list__field",children:(0,rt.jsx)(l.render,{item:n,field:l})}),(0,rt.jsx)("div",{className:"dataviews-view-list__fields",id:y,children:u.map(D=>(0,rt.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,rt.jsx)(Gt,{className:"dataviews-view-list__field-label",render:(0,rt.jsx)("span",{}),children:D.label}),(0,rt.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,rt.jsx)(D.render,{item:n,field:D})})]},D.id))})]})]})]})})}function J9e(e){return!!e}function BH(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,pO.useInstanceId)(BH,"view-list"),m=$u(!!i),{paginationInfo:h}=(0,Fo.useContext)(et),g=r?.findLast(W=>l.includes(n(W))),v=o.find(W=>W.id===c.titleField),b=o.find(W=>W.id===c.mediaField),_=o.find(W=>W.id===c.descriptionField),y=(c?.fields??[]).map(W=>o.find(q=>W===q.id)).filter(J9e),{getSelectionProps:w}=Bl({data:r,getItemId:n,isItemSelectable:()=>!0,selection:l,onChangeSelection:s,selectionMode:"single-required",shouldSelectOnClick:!0}),S=(0,Fo.useCallback)(W=>`${f}-${n(W)}`,[f,n]),x=(0,Fo.useCallback)((W,q)=>q.startsWith(S(W)),[S]),[C,I]=(0,Fo.useState)(void 0),k=(0,Fo.useRef)(null);(0,Fo.useEffect)(()=>{g&&I(FH(S(g)))},[g,S]);let R=r.findIndex(W=>x(W,C??"")),A=(0,pO.usePrevious)(R),P=R!==-1,T=(0,Fo.useCallback)((W,q)=>{let Z=Math.min(r.length-1,Math.max(0,W));if(!r[Z])return;let Q=S(r[Z]),ue=q(Q);I(ue),k.current?.contains(k.current.ownerDocument.activeElement)&&document.getElementById(ue)?.focus()},[r,S]);(0,Fo.useEffect)(()=>{!P&&(A!==void 0&&A!==-1)&&T(A,FH)},[P,T,A]);let M=(0,Fo.useCallback)(W=>{W.key==="ArrowDown"&&(W.preventDefault(),T(R+1,DH)),W.key==="ArrowUp"&&(W.preventDefault(),T(R-1,DH))},[T,R]),B=!!r?.length,F=c.groupBy?.field?o.find(W=>W.id===c.groupBy?.field):null,V=B&&F?pa(r,F):null,z=c.infiniteScrollEnabled&&!V,D=z&&(c.startPosition??1)+(c.perPage??0)<h.totalItems,O=J("dataviews-view-list",u,{[`has-${c.layout?.density}-density`]:c.layout?.density&&["compact","comfortable"].includes(c.layout.density),"is-refreshing":!z&&m}),L={ref:k,id:f,render:(0,rt.jsx)("div",{}),activeId:C,setActiveId:I,inert:!z&&i?"true":void 0};return B?B&&F&&V?(0,rt.jsx)(Gi.Composite,{...L,className:"dataviews-view-list__group",role:"grid",children:(0,rt.jsx)(se,{direction:"column",gap:"lg",className:O,children:Array.from(V.entries()).map(([W,q])=>(0,rt.jsxs)(se,{direction:"column",children:[(0,rt.jsx)("h3",{className:"dataviews-view-list__group-header",children:c.groupBy?.showLabel===!1?W:(0,tT.sprintf)((0,tT.__)("%1$s: %2$s"),F.label,W)}),q.map(Z=>{let Q=S(Z);return(0,rt.jsx)(Bae,{view:c,idPrefix:Q,actions:t,item:Z,isSelected:Z===g,selectionProps:w(n(Z)),mediaField:b,titleField:v,descriptionField:_,otherFields:y,onDropdownTriggerKeyDown:M},Q)})]},W))})}):(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)(Gi.Composite,{...L,className:O,role:c.infiniteScrollEnabled?"feed":"grid",children:r.map((W,q)=>{let Z=S(W);return(0,rt.jsx)(Bae,{view:c,idPrefix:Z,actions:t,item:W,isSelected:W===g,selectionProps:w(n(W)),mediaField:b,titleField:v,descriptionField:_,otherFields:y,onDropdownTriggerKeyDown:M,posinset:c.infiniteScrollEnabled?q+1:void 0},Z)})}),(D||z&&i)&&(0,rt.jsx)("p",{className:"dataviews-loading-more","aria-hidden":!i,children:(0,rt.jsx)(Gi.Spinner,{})})]}):(0,rt.jsx)("div",{className:J("dataviews-no-results",{"is-refreshing":m}),children:d})}var Gae=a(G(),1);var mO=a(j(),1),Vae=a(U(),1);var Mw=a(E(),1);function jae({groupName:e,groupData:t,groupField:r,showLabel:o=!0,children:n}){let i=o?(0,Vae.createInterpolateElement)((0,mO.sprintf)((0,mO.__)("%s: <groupName />"),r.label).trim(),{groupName:(0,Mw.jsx)(r.render,{item:t[0],field:r})}):(0,Mw.jsx)(r.render,{item:t[0],field:r});return(0,Mw.jsxs)(se,{direction:"column",className:"dataviews-view-activity__group",children:[(0,Mw.jsx)("h3",{className:"dataviews-view-activity__group-header",children:i}),n]},e)}var sb=a(U(),1),zae=a(K(),1),Hae=a(Te(),1);var Do=a(E(),1);function $9e(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,sb.useRef)(null),_=(0,zae.useRegistry)(),{paginationInfo:y}=(0,sb.useContext)(et),{primaryActions:w,eligibleActions:S}=(0,sb.useMemo)(()=>{let P=r.filter(M=>!M.isEligible||M.isEligible(o));return{primaryActions:P.filter(M=>M.isPrimary),eligibleActions:P}},[r,o]),x=(0,Hae.useViewportMatch)("medium","<"),C=t.layout?.density??"balanced",I=h&&C!=="compact"&&i?.render?(0,Do.jsx)(i.render,{item:o,field:i,config:{sizes:C==="comfortable"?"32px":"24px"}}):null,k=(0,Do.jsx)("div",{className:"dataviews-view-activity__item-type-icon",children:I||(0,Do.jsx)("span",{className:"dataviews-view-activity__item-bullet","aria-hidden":"true"})}),R=m&&n?.render?(0,Do.jsx)(n.render,{item:o,field:n}):null,A=(0,sb.useMemo)(()=>C==="comfortable"?"md":"sm",[C]);return(0,Do.jsx)("div",{ref:b,role:v?"article":void 0,"aria-posinset":c,"aria-setsize":v?y.totalItems:void 0,className:J("dataviews-view-activity__item",C==="compact"&&"is-compact",C==="balanced"&&"is-balanced",C==="comfortable"&&"is-comfortable"),children:(0,Do.jsxs)(se,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,Do.jsx)(se,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-activity__item-type",children:k}),(0,Do.jsxs)(se,{direction:"column",gap:A,align:"flex-start",className:"dataviews-view-activity__item-content",children:[R&&(0,Do.jsx)(hh,{item:o,isItemClickable:f,onClickItem:u,renderItemLink:d,className:"dataviews-view-activity__item-title",children:R}),g&&s&&(0,Do.jsx)("div",{className:"dataviews-view-activity__item-description",children:(0,Do.jsx)(s.render,{item:o,field:s})}),(0,Do.jsx)("div",{className:"dataviews-view-activity__item-fields",children:l.map(P=>(0,Do.jsxs)("div",{className:"dataviews-view-activity__item-field",children:[(0,Do.jsx)(Gt,{className:"dataviews-view-activity__item-field-label",render:(0,Do.jsx)("span",{}),children:P.label}),(0,Do.jsx)("span",{className:"dataviews-view-activity__item-field-value",children:(0,Do.jsx)(P.render,{item:o,field:P})})]},P.id))}),!!w?.length&&(0,Do.jsx)(IH,{item:o,actions:w,registry:_,buttonVariant:"secondary"})]}),(w.length<S.length||x&&S.length>0)&&(0,Do.jsx)("div",{className:"dataviews-view-activity__item-actions",children:(0,Do.jsx)(Iw,{item:o,actions:S,isCompact:!0})})]})})}var Uae=$9e;var Wae=a(_e(),1);function eje(e){return!!e}function VH(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(eje);return t.map((u,d)=>(0,Wae.createElement)(Uae,{...e,key:o(u),item:u,mediaField:s,titleField:i,descriptionField:l,otherFields:c,posinset:n.infiniteScrollEnabled?d+1:void 0}))}var rl=a(E(),1);function Yae(e){let{empty:t,data:r,fields:o,isLoading:n,view:i,className:s}=e,l=$u(!!n),c=!!r?.length,u=i.groupBy?.field?o.find(v=>v.id===i.groupBy?.field):null,d=c&&u?pa(r,u):null,f=i.infiniteScrollEnabled&&!d;if(!c)return(0,rl.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,rl.jsx)(se,{direction:"column",gap:"sm",className:h,inert:m?"true":void 0,children:g.map(([v,b])=>(0,rl.jsx)(jae,{groupName:v,groupData:b,groupField:u,showLabel:i.groupBy?.showLabel!==!1,children:(0,rl.jsx)(VH,{...e,data:b})},v))}):(0,rl.jsxs)(rl.Fragment,{children:[(0,rl.jsx)("div",{className:h,role:i.infiniteScrollEnabled?"feed":void 0,inert:m?"true":void 0,children:(0,rl.jsx)(VH,{...e})}),f&&n&&(0,rl.jsx)("p",{className:"dataviews-loading-more",children:(0,rl.jsx)(Gae.Spinner,{})})]})}var Ps=a(G(),1),nT=a(j(),1),$ae=a(Te(),1),gO=a(U(),1);var oT=a(G(),1),Kae=a(K(),1),ed=a(U(),1);var hO=a(j(),1);var rT=a(G(),1),Fw=a(U(),1),ol=a(j(),1);var Jf=a(E(),1);function tje(e,t){return!e.infiniteScrollEnabled&&t.totalItems>0&&t.totalPages>1}function jH(){let{view:e,onChangeView:t,paginationInfo:r}=(0,Fw.useContext)(et);if(!tje(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,ol.sprintf)((0,ol.__)("Page %1$d of %2$d"),n,o):c.toString()}});return(0,Jf.jsxs)(se,{direction:"row",className:"dataviews-pagination",justify:"end",align:"center",gap:"xl",children:[(0,Jf.jsx)(se,{direction:"row",justify:"flex-start",align:"center",gap:"xs",className:"dataviews-pagination__page-select",children:(0,Fw.createInterpolateElement)((0,ol.sprintf)((0,ol._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",o),{div:(0,Jf.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,Jf.jsx)(rT.SelectControl,{"aria-label":(0,ol.__)("Current page"),value:n.toString(),options:i,onChange:s=>{t({...e,page:+s})},size:"small",variant:"minimal"})})}),(0,Jf.jsxs)(se,{direction:"row",gap:"xs",align:"center",children:[(0,Jf.jsx)(rT.Button,{onClick:()=>t({...e,page:n-1}),disabled:n===1,accessibleWhenDisabled:!0,label:(0,ol.__)("Previous page"),icon:(0,ol.isRTL)()?kl:Rl,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,Jf.jsx)(rT.Button,{onClick:()=>t({...e,page:n+1}),disabled:n>=o,accessibleWhenDisabled:!0,label:(0,ol.__)("Next page"),icon:(0,ol.isRTL)()?Rl:kl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var qae=(0,Fw.memo)(jH);var qn=a(E(),1),zH=[];function ab(e){return(0,ed.useMemo)(()=>!!e?.length&&e?.every(t=>t.supportsBulk),[e])}function rje({selection:e,selectedItems:t,onChangeSelection:r,data:o,getItemId:n,disableSelectAll:i=!1}){let s=e.length>0,l=t.length===o.length;return i?(0,qn.jsx)(oT.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:s,disabled:!s,onChange:()=>{r([])},"aria-label":(0,hO.__)("Deselect all")}):(0,qn.jsx)(oT.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,hO.__)("Deselect all"):(0,hO.__)("Select all")})}function oje({actions:e,items:t,selection:r}){let o=(0,Kae.useRegistry)(),[n,i]=(0,ed.useState)(null);return(0,qn.jsx)(se,{direction:"row",gap:"xs",children:e.map(s=>{if(!("callback"in s))return null;let{id:l,label:c,icon:u,isPrimary:d,callback:f}=s,m=typeof c=="string"?c:c(t),h=d?"primary":"tertiary",g=l===n;return(0,qn.jsx)(oT.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 Zae(){let{data:e,selection:t,onChangeSelection:r,getItemId:o,actions:n=zH,paginationInfo:i,view:s}=(0,ed.useContext)(et),l=ab(n),c=(0,ed.useMemo)(()=>e.filter(d=>t.includes(o(d))),[t,o,e]);if(!n.length)return null;let u=yae(t.length,e.length,i.totalItems,!!s.infiniteScrollEnabled);return(0,qn.jsxs)(se,{direction:"row",className:"dataviews-picker-footer__bulk-selection",gap:"md",align:"center",children:[l&&(0,qn.jsx)(rje,{selection:t,selectedItems:c,onChangeSelection:r,data:e,getItemId:o,disableSelectAll:!!s.infiniteScrollEnabled}),(0,qn.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:u})]})}function Xae(){let{data:e,selection:t,getItemId:r,actions:o=zH}=(0,ed.useContext)(et),n=(0,ed.useMemo)(()=>e.filter(i=>t.includes(r(i))),[t,r,e]);return o.length?(0,qn.jsx)("div",{className:"dataviews-picker-footer__actions",children:(0,qn.jsx)(oje,{actions:o,items:n,selection:t})}):null}function Qae(){return(0,qn.jsxs)(se,{direction:"row",gap:"md",align:"center",children:[(0,qn.jsx)(Zae,{}),(0,qn.jsx)(Xae,{})]})}function HH(){let{actions:e=zH,paginationInfo:t,view:r}=(0,ed.useContext)(et),o=!r.infiniteScrollEnabled&&!!t.totalItems&&t.totalPages>1;return!e.length&&!o?null:(0,qn.jsxs)(se,{direction:"row",justify:"space-between",align:"center",className:"dataviews-footer",gap:"sm",children:[(0,qn.jsx)(Zae,{}),(0,qn.jsx)(qae,{}),(0,qn.jsx)(Xae,{})]})}var Tt=a(E(),1),{Badge:nje}=_t(Ps.privateApis);function Jae({view:e,selection:t,onChangeSelection:r,selectionProps: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,gO.useRef)(null),w=t.includes(_);vh(y,m);let S=s?.render?(0,Tt.jsx)(s.render,{item:i,field:s,config:f}):null,x=g&&l?.render?(0,Tt.jsx)(l.render,{item:i,field:l}):null;return(0,Tt.jsxs)(Ps.Composite.Item,{ref:y,"aria-label":l?l.getValue({item:i})||(0,nT.__)("(no title)"):void 0,render:({children:C,...I})=>(0,Tt.jsx)(se,{direction:"column",children:C,...I}),role:"option","aria-posinset":m,"aria-setsize":h,className:J("dataviews-view-picker-grid__card",{"is-selected":w}),"aria-selected":w,...o,children:[v&&S&&(0,Tt.jsx)("div",{className:"dataviews-view-picker-grid__media",children:S}),v&&S&&(0,Tt.jsx)(fh,{item:i,selection:t,onChangeSelection:r,getItemId:n,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1}),g&&(0,Tt.jsx)(se,{direction:"row",justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,Tt.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:x})}),(0,Tt.jsxs)(se,{direction:"column",gap:"xs",children:[b&&c?.render&&(0,Tt.jsx)(c.render,{item:i,field:c}),!!d?.length&&(0,Tt.jsx)(se,{direction:"row",className:"dataviews-view-picker-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:d.map(C=>(0,Tt.jsx)(nje,{className:"dataviews-view-picker-grid__field-value",children:(0,Tt.jsx)(C.render,{item:i,field:C})},C.id))}),!!u?.length&&(0,Tt.jsx)(se,{direction:"column",className:"dataviews-view-picker-grid__fields",gap:"xs",children:u.map(C=>(0,Tt.jsx)(Ps.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsx)(Ps.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:C.header}),(0,Tt.jsx)(Ps.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,Tt.jsx)(C.render,{item:i,field:C})})]})},C.id))})]})]},_)}function ele({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,$ae.useInstanceId)(ele,"dataviews-view-picker-grid-group__header");return(0,Tt.jsxs)(se,{direction:"column",gap:"sm",role:"group","aria-labelledby":n,children:[(0,Tt.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:n,children:r?(0,nT.sprintf)((0,nT.__)("%1$s: %2$s"),t.label,e):e}),o]},e)}function ije({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,gO.useContext)(et),h=r.find(z=>z.id===l?.titleField),g=r.find(z=>z.id===l?.mediaField),v=r.find(z=>z.id===l?.descriptionField),b=l.fields??[],{regularFields:_,badgeFields:y}=b.reduce((z,D)=>{let O=r.find(W=>W.id===D);if(!O)return z;let L=l.layout?.badgeFields?.includes(D)?"badgeFields":"regularFields";return z[L].push(O),z},{regularFields:[],badgeFields:[]}),w=!!t?.length,S=l.layout?.previewSize,x=ab(e),C="900px",I=l.groupBy?.field?r.find(z=>z.id===l.groupBy?.field):null,k=I?pa(t,I):null,R=(l.infiniteScrollEnabled&&!k)??!1,A=k?Array.from(k.values()).flat():t,{getSelectionProps:P}=Bl({data:A,getItemId:o,isItemSelectable:()=>!0,selection:s,onChangeSelection:i,selectionMode:x?"multi":"single-clearable",shouldSelectOnClick:!0}),T=l?.page??1,M=l?.perPage??0,B=R?f?.totalItems:void 0,F=cO(),V=dO(t,R,F);return(0,Tt.jsxs)(Tt.Fragment,{children:[w&&I&&k&&(0,Tt.jsx)(Ps.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:z,...D})=>(0,Tt.jsx)(se,{direction:"column",gap:"lg",children:z,...D}),children:Array.from(k.entries()).map(([z,D])=>(0,Tt.jsx)(ele,{groupName:z,groupField:I,showLabel:l.groupBy?.showLabel!==!1,children:(0,Tt.jsx)($C,{previewSize:S,style:{gridTemplateColumns:S&&`repeat(auto-fill, minmax(${S}px, 1fr))`},"aria-busy":n,ref:d,children:D.map(O=>{let L=O.position??(T-1)*M+t.indexOf(O)+1;return(0,Tt.jsx)(Jae,{view:l,selection:s,onChangeSelection:i,selectionProps:P(o(O)),getItemId:o,item:O,mediaField:g,titleField:h,descriptionField:v,regularFields:_,badgeFields:y,config:{sizes:C},posinset:L,setsize:B},o(O))})})},z))}),w&&!k&&(0,Tt.jsxs)(Ps.Composite,{render:(0,Tt.jsx)($C,{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:V}).map((z,D)=>(0,Tt.jsx)(Ps.Composite.Item,{render:({children:O,...L})=>(0,Tt.jsx)(se,{direction:"column",children:O,...L}),role:"option","aria-hidden":!0,tabIndex:-1,className:"dataviews-view-picker-grid__card dataviews-view-picker-grid__placeholder"},`placeholder-${D}`)),t.map(z=>{let D=z.position;return(0,Tt.jsx)(Jae,{view:l,selection:s,onChangeSelection:i,selectionProps:P(o(z)),getItemId:o,item:z,mediaField:g,titleField:h,descriptionField:v,regularFields:_,badgeFields:y,config:{sizes:C},posinset:D,setsize:B},o(z))})]}),!w&&(0,Tt.jsx)("div",{className:J({"dataviews-loading":n,"dataviews-no-results":!n}),children:n?(0,Tt.jsx)("p",{children:(0,Tt.jsx)(Ps.Spinner,{})}):u}),w&&n&&(0,Tt.jsx)("p",{className:"dataviews-loading-more",children:(0,Tt.jsx)(Ps.Spinner,{})})]})}var tle=ije;var vO=a(j(),1),lb=a(G(),1),nl=a(U(),1);var Nt=a(E(),1);function sje({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 rle({item:e,fields:t,id:r,view:o,titleField:n,mediaField:i,descriptionField:s,selection:l,getItemId:c,onChangeSelection:u,selectionProps:d,posinset:f}){let{paginationInfo:m}=(0,nl.useContext)(et),h=l.includes(r),[g,v]=(0,nl.useState)(!1),b=(0,nl.useRef)(null);vh(b,f);let{showTitle:_=!0,showMedia:y=!0,showDescription:w=!0,infiniteScrollEnabled:S}=o,x=()=>{v(!0)},C=()=>{v(!1)},I=o.fields??[],k=n&&_||i&&y||s&&w;return(0,Nt.jsxs)(lb.Composite.Item,{ref:b,render:({children:R,...A})=>(0,Nt.jsx)("tr",{className:J("dataviews-view-table__row",{"is-selected":h,"is-hovered":g}),onMouseEnter:x,onMouseLeave:C,children:R,...A}),"aria-selected":h,"aria-setsize":m.totalItems||void 0,"aria-posinset":f,role:S?"article":"option",onClickCapture:d.onClickCapture,onClick:d.onClick,onMouseDown:R=>{R.button===0&&(R.currentTarget.parentElement?.focus({preventScroll:!0}),d.onMouseDown(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)(fh,{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)(nO,{item:e,titleField:_?n:void 0,mediaField:y?i:void 0,descriptionField:w?s:void 0,isItemClickable:()=>!1})}),I.map(R=>{let{width:A,maxWidth:P,minWidth:T,align:M}=o.layout?.styles?.[R]??{};return(0,Nt.jsx)("td",{style:{width:A,maxWidth:P,minWidth:T},role:"presentation",children:(0,Nt.jsx)(sje,{fields:t,item:e,column:R,align:M})},R)})]},r)}function aje({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,nl.useRef)(new Map),h=(0,nl.useRef)(void 0),[g,v]=(0,nl.useState)(),b=ab(e)??!1;(0,nl.useEffect)(()=>{h.current&&(h.current.focus(),h.current=void 0)});let _=u.groupBy?.field?r.find(D=>D.id===u.groupBy?.field):null,y=_?pa(t,_):null,w=u.infiniteScrollEnabled&&!y,S=y?Array.from(y.values()).flat():t,{getSelectionProps:x}=Bl({data:S,getItemId:o,isItemSelectable:()=>!0,selection:l,onChangeSelection:s,selectionMode:b?"multi":"single-clearable",shouldSelectOnClick:!0}),C=(0,nl.useId)();if(g){h.current=g,v(void 0);return}let I=D=>{let O=m.current.get(D.id),L=O?m.current.get(O.fallback):void 0;v(L?.node)},k=!!t?.length,R=r.find(D=>D.id===u.titleField),A=r.find(D=>D.id===u.mediaField),P=r.find(D=>D.id===u.descriptionField),{showTitle:T=!0,showMedia:M=!0,showDescription:B=!0}=u,F=R&&T||A&&M||P&&B,V=u.fields??[],z=(D,O)=>L=>{L?m.current.set(D,{node:L,fallback:V[O>0?O-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":C,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)(rO,{selection:l,onChangeSelection:s,data:t,actions:e,getItemId:o,disableSelectAll:w})}),F&&(0,Nt.jsx)("th",{children:R&&(0,Nt.jsx)(Nw,{ref:z(R.id,0),fieldId:R.id,view:u,fields:r,onChangeView:i,onHide:I,setOpenedFilter:c,canMove:!1})}),V.map((D,O)=>{let{width:L,maxWidth:W,minWidth:q,align:Z}=u.layout?.styles?.[D]??{};return(0,Nt.jsx)("th",{style:{width:L,maxWidth:W,minWidth:q,textAlign:Z},"aria-sort":u.sort?.direction&&u.sort?.field===D?KI[u.sort.direction]:void 0,scope:"col",children:(0,Nt.jsx)(Nw,{ref:z(D,O),fieldId:D,view:u,fields:r,onChangeView:i,onHide:I,setOpenedFilter:c,canMove:u.layout?.enableMoving??!0})},D)})]})}),k&&_&&y?Array.from(y.entries()).map(([D,O])=>(0,Nt.jsxs)(lb.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:V.length+(F?1:0)+1,className:"dataviews-view-table__group-header-cell",role:"presentation",children:u.groupBy?.showLabel===!1?D:(0,vO.sprintf)((0,vO.__)("%1$s: %2$s"),_.label,D)})}),O.map((L,W)=>{let q=o(L)||W.toString();return(0,Nt.jsx)(rle,{item:L,fields:r,id:q,view:u,titleField:R,mediaField:A,descriptionField:P,selection:l,getItemId:o,onChangeSelection:s,selectionProps:x(q)},o(L))})]},`group-${D}`)):(0,Nt.jsx)(lb.Composite,{render:(0,Nt.jsx)("tbody",{role:"presentation"}),virtualFocus:!0,orientation:"vertical",children:k&&t.map((D,O)=>{let L=o(D),W=L||O.toString(),q=D.position;return(0,Nt.jsx)(rle,{item:D,fields:r,id:W,view:u,titleField:R,mediaField:A,descriptionField:P,selection:l,getItemId:o,onChangeSelection:s,selectionProps:x(W),posinset:q},L)})})]}),(0,Nt.jsxs)("div",{className:J({"dataviews-loading":n,"dataviews-no-results":!k&&!n}),id:C,children:[!k&&(n?(0,Nt.jsx)("p",{children:(0,Nt.jsx)(lb.Spinner,{})}):f),k&&n&&(0,Nt.jsx)("p",{className:"dataviews-loading-more",children:(0,Nt.jsx)(lb.Spinner,{})})]})]})}var ole=aje;var Dw=a(G(),1),Lw=a(U(),1),nle=a(Te(),1),bO=a(j(),1);var Yt=a(E(),1);function lje(e){return!!e}function cje({view:e,selection:t,selectionProps:r,getItemId:o,item:n,titleField:i,mediaField:s,descriptionField:l,otherFields:c,posinset:u,setsize:d}){let f=(0,Lw.useRef)(null);vh(f,u);let{showTitle:m=!0,showMedia:h=!0,showDescription:g=!0}=e,v=o(n),b=t.includes(v),_=e.layout?.density??"balanced",y=h&&_!=="compact"&&s?.render?(0,Yt.jsx)(s.render,{item:n,field:s,config:{sizes:_==="comfortable"?"32px":"24px"}}):null,w=(0,Yt.jsx)("div",{className:"dataviews-view-picker-activity__item-type-icon",children:y||(0,Yt.jsx)("span",{className:"dataviews-view-picker-activity__item-bullet","aria-hidden":"true"})}),S=m&&i?.render?(0,Yt.jsx)(i.render,{item:n,field:i}):null,x=g&&l?.render?(0,Yt.jsx)(l.render,{item:n,field:l}):null,C=(0,Lw.useMemo)(()=>_==="comfortable"?"md":"sm",[_]);return(0,Yt.jsx)(Dw.Composite.Item,{ref:f,role:"option","aria-label":i&&i.getValue({item:n})||void 0,"aria-posinset":u,"aria-setsize":d,"aria-selected":b,className:J("dataviews-view-picker-activity__item",_==="compact"&&"is-compact",_==="balanced"&&"is-balanced",_==="comfortable"&&"is-comfortable",b&&"is-selected"),...r,render:(0,Yt.jsx)("div",{}),children:(0,Yt.jsxs)(se,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,Yt.jsx)(se,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-picker-activity__item-type",children:w}),(0,Yt.jsxs)(se,{direction:"column",gap:C,align:"flex-start",className:"dataviews-view-picker-activity__item-content",children:[S&&(0,Yt.jsx)("div",{className:"dataviews-view-picker-activity__item-title",children:S}),x&&(0,Yt.jsx)("div",{className:"dataviews-view-picker-activity__item-description",children:x}),(0,Yt.jsx)("div",{className:"dataviews-view-picker-activity__item-fields",children:c.map(I=>(0,Yt.jsxs)("div",{className:"dataviews-view-picker-activity__item-field",children:[(0,Yt.jsx)(Gt,{render:(0,Yt.jsx)("span",{}),className:"dataviews-view-picker-activity__item-field-label",children:I.label}),(0,Yt.jsx)("span",{className:"dataviews-view-picker-activity__item-field-value",children:(0,Yt.jsx)(I.render,{item:n,field:I})})]},I.id))})]})]})})}function ile({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,nle.useInstanceId)(ile,"dataviews-view-picker-activity-group__header");return(0,Yt.jsxs)(se,{direction:"column",role:"group","aria-labelledby":n,className:"dataviews-view-picker-activity-group",children:[(0,Yt.jsx)("h3",{className:"dataviews-view-picker-activity-group__header",id:n,children:r?(0,bO.sprintf)((0,bO.__)("%1$s: %2$s"),t.label,e):e}),o]})}function sle({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,Lw.useContext)(et),m=ab(l),h=t.find(A=>A.id===s?.titleField),g=t.find(A=>A.id===s?.mediaField),v=t.find(A=>A.id===s?.descriptionField),b=(s?.fields??[]).map(A=>t.find(P=>A===P.id)).filter(lje),_=s.groupBy?.field?t.find(A=>A.id===s.groupBy?.field):null,y=_?pa(e,_):null,S=(s.infiniteScrollEnabled&&!y)??!1?f?.totalItems:void 0,x=!!e?.length,C=!!(_&&y),I=y?Array.from(y.values()).flat():e,{getSelectionProps:k}=Bl({data:I,getItemId:r,isItemSelectable:()=>!0,selection:i,onChangeSelection:n,selectionMode:m?"multi":"single-clearable",shouldSelectOnClick:!0}),R=A=>(0,Yt.jsx)(cje,{view:s,selection:i,selectionProps:k(r(A)),getItemId:r,item:A,titleField:h,mediaField:g,descriptionField:v,otherFields:b,posinset:A.position,setsize:S},r(A));return x?(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)(Dw.Composite,{virtualFocus:!0,orientation:"vertical",role:"listbox","aria-multiselectable":m,"aria-label":d,"aria-busy":o,render:C?(0,Yt.jsx)(se,{direction:"column",gap:"sm"}):void 0,className:J("dataviews-view-picker-activity",c),children:C&&y?Array.from(y.entries()).map(([A,P])=>(0,Yt.jsx)(ile,{groupName:A,groupField:_,showLabel:s.groupBy?.showLabel!==!1,children:P.map(R)},A)):e.map(R)}),o&&(0,Yt.jsx)("p",{className:"dataviews-loading-more",children:(0,Yt.jsx)(Dw.Spinner,{})})]}):(0,Yt.jsx)("div",{className:J({"dataviews-loading":o,"dataviews-no-results":!o}),children:o?(0,Yt.jsx)("p",{children:(0,Yt.jsx)(Dw.Spinner,{})}):u})}var Bw=a(G(),1),Vw=a(j(),1),ale=a(U(),1);var jw=a(E(),1);function yh(){let e=(0,ale.useContext)(et),t=e.view;return(0,jw.jsxs)(Bw.__experimentalToggleGroupControl,{label:(0,Vw.__)("Density"),value:t.layout?.density||"balanced",onChange:r=>{e.onChangeView({...t,layout:{...t.layout,density:r}})},isBlock:!0,children:[(0,jw.jsx)(Bw.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,Vw._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,jw.jsx)(Bw.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,Vw._x)("Balanced","Density option for DataView layout")},"balanced"),(0,jw.jsx)(Bw.__experimentalToggleGroupControlOption,{value:"compact",label:(0,Vw._x)("Compact","Density option for DataView layout")},"compact")]})}var lle=a(G(),1),cle=a(j(),1),ule=a(U(),1);var dle=a(E(),1),uje=[{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 fle(){let e=(0,ule.useContext)(et),t=e.view,r=uje.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,dle.jsx)(lle.RangeControl,{showTooltip:!1,label:(0,cle.__)("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 cb=a(E(),1);function UH(){return(0,cb.jsxs)(cb.Fragment,{children:[(0,cb.jsx)(yh,{}),(0,cb.jsx)(fle,{})]})}var wh=[{type:XI,label:(0,td.__)("Table"),component:Iae,icon:Qk,viewConfigOptions:yh},{type:oae,label:(0,td.__)("Grid"),component:Lae,icon:$k,viewConfigOptions:UH},{type:nae,label:(0,td.__)("List"),component:BH,icon:(0,td.isRTL)()?dV:b1,viewConfigOptions:yh},{type:iae,label:(0,td.__)("Activity"),component:Yae,icon:bm,viewConfigOptions:yh},{type:sae,label:(0,td.__)("Grid"),component:tle,icon:$k,viewConfigOptions:UH,isPicker:!0},{type:aae,label:(0,td.__)("Table"),component:ole,icon:Qk,viewConfigOptions:yh,isPicker:!0},{type:lae,label:(0,td.__)("Activity"),component:sle,icon:bm,viewConfigOptions:yh,isPicker:!0}];var $w=a(U(),1);var Eh=a(G(),1),rp=a(j(),1),a5=a(U(),1);var ple=a(_e(),1),mle=(0,ple.createContext)(!0);function gle(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function yO(e){let t=[];for(let r of e)t.push(...r);return t}function iT(e){return e.slice().reverse()}function sT(...e){}function ha(e,t){return typeof Object.hasOwn=="function"?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function zw(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}function aT(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function vle(e,t){let r={...e};for(let o of t)ha(r,o)&&delete r[o];return r}function ble(e,t){let r={};for(let o of t)ha(e,o)&&(r[o]=e[o]);return r}function wO(e){return e}function yle(e=sT){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)}function Yi(e,t){if(!e)throw typeof t!="string"?new Error("Invariant failed"):new Error(t)}function WH(e){return Object.keys(e)}function wle(e,...t){let r=typeof e=="function"?e(...t):e;return r==null?!1:!r}function Hw(e){return e.disabled||e["aria-disabled"]===!0||e["aria-disabled"]==="true"}function qi(e){let t={};for(let r in e)e[r]!==void 0&&(t[r]=e[r]);return t}function Lt(...e){for(let t of e)if(t!==void 0)return t}var Uw=dje();function dje(){return typeof window<"u"&&!!window.document?.createElement}function rd(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function db(e,t=!1){let{activeElement:r}=rd(e);if(!r?.nodeName)return null;if(fje(r)&&r.contentDocument?.body)return db(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=rd(r).getElementById(o);if(n)return n}}return r}function ub(e,t){return e===t||e.contains(t)}function Ww(e){return e?.nodeType===1}function _le(e){return typeof e?.nodeType=="number"}function fje(e){return e.tagName==="IFRAME"}function _h(e){let t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?pje.indexOf(e.type)!==-1:!1}var pje=["button","color","file","image","reset","submit"];function mje(e){if(typeof e.checkVisibility=="function")return e.checkVisibility();let t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function ks(e){try{return e.tagName==="TEXTAREA"?!0:e.tagName!=="INPUT"?!1:e.selectionStart!==null}catch{return!1}}function _O(e){return e.isContentEditable||ks(e)}function Sle(e){if(ks(e))return e.value;if(e.isContentEditable){let t=rd(e).createRange();return t.selectNodeContents(e),t.toString()}return""}function lT(e){let t=0,r=0;if(ks(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let o=rd(e).getSelection();if(o?.rangeCount&&o.anchorNode&&ub(e,o.anchorNode)&&o.focusNode&&ub(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 hje=["dialog","menu","listbox","tree","grid"],hle={menu:"menuitem",listbox:"option",tree:"treeitem"};function xle(e,t){let r=e?.getAttribute("role");return r&&hje.indexOf(r)!==-1?r:t}function Cle(e){if(e!=null&&ha(hle,e))return hle[e]}function cT(e){if(!e)return null;let t=o=>o==="auto"||o==="scroll";if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:o}=getComputedStyle(e);if(t(o))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:o}=getComputedStyle(e);if(t(o))return e}let r=rd(e);return cT(e.parentElement)||r.scrollingElement||r.body}function SO(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function Tle(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:gje(c,u)?(n>s&&(o=!0),-1):(n<s&&(o=!0),1)}),o?r.map(([n,i])=>i):e}function gje(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Ele(){return Uw&&!!navigator.maxTouchPoints}function xO(){return Uw?/mac|iphone|ipad|ipod/i.test(navigator.platform):!1}function Gw(){return Uw&&xO()&&/apple/i.test(navigator.vendor)}function Ple(){return Uw&&/firefox\//i.test(navigator.userAgent)}function kle(e){let{currentTarget:t,target:r}=e;return t?_le(r)?!ub(t,r):!0:!1}function fi(e){return e.target===e.currentTarget}function Rle(e){if(!Ww(e))return!1;let t=e,r=t.tagName.toLowerCase();return r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit"}function Ale(e){let t=xO();return t&&!e.metaKey||!t&&!e.ctrlKey?!1:Rle(e.currentTarget)}function Ile(e){return e.altKey?Rle(e.currentTarget):!1}function fb(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 Ole(e,t,r){let o=new KeyboardEvent(t,r);return e.dispatchEvent(o)}function GH(e,t){let r=new MouseEvent("click",t);return e.dispatchEvent(r)}function CO(e,t){let r=t||e.currentTarget,o=e.relatedTarget;return!_le(o)||!ub(r,o)}function Nle(e){return e.type==="input"}function pb(e,t,r,o){let i=(l=>{if(o){let u=setTimeout(l,o);return()=>clearTimeout(u)}let c=requestAnimationFrame(l);return()=>cancelAnimationFrame(c)})(()=>{e.removeEventListener(t,s,!0),r()}),s=()=>{i(),r()};return e.addEventListener(t,s,{once:!0,capture:!0}),()=>{i(),e.removeEventListener(t,s,!0)}}function od(e,t,r,o=window){let n=[];try{o.document.addEventListener(e,t,r);for(let s of Array.from(o.frames))n.push(od(e,t,r,s))}catch{}return()=>{try{o.document.removeEventListener(e,t,r)}catch{}for(let s of n)s()}}var vje="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 TO(e){return!(!e.matches(vje)||!mje(e)||e.closest("[inert]"))}function Vl(e){let t=db(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return r?r===e.id:!1}function Mle(e){let t=db(e);if(!t)return!1;if(ub(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 Fle(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest",...t})):e.focus()}function Dle(e){return async()=>{let t=await e?.();return Dle(async()=>(await t?.(),e))}}var U3t=bje();function bje({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]=Dle(async()=>{await h?.();let v=await g?.();return async()=>{await v?.(),await u?.()}});t.length>e;)t.shift()}}}var Ki=a(_e(),1),br=a(_e(),1),mb=a(E(),1);function Lle(e,t){if(typeof e=="function"){let r=e(t);if(typeof r=="function")return r}else e&&(e.current=t)}function yje(e){return!e||!(0,br.isValidElement)(e)?!1:"ref"in e.props||"ref"in e}function wje(e){return yje(e)?{...e.props}.ref||e.ref:null}function _je(e,t){let r={...e};for(let o in t){if(!ha(t,o))continue;if(o==="className"){let i="className",s=e[i],l=t[i];s&&l?r[i]=`${s} ${l}`:r[i]=l||s;continue}if(o==="style"){let i="style";r[i]=e[i]?{...e[i],...t[i]}:t[i];continue}let n=t[o];if(o.startsWith("on")){if(typeof n!="function")continue;let i=e[o];if(typeof i=="function"){r[o]=(...s)=>{n(...s),i(...s)};continue}}r[o]=n}return r}var YH={...Ki},Ble=YH.useId,Y3t=YH.useDeferredValue,Vle=YH.useInsertionEffect,Dr=Uw?br.useLayoutEffect:br.useEffect;function Sje(e){let[t]=(0,br.useState)(e);return t}function Ule(e){let t=(0,br.useRef)(e);return Dr(()=>{t.current=e}),t}function Mt(e){let t=(0,br.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return Vle?Vle(()=>{t.current=e}):t.current=e,(0,br.useCallback)((...r)=>t.current?.(...r),[])}function Wle(e){let[t,r]=(0,br.useState)(null);return Dr(()=>{if(t==null||!e)return;let o=null;return e(n=>(o=n,t)),()=>{e(o)}},[t,e]),[t,r]}function Qo(...e){return(0,br.useMemo)(()=>{if(e.some(Boolean))return t=>{let r=[];for(let o of e){if(!o)continue;let n=Lle(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():Lle(o,null)}}},e)}function jl(e){if(Ble){let o=Ble();return e||o}let[t,r]=(0,br.useState)(e);return Dr(()=>{e||t||r(`id-${Math.random().toString(36).slice(2,8)}`)},[e,t]),e||t}function Gle(e,t){let r=i=>{if(typeof i=="string")return i},[o,n]=(0,br.useState)(()=>r(t));return Dr(()=>{n((e&&"current"in e?e.current:e)?.tagName.toLowerCase()||r(t))},[e,t]),o}function Yle(e,t,r){let o=Sje(r),[n,i]=(0,br.useState)(o);return(0,br.useEffect)(()=>{let s=e&&"current"in e?e.current:e;if(!s)return;let l=()=>{let u=s.getAttribute(t);i(u??o)},c=new MutationObserver(l);return c.observe(s,{attributeFilter:[t]}),l(),()=>c.disconnect()},[e,t,o]),n}function nd(e,t){let r=(0,br.useRef)(!1);(0,br.useEffect)(()=>{if(r.current)return e();r.current=!0},t),(0,br.useEffect)(()=>()=>{r.current=!1},[])}function qle(e,t){let r=(0,br.useRef)(!1);Dr(()=>{if(r.current)return e();r.current=!0},t),Dr(()=>()=>{r.current=!1},[])}function Kle(){return(0,br.useReducer)(()=>[],[])}function Jo(e){return Mt(typeof e=="function"?e:()=>e)}function id(e,t,r=[]){let o=(0,br.useCallback)(n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n)),[...r,e.wrapElement]);return{...e,wrapElement:o}}function PO(e,t,r){let o=e.onLoadedMetadataCapture,n=(0,br.useMemo)(()=>Object.assign(()=>{},o,...r!==void 0?[{[t]:r}]:[]),[o,t,r]);return[o?.[t],{onLoadedMetadataCapture:n}]}var jle=!1;function Zle(){return(0,br.useEffect)(()=>{jle||(od("mousemove",Cje,!0),od("mousedown",EO,!0),od("mouseup",EO,!0),od("keydown",EO,!0),od("scroll",EO,!0),jle=!0)},[]),Mt(()=>qH)}var qH=!1,zle=0,Hle=0;function xje(e){let t=e.movementX||e.screenX-zle,r=e.movementY||e.screenY-Hle;return zle=e.screenX,Hle=e.screenY,t||r||!1}function Cje(e){xje(e)&&(qH=!0)}function EO(){qH=!1}function Ir(e){let t=Ki.forwardRef((r,o)=>e({...r,ref:o}));return t.displayName=e.displayName||e.name,t}function sd(e,t){return Ki.memo(e,t)}function Lr(e,t){let{wrapElement:r,render:o,...n}=t,i=Qo(t.ref,wje(o)),s;if(Ki.isValidElement(o)){let l={...o.props,ref:i};s=Ki.cloneElement(o,_je(n,l))}else o?s=o(n):s=(0,mb.jsx)(e,{...n});return r?r(s):s}function Br(e){let t=(r={})=>e(r);return t.displayName=e.name,t}function ga(e=[],t=[]){let r=Ki.createContext(void 0),o=Ki.createContext(void 0),n=()=>Ki.useContext(r),i=(u=!1)=>{let d=Ki.useContext(o),f=n();return u?d:d||f},s=()=>{let u=Ki.useContext(o),d=n();if(!(u&&u===d))return d},l=u=>e.reduceRight((d,f)=>(0,mb.jsx)(f,{...u,children:d}),(0,mb.jsx)(r.Provider,{...u}));return{context:r,scopedContext:o,useContext:n,useScopedContext:i,useProviderContext:s,ContextProvider:l,ScopedContextProvider:u=>(0,mb.jsx)(l,{...u,children:t.reduceRight((d,f)=>(0,mb.jsx)(f,{...u,children:d}),(0,mb.jsx)(o.Provider,{...u}))})}}var pi=a(_e(),1),Tje="div",Eje=Symbol("accessibleWhenDisabled"),Pje=Gw(),kje=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"];function Rje(e){let{tagName:t,readOnly:r,type:o}=e;return t==="TEXTAREA"&&!r||t==="SELECT"&&!r?!0:t==="INPUT"&&!r?kje.includes(o):!!(e.isContentEditable||e.getAttribute("role")==="combobox"&&e.dataset.name)}function Aje(e){return e?e==="button"||e==="summary"||e==="input"||e==="select"||e==="textarea"||e==="a":!0}function Ije(e){return e?e==="button"||e==="input"||e==="select"||e==="textarea":!0}function Oje(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 Nje({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 KH(e,t){return Mt(r=>{e?.(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var Xle=!1,ZH=!0;function Mje(e){let t=e.target;Ww(t)&&!t.hasAttribute("data-focus-visible")&&(ZH=!1)}function Fje(e){e.metaKey||e.ctrlKey||e.altKey||(ZH=!0)}var uT=Br(function({focusable:t=!0,accessibleWhenDisabled:r,autoFocus:o,onFocusVisible:n,...i}){let s=(0,pi.useRef)(null),[l,c]=PO(i,Eje,r);r??=l,(0,pi.useEffect)(()=>{t&&(Xle||(od("mousedown",Mje,!0),od("keydown",Fje,!0),Xle=!0))},[t]);let u=t&&Hw(i),d=u&&!r,[f,m]=(0,pi.useState)(!1),h=(0,pi.useRef)(!1),g=(0,pi.useRef)(null),v=Mt(O=>{g.current?.(),g.current=null,h.current=!1,O?.removeAttribute("data-focus-visible")});(0,pi.useEffect)(()=>{t&&d&&(v(s.current),f&&m(!1))},[t,d,f,v]),(0,pi.useEffect)(()=>{if(!t||!f)return;let O=s.current;if(!O||typeof IntersectionObserver>"u")return;let L=new IntersectionObserver(()=>{TO(O)||(h.current=!1,m(!1))});return L.observe(O),()=>L.disconnect()},[t,f]),(0,pi.useEffect)(()=>()=>g.current?.(),[]);let b=KH(i.onKeyPressCapture,u),_=KH(i.onMouseDownCapture,u),y=KH(i.onClickCapture,u),w=(O,L)=>{if(L&&(O.currentTarget=L),!t)return;let W=O.currentTarget;if(W&&Vl(W)&&(n?.(O),!O.defaultPrevented)){if(W.dataset.focusVisible="true",h.current=!0,Oje(W)){if(g.current?.(),g.current=null,typeof IntersectionObserver<"u"){let q=new IntersectionObserver(()=>{TO(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||!fi(O))return;let L=O.currentTarget;pb(L,"focusout",()=>w(O,L))}),C=i.onFocusCapture,I=Mt(O=>{if(C?.(O),O.defaultPrevented||!t)return;if(!fi(O)){m(!1);return}let L=O.currentTarget,W=()=>w(O,L);ZH||Rje(O.target)?pb(O.target,"focusout",W):m(!1)}),k=i.onBlur,R=Mt(O=>{k?.(O),t&&CO(O)&&(v(O.currentTarget),m(!1))}),A=(0,pi.useContext)(mle),P=Mt(O=>{t&&o&&O&&A&&queueMicrotask(()=>{Vl(O)||TO(O)&&O.focus()})}),T=Gle(s),M=t&&Aje(T),B=t&&Ije(T),[F,V]=(0,pi.useState)(!1);Pje&&(0,pi.useEffect)(()=>{if(!t)return;let O=s.current;if(!O)return;let{type:L}=O,W=O.tagName==="INPUT"&&(L==="checkbox"||L==="radio");V(_h(O)||W)},[t]);let z=i.style,D=(0,pi.useMemo)(()=>d?{pointerEvents:"none",...z}:z,[d,z]);return i={"data-focus-visible":t&&f||void 0,"data-autofocus":o||void 0,"aria-disabled":u||void 0,...i,...c,ref:Qo(s,P,i.ref),style:D,tabIndex:Nje({focusable:t,trulyDisabled:d,nativeTabbable:M,supportsDisabled:B,safariTabIndex:F,tabIndexProp:i.tabIndex}),disabled:B&&d?!0:void 0,contentEditable:u?void 0:i.contentEditable,onKeyPressCapture:b,onClickCapture:y,onMouseDownCapture:_,onKeyDownCapture:x,onFocusCapture:I,onBlur:R},qi(i)}),Q3t=Ir(function(t){return Lr(Tje,uT(t))});var Sh=a(_e(),1),Dje="button";function Qle(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return e.key==="Enter"?_h(t)||t.tagName==="SUMMARY"||t.tagName==="A":e.key===" "?_h(t)||t.tagName==="SUMMARY"||t.tagName==="INPUT"||t.tagName==="SELECT":!1}var Lje=Symbol("command"),XH=Br(function({clickOnEnter:t=!0,clickOnSpace:r=!0,...o}){let n=(0,Sh.useRef)(null),[i,s]=(0,Sh.useState)(!1);(0,Sh.useEffect)(()=>{n.current&&s(_h(n.current))},[]);let[l,c]=(0,Sh.useState)(!1),u=(0,Sh.useRef)(!1),d=Hw(o),[f,m]=PO(o,Lje,!0);Dr(()=>{d&&(u.current=!1,c(!1))},[d]);let h=o.onKeyDown,g=Mt(w=>{h?.(w);let S=w.currentTarget;if(w.defaultPrevented||f||d||!fi(w)||ks(S)||S.isContentEditable)return;let x=t&&w.key==="Enter",C=r&&w.key===" ",I=w.key==="Enter"&&!t,k=w.key===" "&&!r;if(I||k){w.preventDefault();return}if(x||C){let R=Qle(w);if(x){if(!R){w.preventDefault();let{view:A,...P}=w,T=()=>GH(S,P);Ple()?pb(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=Qle(w);if(u.current=!1,x||c(!1),w.defaultPrevented||!fi(w)||d||w.metaKey||x)return;w.preventDefault();let C=w.currentTarget,{view:I,...k}=w;queueMicrotask(()=>GH(C,k))}),_=o.onBlur,y=Mt(w=>{_?.(w),u.current&&(u.current=!1,c(!1))});return o={"data-active":l||void 0,type:i?"button":void 0,...m,...o,ref:Qo(n,o.ref),onKeyDown:g,onKeyUp:b,onBlur:y},o=uT(o),o}),r6t=Ir(function(t){return Lr(Dje,XH(t))});var dT=ga(),Jle=dT.useContext,i6t=dT.useScopedContext,s6t=dT.useProviderContext,$le=dT.ContextProvider,ece=dT.ScopedContextProvider;var kO=a(_e(),1),Bje="div",QH=Br(function({store:t,shouldRegisterItem:r=!0,getItem:o=wO,element:n,...i}){let s=Jle();t=t||s;let l=jl(i.id),c=(0,kO.useRef)(n);return(0,kO.useEffect)(()=>{let u=c.current;if(!l||!u||!r)return;let d=o({id:l,element:u});return t?.renderItem(d)},[l,r,o,t]),i={...i,ref:Qo(c,i.ref)},qi(i)}),d6t=Ir(function(t){return Lr(Bje,QH(t))});var JH=a(_e(),1),fT=ga([$le],[ece]),h6t=fT.useContext,RO=fT.useScopedContext,tce=fT.useProviderContext,AO=fT.ContextProvider,Yw=fT.ScopedContextProvider,rce=(0,JH.createContext)(void 0),oce=(0,JH.createContext)(void 0);function hb(e,t){let r=e.__unstableInternals;return Yi(r,"Invalid store"),r[t]}function ice(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 IO(e,t){return e===t||e!==e&&t!==t}function sce(e,t,r,o){let n;for(let i of WH(t))IO(t[i],r[i])||o!==void 0&&ice([i],o)||(n??={...e},n[i]=t[i]);return n}var Vje=100;function jje(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 zje(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 ace(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 OO(e){e.notifiedListeners??=ace(e)}function eU(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 $H(e,t,r){for(let o of e)if(o.group===t&&!o.recovering&&!(r&&!o.keyedListeners.has(r))){OO(o);for(let n of o.group.listeners){if(n===o.currentListener)break;eU(o,n)&&o.notifiedListeners?.add(n)}}}function Hje(e,t,r){for(let o of e)o.group===t&&(o.recovering||eU(o,r)&&(OO(o),o.notifiedListeners?.add(r)))}function Uje({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)&&(eU(i,o)?(OO(i),i.notifiedListeners?.add(o)):n&&(OO(i),i.recoverToLive=!0)))}function Wje(e,t,r){for(let o of e)o.group===t&&o.notifiedListeners?.delete(r)}function Gje({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 Yje(e,t){if(!e.disposables.size)return;let r=e.disposables.get(t);r&&(e.disposables.delete(t),r())}function lce(e,t,r){let o=e.disposables.get(t);if(!o){e.disposables.set(t,r);return}e.disposables.set(t,()=>{o(),r()})}function cce(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=sce(o,r,u,i)??o)}let c=t(r,o);c&&lce(e,t,c)}function nce({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)&&!ice(e.listenerKeys.get(s),o)||(n?.add(s),cce(e,s,t(),r,t,o))}function va(e,...t){let r=e,o=r,n=sT,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 B=WH(r),F=[];for(let D of t){let O=D?.getState?.();if(!O)continue;let L=B.filter(W=>ha(O,W));if(L.length){if(t.length===1||L.length===B.length){for(let W of L)F.push(hi(D,[W],q=>{R(W,q[W],!0)}));continue}F.push(xh(D,L,(W,q)=>{for(let Z of L)W[Z]!==q[Z]&&R(Z,W[Z],!0)}));for(let W of L){let q=D?.getState?.();q&&R(W,q[W],!0)}}}let V=[];for(let D of u)V.push(D());let z=t.map(pT);return n=zw(...F,...V,...z),M},g=(P,T,M)=>{M!==void 0&&(M?zje(P.listenersByKey,M,T):P.allKeysListeners?.delete(T))},v=[],b=(P,T,M=d)=>{let B=P?[...P]:null,F=M.listeners.has(T);return F||Wje(v,M,T),B?Uje({fastPathFrames:v,group:M,keys:B,listener:T}):(F&&$H(v,M),Hje(v,M,T)),F&&($H(v,M,T),g(M,T,M.listenerKeys.get(T))),M.listeners.add(T),B?(M.listenersByKey??=new Map,jje(M.listenersByKey,B,T),Gje({fastPathFrames:v,group:M,keys:B,listener:T})):(M.allKeysListeners??=new Set,M.allKeysListeners.add(T)),M.listenerKeys.set(T,B),()=>{let V=M.disposables.get(T);M.disposables.delete(T),$H(v,M,T);let z=M.listenerKeys.get(T);g(M,T,B),z!==B&&g(M,T,z),M.listenerKeys.delete(T),M.listeners.delete(T),V?.()}},_=(P,T)=>b(P,T),y=(P,T,M)=>{let B=P.listeners.has(T);if(B){P.suspendCounts??=new Map;let V=P.suspendCounts.get(T)??0;P.suspendCounts.set(T,V+1)}let F;try{let V=r;Yje(P,T),r!==V&&(F=sce(M,r,V));let z=T(r,F??M);z&&lce(P,T,z)}finally{if(B){let V=P.suspendCounts,z=V?.get(T);z&&z>1?V?.set(T,z-1):V?.delete(T),V?.size||delete P.suspendCounts}}},w=(P,T)=>(y(d,T,r),b(P,T)),S=(P,T)=>(!f.listeners.size&&!s&&(o=r),y(f,T,o),b(P,T,f)),x=P=>va(ble(r,P),A),C=P=>va(vle(r,P),A),I=()=>r,k=(P,T,M)=>{if(!(M instanceof Set)&&!P.allKeysListeners?.size){let B=P.listenersByKey?.get(M);if(!B)return;let F={group:P,keyedListeners:B,updatedKey:M,currentListener:null};v.push(F);try{for(let V of B){if(F.notifiedListeners?.has(V)||(F.currentListener=V,F.notifiedListeners?.add(V),cce(P,V,r,T,I,M),!P.allKeysListeners?.size&&!F.recoverToLive))continue;let z=F.notifiedListeners??ace(F);F.notifiedListeners=z,F.recovering=!0,nce({group:P,getState:I,prevState:T,updatedKey:M,notifiedListeners:z});return}}finally{v.pop()}return}nce({group:P,getState:I,prevState:T,updatedKey:M})},R=(P,T,M=!1)=>{if(!ha(r,P))return;let B=r[P],F=typeof T=="function"?T(B):T;if(IO(F,B))return;let V=s;s=!0;let z=r,D={...r,[P]:F};r=D;let O=!1;try{if(!M&&t.length){for(let L of t)if(L?.setState?.(P,F),!IO(r[P],F)){O=!0;break}if(O){let L=0;for(;L<Vje;L+=1){let W=!1;for(let q of t){let Z=r[P];q?.setState?.(P,Z),IO(r[P],Z)||(W=!0)}if(!W)break}}}O||k(d,r===D?z:{...r,[P]:z[P]},P)}finally{s=V}if(!f.listeners.size){s||(o=r);return}l.add(P),!i&&(i=!0,queueMicrotask(()=>{i=!1;let L=r,W=l;l=new Set;let q=o;k(f,q,W),o===q&&(o=L)}))},A={getState:I,setState:R,__unstableInternals:{setup:m,init:h,subscribe:_,sync:w,batch:S,pick:x,omit:C}};return A}function mi(e,...t){if(e)return hb(e,"setup")(...t)}function pT(e,...t){if(e)return hb(e,"init")(...t)}function xh(e,...t){if(e)return hb(e,"subscribe")(...t)}function hi(e,...t){if(e)return hb(e,"sync")(...t)}function gb(e,...t){if(e)return hb(e,"batch")(...t)}function NO(e,...t){if(e)return hb(e,"omit")(...t)}function uce(e,...t){if(e)return hb(e,"pick")(...t)}function qw(...e){let t={};for(let o of e){let n=o?.getState?.();n&&Object.assign(t,n)}let r=va(t,...e);return Object.assign({},...e,r)}function qje(e){let t=e.find(n=>!!n.element),r=[...e].reverse().find(n=>!!n.element)?.element,o=t?.element?.parentElement;if(!r)return rd(o).body;for(;o;){if(o.contains(r))return o;o=o.parentElement}return rd(o).body}function Kje(e){return e?.__unstablePrivateStore}function dce(e={}){e.store;let t=e.store?.getState(),r=Lt(e.items,t?.items,e.defaultItems,[]),o=new Map(r.map(f=>[f.id,f])),n={items:r,renderedItems:Lt(t?.renderedItems,[])},i=Kje(e.store),s=va({items:r,renderedItems:n.renderedItems},i),l=va(n,e.store),c=f=>{let m=Tle(f,h=>h.element);s.setState("renderedItems",m),l.setState("renderedItems",m)};mi(l,()=>pT(s)),mi(s,()=>gb(s,["items"],f=>{l.setState("items",f.items)})),mi(s,()=>gb(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=qje(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=>zw(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 Zje={id:null};function zc(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function Xje(e,t){return e.filter(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function fce(e,t){return e.filter(r=>r.rowId===t)}function pce({items:e,fromIndex:t,step:r,rowId:o,excludeId:n}){for(let i=t;i>=0&&i<e.length;i+=r){let s=e[i];if(s&&s.rowId===o&&!s.disabled&&!(n!=null&&s.id===n))return s.id}}function mce(e,t,r=!1){let o=e.findIndex(n=>n.id===t);return[...e.slice(o+1),...r?[Zje]:[],...e.slice(0,o)]}function MO(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 hce(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}function Qje(e){return{id:"__EMPTY_ITEM__",disabled:!0,rowId:e}}function Jje(e,t,r){let o=hce(e);for(let n of e)for(let i=0;i<o;i+=1){let s=n[i];if(!s||r&&s.disabled){let l=i===0&&r?zc(n):n[i-1];n[i]=l&&t!==l.id&&r?l:Qje(l?.rowId)}}return e}function $je(e){let t=MO(e),r=hce(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 gce(e={}){let t=e.store?.getState(),r=dce(e),o=Lt(e.activeId,t?.activeId,e.defaultActiveId),n=va({...r.getState(),id:Lt(e.id,t?.id)??`id-${Math.random().toString(36).slice(2,8)}`,activeId:o,baseElement:Lt(t?.baseElement,null),includesBaseElement:Lt(e.includesBaseElement,t?.includesBaseElement,o===null),moves:Lt(t?.moves,0),orientation:Lt(e.orientation,t?.orientation,"both"),rtl:Lt(e.rtl,t?.rtl,!1),virtualFocus:Lt(e.virtualFocus,t?.virtualFocus,!1),focusLoop:Lt(e.focusLoop,t?.focusLoop,!1),focusWrap:Lt(e.focusWrap,t?.focusWrap,!1),focusShift:Lt(e.focusShift,t?.focusShift,!1)},r,e.store);mi(n,()=>hi(n,["renderedItems","activeId"],l=>{n.setState("activeId",c=>c!==void 0?c:zc(l.renderedItems)?.id)}));let i=(l="next",c={})=>{let u=n.getState(),{skip:d=0,activeId:f=u.activeId,focusShift:m=u.focusShift,focusLoop:h=u.focusLoop,focusWrap:g=u.focusWrap,includesBaseElement:v=u.includesBaseElement,renderedItems:b=u.renderedItems,rtl:_=u.rtl}=c,y=l==="up"||l==="down",w=l==="next"||l==="down",S=w?_&&!y:!_||y,x=m&&!d;if(!d&&!g&&!v&&f!=null&&(!y||!x&&!b.some(V=>V.rowId!=null))){let V=b.findIndex(D=>D.id===f),z=b[V];if(z){let D=S?-1:1,O=pce({items:b,fromIndex:V+D,step:D,rowId:z.rowId,excludeId:f});return O!==void 0?O:h&&(y?h!=="horizontal":h!=="vertical")?pce({items:b,fromIndex:D===1?0:b.length-1,step:D,rowId:z.rowId,excludeId:f}):void 0}}let C=y?yO(Jje(MO(b),f,x)):b;if(C=S?iT(C):C,C=y?$je(C):C,f==null)return zc(C)?.id;let I=C.find(V=>V.id===f);if(!I)return zc(C)?.id;let k=C.some(V=>V.rowId),R=C.indexOf(I),A=C.slice(R+1),P=fce(A,I.rowId);if(d){let V=Xje(P,f);return(V.slice(d)[0]||V[V.length-1])?.id}let T=h&&(y?h!=="horizontal":h!=="vertical"),M=k&&g&&(y?g!=="horizontal":g!=="vertical"),B=w?(!k||y)&&T&&v:y?v:!1;if(T)return zc(mce(M&&!B?C:fce(C,I.rowId),f,B),f)?.id;if(M){let V=zc(B?P:A,f);return B?V?.id||null:V?.id}let F=zc(P,f);return!F&&B?null:F?.id},s=(l,c)=>typeof c=="number"?i(l,{skip:c}):i(l,c);return{...r,...n,setBaseElement:l=>n.setState("baseElement",l),setActiveId:l=>n.setState("activeId",l),move:l=>{l!==void 0&&(n.setState("activeId",l),n.setState("moves",c=>c+1))},first:()=>zc(n.getState().renderedItems)?.id,last:()=>zc(iT(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 vce=zc,bce=MO;function ad(e,t){return t&&e.item(t)||null}function yce(e,t=!1){if(ks(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=rd(e).getSelection();r?.selectAllChildren(e),t&&r?.collapseToEnd()}}var rU=Symbol("FOCUS_SILENTLY");function wce(e){e[rU]=!0,e.focus({preventScroll:!0})}function _ce(e){let t=e[rU];return delete e[rU],t}function vb(e,t,r){if(!t||t===r)return!1;let o=e.item(t.id);return!(!o||r&&o.element===r)}var cd=a(_e(),1),Cce=a(E(),1);var ld=a(_e(),1),oU=a(nC(),1),Sce=()=>()=>{};function qt(e,t=wO){let r=ld.useCallback(n=>e?xh(e,null,n):Sce(),[e]),o=()=>{let n=typeof t=="string"?t:null,i=typeof t=="function"?t:null,s=e?.getState();if(i)return i(s);if(s&&n&&ha(s,n))return s[n]};return(0,oU.useSyncExternalStore)(r,o,o)}function FO(e,t){let r=ld.useRef({}),o=ld.useCallback(i=>e?xh(e,null,i):Sce(),[e]),n=()=>{let i=e?.getState(),s=!1,l=r.current;for(let c in t){let u=t[c];if(typeof u=="function"){let d=u(i);Object.is(d,l[c])||(l[c]=d,s=!0)}if(typeof u=="string"){if(!i||!ha(i,u))continue;let d=i[u];Object.is(d,l[c])||(l[c]=d,s=!0)}}return s&&(r.current={...l}),r.current};return(0,oU.useSyncExternalStore)(o,n,n)}function Lo(e,t,r,o){let n=ha(t,r)?t[r]:void 0,i=Ule({value:n,setValue:o?t[o]:void 0});Dr(()=>hi(e,[r],(s,l)=>{let{value:c,setValue:u}=i.current;u&&s[r]!==l[r]&&s[r]!==c&&u(s[r])}),[e,r]),Dr(()=>{if(n!==void 0)return e.setState(r,n),gb(e,[r],()=>{n!==void 0&&e.setState(r,n)})})}function Kw(e,t){let[r,o]=ld.useState(()=>e(t));Dr(()=>pT(r),[r]);let n=ld.useCallback(i=>qt(r,i),[r]);return[ld.useMemo(()=>({...r,useState:n}),[r,n]),Mt(()=>{o(i=>e({...t,...i.getState()}))})]}var tze="button";function rze(e){return _O(e)?!0:e.tagName==="INPUT"&&!_h(e)}function oze(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 nze(e,t=!1){let{top:r}=e.getBoundingClientRect();return t?r+e.clientHeight:r}function xce(e,t,r,o=!1){if(!t||!r)return;let{renderedItems:n}=t.getState(),i=cT(e);if(!i)return;let s=oze(i,o),l,c;for(let u=0;u<n.length;u+=1){let d=l;if(l=r(u),!l)break;if(l===d)continue;let f=ad(t,l)?.element;if(!f)continue;let m=nze(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 ize(e,t){return fi(e)?!1:vb(t,e.target)}var nU=Br(function({store:t,rowId:r,preventScrollOnKeyDown:o=!1,moveOnKeyPress:n=!0,tabbable:i=!1,getItem:s,"aria-setsize":l,"aria-posinset":c,...u}){let d=RO();t=t||d;let f=jl(u.id),m=(0,cd.useRef)(null),h=(0,cd.useContext)(oce),g=Hw(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}=FO(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 L=b(O),W=O.renderedItems.filter(q=>q.rowId===L);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 L=t?.item(O.activeId);return L?.disabled||!L?.element?!0:O.activeId===f}}),I=(0,cd.useCallback)(O=>{let L={...O,id:f||O.id,rowId:_,disabled:g,children:O.element?.textContent};return s?s(L):L},[f,_,g,s]),k=u.onFocus,R=(0,cd.useRef)(!1),A=(0,cd.useRef)(null),P=Mt(O=>{if(k?.(O),O.defaultPrevented||kle(O)||!f||!t||ize(O,t))return;let{virtualFocus:L,baseElement:W}=t.getState();if(t.setActiveId(f),_O(O.currentTarget)&&yce(O.currentTarget),!L||!fi(O)||rze(O.currentTarget))return;let q=(te,de,pe)=>{Gw()&&te.hasAttribute("data-autofocus")&&te.scrollIntoView({block:"nearest",inline:"nearest"}),R.current=!0,de===pe||vb(t,de)?wce(pe):pe.focus()};if(W?.isConnected){q(O.currentTarget,O.relatedTarget,W);return}if(v===!1)return;let{currentTarget:Z,relatedTarget:Q}=O,ue=()=>{A.current?.(),A.current=null};ue(),A.current=xh(t,null,()=>{if(db(Z)!==Z){ue();return}let te=t.getState(),de=te.baseElement;de?.isConnected&&(ue(),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())}),B=u.onKeyDown,F=Jo(o),V=Jo(n),z=Mt(O=>{if(B?.(O),O.defaultPrevented||!fi(O)||!t)return;let{currentTarget:L}=O,W=t.getState(),q=!!t.item(f)?.rowId,Z=W.orientation!=="horizontal",Q=W.orientation!=="vertical",ue=()=>!!(q||Q||!W.baseElement||!ks(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(ue())return!q||O.ctrlKey?t?.first():t?.previous(-1)},End:()=>{if(ue())return!q||O.ctrlKey?t?.last():t?.next(-1)},PageUp:()=>xce(L,t,t?.up,!0),PageDown:()=>xce(L,t,t?.down)}[O.key];if(te){if(_O(L)){let pe=lT(L),$=Q&&O.key==="ArrowLeft",ee=Q&&O.key==="ArrowRight",fe=Z&&O.key==="ArrowUp",ve=Z&&O.key==="ArrowDown";if(ee||ve){let{length:we}=Sle(L);if(pe.end!==we)return}else if(($||fe)&&pe.start!==0)return}let de=te();if(F(O)||de!==void 0){if(!V(O))return;O.preventDefault(),t.move(de)}}}),D=(0,cd.useMemo)(()=>({id:f,baseElement:y}),[f,y]);return u=id(u,O=>(0,Cce.jsx)(rce.Provider,{value:D,children:O}),[D]),u={"data-active-item":w||void 0,...u,id:f,ref:Qo(m,u.ref),tabIndex:C?u.tabIndex:-1,onFocus:P,onBlurCapture:M,onKeyDown:z},u=XH(u),u=QH({store:t,...u,getItem:I,shouldRegisterItem:f?v:!1}),qi({...u,"aria-setsize":S,"aria-posinset":x})}),V6t=sd(Ir(function(t){return Lr(tze,nU(t))}));var ud=a(_e(),1),DO=a(E(),1);var sze="div";function aze(e){return e.some(t=>!!t.rowId)}function lze(e){let t=e.target;return t&&!ks(t)?!1:e.key.length===1&&!e.ctrlKey&&!e.metaKey}function cze(e){return e.key==="Shift"||e.key==="Control"||e.key==="Alt"||e.key==="Meta"}function Tce(e,t,r){return Mt(o=>{if(t?.(o),o.defaultPrevented||o.isPropagationStopped()||!fi(o)||cze(o)||lze(o))return;let n=ad(e,e.getState().activeId)?.element;if(!n)return;let{view:i,...s}=o;n!==r?.current&&n.focus(),Ole(n,o.type,s)||o.preventDefault(),o.currentTarget.contains(n)&&o.stopPropagation()})}function uze(e){return vce(yO(iT(bce(e))))}function Ece(e,t){let{virtualFocus:r,baseElement:o}=e.getState();if(!r||!o||!ks(o)){t();return}let n=o.scrollLeft,i=o.scrollTop;t(),o.scrollLeft=n,o.scrollTop=i}function dze(e){let[t,r]=(0,ud.useState)(!1),o=(0,ud.useCallback)(()=>r(!0),[]),n=qt(e,i=>t?ad(e,i.activeId):null);return(0,ud.useEffect)(()=>{let i=n?.element;t&&i&&(r(!1),Ece(e,()=>{i.focus({preventScroll:!0})}))},[e,n,t]),o}var fze=sd(function({store:t,focusOnMove:r,previousElementRef:o}){let n=qt(t,"moves"),i=qt(t,"baseElement");return(0,ud.useEffect)(()=>{if(!n||!r)return;let{activeId:s}=t.getState(),l=ad(t,s)?.element;l&&Ece(t,()=>Fle(l))},[t,n,r]),Dr(()=>{if(!n||!i)return;let{activeId:s}=t.getState();if(s!==null)return;let l=o.current;o.current=null,l&&fb(l,{relatedTarget:i}),Vl(i)||i.focus()},[t,n,i]),null}),iU=Br(function({store:t,composite:r=!0,focusOnMove:o=r,moveOnKeyPress:n=!0,...i}){let s=tce();t=t||s,Yi(t,!1);let l=(0,ud.useRef)(null),c=(0,ud.useRef)(null),u=dze(t),[,d]=Wle(r?t.setBaseElement:null),f=qt(t,"virtualFocus"),m=qt(t,k=>k.virtualFocus?k.activeId:null);Dr(()=>{if(!t||!r||!f)return;let k=c.current;if(c.current=null,!k)return;let R=ad(t,m)?.element||db(k);R!==k&&fb(k,{relatedTarget:R})},[t,m,f,r]);let h=Tce(t,i.onKeyDownCapture,c),g=Tce(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 A=k.relatedTarget,P=_ce(k.currentTarget);fi(k)&&P&&(k.stopPropagation(),c.current=A)}),_=i.onFocus,y=Mt(k=>{if(_?.(k),k.defaultPrevented||!r||!t)return;let{relatedTarget:R}=k,{virtualFocus:A}=t.getState();A?fi(k)&&!vb(t,R)&&queueMicrotask(u):fi(k)&&t.setActiveId(null)}),w=i.onBlurCapture,S=Mt(k=>{if(w?.(k),k.defaultPrevented||!t)return;let{virtualFocus:R,activeId:A}=t.getState();if(!R)return;let P=ad(t,A)?.element,T=k.relatedTarget,M=vb(t,T),B=c.current;c.current=null,fi(k)&&M?(T===P?B&&B!==T&&fb(B,k):P?fb(P,k):B&&fb(B,k),k.stopPropagation()):!vb(t,k.target)&&P&&fb(P,k)}),x=i.onKeyDown,C=Jo(n),I=Mt(k=>{if(x?.(k),k.nativeEvent.isComposing||k.defaultPrevented||!t||!fi(k))return;let{orientation:R,renderedItems:A,activeId:P,rtl:T}=t.getState();if(ad(t,P)?.element?.isConnected)return;let M=R!=="horizontal",B=R!=="vertical",F=aze(A);if((k.key==="ArrowLeft"||k.key==="ArrowRight"||k.key==="Home"||k.key==="End")&&ks(k.currentTarget))return;let z={ArrowUp:(F||M)&&(()=>F?uze(A)?.id:t?.last()),ArrowRight:(F||B)&&(T?t.last:t.first),ArrowDown:(F||M)&&t.first,ArrowLeft:(F||B)&&(T?t.first:t.last),Home:t.first,End:t.last,PageUp:t.first,PageDown:t.last}[k.key];if(z){let D=z();if(D!==void 0){if(!C(k))return;k.preventDefault(),t.move(D)}}});return i=id(i,k=>(0,DO.jsxs)(Yw,{value:t,children:[k,r&&(0,DO.jsx)(fze,{store:t,focusOnMove:o,previousElementRef:c})]}),[t,r,o]),i={"aria-activedescendant":qt(t,k=>{if(t&&r&&k.virtualFocus)return ad(t,k.activeId)?.id}),...i,ref:Qo(l,d,i.ref),onKeyDownCapture:h,onKeyUpCapture:g,onFocusCapture:b,onFocus:y,onBlurCapture:S,onKeyDown:I},i=uT({focusable:qt(t,k=>r&&(k.virtualFocus||k.activeId===null)),...i}),i}),q6t=Ir(function(t){return Lr(sze,iU(t))});var mT=ga(),X6t=mT.useContext,Q6t=mT.useScopedContext,sU=mT.useProviderContext,Pce=mT.ContextProvider,kce=mT.ScopedContextProvider;var aU=a(_e(),1),hT=ga([Pce],[kce]),tFt=hT.useContext,rFt=hT.useScopedContext,oFt=hT.useProviderContext,Rce=hT.ContextProvider,LO=hT.ScopedContextProvider,nFt=(0,aU.createContext)(void 0),iFt=(0,aU.createContext)(void 0);var bb=a(_e(),1),lU=a(E(),1);var Nce=a(Vu(),1),pze="div";function Ace(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function Ice(e){let t=e?.trim()||"0s",r=t.endsWith("ms")?1:1e3,o=Number.parseFloat(t)*r;return Number.isNaN(o)?0:o}function Oce(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=Ice(n[l%n.length]),d=Ice(i[l%i.length]);s=Math.max(s,u+d)}return s}function mze(e){let{transitionProperty:t,transitionDuration:r,transitionDelay:o,animationName:n,animationDuration:i,animationDelay:s}=getComputedStyle(e);return Math.max(Oce(t,o,r),Oce(n,s,i))}function cU(e,t,r){return!r&&t!==!1&&(!e||!!t)}var hze=Br(function({store:t,alwaysVisible:r,unstable_otherElementRef:o,...n}){let i=sU();t=t||i,Yi(t,!1);let s=(0,bb.useRef)(null),l=jl(n.id),[c,u]=(0,bb.useState)(null),d=qt(t,"open"),f=qt(t,"mounted"),m=qt(t,"animated"),h=qt(t,"contentElement"),g=qt(t.disclosure,"contentElement"),v=(0,bb.useRef)(!1);Dr(()=>{s.current&&t?.setContentElement(s.current)},[t]),Dr(()=>{let w;return t?.setState("animated",S=>(w=S,!0)),()=>{w!==void 0&&t?.setState("animated",w)}},[t]),Dr(()=>{if(!m){d?v.current&&(v.current=!1,u("enter")):(v.current=!0,u(null));return}if(!h?.isConnected){u(null);return}return yle(()=>{u(d?"enter":f?"leave":null)})},[m,h,d,f]),Dr(()=>{if(!t||!m||!c||!h)return;let w=()=>t?.setState("animating",!1),S=()=>(0,Nce.flushSync)(w);if(c==="leave"&&d||c==="enter"&&!d)return;if(typeof m=="number")return Ace(m,S);let x=[h];g&&x.push(g);let C=o?.current;C&&x.push(C);let I=Math.max(...x.map(mze));if(!I){c==="enter"&&t.setState("animated",!1),w();return}return Ace(Math.max(I-1e3/60,0),S)},[t,m,h,g,o,d,c]),n=id(n,w=>(0,lU.jsx)(LO,{value:t,children:w}),[t]);let b=cU(f,n.hidden,r),_=n.style,y=(0,bb.useMemo)(()=>b?{..._,display:"none"}:_,[b,_]);return n={"data-open":d||void 0,"data-enter":c==="enter"||void 0,"data-leave":c==="leave"||void 0,hidden:b,...n,id:l,ref:Qo(l?t.setContentElement:null,s,n.ref),style:y},qi(n)}),gze=Ir(function(t){return Lr(pze,hze(t))}),fFt=Ir(function({unmountOnHide:t,...r}){let o=sU();return qt(r.store||o,n=>!t||n?.mounted)===!1?null:(0,lU.jsx)(gze,{...r})});function Mce(e={}){let t=qw(e.store,NO(e.disclosure,["contentElement","disclosureElement"]));let r=t?.getState(),o=Lt(e.open,r?.open,e.defaultOpen,!1),n=Lt(e.animated,r?.animated,!1),i=va({open:o,animated:n,animating:!!n&&o,mounted:o,contentElement:Lt(r?.contentElement,null),disclosureElement:Lt(r?.disclosureElement,null)},t);return mi(i,()=>hi(i,["animated","animating"],s=>{s.animated||i.setState("animating",!1)})),mi(i,()=>xh(i,["open"],()=>{i.getState().animated&&i.setState("animating",!0)})),mi(i,()=>hi(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 Fce(e,t,r){return nd(t,[r.store,r.disclosure]),Lo(e,r,"open","setOpen"),Lo(e,r,"mounted","setMounted"),Lo(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}var gT=ga([Rce],[LO]),SFt=gT.useContext,xFt=gT.useScopedContext,Dce=gT.useProviderContext,Lce=gT.ContextProvider,Bce=gT.ScopedContextProvider;var BO=a(_e(),1),VO=(0,BO.createContext)(void 0),vT=ga([Lce,AO],[Bce,Yw]),uU=vT.useContext,Zw=vT.useScopedContext,jO=vT.useProviderContext,Vce=vT.ContextProvider,jce=vT.ScopedContextProvider,zO=(0,BO.createContext)(void 0),zce=(0,BO.createContext)(!1);function Hce(e,t,r){return nd(t,[r.store]),Lo(e,r,"items","setItems"),e}function Uce(e){return{id:jl(e.id),...e}}function Wce(e,t,r){return e=Hce(e,t,r),Lo(e,r,"activeId","setActiveId"),Lo(e,r,"includesBaseElement"),Lo(e,r,"virtualFocus"),Lo(e,r,"orientation"),Lo(e,r,"rtl"),Lo(e,r,"focusLoop"),Lo(e,r,"focusWrap"),Lo(e,r,"focusShift"),e}function Gce(e={}){return Mce(e)}function Yce(e,t,r){return Fce(e,t,r)}function qce({popover:e,...t}={}){let r=qw(t.store,NO(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let o=r?.getState(),n=Gce({...t,store:r}),i=Lt(t.placement,o?.placement,"bottom"),s=va({...n.getState(),placement:i,currentPlacement:i,anchorElement:Lt(o?.anchorElement,null),popoverElement:Lt(o?.popoverElement,null),arrowElement:Lt(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 Kce(e,t,r){return nd(t,[r.popover]),Lo(e,r,"placement"),Yce(e,t,r)}var vze="div",dU=Br(function({store:t,...r}){let o=Dce();return t=t||o,r={...r,ref:Qo(t?.setAnchorElement,r.ref)},r}),XFt=Ir(function(t){return Lr(vze,dU(t))});var Zce=a(_e(),1),bze="div";function yze(e){let t=e.relatedTarget;return Ww(t)?ub(e.currentTarget,t):!1}var fU=Symbol("composite-hover");function wze(e){let{relatedTarget:t}=e;if(!Ww(t))return!1;let r=t;do{if(ha(r,fU)&&r[fU])return!0;r=r.parentElement}while(r);return!1}var pU=Br(function({store:t,focusOnHover:r=!0,blurOnHoverEnd:o=!!r,...n}){let i=RO();t=t||i,Yi(t,!1);let s=Zle(),l=n.onMouseMove,c=Jo(r),u=Mt(g=>{if(l?.(g),!g.defaultPrevented&&s()&&c(g)){if(!Mle(g.currentTarget)){let v=t?.getState().baseElement;v&&!Vl(v)&&v.focus()}t?.setActiveId(g.currentTarget.id)}}),d=n.onMouseLeave,f=Jo(o),m=Mt(g=>{d?.(g),!g.defaultPrevented&&s()&&(yze(g)||wze(g)||c(g)&&f(g)&&(t?.setActiveId(null),t?.getState().baseElement?.focus()))}),h=(0,Zce.useCallback)(g=>{g&&(g[fU]=!0)},[]);return n={...n,ref:Qo(h,n.ref),onMouseMove:u,onMouseLeave:m},qi(n)}),tDt=sd(Ir(function(t){return Lr(bze,pU(t))}));var Pn=a(_e(),1);var _ze="input";function Xce(e,t,r){return r?e.find(o=>!o.disabled&&o.value)?.value===t:!1}function Qce(e,t){if(!t||e==null)return!1;let r=aT(e),o=aT(t);return r.length!==e.length||o.length!==t.length?!1:o.length>r.length&&o.toLowerCase().startsWith(r.toLowerCase())}function Sze(e){return e==="inline"||e==="list"||e==="both"||e==="none"}function xze(e){return e.find(t=>t.disabled?!1:t.element?.getAttribute("role")!=="tab")?.id}var Cze=Br(function({store:t,focusable:r=!0,autoSelect:o=!1,getAutoSelectId:n,setValueOnChange:i,showMinLength:s=0,showOnChange:l,showOnMouseDown:c,showOnClick:u=c,showOnKeyDown:d,showOnKeyPress:f=d,blurActiveItemOnClick:m,setValueOnClick:h=!0,moveOnKeyPress:g=!0,autoComplete:v="list",...b}){let _=jO();t=t||_,Yi(t,!1);let y=(0,Pn.useRef)(null),[w,S]=Kle(),x=(0,Pn.useRef)(!1),C=(0,Pn.useRef)(!1),I=qt(t,X=>X.virtualFocus&&o),k=v==="inline"||v==="both",[R,A]=(0,Pn.useState)(k);qle(()=>{k&&A(!0)},[k]);let P=qt(t,"value"),T=(0,Pn.useRef)(void 0);(0,Pn.useEffect)(()=>hi(t,["selectedValue","activeId"],(X,ge)=>{T.current=ge.selectedValue}),[t]);let M=qt(t,X=>{if(k&&R&&!(X.activeValue&&Array.isArray(X.selectedValue)&&(X.selectedValue.includes(X.activeValue)||T.current?.includes(X.activeValue))))return X.activeValue}),B=qt(t,"renderedItems"),F=qt(t,"open"),V=qt(t,"contentElement"),z=(0,Pn.useMemo)(()=>!k||!R?P:Xce(B,M,I)?Qce(P,M)?P+(M?.slice(P.length)||""):P:M||P,[k,R,B,M,I,P]);(0,Pn.useEffect)(()=>{let X=y.current;if(!X)return;let ge=()=>A(!0);return X.addEventListener("combobox-item-move",ge),()=>{X.removeEventListener("combobox-item-move",ge)}},[]),(0,Pn.useEffect)(()=>{if(!k||!R||!M||!Xce(B,M,I)||!Qce(P,M))return;let X=sT;return queueMicrotask(()=>{let ge=y.current;if(!ge)return;let{start:Ue,end:Ye}=lT(ge),st=P.length,St=M.length;SO(ge,st,St),X=()=>{if(!Vl(ge))return;let{start:dt,end:xt}=lT(ge);dt===st&&xt===St&&SO(ge,Ue,Ye)}}),()=>X()},[w,k,R,M,B,I,P]);let D=Mt(n),O=(0,Pn.useRef)(null),L=(0,Pn.useRef)(void 0),W=(0,Pn.useRef)(!1),q=(0,Pn.useRef)(!1);(0,Pn.useEffect)(()=>{if(!F||!V)return;let X=cT(V);if(!X)return;let ge=()=>{x.current=!1,W.current=!0},Ue=()=>{if(q.current||(W.current=!0),!t||!x.current)return;let{activeId:st}=t.getState();st!==null&&st!==O.current&&(x.current=!1)},Ye={passive:!0,capture:!0};return X.addEventListener("wheel",ge,Ye),X.addEventListener("touchmove",ge,Ye),X.addEventListener("scroll",Ue,Ye),()=>{X.removeEventListener("wheel",ge,!0),X.removeEventListener("touchmove",ge,!0),X.removeEventListener("scroll",Ue,!0)}},[F,V,t]),Dr(()=>{W.current=!1,P&&(C.current||(x.current=!0))},[P]),Dr(()=>{I!=="always"&&F||(x.current=F)},[I,F]),Dr(()=>{F||(L.current=void 0)},[F]);let Z=qt(t,"resetValueOnSelect");nd(()=>{let X=x.current;if(!t||!F||!X&&(!Z||W.current))return;let{baseElement:ge,contentElement:Ue,activeId:Ye}=t.getState();if(!(ge&&!Vl(ge))){if(Ue?.hasAttribute("data-placing")){let st=new MutationObserver(S);return st.observe(Ue,{attributeFilter:["data-placing"]}),()=>st.disconnect()}if(I&&X){let st=D(B),St=st!==void 0?st:xze(B)??t.first();O.current=St;let dt=St??null,xt=t.item(dt)?.value,Kt=L.current;dt!==Ye||Kt?.id!==dt||Kt?.value!==xt?(L.current={id:dt,value:xt},t.move(dt)):t.setState("activeValue",xt)}else{let st=t.item(Ye||t.first())?.element;st&&"scrollIntoView"in st&&(q.current=!0,st.scrollIntoView({block:"nearest",inline:"nearest"}),requestAnimationFrame(()=>{q.current=!1}))}}},[t,F,w,P,I,Z,D,B]),(0,Pn.useEffect)(()=>{if(!k)return;let X=y.current;if(!X)return;let ge=[X,V].filter(Ye=>!!Ye),Ue=Ye=>{ge.every(st=>CO(Ye,st))&&t?.setValue(z)};for(let Ye of ge)Ye.addEventListener("focusout",Ue);return()=>{for(let Ye of ge)Ye.removeEventListener("focusout",Ue)}},[k,V,t,z]);let Q=X=>X.currentTarget.value.length>=s,ue=b.onChange,te=Jo(l??Q),de=Jo(i??!t.tag),pe=Mt(X=>{if(ue?.(X),X.defaultPrevented||!t)return;let ge=X.currentTarget,{value:Ue,selectionStart:Ye,selectionEnd:st}=ge,St=X.nativeEvent;if(x.current=!0,Nle(St)&&(St.isComposing&&(x.current=!1,C.current=!0),k)){let dt=St.inputType==="insertText"||St.inputType==="insertCompositionText",xt=Ye===Ue.length;A(dt&&xt)}if(de(X)){let dt=Ue===t.getState().value;t.setValue(Ue),queueMicrotask(()=>{SO(ge,Ye,st)}),k&&I&&dt&&S()}te(X)&&t.show(),(!I||!x.current)&&t.setActiveId(null)}),$=b.onCompositionEnd,ee=Mt(X=>{x.current=!0,C.current=!1,$?.(X),!X.defaultPrevented&&I&&S()}),fe=b.onMouseDown,ve=Jo(m??(()=>t.getState().includesBaseElement)),we=Jo(h),oe=Jo(u??Q),re=Mt(X=>{fe?.(X),!X.defaultPrevented&&(X.button||X.ctrlKey||t&&(ve(X)&&t.setActiveId(null),we(X)&&t.setValue(z),oe(X)&&pb(X.currentTarget,"mouseup",t.show)))}),ce=b.onKeyDown,ie=Jo(f??Q),le=Mt(X=>{if(ce?.(X),X.repeat||(x.current=!1),X.defaultPrevented||!t)return;let{open:ge}=t.getState();if(ge&&X.key==="Enter"){X.preventDefault();return}X.ctrlKey||X.altKey||X.shiftKey||X.metaKey||ge||(X.key==="ArrowUp"||X.key==="ArrowDown")&&ie(X)&&(X.preventDefault(),t.show())}),Oe=b.onBlur,ke=Mt(X=>{x.current=!1,Oe?.(X)}),Me=jl(b.id),Ne=Sze(v)?v:void 0,Fe=qt(t,X=>X.activeId===null);return b={role:"combobox","aria-autocomplete":Ne,"aria-haspopup":xle(V,"listbox"),"aria-expanded":F,"aria-controls":V?.id,"data-active-item":Fe||void 0,value:z,...b,id:Me,ref:Qo(y,b.ref),onChange:pe,onCompositionEnd:ee,onMouseDown:re,onKeyDown:le,onBlur:ke},b=iU({store:t,focusable:r,...b,moveOnKeyPress:X=>wle(g,X)?!1:(k&&A(!0),!0)}),b=dU({store:t,...b}),{autoComplete:"off",...b}}),HO=Ir(function(t){return Lr(_ze,Cze(t))});var UO=a(_e(),1),mU=a(E(),1);var Tze="div";function Eze(e,t){if(t!=null)return e==null?!1:Array.isArray(e)?e.includes(t):e===t}function Pze(e){return Cle(e)??"option"}var kze=Br(function({store:t,value:r,hideOnClick:o,setValueOnClick:n,selectValueOnClick:i=!0,resetValueOnSelect:s,focusOnHover:l=!1,moveOnKeyPress:c=!0,getItem:u,...d}){let f=Zw();t=t||f,Yi(t,!1);let{resetValueOnSelectState:m,multiSelectable:h,selected:g}=FO(t,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable(R){return Array.isArray(R.selectedValue)},selected(R){return Eze(R.selectedValue,r)}}),v=(0,UO.useCallback)(R=>{let A={...R,value:r};return u?u(A):A},[r,u]);n=n??!h,o=o??(r!=null&&!h);let b=d.onClick,_=Jo(n),y=Jo(i),w=Jo(s??m??h),S=Jo(o),x=Mt(R=>{b?.(R),!R.defaultPrevented&&(Ile(R)||Ale(R)||(r!=null&&(y(R)&&(w(R)&&t?.resetValue(),t?.setSelectedValue(A=>Array.isArray(A)?A.includes(r)?A.filter(P=>P!==r):[...A,r]:r)),_(R)&&t?.setValue(r)),S(R)&&t?.hide()))}),C=d.onKeyDown,I=Mt(R=>{if(C?.(R),R.defaultPrevented)return;let A=t?.getState().baseElement;if(!A||Vl(A))return;let P=R.key.length===1&&!R.ctrlKey&&!R.metaKey,T=(xO()?R.metaKey:R.ctrlKey)&&R.key.toLowerCase()==="v",M=R.key==="Backspace"||R.key==="Delete";(P||T||M)&&(queueMicrotask(()=>A.focus()),ks(A)&&t?.setValue(A.value))});h&&g!=null&&(d={"aria-selected":g,...d}),d=id(d,R=>(0,mU.jsx)(zO.Provider,{value:r,children:(0,mU.jsx)(zce.Provider,{value:g??!1,children:R})}),[r,g]),d={role:Pze((0,UO.useContext)(VO)),children:r,...d,onClick:x,onKeyDown:I};let k=Jo(c);return d=nU({store:t,...d,getItem:v,moveOnKeyPress:R=>{if(!k(R))return!1;let A=new Event("combobox-item-move");return t?.getState().baseElement?.dispatchEvent(A),!0}}),d=pU({store:t,focusOnHover:l,...d}),d}),WO=sd(Ir(function(t){return Lr(Tze,kze(t))}));var GO=a(_e(),1),Jce=a(E(),1);var Rze="span";function hU(e){return aT(e).toLowerCase()}function Aze(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 Ize(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 Oze(e){let t=[],r=[],o=0;for(let i of e){let s=hU(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 Nze(e,t){if(!t.length)return t;let{starts:r,ends:o}=Oze(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 Mze(e,t){if(!e||!t)return e;let r=gle(t).map(hU),o=[],n=(c,u=!1)=>(0,Jce.jsx)("span",{"data-autocomplete-value":u?"":void 0,"data-user-value":u?void 0:"",children:c},o.length),i=Nze(e,Ize(Aze(hU(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 Fze=Br(function({store:t,value:r,userValue:o,...n}){let i=Zw();t=t||i;let s=(0,GO.useContext)(zO),l=r??s,c=qt(t,u=>o??u?.value);return n={children:(0,GO.useMemo)(()=>{if(l)return c?Mze(l,c):l},[l,c]),...n},qi(n)}),YO=Ir(function(t){return Lr(Rze,Fze(t))});var Dze="label",Lze=Br(function({store:t,...r}){let o=jO();return t=t||o,Yi(t,!1),r={htmlFor:qt(t,n=>n.baseElement?.id),...r},qi(r)}),qO=sd(Ir(function(t){return Lr(Dze,Lze(t))}));var KO=a(_e(),1),gU=a(E(),1);var Bze="div",Vze=Br(function({store:t,alwaysVisible:r,...o}){let n=Zw(!0),i=uU();t=t||i;let s=!!t&&t===n;Yi(t,!1);let l=(0,KO.useRef)(null),c=jl(o.id),u=qt(t,"mounted"),d=cU(u,o.hidden,r),f=d?{...o.style,display:"none"}:o.style,m=qt(t,w=>Array.isArray(w.selectedValue)),h=Yle(l,"role",o.role),g=(h==="listbox"||h==="tree"||h==="grid")&&m||void 0,[v,b]=(0,KO.useState)(!1),_=qt(t,"contentElement");Dr(()=>{if(!u)return;let w=l.current;if(!w||_!==w)return;let S=()=>{b(!!w.querySelector("[role='listbox']"))},x=new MutationObserver(S);return x.observe(w,{subtree:!0,childList:!0,attributeFilter:["role"]}),S(),()=>x.disconnect()},[u,_]),v||(o={role:"listbox","aria-multiselectable":g,...o}),o=id(o,w=>(0,gU.jsx)(jce,{value:t,children:(0,gU.jsx)(VO.Provider,{value:h,children:w})}),[t,h]);let y=c&&(!n||!s)?t.setContentElement:null;return o={hidden:d,...o,id:c,ref:Qo(y,l,o.ref),style:f},qi(o)}),ZO=Ir(function(t){return Lr(Bze,Vze(t))});var vU=a(_e(),1),DDt=(0,vU.createContext)(null),LDt=(0,vU.createContext)(null),bT=ga([AO],[Yw]),$ce=bT.useContext,BDt=bT.useScopedContext,VDt=bT.useProviderContext,jDt=bT.ContextProvider,zDt=bT.ScopedContextProvider;var jze=Gw()&&Ele();function eue({tag:e,...t}={}){let r=qw(t.store,uce(e,["value","rtl"]));let o=e?.getState(),n=r?.getState(),i=Lt(t.activeId,n?.activeId,t.defaultActiveId,null),s=gce({...t,activeId:i,includesBaseElement:Lt(t.includesBaseElement,n?.includesBaseElement,!0),orientation:Lt(t.orientation,n?.orientation,"vertical"),focusLoop:Lt(t.focusLoop,n?.focusLoop,!0),focusWrap:Lt(t.focusWrap,n?.focusWrap,!0),virtualFocus:Lt(t.virtualFocus,n?.virtualFocus,!0)}),l=qce({...t,placement:Lt(t.placement,n?.placement,"bottom-start")}),c=Lt(t.value,n?.value,t.defaultValue,""),u=Lt(t.selectedValue,n?.selectedValue,o?.values,t.defaultSelectedValue,""),d=Array.isArray(u),f={...s.getState(),...l.getState(),value:c,selectedValue:u,resetValueOnSelect:Lt(t.resetValueOnSelect,n?.resetValueOnSelect,d),resetValueOnHide:Lt(t.resetValueOnHide,n?.resetValueOnHide,d&&!e),activeValue:n?.activeValue},m=va(f,s,l,r);return jze&&mi(m,()=>hi(m,["virtualFocus"],()=>{m.setState("virtualFocus",!1)})),mi(m,()=>{if(e)return zw(hi(m,["selectedValue"],h=>{Array.isArray(h.selectedValue)&&e.setValues(h.selectedValue)}),hi(e,["values"],h=>{m.setState("selectedValue",h.values)}))}),mi(m,()=>hi(m,["resetValueOnHide","mounted"],h=>{h.resetValueOnHide&&(h.mounted||m.setState("value",c))})),mi(m,()=>hi(m,["open"],h=>{h.open||(m.setState("activeId",i),m.setState("moves",0))})),mi(m,()=>hi(m,["moves","activeId"],(h,g)=>{h.moves===g.moves&&m.setState("activeValue",void 0)})),mi(m,()=>gb(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 Hze(e){let t=$ce();return e={...e,tag:e.tag!==void 0?e.tag:t},Uce(e)}function Uze(e,t,r){return nd(t,[r.tag]),Lo(e,r,"value","setValue"),Lo(e,r,"selectedValue","setSelectedValue"),Lo(e,r,"resetValueOnHide"),Lo(e,r,"resetValueOnSelect"),Object.assign(Wce(Kce(e,t,r),t,r),{tag:r.tag})}function bU(e={}){e=Hze(e);let[t,r]=Kw(eue,e);return Uze(t,r,e)}var tue=a(E(),1);function XO(e={}){return(0,tue.jsx)(Vce,{value:bU(e),children:e.children})}var iue=a(dw(),1);var sue=a(Te(),1),Ch=a(j(),1),yb=a(U(),1),dd=a(G(),1);var Gze=[],yT=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:Gze;var wT=a(U(),1),Yze=[];function Kn({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:Yze,[o,n]=(0,wT.useState)(r),[i,s]=(0,wT.useState)(!1);return(0,wT.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 rue(e=""){return(0,iue.default)(e.trim().toLowerCase())}var oue=(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 nue(e,t){return`${e}-${t}`}var aue=({selected:e})=>(0,$t.jsx)("span",{className:J("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,$t.jsx)(dd.Icon,{icon:Oo})}),lue=({selected:e})=>(0,$t.jsx)("span",{className:J("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function cue({view:e,filter:t,onChangeView:r}){let o=(0,sue.useInstanceId)(cue,"dataviews-filter-list-box"),[n,i]=(0,yb.useState)(t.operators?.length===1?void 0:null),s=e.filters?.find(c=>c.field===t.field),l=yT(t,s);return(0,$t.jsx)(dd.Composite,{virtualFocus:!0,focusLoop:!0,activeId:n,setActiveId:i,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,Ch.sprintf)((0,Ch.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!n&&t.elements.length&&i(nue(o,t.elements[0].value))},render:(0,$t.jsx)(dd.Composite.Typeahead,{}),children:t.elements.map(c=>(0,$t.jsxs)(dd.Composite.Hover,{render:(0,$t.jsx)(dd.Composite.Item,{id:nue(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:oue(t,s,c.value)}:d)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:oue(t,s,c.value)}];r({...e,page:1,filters:u})}}),children:[t.singleSelection&&(0,$t.jsx)(lue,{selected:l===c.value}),!t.singleSelection&&(0,$t.jsx)(aue,{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 qze({view:e,filter:t,onChangeView:r}){let[o,n]=(0,yb.useState)(""),i=(0,yb.useDeferredValue)(o),s=e.filters?.find(u=>u.field===t.field),l=yT(t,s),c=(0,yb.useMemo)(()=>{let u=rue(i);return t.elements.filter(d=>rue(d.label).includes(u))},[t.elements,i]);return(0,$t.jsxs)(XO,{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)(Gt,{render:(0,$t.jsx)(qO,{}),children:(0,Ch.__)("Search items")}),(0,$t.jsx)(HO,{autoSelect:"always",placeholder:(0,Ch.__)("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)(dd.Icon,{icon:JV})})]}),(0,$t.jsxs)(ZO,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[c.map(u=>(0,$t.jsxs)(WO,{resetValueOnSelect:!1,value:u.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,$t.jsx)(lue,{selected:l===u.value}),!t.singleSelection&&(0,$t.jsx)(aue,{selected:l.includes(u.value)}),(0,$t.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-value",title:u.label,children:[(0,$t.jsx)(YO,{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,Ch.__)("No results found")})]})]})}function uue(e){let{elements:t,isLoading:r}=Kn({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)(dd.Spinner,{})});if(t.length===0)return(0,$t.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,Ch.__)("No elements found")});let o=t.length>10?qze:cue;return(0,$t.jsx)(o,{...e,filter:{...e.filter,elements:t}})}var due=a(wk(),1),fue=a(Te(),1),yU=a(U(),1),pue=a(G(),1);var wU=a(E(),1);function mue({filter:e,view:t,onChangeView:r,fields:o}){let n=t.filters?.find(u=>u.field===e.field),i=yT(e,n),s=(0,yU.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,yU.useMemo)(()=>(t.filters??[]).reduce((u,d)=>(u[d.field]=d.value,u),{}),[t.filters]),c=(0,fue.useEvent)(u=>{if(!s||!n)return;let d=s.getValue({item:u});(0,due.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,wU.jsx)(pue.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,wU.jsx)(s.Edit,{hideLabelFromVision:!0,data:l,field:s,operator:n.operator,onChange:c})})}var Kze=Math.pow(10,8)*24*60*60*1e3,RLt=-Kze,QO=6048e5,hue=864e5;var Zze=3600;var gue=Zze*24,ALt=gue*7,Xze=gue*365.2425,Qze=Xze/12,ILt=Qze*3,_U=Symbol.for("constructDateFrom");function kn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&_U in e?e[_U](t):e instanceof Date?new e.constructor(t):new Date(t)}function Er(e,t){return kn(t||e,e)}function JO(e,t,r){let o=Er(e,r?.in);return isNaN(t)?kn(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function $O(e,t,r){let o=Er(e,r?.in);if(isNaN(t))return kn(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=kn(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 Jze={};function Th(){return Jze}function $f(e,t){let r=Th(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Er(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 wb(e,t){return $f(e,{...t,weekStartsOn:1})}function e5(e,t){let r=Er(e,t?.in),o=r.getFullYear(),n=kn(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);let i=wb(n),s=kn(r,0);s.setFullYear(o,0,4),s.setHours(0,0,0,0);let l=wb(s);return r.getTime()>=i.getTime()?o+1:r.getTime()>=l.getTime()?o:o-1}function SU(e){let t=Er(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 vue(e,...t){let r=kn.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function xU(e,t){let r=Er(e,t?.in);return r.setHours(0,0,0,0),r}function bue(e,t,r){let[o,n]=vue(r?.in,e,t),i=xU(o),s=xU(n),l=+i-SU(i),c=+s-SU(s);return Math.round((l-c)/hue)}function yue(e,t){let r=e5(e,t),o=kn(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),wb(o)}function wue(e,t,r){return JO(e,t*7,r)}function _ue(e,t,r){return $O(e,t*12,r)}function Sue(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ep(e){return!(!Sue(e)&&typeof e!="number"||isNaN(+Er(e)))}function xue(e,t){let r=Er(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function t5(e,t){let r=Er(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var $ze={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"}},Cue=(e,t,r)=>{let o,n=$ze[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 r5(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var eHe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},tHe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rHe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Tue={date:r5({formats:eHe,defaultWidth:"full"}),time:r5({formats:tHe,defaultWidth:"full"}),dateTime:r5({formats:rHe,defaultWidth:"full"})};var oHe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Eue=(e,t,r,o)=>oHe[e];function Xw(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 nHe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},iHe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},sHe={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"]},aHe={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"]},lHe={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"}},cHe={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"}},uHe=(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"},Pue={ordinalNumber:uHe,era:Xw({values:nHe,defaultWidth:"wide"}),quarter:Xw({values:iHe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Xw({values:sHe,defaultWidth:"wide"}),day:Xw({values:aHe,defaultWidth:"wide"}),dayPeriod:Xw({values:lHe,defaultWidth:"wide",formattingValues:cHe,defaultFormattingWidth:"wide"})};function Qw(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)?fHe(l,f=>f.test(s)):dHe(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 dHe(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function fHe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function kue(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=r.valueCallback?r.valueCallback(s):s;let l=t.slice(n.length);return{value:s,rest:l}}}var pHe=/^(\d+)(th|st|nd|rd)?/i,mHe=/\d+/i,hHe={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},gHe={any:[/^b/i,/^(a|c)/i]},vHe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bHe={any:[/1/i,/2/i,/3/i,/4/i]},yHe={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},wHe={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]},_He={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},SHe={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]},xHe={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},CHe={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}},Rue={ordinalNumber:kue({matchPattern:pHe,parsePattern:mHe,valueCallback:e=>parseInt(e,10)}),era:Qw({matchPatterns:hHe,defaultMatchWidth:"wide",parsePatterns:gHe,defaultParseWidth:"any"}),quarter:Qw({matchPatterns:vHe,defaultMatchWidth:"wide",parsePatterns:bHe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Qw({matchPatterns:yHe,defaultMatchWidth:"wide",parsePatterns:wHe,defaultParseWidth:"any"}),day:Qw({matchPatterns:_He,defaultMatchWidth:"wide",parsePatterns:SHe,defaultParseWidth:"any"}),dayPeriod:Qw({matchPatterns:xHe,defaultMatchWidth:"any",parsePatterns:CHe,defaultParseWidth:"any"})};var CU={code:"en-US",formatDistance:Cue,formatLong:Tue,formatRelative:Eue,localize:Pue,match:Rue,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Aue(e,t){let r=Er(e,t?.in);return bue(r,t5(r))+1}function Iue(e,t){let r=Er(e,t?.in),o=+wb(r)-+yue(r);return Math.round(o/QO)+1}function o5(e,t){let r=Er(e,t?.in),o=r.getFullYear(),n=Th(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=kn(t?.in||e,0);s.setFullYear(o+1,0,i),s.setHours(0,0,0,0);let l=$f(s,t),c=kn(t?.in||e,0);c.setFullYear(o,0,i),c.setHours(0,0,0,0);let u=$f(c,t);return+r>=+l?o+1:+r>=+u?o:o-1}function Oue(e,t){let r=Th(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=o5(e,t),i=kn(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),$f(i,t)}function Nue(e,t){let r=Er(e,t?.in),o=+$f(r,t)-+Oue(r,t);return Math.round(o/QO)+1}function rr(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var tp={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return 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"},TU={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return tp.y(e,t)},Y:function(e,t,r,o){let n=o5(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=e5(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 tp.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return 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=Nue(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):rr(n,t.length)},I:function(e,t,r){let o=Iue(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"}):tp.d(e,t)},D:function(e,t,r){let o=Aue(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 tp.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):tp.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):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"}):tp.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):tp.s(e,t)},S:function(e,t){return tp.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return Fue(o);case"XXXX":case"XX":return _b(o);default:return _b(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return Fue(o);case"xxxx":case"xx":return _b(o);default:return _b(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Mue(o,":");default:return"GMT"+_b(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Mue(o,":");default:return"GMT"+_b(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 Mue(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 Fue(e,t){return e%60===0?(e>0?"-":"+")+rr(Math.abs(e)/60,2):_b(e,t)}function _b(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 Due=(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"})}},Lue=(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"})}},THe=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return Due(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}}",Due(o,t)).replace("{{time}}",Lue(n,t))},Bue={p:Lue,P:THe};var EHe=/^D+$/,PHe=/^Y+$/,kHe=["D","DD","YY","YYYY"];function Vue(e){return EHe.test(e)}function jue(e){return PHe.test(e)}function zue(e,t,r){let o=RHe(e,t,r);if(console.warn(o),kHe.includes(e))throw new RangeError(o)}function RHe(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 AHe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IHe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,OHe=/^'([^]*?)'?$/,NHe=/''/g,MHe=/[a-zA-Z]/;function EU(e,t,r){let o=Th(),n=r?.locale??o.locale??CU,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=Er(e,r?.in);if(!ep(l))throw new RangeError("Invalid time value");let c=t.match(IHe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=Bue[f];return m(d,n.formatLong)}return d}).join("").match(AHe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:FHe(d)};if(TU[f])return{isToken:!0,value:d};if(f.match(MHe))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&&jue(f)||!r?.useAdditionalDayOfYearTokens&&Vue(f))&&zue(f,t,String(e));let m=TU[f[0]];return m(l,f,n.localize,u)}).join("")}function FHe(e){let t=e.match(OHe);return t?t[1].replace(NHe,"'"):e}function Sb(e,t,r){return JO(e,-t,r)}function n5(e,t,r){return $O(e,-t,r)}function Hue(e,t,r){return wue(e,-t,r)}function i5(e,t,r){return _ue(e,-t,r)}var Ve=a(j(),1),Bo=a(U(),1),Rs=a(an(),1);var PU=a(E(),1),$o={Name:(0,PU.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,PU.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Uue(e,t){switch(t){case"days":return Sb(new Date,e);case"weeks":return Hue(new Date,e);case"months":return n5(new Date,e);case"years":return i5(new Date,e);default:return new Date}}var Wue={label:(0,Ve.__)("Is none of"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),$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"},s5=[{name:so,label:(0,Ve.__)("Includes"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),$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:ao,...Wue},{name:Wi,label:(0,Ve.__)("Includes all"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),$o),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:Yn,...Wue},{name:Ts,label:(0,Ve.__)("Between (inc)"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),$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:Es,label:(0,Ve.__)("In the past"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),$o),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Uue(r.value,r.unit),n=(0,Rs.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:fa,label:(0,Ve.__)("Over"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),$o),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Uue(r.value,r.unit);return(0,Rs.getDate)(t.getValue({item:e}))<o},selection:"custom"},{name:_o,label:(0,Ve.__)("Is"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:So,label:(0,Ve.__)("Is not"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:rh,label:(0,Ve.__)("Less than"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<r},selection:"single"},{name:oh,label:(0,Ve.__)("Greater than"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:nh,label:(0,Ve.__)("Less than or equal"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:ih,label:(0,Ve.__)("Greater than or equal"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:sh,label:(0,Ve.__)("Before"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,Rs.getDate)(r);return(0,Rs.getDate)(t.getValue({item:e}))<o},selection:"single"},{name:ah,label:(0,Ve.__)("After"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,Rs.getDate)(r);return(0,Rs.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:lh,label:(0,Ve.__)("Before (inc)"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,Rs.getDate)(r);return(0,Rs.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:ch,label:(0,Ve.__)("After (inc)"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,Rs.getDate)(r);return(0,Rs.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:Zu,label:(0,Ve.__)("Contains"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),$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:Xu,label:(0,Ve.__)("Doesn't contain"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),$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,Bo.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:uh,label:(0,Ve.__)("On"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,Rs.getDate)(r),n=(0,Rs.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:dh,label:(0,Ve.__)("Not on"),filterText:(e,t)=>(0,Bo.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),$o),filter(e,t,r){if(r===void 0)return!0;let o=(0,Rs.getDate)(r),n=(0,Rs.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],xb=e=>s5.find(t=>t.name===e),Gue=()=>s5.map(e=>e.name),Yue=e=>s5.filter(t=>t.selection==="single").some(t=>t.name===e),que=e=>s5.some(t=>t.name===e);var en=a(E(),1),DHe="Enter",LHe=" ",BHe=({activeElements:e,filterInView:t,filter:r})=>{if(e===void 0||e.length===0)return r.name;let o=xb(t?.operator);return o!==void 0?o.filterText(r,e):(0,rp.sprintf)((0,rp.__)("Unknown status for %1$s"),r.name)};function VHe({filter:e,view:t,onChangeView:r}){let o=e.operators?.map(s=>({value:s,label:xb(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)(se,{direction:"row",gap:"sm",justify:"flex-start",className:"dataviews-filters__summary-operators-container",align:"center",children:[(0,en.jsx)(Eh.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,en.jsx)(Eh.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,rp.__)("Conditions"),value:i,options:o,onChange:s=>{let l=s,c=n?.operator,u=n?[...(t.filters??[]).map(d=>{if(d.field===e.field){let f=xb(c)?.selection,m=xb(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 Kue({addFilterRef:e,openedFilter:t,fields:r,...o}){let n=(0,a5.useRef)(null),{filter:i,view:s,onChangeView:l}=o,c=s.filters?.find(_=>_.field===i.field),u=[],d=(0,a5.useMemo)(()=>{let _=r.find(y=>y.id===i.field);return _&&{..._,getValue:({item:y})=>y[_.id]}},[r,i.field]),{elements:f}=Kn({elements:i.elements,getElements:i.getElements});if(f.length>0)u=f.filter(_=>i.singleSelection?_.value===c?.value:c?.value?.includes(_.value));else if(Array.isArray(c?.value)){let _=c.value.map(y=>d?.getValueFormatted({item:{[d.id]:y},field:d})||String(y));u=[{value:c.value,label:_}]}else if(typeof c?.value=="object")u=[{value:c.value,label:c.value}];else if(c?.value!==void 0){let _=d!==void 0?d.getValueFormatted({item:{[d.id]:c.value},field:d}):String(c.value);u=[{value:c.value,label:_}]}let m=i.isPrimary,h=c?.isLocked,g=!h&&c?.value!==void 0,v=!h&&(!m||g),b=m?(0,rp.__)("Reset"):(0,rp.__)("Remove");return(0,en.jsx)(Eh.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)(Ze.Root,{children:[(0,en.jsx)(Ze.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&&[DHe,LHe].includes(w.key)&&(y(),w.preventDefault())},"aria-disabled":h,"aria-pressed":_,"aria-expanded":_,ref:n,children:(0,en.jsx)(BHe,{activeElements:u,filterInView:c,filter:i})})}),(0,en.jsx)(Ze.Popup,{children:(0,rp.sprintf)((0,rp.__)("Filter by: %1$s"),i.name.toLowerCase())})]}),v&&(0,en.jsxs)(Ze.Root,{children:[(0,en.jsx)(Ze.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)(Eh.Icon,{icon:Mi})})}),(0,en.jsx)(Ze.Popup,{children:b})]})]}),renderContent:()=>(0,en.jsxs)(se,{direction:"column",justify:"flex-start",children:[(0,en.jsx)(VHe,{...o}),o.filter.hasElements?(0,en.jsx)(uue,{...o,filter:{...o.filter,elements:f}}):(0,en.jsx)(mue,{...o,fields:r})]})})}var l5=a(G(),1),Zue=a(j(),1),Xue=a(U(),1);var op=a(E(),1),{Menu:_T}=_t(l5.privateApis);function kU({filters:e,view:t,onChangeView:r,setOpenedFilter:o,triggerProps:n}){let i=e.filter(s=>!s.isVisible);return(0,op.jsxs)(_T,{children:[(0,op.jsx)(_T.TriggerButton,{...n}),(0,op.jsx)(_T.Popover,{children:i.map(s=>(0,op.jsx)(_T.Item,{onClick:()=>{o(s.field),r({...t,page:1,filters:[...t.filters||[],{field:s.field,value:void 0,operator:s.operators[0]}]})},children:(0,op.jsx)(_T.ItemLabel,{children:s.name})},s.field))})]})}function jHe({filters:e,view:t,onChangeView:r,setOpenedFilter:o},n){if(!e.length||e.every(({isPrimary:s})=>s))return null;let i=e.filter(s=>!s.isVisible);return(0,op.jsx)(kU,{triggerProps:{render:(0,op.jsx)(l5.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!i.length,ref:n}),children:(0,Zue.__)("Add filter")},filters:e,view:t,onChangeView:r,setOpenedFilter:o})}var Que=(0,Xue.forwardRef)(jHe);var Jue=a(G(),1),$ue=a(j(),1),ede=a(E(),1);function tde({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,ede.jsx)(Jue.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,$ue.__)("Reset")})}var rde=a(U(),1);function zHe(e,t){return(0,rde.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=>Yue(l)),operators:n,isVisible:s||i||!!t.filters?.some(l=>l.field===o.id&&que(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 ST=zHe;var xT=a(E(),1);function HHe({className:e}){let{fields:t,view:r,onChangeView:o,openedFilter:n,setOpenedFilter:i}=(0,$w.useContext)(et),s=(0,$w.useRef)(null),l=ST(t,r),c=(0,xT.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,xT.jsx)(Kue,{filter:f,view:r,fields:t,onChangeView:o,addFilterRef:s,openedFilter:n},f.field)),c];return d.push((0,xT.jsx)(tde,{filters:l,view:r,onChangeView:o},"reset-filters")),(0,xT.jsx)(se,{direction:"row",justify:"flex-start",gap:"sm",style:{width:"fit-content"},wrap:"wrap",className:e,children:d})}var CT=(0,$w.memo)(HHe);var Ph=a(U(),1),ode=a(G(),1);var c5=a(j(),1);var fd=a(E(),1);function UHe(){let{filters:e,view:t,onChangeView:r,setOpenedFilter:o,isShowingFilter:n,setIsShowingFilter:i}=(0,Ph.useContext)(et),s=(0,Ph.useRef)(null),l=(0,Ph.useCallback)(h=>{r(h),i(!0)},[r,i]);if(e.length===0)return null;let c=e.some(h=>h.isVisible),u={label:(0,c5.__)("Add filter"),"aria-expanded":!1,isPressed:!1},d={label:(0,c5._x)("Filter","verb"),"aria-expanded":n,isPressed:n,onClick:()=>{n||o(null),i(!n)}},f=e.some(h=>h.isPrimary||h.isLocked),m=(0,fd.jsx)(ode.Button,{ref:s,className:"dataviews-filters__visibility-toggle",size:"compact",icon:y1,disabled:f,accessibleWhenDisabled:!0,...c?d:u});return(0,fd.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:c?(0,fd.jsx)(WHe,{buttonRef:s,filtersCount:t.filters?.length,children:m}):(0,fd.jsx)(kU,{filters:e,view:t,onChangeView:l,setOpenedFilter:o,triggerProps:{render:m}})})}function WHe({buttonRef:e,filtersCount:t,children:r}){return(0,Ph.useEffect)(()=>()=>{e.current?.focus()},[e]),(0,fd.jsxs)(fd.Fragment,{children:[r,!!t&&(0,fd.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var u5=UHe;var nde=a(U(),1);var ide=a(E(),1);function GHe(e){let{isShowingFilter:t}=(0,nde.useContext)(et);return t?(0,ide.jsx)(CT,{...e}):null}var d5=GHe;var sde=a(U(),1),ade=a(G(),1),lde=a(j(),1);var Cb=a(E(),1);function RU({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,Cb.jsx)("p",{children:(0,lde.__)("No results")})}=(0,sde.useContext)(et),w=$u(!s,{delay:200});if(!s)return w?(0,Cb.jsx)("div",{className:"dataviews-loading",children:(0,Cb.jsx)("p",{children:(0,Cb.jsx)(ade.Spinner,{})})}):null;let S=wh.find(x=>x.type===c.type&&b[x.type])?.component;return(0,Cb.jsx)("div",{className:"dataviews-layout__container",ref:_,children:(0,Cb.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 cde=a(j(),1),Hc=a(U(),1),ude=a(G(),1),dde=a(Te(),1);var fde=a(E(),1),YHe=(0,Hc.memo)(function({label:t}){let{view:r,onChangeView:o}=(0,Hc.useContext)(et),[n,i,s]=(0,dde.useDebouncedInput)(r.search);(0,Hc.useEffect)(()=>{r.search!==s&&i(r.search??"")},[r.search,i]);let l=(0,Hc.useRef)(o),c=(0,Hc.useRef)(r);(0,Hc.useEffect)(()=>{l.current=o,c.current=r},[o,r]),(0,Hc.useEffect)(()=>{s!==c.current?.search&&l.current({...c.current,page:r.page?1:void 0,startPosition:r.startPosition?1:void 0,search:s})},[s]);let u=t||(0,cde.__)("Search");return(0,fde.jsx)(ude.SearchControl,{className:"dataviews-search",onChange:i,value:n,label:u,placeholder:u,size:"compact"})}),AU=YHe;var tn=a(G(),1),np=a(j(),1),Uc=a(U(),1);var OU=a(IU(),1),mde=a(Te(),1);var Ht=a(E(),1),{Menu:TT}=_t(tn.privateApis),qHe={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function NU(){let{view:e,onChangeView:t,defaultLayouts:r}=(0,Uc.useContext)(et),o=Object.keys(r);if(o.length<=1)return null;let n=wh.find(i=>e.type===i.type);return(0,Ht.jsxs)(TT,{children:[(0,Ht.jsx)(TT.TriggerButton,{render:(0,Ht.jsx)(tn.Button,{size:"compact",icon:n?.icon,label:(0,np.__)("Layout")})}),(0,Ht.jsx)(TT.Popover,{children:o.map(i=>{let s=wh.find(l=>l.type===i);return s?(0,Ht.jsx)(TT.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,OU.default)("Invalid dataview")},children:(0,Ht.jsx)(TT.ItemLabel,{children:s.label})},i):null})})]})}function KHe(){let{view:e,fields:t,onChangeView:r}=(0,Uc.useContext)(et),o=(0,Uc.useMemo)(()=>t.filter(i=>i.enableSorting!==!1).map(i=>({label:i.label,value:i.id})),[t]);return(0,Ht.jsx)(tn.SelectControl,{label:(0,np.__)("Sort by"),value:e.sort?.field,options:o,onChange:n=>{r({...e,sort:{direction:e?.sort?.direction||"desc",field:n},showLevels:!1})}})}function ZHe(){let{view:e,fields:t,onChangeView:r}=(0,Uc.useContext)(et);if(t.filter(i=>i.enableSorting!==!1).length===0)return null;let n=e.sort?.direction;return!n&&e.sort?.field&&(n="desc"),(0,Ht.jsx)(tn.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",isBlock:!0,label:(0,np.__)("Order"),value:n,onChange:i=>{if(i==="asc"||i==="desc"){r({...e,sort:{direction:i,field:e.sort?.field||t.find(s=>s.enableSorting!==!1)?.id||""},showLevels:!1});return}(0,OU.default)("Invalid direction")},children:qI.map(i=>(0,Ht.jsx)(tn.__experimentalToggleGroupControlOptionIcon,{value:i,icon:rae[i],label:ZI[i]},i))})}function XHe(){let{view:e,config:t,onChangeView:r}=(0,Uc.useContext)(et),{infiniteScrollEnabled:o}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||o?null:(0,Ht.jsx)(tn.__experimentalToggleGroupControl,{isBlock:!0,label:(0,np.__)("Items per page"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:n=>{let i=typeof n=="number"||n===void 0?n:parseInt(n,10);r({...e,perPage:i,page:1})},children:t.perPageSizes.map(n=>(0,Ht.jsx)(tn.__experimentalToggleGroupControlOption,{value:n,label:n.toString()},n))})}function QHe(){let{onReset:e}=(0,Uc.useContext)(et);return e===void 0?null:(0,Ht.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,np.__)("Reset view")})}function MU(){let{view:e,onReset:t}=(0,Uc.useContext)(et),r=(0,mde.useInstanceId)(hde,"dataviews-view-config-dropdown"),o=wh.find(i=>i.type===e.type),n=typeof t=="function";return(0,Ht.jsx)(tn.Dropdown,{expandOnMobile:!0,popoverProps:{...qHe,id:r},renderToggle:({onToggle:i,isOpen:s})=>(0,Ht.jsxs)("div",{className:"dataviews-view-config__toggle-wrapper",children:[(0,Ht.jsx)(tn.Button,{size:"compact",icon:VB,label:(0,np._x)("View options","View is used as a noun"),onClick:i,"aria-expanded":s?"true":"false","aria-controls":r}),n&&(0,Ht.jsx)("span",{className:"dataviews-view-config__modified-indicator"})]}),renderContent:()=>(0,Ht.jsx)(tn.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,Ht.jsxs)(se,{direction:"column",className:"dataviews-view-config",gap:"xl",children:[(0,Ht.jsxs)(se,{direction:"row",justify:"space-between",align:"center",className:"dataviews-view-config__header",children:[(0,Ht.jsx)(tn.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:(0,np.__)("Appearance")}),(0,Ht.jsx)(QHe,{})]}),(0,Ht.jsxs)(se,{direction:"column",gap:"lg",children:[(0,Ht.jsxs)(se,{direction:"row",gap:"sm",className:"dataviews-view-config__sort-controls",children:[(0,Ht.jsx)(KHe,{}),(0,Ht.jsx)(ZHe,{})]}),!!o?.viewConfigOptions&&(0,Ht.jsx)(o.viewConfigOptions,{}),(0,Ht.jsx)(XHe,{}),(0,Ht.jsx)(iO,{})]})]})})})}function hde(){return(0,Ht.jsxs)(Ht.Fragment,{children:[(0,Ht.jsx)(NU,{}),(0,Ht.jsx)(MU,{})]})}var JHe=(0,Uc.memo)(hde),gde=JHe;var vde=a(G(),1),bde=a(U(),1);function yr(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 yde=a(E(),1),{ValidatedCheckboxControl:$He}=_t(vde.privateApis);function wde({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,bde.useCallback)(()=>{t(l({item:r,value:!s({item:r})}))},[r,s,t,l]);return(0,yde.jsx)($He,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:yr(d,i),hidden:o,label:c,help:u,checked:s({item:r}),onChange:m,disabled:f})}var f5=a(G(),1),_de=a(U(),1);var FU=a(E(),1),{ValidatedComboboxControl:eUe}=_t(f5.privateApis);function p5({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,_de.useCallback)(v=>r(u({item:e,value:v??""})),[e,r,u]),{elements:h,isLoading:g}=Kn({elements:t.elements,getElements:t.getElements});return g?(0,FU.jsx)(f5.Spinner,{}):(0,FU.jsx)(eUe,{required:!!t.isValid?.required,customValidity:yr(d,n),label:i,value:f,help:s,placeholder:l,options:h,onChange:m,hideLabelFromVision:o,allowReset:!0,expandOnFocus:!0})}var g5=a(G(),1),zl=a(U(),1),h5=a(j(),1),il=a(an(),1);var t_=a(G(),1),DU=a(U(),1),pd=a(j(),1);var e_=a(E(),1),tUe={[Es]:[{value:"days",label:(0,pd.__)("Days")},{value:"weeks",label:(0,pd.__)("Weeks")},{value:"months",label:(0,pd.__)("Months")},{value:"years",label:(0,pd.__)("Years")}],[fa]:[{value:"days",label:(0,pd.__)("Days ago")},{value:"weeks",label:(0,pd.__)("Weeks ago")},{value:"months",label:(0,pd.__)("Months ago")},{value:"years",label:(0,pd.__)("Years ago")}]};function m5({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let s=tUe[i===Es?"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,DU.useCallback)(y=>o(f({item:t,value:{value:Number(y),unit:v}})),[o,f,t,v]),_=(0,DU.useCallback)(y=>o(f({item:t,value:{value:g,unit:y}})),[o,f,t,g]);return(0,e_.jsx)(t_.BaseControl,{id:l,className:J(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,help:u,children:(0,e_.jsxs)(se,{direction:"row",gap:"sm",children:[(0,e_.jsx)(t_.__experimentalNumberControl,{className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:g,onChange:b,disabled:m}),(0,e_.jsx)(t_.SelectControl,{className:"dataviews-controls__relative-date-unit",label:(0,pd.__)("Unit"),value:v,options:s,onChange:_,hideLabelFromVision:!0,disabled:m})]})})}var Sde=a(U(),1);function ET(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,Sde.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 xde=a(an(),1);function PT(e){if(!e)return null;let t=(0,xde.getDate)(e);return t&&ep(t)?t:null}var kh=a(E(),1),{DateCalendar:rUe,ValidatedInputControl:oUe}=_t(g5.privateApis),LU=e=>e?(0,il.dateI18n)("Y-m-d\\TH:i",(0,il.getDate)(e)):"";function nUe({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,zl.useState)(()=>PT(b)||new Date),w=(0,zl.useRef)(null),S=(0,zl.useRef)(void 0),x=(0,zl.useRef)(null),{minConstraint:C,maxConstraint:I,disabledMatchers:k}=ET(h,PT),R=(0,zl.useCallback)(V=>r(f({item:e,value:V})),[e,r,f]);(0,zl.useEffect)(()=>()=>{S.current&&clearTimeout(S.current)},[]);let A=(0,zl.useCallback)(V=>{let z;if(V){let D=(0,il.dateI18n)("Y-m-d",V),O;b?O=(0,il.dateI18n)("H:i",(0,il.getDate)(b)):O=(0,il.dateI18n)("H:i",V),z=(0,il.getDate)(`${D}T${O}`).toISOString(),R(z),S.current&&clearTimeout(S.current)}else R(void 0);x.current=w.current&&w.current.ownerDocument.activeElement,S.current=setTimeout(()=>{w.current&&(w.current.focus(),w.current.blur(),R(z),x.current&&x.current instanceof HTMLElement&&x.current.focus())},0)},[R,b]),P=(0,zl.useCallback)(V=>{if(V){let z=(0,il.getDate)(V);R(z.toISOString());let D=PT(z.toISOString());D&&y(D)}else R(void 0)},[R]),{format:T}=t,M=T.weekStartsOn??(0,il.getSettings)().l10n.startOfWeek,{timezone:{string:B}}=(0,il.getSettings)(),F=u;return h?.required&&!n&&!o?F=`${u} (${(0,h5.__)("Required")})`:!h?.required&&n&&!o&&(F=`${u} (${(0,h5.__)("Optional")})`),(0,kh.jsx)(g5.BaseControl,{id:c,label:F,help:d,hideLabelFromVision:o,children:(0,kh.jsxs)(se,{direction:"column",gap:"lg",children:[(0,kh.jsx)(oUe,{ref:w,required:!!h?.required,customValidity:yr(h,i),type:"datetime-local",label:(0,h5.__)("Date time"),hideLabelFromVision:!0,value:LU(b),onChange:P,disabled:g,min:C?LU(C):void 0,max:I?LU(I):void 0}),!l&&(0,kh.jsx)(rUe,{style:{width:"100%"},selected:b&&PT(b)||void 0,onSelect:A,month:_,onMonthChange:y,timeZone:B||void 0,weekStartsOn:M,disabled:g||k})]})})}function Cde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s,config:l}){return i===Es||i===fa?(0,kh.jsx)(m5,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,kh.jsx)(nUe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s,config:l})}var Xi=a(G(),1),Tde=a(na(),1),ar=a(U(),1),Rn=a(j(),1),Zi=a(an(),1);var Vr=a(E(),1),{DateCalendar:iUe,DateRangeCalendar:sUe}=_t(Xi.privateApis),aUe=[{id:"today",label:(0,Rn.__)("Today"),getValue:()=>(0,Zi.getDate)(null)},{id:"yesterday",label:(0,Rn.__)("Yesterday"),getValue:()=>{let e=(0,Zi.getDate)(null);return Sb(e,1)}},{id:"past-week",label:(0,Rn.__)("Past week"),getValue:()=>{let e=(0,Zi.getDate)(null);return Sb(e,7)}},{id:"past-month",label:(0,Rn.__)("Past month"),getValue:()=>{let e=(0,Zi.getDate)(null);return n5(e,1)}}],lUe=[{id:"last-7-days",label:(0,Rn.__)("Last 7 days"),getValue:()=>{let e=(0,Zi.getDate)(null);return[Sb(e,7),e]}},{id:"last-30-days",label:(0,Rn.__)("Last 30 days"),getValue:()=>{let e=(0,Zi.getDate)(null);return[Sb(e,30),e]}},{id:"month-to-date",label:(0,Rn.__)("Month to date"),getValue:()=>{let e=(0,Zi.getDate)(null);return[xue(e),e]}},{id:"last-year",label:(0,Rn.__)("Last year"),getValue:()=>{let e=(0,Zi.getDate)(null);return[i5(e,1),e]}},{id:"year-to-date",label:(0,Rn.__)("Year to date"),getValue:()=>{let e=(0,Zi.getDate)(null);return[t5(e),e]}}],Rh=e=>{if(!e)return null;let t=(0,Zi.getDate)(e);return t&&ep(t)?t:null},BU=e=>e?typeof e=="string"?e:EU(e,"yyyy-MM-dd"):"";function Ede({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:s}=e,[l,c]=(0,ar.useState)(void 0),u=(0,ar.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,ar.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=t?yr(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,ar.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,ar.useEffect)(()=>{if(!o)return;let f=t?yr(s,t):void 0;f?c(f):u()},[o,s,t,u]),(0,ar.useEffect)(()=>{o&&l?.message&&(0,Tde.speak)(l.message)},[o,l?.message]),(0,Vr.jsxs)("div",{onBlur:f=>{o||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,l&&(0,Vr.jsxs)("p",{className:J("components-validated-control__indicator",l.type==="invalid"?"is-invalid":void 0),children:[(0,Vr.jsx)(Xi.Icon,{className:"components-validated-control__indicator-icon",icon:xf,size:16,fill:"currentColor"}),l.message]})]})}function cUe({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,ar.useState)(null),b=m.weekStartsOn??(0,Zi.getSettings)().l10n.startOfWeek,_=d({item:e}),y=typeof _=="string"?_:void 0,[w,S]=(0,ar.useState)(()=>Rh(y)||new Date),[x,C]=(0,ar.useState)(!1),I=(0,ar.useRef)(null),{minConstraint:k,maxConstraint:R,disabledMatchers:A}=ET(f,Rh),P=(0,ar.useCallback)(z=>r(u({item:e,value:z})),[e,r,u]),T=(0,ar.useCallback)(z=>{let D=z?EU(z,"yyyy-MM-dd"):void 0;P(D),v(null),C(!0)},[P]),M=(0,ar.useCallback)(z=>{let D=z.getValue(),O=BU(D);S(D),P(O),v(z.id),C(!0)},[P]),B=(0,ar.useCallback)(z=>{if(P(z),z){let D=Rh(z);D&&S(D)}v(null),C(!0)},[P]),{timezone:{string:F}}=(0,Zi.getSettings)(),V=l;return f?.required&&!n?V=`${l} (${(0,Rn.__)("Required")})`:!f?.required&&n&&(V=`${l} (${(0,Rn.__)("Optional")})`),(0,Vr.jsx)(Ede,{field:t,validity:i,inputRefs:I,isTouched:x,setIsTouched:C,children:(0,Vr.jsx)(Xi.BaseControl,{id:s,className:"dataviews-controls__date",label:V,help:c,hideLabelFromVision:o,children:(0,Vr.jsxs)(se,{direction:"column",gap:"lg",children:[(0,Vr.jsxs)(se,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[aUe.map(z=>{let D=g===z.id;return(0,Vr.jsx)(Xi.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:D,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>M(z),children:z.label},z.id)}),(0,Vr.jsx)(Xi.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!g,size:"small",disabled:!!g||h,accessibleWhenDisabled:!0,children:(0,Rn.__)("Custom")})]}),(0,Vr.jsx)(Xi.__experimentalInputControl,{ref:I,type:"date",label:(0,Rn.__)("Date"),hideLabelFromVision:!0,value:y,onChange:B,required:!!t.isValid?.required,disabled:h,min:k,max:R}),(0,Vr.jsx)(iUe,{style:{width:"100%"},selected:y&&Rh(y)||void 0,onSelect:T,month:w,onMonthChange:S,timeZone:F||void 0,weekStartsOn:b,disabled:h||A,disableNavigation:h})]})})})}function uUe({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(L=>typeof L=="string")&&(g=v);let b=m.weekStartsOn??(0,Zi.getSettings)().l10n.startOfWeek,{minConstraint:_,maxConstraint:y,disabledMatchers:w}=ET(f,Rh),S=(0,ar.useCallback)(L=>{r(d({item:e,value:L}))},[e,r,d]),[x,C]=(0,ar.useState)(null),I=(0,ar.useMemo)(()=>{if(!g)return{from:void 0,to:void 0};let[L,W]=g;return{from:Rh(L)||void 0,to:Rh(W)||void 0}},[g]),[k,R]=(0,ar.useState)(()=>I.from||new Date),[A,P]=(0,ar.useState)(!1),T=(0,ar.useRef)(null),M=(0,ar.useRef)(null),B=(0,ar.useCallback)((L,W)=>{L&&W?S([BU(L),BU(W)]):!L&&!W&&S(void 0)},[S]),F=(0,ar.useCallback)(L=>{B(L?.from,L?.to),C(null),P(!0)},[B]),V=(0,ar.useCallback)(L=>{let[W,q]=L.getValue();R(W),B(W,q),C(L.id),P(!0)},[B]),z=(0,ar.useCallback)((L,W)=>{let[q,Z]=g||[void 0,void 0];if(B(L==="from"?W:q,L==="to"?W:Z),W){let te=Rh(W);te&&R(te)}C(null),P(!0)},[g,B]),{timezone:D}=(0,Zi.getSettings)(),O=l;return t.isValid?.required&&!n?O=`${l} (${(0,Rn.__)("Required")})`:!t.isValid?.required&&n&&(O=`${l} (${(0,Rn.__)("Optional")})`),(0,Vr.jsx)(Ede,{field:t,validity:i,inputRefs:[T,M],isTouched:A,setIsTouched:P,children:(0,Vr.jsx)(Xi.BaseControl,{id:s,className:"dataviews-controls__date",label:O,help:c,hideLabelFromVision:o,children:(0,Vr.jsxs)(se,{direction:"column",gap:"lg",children:[(0,Vr.jsxs)(se,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[lUe.map(L=>{let W=x===L.id;return(0,Vr.jsx)(Xi.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:W,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>V(L),children:L.label},L.id)}),(0,Vr.jsx)(Xi.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!x,size:"small",accessibleWhenDisabled:!0,disabled:!!x||h,children:(0,Rn.__)("Custom")})]}),(0,Vr.jsxs)(se,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,Vr.jsx)(Xi.__experimentalInputControl,{ref:T,type:"date",label:(0,Rn.__)("From"),hideLabelFromVision:!0,value:g?.[0],onChange:L=>z("from",L),required:!!t.isValid?.required,disabled:h,min:_,max:y}),(0,Vr.jsx)(Xi.__experimentalInputControl,{ref:M,type:"date",label:(0,Rn.__)("To"),hideLabelFromVision:!0,value:g?.[1],onChange:L=>z("to",L),required:!!t.isValid?.required,disabled:h,min:_,max:y})]}),(0,Vr.jsx)(sUe,{style:{width:"100%"},selected:I,onSelect:F,month:k,onMonthChange:R,timeZone:D.string||void 0,weekStartsOn:b,disabled:h||w})]})})})}function Pde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s}){return i===Es||i===fa?(0,Vr.jsx)(m5,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===Ts?(0,Vr.jsx)(uUe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s}):(0,Vr.jsx)(cUe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s})}var v5=a(G(),1),kde=a(U(),1);var VU=a(E(),1),{ValidatedSelectControl:dUe}=_t(v5.privateApis);function b5({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,kde.useCallback)(y=>r(d({item:e,value:y})),[e,r,d]),{elements:b,isLoading:_}=Kn({elements:t.elements,getElements:t.getElements});return _?(0,VU.jsx)(v5.Spinner,{}):(0,VU.jsx)(dUe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:yr(f,i),label:l,value:g,help:c,options:b,onChange:v,hideLabelFromVision:o,multiple:h,disabled:m})}var jU=a(E(),1),fUe=10;function Rde(e){let{field:t}=e,{elements:r}=Kn({elements:t.elements,getElements:t.getElements});return r.length>=fUe?(0,jU.jsx)(p5,{...e}):(0,jU.jsx)(b5,{...e})}var w5=a(G(),1);var Ade=a(G(),1),Ide=a(U(),1);var Ode=a(E(),1),{ValidatedInputControl:pUe}=_t(Ade.privateApis);function md({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,type:i,prefix:s,suffix:l,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:g}=t,v=m({item:e}),b=t.isDisabled({item:e,field:t}),_=(0,Ide.useCallback)(y=>r(h({item:e,value:y})),[e,h,r]);return(0,Ode.jsx)(pUe,{required:!!g.required,markWhenOptional:n,customValidity:yr(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 y5=a(E(),1);function Nde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,y5.jsx)(md,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,y5.jsx)(w5.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,y5.jsx)(w5.Icon,{icon:$B})})})}var S5=a(G(),1);var _5=a(E(),1);function Mde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,_5.jsx)(md,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,_5.jsx)(S5.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,_5.jsx)(S5.Icon,{icon:y0})})})}var C5=a(G(),1);var x5=a(E(),1);function Fde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,x5.jsx)(md,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,x5.jsx)(C5.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,x5.jsx)(C5.Icon,{icon:CV})})})}var ip=a(G(),1),kT=a(U(),1),T5=a(j(),1);var Ah=a(E(),1),{ValidatedNumberControl:mUe}=_t(ip.privateApis);function Dde(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function hUe({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,s=(0,kT.useCallback)(c=>t([Dde(c),i]),[t,i]),l=(0,kT.useCallback)(c=>t([n,Dde(c)]),[t,n]);return(0,Ah.jsx)(ip.BaseControl,{help:(0,T5.__)("The max. value must be greater than the min. value."),children:(0,Ah.jsxs)(ip.Flex,{direction:"row",gap:4,children:[(0,Ah.jsx)(ip.__experimentalNumberControl,{label:(0,T5.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:s,hideLabelFromVision:r,step:o}),(0,Ah.jsx)(ip.__experimentalNumberControl,{label:(0,T5.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:l,hideLabelFromVision:r,step:o})]})})}function E5({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,kT.useCallback)(y=>{r(m({item:e,value:["",void 0].includes(y)?void 0:Number(y)}))},[e,r,m]),_=(0,kT.useCallback)(y=>{r(m({item:e,value:y}))},[e,r,m]);if(i===Ts){let y=["",""];return Array.isArray(g)&&g.length===2&&g.every(w=>typeof w=="number"||w==="")&&(y=g),(0,Ah.jsx)(hUe,{value:y,onChange:_,hideLabelFromVision:o,step:c})}return(0,Ah.jsx)(mUe,{required:!!h.required,markWhenOptional:n,customValidity:yr(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 Lde=a(E(),1);function Bde(e){return(0,Lde.jsx)(E5,{...e})}var Vde=a(E(),1);function jde(e){return(0,Vde.jsx)(E5,{...e})}var P5=a(G(),1),zde=a(U(),1);var zU=a(E(),1),{ValidatedRadioControl:gUe}=_t(P5.privateApis);function Hde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,description:l,getValue:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),{elements:m,isLoading:h}=Kn({elements:t.elements,getElements:t.getElements}),g=c({item:e}),v=(0,zde.useCallback)(b=>r(u({item:e,value:b})),[e,r,u]);return h?(0,zU.jsx)(P5.Spinner,{}):(0,zU.jsx)(gUe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:yr(d,i),label:s,help:l,onChange:v,options:m,selected:g,hideLabelFromVision:o,disabled:f})}var HU=a(U(),1);var Ude=a(E(),1);function Wde({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:s}){let{prefix:l,suffix:c}=i||{};return(0,Ude.jsx)(md,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s,prefix:l?(0,HU.createElement)(l):void 0,suffix:c?(0,HU.createElement)(c):void 0})}var Gde=a(G(),1),Yde=a(U(),1);var qde=a(E(),1),{ValidatedToggleControl:vUe}=_t(Gde.privateApis);function Kde({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,Yde.useCallback)(()=>{t(u({item:r,value:!c({item:r})}))},[t,u,r,c]);return(0,qde.jsx)(vUe,{required:!!d.required,markWhenOptional:n,customValidity:yr(d,i),hidden:o,label:s,help:l,checked:c({item:r}),onChange:m,disabled:f})}var Zde=a(G(),1),Xde=a(U(),1);var Qde=a(E(),1),{ValidatedTextareaControl:bUe}=_t(Zde.privateApis);function Jde({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,Xde.useCallback)(b=>r(m({item:e,value:b})),[e,r,m]);return(0,Qde.jsx)(bUe,{required:!!h.required,markWhenOptional:n,customValidity:yr(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,hideLabelFromVision:o})}var nfe=a(U(),1);var r_=a(G(),1),Oh=a(Te(),1),sl=a(U(),1),R5=a(hd(),1);var yUe=[];function efe({allowedFormats:e,disableFormats:t}){return t?yUe:e}var k5=a(hd(),1),tfe=a(E(),1),rfe=a(_e(),1),wUe={};function _Ue({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,k5.getActiveFormat)(r,s),u=c!==void 0,d=(0,k5.getActiveObject)(r),f=d!==void 0&&d.type===s;return(0,tfe.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:wUe},s)}function ofe({formatTypes:e,...t}){return e.map(r=>(0,rfe.createElement)(_Ue,{settings:r,...t,key:r.name}))}var Ih=a(E(),1),{ValidatedContentEditableControl:SUe,withIgnoreIMEEvents:xUe}=_t(r_.privateApis),{useRichText:CUe,KeyboardShortcutContext:TUe,InputEventContext:EUe,shortcutsListener:PUe,inputEventsListener:kUe}=_t(R5.privateApis),RUe=[];function A5({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=RUe}){let[S,x]=(0,sl.useState)({start:void 0,end:void 0}),[C,I]=(0,sl.useState)(!1),k=(0,sl.useRef)(void 0),R=(0,sl.useRef)(new Set),A=(0,sl.useRef)(new Set),P=(0,Oh.__experimentalUseFocusOutside)(()=>I(!1)),T=efe({allowedFormats:h,disableFormats:g}),{value:M,onChange:B,ref:F,formatTypes:V,getValue:z}=CUe({value:t,onChange:r,selectionStart:S.start,selectionEnd:S.end,onSelectionChange:(de,pe)=>x({start:de,end:pe}),__unstableIsSelected:C,preserveWhiteSpace:!!b,placeholder:o,__unstableDisableFormats:g,allowedFormats:T,withoutInteractiveFormatting:v,__unstableFormatTypeHandlerContext:(0,sl.useMemo)(()=>({richTextIdentifier:n,blockClientId:i}),[n,i])});function D(){k.current?.focus()}let O=(0,sl.useRef)({keyboardShortcuts:A,inputEvents:R}),L=(0,sl.useRef)({formatTypes:V,getValue:z,onChange:B});(0,sl.useInsertionEffect)(()=>{L.current={formatTypes:V,getValue:z,onChange:B}});let W=(0,Oh.useRefEffect)(de=>{if(u)return;let pe=xUe($=>{if($.key!=="Enter"||$.defaultPrevented||$.metaKey||$.ctrlKey||($.preventDefault(),_))return;let{getValue:ee,onChange:fe}=L.current,ve=ee();fe((0,R5.insert)(ve,` |
| 43 |
`,ve.start??ve.text.length,ve.end??ve.text.length))});return de.addEventListener("keydown",pe),()=>de.removeEventListener("keydown",pe)},[_,u]),q=(0,Oh.useRefEffect)(de=>{if(!C)return;let pe=PUe(O)(de),$=kUe(O)(de);function ee(fe){if(fe.inputType!=="insertText"&&fe.type!=="compositionend")return;let{formatTypes:ve,getValue:we,onChange:oe}=L.current,re=we(),ce=ve.reduce((ie,{__unstableInputRule:le})=>le?le(ie):ie,re);ce!==re&&oe({...ce,activeFormats:re.activeFormats})}return de.addEventListener("input",ee),de.addEventListener("compositionend",ee),()=>{pe(),$(),de.removeEventListener("input",ee),de.removeEventListener("compositionend",ee)}},[C]),{ref:Z,...Q}=(0,r_.__unstableUseAutocompleteProps)({completers:w,record:M,onChange:B,onReplace:()=>{}}),ue=(0,Oh.useRefEffect)(de=>{y&&!u&&de.focus()},[y,u]),te=(0,Oh.useMergeRefs)([F,k,q,W,ue,Z]);return(0,Ih.jsx)("div",{...P,onFocus:de=>{I(!0),P.onFocus(de)},children:(0,Ih.jsxs)(r_.SlotFillProvider,{children:[(0,Ih.jsx)(SUe,{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:M.text,"aria-multiline":!_,...Q,ref:te}),C&&!u&&(0,Ih.jsx)(TUe.Provider,{value:A,children:(0,Ih.jsx)(EUe.Provider,{value:R,children:(0,Ih.jsx)(ofe,{value:M,onChange:B,onFocus:D,formatTypes:V,forwardedRef:k,isVisible:!0})})})]})})}var ife=a(E(),1);function sfe({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,nfe.useCallback)(I=>r(w({item:e,value:I})),[e,r,w]);return(0,ife.jsx)(A5,{label:v,value:x,onChange:C,placeholder:b,id:y,hideLabelFromVision:o,help:_,disabled:g,required:!!S.required,markWhenOptional:n,customValidity:yr(S,s),className:l,clientId:c,allowedFormats:u,disableFormats:d,withoutInteractiveFormatting:f,preserveWhiteSpace:m,disableLineBreaks:h})}var o_=a(G(),1),afe=a(U(),1);var I5=a(E(),1),{ValidatedToggleGroupControl:AUe}=_t(o_.privateApis);function lfe({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,afe.useCallback)(v=>r(l({item:e,value:v})),[e,r,l]),{elements:m,isLoading:h}=Kn({elements:t.elements,getElements:t.getElements});if(h)return(0,I5.jsx)(o_.Spinner,{});if(m.length===0)return null;let g=m.find(v=>v.value===d);return(0,I5.jsx)(AUe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:yr(c,i),isBlock:!0,label:t.label,help:g?.description||t.description,onChange:f,value:d,hideLabelFromVision:o,children:m.map(v=>(0,I5.jsx)(o_.__experimentalToggleGroupControlOption,{label:v.label,value:v.value,disabled:u},v.value))})}var O5=a(G(),1),N5=a(U(),1);var RT=a(E(),1),{ValidatedFormTokenField:IUe}=_t(O5.privateApis);function cfe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,placeholder:l,description:c,getValue:u,setValue:d,isValid:f}=t,m=u({item:e}),h=t.isDisabled({item:e,field:t}),{elements:g,isLoading:v}=Kn({elements:t.elements,getElements:t.getElements}),b=(0,N5.useMemo)(()=>Array.isArray(m)?m.map(y=>g?.find(S=>S.value===y)||{value:y,label:y}):[],[m,g]),_=(0,N5.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,RT.jsx)(O5.Spinner,{}):(0,RT.jsx)(IUe,{required:!!f?.required,markWhenOptional:n,customValidity:yr(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,RT.jsx)("span",{children:w?.label||y})}return(0,RT.jsx)("span",{children:y})}})}var ba=a(G(),1),UU=a(U(),1),ufe=a(j(),1);var sp=a(E(),1),{ValidatedInputControl:OUe}=_t(ba.privateApis),NUe=({color:e,onColorChange:t,disabled:r})=>{let o=e&&Io(e).isValid()?e:"#ffffff";return(0,sp.jsx)(ba.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:n})=>(0,sp.jsx)(ba.Button,{onClick:n,"aria-label":(0,ufe.__)("Open color picker"),size:"small",disabled:r,accessibleWhenDisabled:!0,icon:()=>(0,sp.jsx)(ba.ColorIndicator,{colorValue:o})}),renderContent:()=>(0,sp.jsx)(ba.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,sp.jsx)(ba.ColorPicker,{color:o,onChange:t,enableAlpha:!0})})})};function dfe({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,UU.useCallback)(v=>{r(u({item:e,value:v}))},[e,r,u]),g=(0,UU.useCallback)(v=>{r(u({item:e,value:v||""}))},[e,r,u]);return(0,sp.jsx)(OUe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:yr(d,i),label:s,placeholder:l,value:m,help:c,onChange:g,hideLabelFromVision:o,type:"text",disabled:f,prefix:(0,sp.jsx)(ba.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,sp.jsx)(NUe,{color:m,onColorChange:h,disabled:f})})})}var F5=a(G(),1),D5=a(U(),1),WU=a(j(),1);var M5=a(E(),1);function ffe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[s,l]=(0,D5.useState)(!1),c=t.isDisabled({item:e,field:t}),u=(0,D5.useCallback)(()=>{l(d=>!d)},[]);return(0,M5.jsx)(md,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,M5.jsx)(F5.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,M5.jsx)(F5.Button,{icon:s?F1:mv,onClick:u,size:"small",label:s?(0,WU.__)("Hide password"):(0,WU.__)("Show password"),disabled:c,accessibleWhenDisabled:!0})})})}function L5(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var mfe=a(E(),1),pfe={adaptiveSelect:Rde,array:cfe,checkbox:wde,color:dfe,combobox:p5,datetime:Cde,date:Pde,email:Nde,telephone:Mde,url:Fde,integer:Bde,number:jde,password:ffe,radio:Hde,select:b5,text:Wde,toggle:Kde,textarea:Jde,richtext:sfe,toggleGroup:lfe};function MUe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function FUe(e){let{control:t,...r}=e,o=B5(t);return o===null?null:function(i){return(0,mfe.jsx)(o,{...i,config:r})}}function hfe(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?B5(e.Edit):MUe(e.Edit)?FUe(e.Edit):L5(e)&&e.type!=="array"?B5("adaptiveSelect"):t===null?null:B5(t)}function B5(e){return Object.keys(pfe).includes(e)?pfe[e]:null}function DUe(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 gfe=DUe;var LUe=e=>({item:t})=>{let r=e.split("."),o=t;for(let n of r)o.hasOwnProperty(n)?o=o[n]:o=void 0;return o},vfe=LUe;var BUe=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},bfe=BUe;var wfe=a(j(),1);function V5({item:e,field:t}){let{elements:r,isLoading:o}=Kn({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return o||r.length===0?n:r?.find(i=>i.value===n)?.label||t.getValue({item:e})}var yfe=a(E(),1);function Vo({item:e,field:t}){return t.hasElements?(0,yfe.jsx)(V5,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var gd=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function jo(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function vd(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length>=t.isValid.minLength.constraint}function bd(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length<=t.isValid.maxLength.constraint}function yd(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let r=new RegExp(t.isValid.pattern.constraint),o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:r.test(String(o))}catch{return!1}}function jr(e,t){let o=(t.elements??[]).map(i=>i.value);if(o.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>o.includes(i))}function VUe({item:e,field:t}){return t.getValue({item:e})}var As=VUe;var jUe=/^[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 zUe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!jUe.test(r)?(0,wfe.__)("Value must be a valid email address."):null}var _fe={type:"email",render:Vo,Edit:"email",sort:gd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[so,ao],validOperators:[_o,So,Zu,Xu,Qu,so,ao,Wi,Yn],format:{},getValueFormatted:As,validate:{required:jo,pattern:yd,minLength:vd,maxLength:bd,elements:jr,custom:zUe}};var Sfe=a(j(),1);var n_=(e,t,r)=>r==="asc"?e-t:t-e;function j5(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 z5(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 xfe={separatorThousand:","};function HUe({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=xfe: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 UUe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,Sfe.__)("Value must be an integer."):null}var Cfe={type:"integer",render:Vo,Edit:"integer",sort:n_,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_o,So,rh,oh,nh,ih,Ts],validOperators:[_o,So,rh,oh,nh,ih,Ts,so,ao,Wi,Yn],format:xfe,getValueFormatted:HUe,validate:{required:jo,min:j5,max:z5,elements:jr,custom:UUe}};var Tfe=a(j(),1);var Efe={separatorThousand:",",separatorDecimal:".",decimals:2};function WUe({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=Efe: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 GUe(e){return e===""||e===void 0||e===null}function YUe(e,t){let r=t.getValue({item:e});return!GUe(r)&&!Number.isFinite(r)?(0,Tfe.__)("Value must be a number."):null}var Pfe={type:"number",render:Vo,Edit:"number",sort:n_,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_o,So,rh,oh,nh,ih,Ts],validOperators:[_o,So,rh,oh,nh,ih,Ts,so,ao,Wi,Yn],format:Efe,getValueFormatted:WUe,validate:{required:jo,min:j5,max:z5,elements:jr,custom:YUe}};var kfe={type:"text",render:Vo,Edit:"text",sort:gd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[so,ao],validOperators:[_o,So,Zu,Xu,Qu,so,ao,Wi,Yn],format:{},getValueFormatted:As,validate:{required:jo,pattern:yd,minLength:vd,maxLength:bd,elements:jr}};var Tb=a(an(),1);var Afe=a(an(),1);function Rfe(e){if(!e||!ep(new Date(e)))return null;let t=(0,Afe.getDate)(e);return t&&ep(t)?t:null}function Ife(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=Rfe(o),l=Rfe(String(i));return!!s&&!!l&&(r==="min"?l.getTime()>=s.getTime():l.getTime()<=s.getTime())}function H5(e,t){return Ife(e,t,"min")}function U5(e,t){return Ife(e,t,"max")}var Ofe={datetime:(0,Tb.getSettings)().formats.datetime,weekStartsOn:(0,Tb.getSettings)().l10n.startOfWeek};function qUe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=Ofe:o=t.format,(0,Tb.dateI18n)(o.datetime,(0,Tb.getDate)(r))}var KUe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Nfe={type:"datetime",render:Vo,Edit:"datetime",sort:KUe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[uh,dh,sh,ah,lh,ch,Es,fa],validOperators:[uh,dh,sh,ah,lh,ch,Es,fa],format:Ofe,getValueFormatted:qUe,validate:{required:jo,elements:jr,min:H5,max:U5}};var Eb=a(an(),1);var Mfe={date:(0,Eb.getSettings)().formats.date,weekStartsOn:(0,Eb.getSettings)().l10n.startOfWeek};function ZUe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=Mfe:o=t.format,(0,Eb.dateI18n)(o.date,(0,Eb.getDate)(r))}var XUe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Ffe={type:"date",render:Vo,Edit:"date",sort:XUe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[uh,dh,sh,ah,lh,ch,Es,fa,Ts],validOperators:[uh,dh,sh,ah,lh,ch,Es,fa,Ts],format:Mfe,getValueFormatted:ZUe,validate:{required:jo,elements:jr,min:H5,max:U5}};var W5=a(j(),1);function Dfe(e,t){return t.getValue({item:e})===!0}function QUe({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,W5.__)("True"):r===!1?(0,W5.__)("False"):""}function JUe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,W5.__)("Value must be true, false, or undefined"):null}var $Ue=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},Lfe={type:"boolean",render:Vo,Edit:"checkbox",sort:$Ue,validate:{required:Dfe,elements:jr,custom:JUe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_o,So],validOperators:[_o,So],format:{},getValueFormatted:QUe};var Bfe={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:As,validate:{}};var GU=a(j(),1);function Vfe(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function jfe({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function eWe({item:e,field:t}){return jfe({item:e,field:t})}function tWe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,GU.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,GU.__)("Every value must be a string.")}var rWe=(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)},zfe={type:"array",render:eWe,Edit:"array",sort:rWe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[so,ao],validOperators:[so,ao,Wi,Yn],format:{},getValueFormatted:jfe,validate:{required:Vfe,elements:jr,custom:tWe}};function oWe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var Hfe={type:"password",render:Vo,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:oWe,validate:{required:jo,pattern:yd,minLength:vd,maxLength:bd,elements:jr}};var Ufe={type:"telephone",render:Vo,Edit:"telephone",sort:gd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[so,ao],validOperators:[_o,So,Zu,Xu,Qu,so,ao,Wi,Yn],format:{},getValueFormatted:As,validate:{required:jo,pattern:yd,minLength:vd,maxLength:bd,elements:jr}};var Wfe=a(j(),1);var i_=a(E(),1);function nWe({item:e,field:t}){if(t.hasElements)return(0,i_.jsx)(V5,{item:e,field:t});let r=As({item:e,field:t});return!r||!Io(r).isValid()?r:(0,i_.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,i_.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,i_.jsx)("span",{children:r})]})}function iWe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Io(r).isValid()?(0,Wfe.__)("Value must be a valid color."):null}var sWe=(e,t,r)=>{let o=Io(e),n=Io(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},Gfe={type:"color",render:nWe,Edit:"color",sort:sWe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[so,ao],validOperators:[_o,So,so,ao],format:{},getValueFormatted:As,validate:{required:jo,elements:jr,custom:iWe}};var Yfe={type:"url",render:Vo,Edit:"url",sort:gd,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[so,ao],validOperators:[_o,So,Zu,Xu,Qu,so,ao,Wi,Yn],format:{},getValueFormatted:As,validate:{required:jo,pattern:yd,minLength:vd,maxLength:bd,elements:jr}};var aWe=(e,t,r)=>typeof e=="number"&&typeof t=="number"?n_(e,t,r):gd(e,t,r),qfe={render:Vo,Edit:null,sort:aWe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_o,So],validOperators:Gue(),format:{},getValueFormatted:As,validate:{required:jo,elements:jr}};function lWe(e){return e==="integer"||e==="number"}function cWe(e){return e==="date"||e==="datetime"}function Kfe(e,t,r){let o=t.validate[r];if(o&&(typeof e=="number"&&lWe(t.type)||typeof e=="string"&&cWe(t.type)))return{constraint:e,validate:o}}function Zfe(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=Kfe(r?.min,t,"min"),s=Kfe(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 Xfe(e){return e.validOperators.reduce((t,r)=>{let o=xb(r);return o?.filter&&(t[r]=o.filter),t},{})}function uWe(e,t){return{...t.format,...e.format}}var Qfe=uWe;function dWe(e){let t=[_fe,Cfe,Pfe,kfe,Nfe,Ffe,Lfe,Bfe,zfe,Hfe,Ufe,Gfe,Yfe].find(r=>r?.type===e);return t||qfe}function ap(e){return e.map(t=>{let r=dWe(t.type),o=t.getValue||vfe(t.id),n=function(i,s,l){let c=o({item:i}),u=o({item:s});return t.sort?t.sort(c,u,l):r.sort(c,u,l)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:o,setValue:t.setValue||bfe(t.id),elements:t.elements,getElements:t.getElements,hasElements:L5(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:hfe(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:Zfe(t,r),filterBy:gfe(t,r.defaultOperators,r.validOperators),filter:Xfe(r),format:Qfe(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var gi=a(U(),1);function Jfe({view:e,data:t,getItemId:r,isLoading:o,paginationInfo:n,selection:i}){let s=e.infiniteScrollEnabled,[l,c]=(0,gi.useState)(!o);(0,gi.useEffect)(()=>{o||c(!0)},[o]);let u=(0,gi.useRef)(t),d=(0,gi.useRef)(n);(0,gi.useEffect)(()=>{o||(u.current=t,d.current=n)},[t,o,n]);let[f,m]=(0,gi.useState)([]),h=(0,gi.useRef)(new Map),g=(0,gi.useRef)([]),v=(0,gi.useRef)({search:void 0,filters:void 0,perPage:void 0}),b=(0,gi.useRef)(void 0),_=(0,gi.useRef)(void 0),y=(0,gi.useRef)(!1),w=(0,gi.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,V=t.map((z,D)=>{let O=F+D;return h.current.set(r(z),O),{...z,position:O}});return g.current=V,V}let I=g.current,k=new Set(t.map(r)),R=b.current,A=e.search?1:e.startPosition??1,P=t.map((F,V)=>{let z=r(F),D=e.infiniteScrollEnabled?A+V:void 0;return D!==void 0&&h.current.set(z,D),{...F,position:D}});if(P.length===0)return I;let T=I.filter(F=>!k.has(r(F))),M=R==="up"?[...P,...T]:[...T,...P];M.sort((F,V)=>{let z=F.position,D=V.position;return z-D});let B=M;if(f.length>0){let F=Math.min(...f),V=Math.max(...f),z=20,D=M.map(q=>q.position),O=Math.min(...D);!(Math.max(...D)<F-z||O>V+z)&&(B=M.filter(q=>{let Z=r(q);if(i?.includes(Z))return!0;let ue=q.position;return R==="up"?ue<=V+z:R==="down"?ue>=F-z:ue>=F-z&&ue<=V+z}))}return g.current=B,B},[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 Is=a(U(),1),epe=a(Te(),1);function $fe(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 tpe({view:e,onChangeView:t,isLoading:r,paginationInfo:o,containerRef:n,setVisibleEntries:i}){let s=(0,Is.useRef)(null),l=(0,Is.useRef)(e),c=(0,Is.useRef)(r),u=(0,Is.useRef)(t),d=(0,Is.useRef)(o.totalItems);(0,Is.useLayoutEffect)(()=>{l.current=e,c.current=r,u.current=t,d.current=o.totalItems},[e,r,t,o.totalItems]);let f=(0,Is.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,Is.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,Is.useRef)(null);return(0,Is.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,Is.useEffect)(()=>{if(!e.infiniteScrollEnabled||!n.current)return;let h=0,g=600,v=800,b=(0,epe.throttle)(y=>{let w=l.current,S=d.current,x=y.target,C=x.scrollTop,I=x.scrollHeight,k=x.clientHeight,R=C>h?"down":"up";if(h=C,c.current)return;let A=w.startPosition||1,P=w.perPage||10,T=Math.min(A+P,S);if(R==="down"&&C+k>=I-g&&T<S){let M=T;$fe(x,s,"down"),u.current({...w,startPosition:M})}if(R==="up"&&C<=v&&A>1){let M=A-P,B=M<6?1:M;$fe(x,s,"up"),u.current({...w,startPosition:B})}},50),_=n.current;return _.addEventListener("scroll",b),()=>{_.removeEventListener("scroll",b),b.cancel()}},[n,e.infiniteScrollEnabled]),{intersectionObserver:m.current}}var ya=a(U(),1),rpe=a(Te(),1);var vi=a(E(),1),fWe=()=>!1,pWe=wh.filter(e=>e.isPicker),mWe=e=>e.id,hWe=[],gWe={pickerGrid:!0,pickerTable:!0};function vWe({search:e=!0,searchLabel:t=void 0}){let{view:r}=(0,ya.useContext)(et),o=r.infiniteScrollEnabled;return(0,vi.jsxs)(vi.Fragment,{children:[(0,vi.jsxs)(se,{direction:"row",align:"top",justify:"space-between",className:J("dataviews__view-actions",{"dataviews__view-actions--infinite-scroll":o}),gap:"xs",children:[(0,vi.jsxs)(se,{direction:"row",gap:"sm",justify:"start",className:"dataviews__search",children:[e&&(0,vi.jsx)(AU,{label:t}),(0,vi.jsx)(u5,{})]}),(0,vi.jsx)(se,{direction:"row",gap:"xs",style:{flexShrink:0},children:(0,vi.jsx)(gde,{})})]}),(0,vi.jsx)(d5,{className:"dataviews-filters__container"}),(0,vi.jsx)(RU,{}),(0,vi.jsx)(HH,{})]})}function bWe({view:e,onChangeView:t,fields:r,search:o=!0,searchLabel:n=void 0,actions:i=hWe,data:s,getItemId:l=mWe,isLoading:c=!1,paginationInfo:u,defaultLayouts:d=gWe,selection:f,onChangeSelection:m,children:h,config:g={perPageSizes:[10,20,50,100]},itemListLabel:v,empty:b,onReset:_}){let{data:y,setVisibleEntries:w}=Jfe({view:e,data:s,getItemId:l,selection:f,paginationInfo:u}),S=(0,ya.useRef)(null),[x,C]=(0,ya.useState)(0),I=(0,rpe.useResizeObserver)(D=>{C(D[0].borderBoxSize[0].inlineSize)},{box:"border-box"}),[k,R]=(0,ya.useState)(null);function A(D){let O=typeof D=="function"?D(f):D;m&&m(O)}let P=(0,ya.useMemo)(()=>ap(r),[r]),T=ST(P,e),M=(0,ya.useMemo)(()=>(T||[]).some(D=>D.isPrimary||D.isLocked),[T]),[B,F]=(0,ya.useState)(M),{intersectionObserver:V}=tpe({view:e,onChangeView:t,isLoading:c,paginationInfo:u,containerRef:S,setVisibleEntries:w});(0,ya.useEffect)(()=>{M&&!B&&F(!0)},[M,B]);let z=(0,ya.useMemo)(()=>Object.fromEntries(Object.entries(d).filter(([D])=>pWe.some(O=>O.type===D)).map(([D,O])=>[D,O===!0?{}:O])),[d]);return z[e.type]?(0,vi.jsx)(et.Provider,{value:{view:e,onChangeView:t,fields:P,actions:i,data:y,isLoading:c,paginationInfo:u,isItemClickable:fWe,selection:f,onChangeSelection:A,openedFilter:k,setOpenedFilter:R,getItemId:l,containerWidth:x,containerRef:S,resizeObserverRef:I,defaultLayouts:z,filters:T,isShowingFilter:B,setIsShowingFilter:F,config:g,itemListLabel:v,empty:b,onReset:_,hasInitiallyLoaded:!0,intersectionObserver:V},children:(0,vi.jsx)("div",{className:"dataviews-picker-wrapper",children:h??(0,vi.jsx)(vWe,{search:o,searchLabel:n})})}):null}var Wc=bWe;Wc.BulkActionToolbar=Qae;Wc.Footer=HH;Wc.Filters=CT;Wc.FiltersToggled=d5;Wc.FiltersToggle=u5;Wc.Layout=RU;Wc.LayoutSwitcher=NU;Wc.Pagination=jH;Wc.Search=AU;Wc.ViewConfig=MU;var lp=Wc;var QU=a(U(),1);var ope=a(U(),1),npe=a(E(),1),YU=(0,ope.createContext)({fields:[]});YU.displayName="DataFormContext";function ipe({fields:e,children:t}){return(0,npe.jsx)(YU.Provider,{value:{fields:e},children:t})}var Hl=YU;var tN=a(U(),1);var Y5=a(U(),1),IT=a(G(),1);var AT=a(j(),1),Qi={type:"regular",labelPosition:"top"},yWe=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 spe(e){let t=Qi;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,AT.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,AT.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,AT.__)("Apply"),cancelLabel:(0,AT.__)("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:yWe(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 ape(e){let t=spe(e?.layout),r=(e.fields??[]).map(o=>{if(typeof o=="string")return{id:o,layout:t};let n=o.layout?spe(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:ape({fields:o.children,layout:Qi}).fields}}});return{layout:t,fields:r}}var G5=ape;var lo=a(E(),1);function wWe({title:e}){return(0,lo.jsx)(se,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,lo.jsx)(se,{direction:"row",align:"center",children:(0,lo.jsx)(IT.__experimentalHeading,{level:2,size:13,children:e})})})}function lpe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,Y5.useContext)(Hl),l=t.layout,c=(0,Y5.useMemo)(()=>({layout:Qi,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,lo.jsxs)(lo.Fragment,{children:[!o&&t.label&&(0,lo.jsx)(wWe,{title:t.label}),(0,lo.jsx)(wa,{data:e,form:c,onChange:r,validity:i?.children})]});let u=l.labelPosition,d=s.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,lo.jsxs)(se,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,lo.jsx)("div",{className:J("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,lo.jsx)(IT.BaseControl.VisualLabel,{children:d.label})}),(0,lo.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,lo.jsx)(d.render,{item:e,field:d}):(0,lo.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,lo.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,lo.jsx)(lo.Fragment,{children:(0,lo.jsxs)(lo.Fragment,{children:[!o&&u!=="none"&&(0,lo.jsx)(IT.BaseControl.VisualLabel,{children:d.label}),(0,lo.jsx)(d.render,{item:e,field:d})]})}):(0,lo.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:u==="none"?!0:o,markWhenOptional:n,validity:i})})}var ZU=a(_k(),1),Pb=a(G(),1),Gc=a(U(),1),Q5=a(Te(),1);var q5=a(G(),1),s_=a(j(),1);var mpe=a(Te(),1);var qU=a(U(),1);function _We(e,t){return J("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var cpe=_We;var upe=a(G(),1);var Nh=a(E(),1);function SWe(e,t,r){return e?(0,Nh.jsxs)(Ze.Root,{children:[(0,Nh.jsx)(Ze.Trigger,{render:(0,Nh.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,Nh.jsx)(upe.Icon,{icon:xf,size:16}),(0,Nh.jsxs)(Gt,{children:[t,": "]}),r]})}),(0,Nh.jsx)(Ze.Popup,{children:t})]}):r}var dpe=SWe;function fpe(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=fpe(r);if(o)return o}}var ppe=fpe;var Os=a(E(),1);function OT({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=ppe(n),m=i&&!!f,h=cpe(u,m),g=dpe(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,mpe.useInstanceId)(OT,"dataforms-layouts-panel__field-control"),_=m?(0,s_.sprintf)((0,s_._x)("Edit %s (has errors)","field"),r||""):(0,s_.sprintf)((0,s_._x)("Edit %s","field"),r||""),y=(0,qU.useRef)(null),w=(0,qU.useRef)(null);return(0,Os.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,Os.jsx)("span",{className:h,children:g}),u==="none"&&m&&(0,Os.jsxs)(Ze.Root,{children:[(0,Os.jsx)(Ze.Trigger,{render:(0,Os.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",role:"img","aria-label":f,children:(0,Os.jsx)(q5.Icon,{icon:xf,size:16})})}),(0,Os.jsx)(Ze.Popup,{children:f})]}),(0,Os.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:o.length>1?(0,Os.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:o.map(C=>(0,Os.jsx)("span",{style:{width:"100%"},children:(0,Os.jsx)(C.render,{item:e,field:C})},C.id))}):o.map(C=>(0,Os.jsx)(C.render,{item:e,field:C},C.id))}),!s&&(0,Os.jsx)(q5.Button,{ref:w,className:"dataforms-layouts-panel__field-trigger-icon",label:_,icon:P1,size:"small","aria-expanded":l,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var hpe=a(_k(),1),KU=a(wk(),1),wd=a(U(),1),Ns=a(j(),1);function gpe(e){return e?Object.values(e).every(t=>Object.entries(t).every(([r,o])=>r==="children"&&o&&typeof o=="object"?gpe(o):o.type!=="invalid"&&o.type!=="validating")):!0}function xWe(e,t){let r=G5(e);if(r.fields.length===0)return[];let o=new Map;t.forEach(s=>{o.set(s.id,s)});function n(s){if("children"in s&&Array.isArray(s.children)){let u=s.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=o.get(s.id);if(d){let[f]=ap([d]);return{id:s.id,children:u,field:f}}return{id:s.id,children:u}}let l=o.get(s.id);if(!l)return null;let[c]=ap([l]);return{id:s.id,children:[],field:c}}return r.fields.map(n).filter(s=>s!==null)}function a_(e,t,r){if(e||(e={}),r.length===0)return e;let o={...e},n=o;for(let s=0;s<r.length-1;s++){let l=r[s];n[l]||(n[l]={}),n[l]={...n[l]},n=n[l]}let i=r[r.length-1];return n[i]={...n[i]||{},...t},o}function vpe(e,t,r){if(!e||t.length===0)return e;let o={...e},n=o;for(let l=0;l<t.length-1;l++){let c=t[l];if(!n[c])return e;n[c]={...n[c]},n=n[c]}let i=t[t.length-1];if(!n[i])return e;let s={...n[i]};if(delete s[r],Object.keys(s).length===0?delete n[i]:n[i]=s,Object.keys(o).length!==0)return o}function CWe(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=>a_(u,{elements:{type:"invalid",message:(0,Ns.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>a_(u,{elements:{type:"invalid",message:(0,Ns.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>vpe(u,[...i,t.id],"elements"))}}).catch(c=>{if(l!==o.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,Ns.__)("Unknown error when running elements validation asynchronously."),n(d=>a_(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function TWe(e,t,r){let{customCounterRef:o,setFormValidity:n,path:i}=r,s=(o.current[t.id]||0)+1;o.current[t.id]=s,e.then(l=>{if(s===o.current[t.id]){if(l===null){n(c=>vpe(c,[...i,t.id],"custom"));return}if(typeof l=="string"){n(c=>a_(c,{custom:{type:"invalid",message:l}},[...i,t.id]));return}n(c=>a_(c,{custom:{type:"invalid",message:(0,Ns.__)("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,Ns.__)("Unknown error when running custom validation asynchronously."),n(u=>a_(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function bpe(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,Ns.__)("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,Ns.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,Ns.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,Ns.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,Ns.__)("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,Ns.__)("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,hpe.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,Ns.__)("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"&&(CWe(t.field.getElements(),t,r),n.elements={type:"validating",message:(0,Ns.__)("Validating\u2026")}),o instanceof Promise&&(TWe(o,t,r),n.custom={type:"validating",message:(0,Ns.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(l=>{i[l.id]=bpe(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 ype(e,t){let r=e?.field?.getValue({item:t});if(e.children.length===0)return r;let o=e.children.map(n=>ype(n,t));return o?{value:r,children:o}:r}function EWe(e,t,r){let[o,n]=(0,wd.useState)(),i=(0,wd.useRef)({}),s=(0,wd.useRef)({}),l=(0,wd.useRef)({}),c=(0,wd.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=xWe(r,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let g=ype(h,e);if(l.current.hasOwnProperty(h.id)&&(0,KU.default)(l.current[h.id],g)){m.push(h.id);return}l.current[h.id]=g;let v=bpe(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,KU.default)(h,g)?h:g})},[e,t,r]);return(0,wd.useEffect)(()=>{c()},[c]),{validity:o,isValid:gpe(o)}}var wpe=EWe;var K5=a(U(),1);function Mh(e,t){let r=(0,K5.useCallback)(()=>{let o=e.current?.querySelectorAll("input, textarea, select"),n=0;return o?.forEach(i=>{i.willValidate&&!i.validity.valid&&(n++,i.dispatchEvent(new Event("invalid",{cancelable:!0})))}),n},[e]);return(0,K5.useEffect)(()=>{t&&r()},[t,r]),r}var _pe=a(U(),1);function PWe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var Z5=(e,t)=>Array.isArray(e)&&e.length>0?PWe(e).map(o=>t.find(n=>n.id===o)).filter(o=>o!==void 0):[];var kWe=(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 RWe(e){let{fields:t}=(0,_pe.useContext)(Hl),r=e.layout,o=Z5(r.summary,t),n=kWe(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 X5=RWe;var Ms=a(E(),1);function AWe({data:e,field:t,onChange:r,fieldLabel:o,onClose:n,touched:i}){let{openAs:s}=t.layout,{applyLabel:l,cancelLabel:c}=s,{fields:u}=(0,Gc.useContext)(Hl),[d,f]=(0,Gc.useState)({}),m=(0,Gc.useMemo)(()=>(0,ZU.default)(e,d,{arrayMerge:(x,C)=>C}),[e,d]),h=(0,Gc.useMemo)(()=>({layout:Qi,fields:t.children?t.children:[{id:t.id,layout:Qi}]}),[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}=wpe(m,g,h),b=()=>{r(d),n()},_=x=>{f(C=>(0,ZU.default)(C,x,{arrayMerge:(I,k)=>k}))},y=(0,Q5.useFocusOnMount)("firstInputElement"),w=(0,Gc.useRef)(null),S=(0,Q5.useMergeRefs)([y,w]);return Mh(w,i),(0,Ms.jsxs)(Pb.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:o,size:"medium",children:[(0,Ms.jsx)("div",{ref:S,children:(0,Ms.jsx)(wa,{data:m,form:h,onChange:_,validity:v,children:(x,C,I,k)=>(0,Ms.jsx)(x,{data:m,field:C,onChange:_,hideLabelFromVision:h.fields.length<2,markWhenOptional:k,validity:I},C.id)})}),(0,Ms.jsxs)(se,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,Ms.jsx)(Pb.__experimentalSpacer,{style:{flex:1}}),(0,Ms.jsx)(Pb.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:c}),(0,Ms.jsx)(Pb.Button,{variant:"primary",onClick:b,__next40pxDefaultSize:!0,children:l})]})]})}function IWe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,Gc.useState)(!1),[s,l]=(0,Gc.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=X5(t);if(!c)return null;let f=()=>{l(!1),i(!0)};return(0,Ms.jsxs)(Ms.Fragment,{children:[(0,Ms.jsx)(OT,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:o,touched:n,disabled:c.readOnly===!0,onClick:()=>l(!0),isOpen:s}),s&&(0,Ms.jsx)(AWe,{data:e,field:t,onChange:r,fieldLabel:u??"",onClose:f,touched:n})]})}var Spe=IWe;var Fh=a(G(),1),xpe=a(j(),1),cp=a(U(),1);var Cpe=a(Te(),1);var Ji=a(E(),1);function OWe({title:e,onClose:t}){return(0,Ji.jsx)(se,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Ji.jsxs)(se,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Ji.jsx)(Fh.__experimentalHeading,{level:2,size:13,children:e}),(0,Ji.jsx)(Fh.__experimentalSpacer,{style:{flex:1}}),t&&(0,Ji.jsx)(Fh.Button,{label:(0,xpe.__)("Close"),icon:Mi,onClick:t,size:"small"})]})})}function NWe({touched:e,children:t}){let r=(0,cp.useRef)(null);return Mh(r,e),(0,Ji.jsx)("div",{ref:r,children:t})}function MWe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,cp.useState)(!1),[s,l]=(0,cp.useState)(null),c=(0,cp.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,Cpe.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,cp.useMemo)(()=>({layout:Qi,fields:t.children?t.children:[{id:t.id,layout:Qi}]}),[t]),m=(0,cp.useMemo)(()=>{if(o!==void 0)return t.children?o?.children:{[t.id]:o}},[o,t]),{fieldDefinition:h,fieldLabel:g,summaryFields:v}=X5(t);return h?(0,Ji.jsx)("div",{ref:l,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Ji.jsx)(Fh.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:_})=>(0,Ji.jsx)(OT,{data:e,field:t,fieldLabel:g,summaryFields:v,validity:o,touched:n,disabled:h.readOnly===!0,isOpen:b,onClick:_}),renderContent:({onClose:b})=>(0,Ji.jsx)(NWe,{touched:n,children:(0,Ji.jsxs)("div",{ref:u,...d,children:[(0,Ji.jsx)(OWe,{title:g,onClose:b}),(0,Ji.jsx)(wa,{data:e,form:f,onChange:r,validity:m,children:(_,y,w,S)=>(0,Ji.jsx)(_,{data:e,field:y,onChange:r,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:S,validity:w},y.id)})]})})})}):null}var Tpe=MWe;var XU=a(E(),1);function Epe({data:e,field:t,onChange:r,validity:o}){return t.layout.openAs.type==="modal"?(0,XU.jsx)(Spe,{data:e,field:t,onChange:r,validity:o}):(0,XU.jsx)(Tpe,{data:e,field:t,onChange:r,validity:o})}var $i=a(U(),1),Rpe=a(na(),1),Ape=a(Te(),1);var J5=a(j(),1);function Ppe(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+=Ppe(o);return t}function l_(e){let t=Ppe(e);if(t!==0)return(0,J5.sprintf)((0,J5._n)("%d field needs attention","%d fields need attention",t),t)}var kpe=a(E(),1);function $5({validity:e}){let t=l_(e);return t?(0,kpe.jsx)(mC,{intent:"high",children:t}):null}var zo=a(E(),1);function FWe(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 DWe({data:e,fields:t,label:r,layout:o,isOpen:n,touched:i,validity:s}){let c=Z5(o.summary,t).filter(f=>FWe(f,o.summary,n)),u=i&&o.isCollapsible,d=c.length>0&&o.withHeader;return(0,zo.jsxs)(se,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,zo.jsx)(Wu.Title,{children:r}),(u||d)&&(0,zo.jsxs)(Nv.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,zo.jsx)($5,{validity:s}),d&&(0,zo.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:c.map(f=>(0,zo.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function LWe({data:e,field:t,form:r,onChange:o,hideLabelFromVision:n,markWhenOptional:i,validity:s,withHeader:l}){if(t.children)return(0,zo.jsxs)(zo.Fragment,{children:[t.description&&(0,zo.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,zo.jsx)(wa,{data:e,form:r,onChange:o,validity:s?.children})]});let c=kb("regular")?.component;return c?(0,zo.jsx)(c,{data:e,field:t,onChange:o,hideLabelFromVision:n||l,markWhenOptional:i,validity:s}):null}function Ipe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,$i.useContext)(Hl),l=t.layout,c=(0,$i.useRef)(null),u=(0,$i.useRef)(!1),d=(0,$i.useMemo)(()=>({layout:Qi,fields:t.children??[]}),[t]),{isOpened:f,isCollapsible:m}=l,[h,g]=(0,$i.useState)(f),[v,b]=(0,$i.useState)(!1);(0,$i.useEffect)(()=>{g(f)},[f]);let _=(0,$i.useCallback)(A=>{A||b(!0),g(A)},[]),y=Mh(c,(m?h:!0)&&v),w=(0,$i.useCallback)(()=>{u.current=!0},[]),S=(0,$i.useCallback)(()=>{if(!u.current||(b(!0),m&&!h))return;let A=y(),P=l_(i);A>0&&P&&(0,Rpe.speak)(P,"polite")},[m,h,y,i]),x=(0,Ape.__experimentalUseFocusOutside)(S),C=t.label,I;if(t.children)I=!!C&&l.withHeader;else{let A=s.find(P=>P.id===t.id);if(!A||!A.Edit)return null;C=A.label,I=!!C&&l.withHeader}let k=(0,zo.jsx)(LWe,{data:e,field:t,form:d,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,withHeader:I}),R=(0,zo.jsx)(DWe,{data:e,fields:s,label:C,layout:l,isOpen:m?!!h:!0,touched:v,validity:i});return I&&m?(0,zo.jsxs)(Nv.Root,{className:"dataforms-layouts-card__field",open:h,onOpenChange:_,...x,children:[(0,zo.jsx)(Nv.Header,{children:R}),(0,zo.jsx)(Nv.Content,{ref:c,onFocus:w,children:k})]}):(0,zo.jsxs)(Wu.Root,{className:"dataforms-layouts-card__field",...x,children:[I&&(0,zo.jsx)(Wu.Header,{children:R}),(0,zo.jsx)(Wu.Content,{ref:c,onFocus:w,children:k})]})}var Ope=a(G(),1);var Zn=a(E(),1);function BWe({title:e}){return(0,Zn.jsx)(se,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,Zn.jsx)(se,{direction:"row",align:"center",children:(0,Zn.jsx)(Ope.__experimentalHeading,{level:2,size:13,children:e})})})}var VWe=({children:e})=>(0,Zn.jsx)(Zn.Fragment,{children:e});function Npe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:Qi,fields:t.children};return(0,Zn.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!o&&t.label&&(0,Zn.jsx)(BWe,{title:t.label}),(0,Zn.jsx)(se,{direction:"row",align:s.alignment,gap:"lg",children:(0,Zn.jsx)(wa,{data:e,form:c,onChange:r,validity:i?.children,as:VWe,children:(u,d,f)=>(0,Zn.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,Zn.jsx)(u,{data:e,field:d,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:f})},d.id)})})]})}let l=kb("regular")?.component;return l?(0,Zn.jsx)(Zn.Fragment,{children:(0,Zn.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,Zn.jsx)(l,{data:e,field:t,onChange:r,markWhenOptional:n,validity:i})})}):null}var es=a(U(),1),Mpe=a(j(),1),Fpe=a(na(),1),Dpe=a(Te(),1);var up=a(E(),1);function Lpe({data:e,field:t,onChange:r,validity:o}){let{fields:n}=(0,es.useContext)(Hl),i=(0,es.useRef)(null),s=(0,es.useRef)(null),l=(0,es.useRef)(!1),[c,u]=(0,es.useState)(!1),[d,f]=(0,es.useState)(!1),m=(0,es.useMemo)(()=>({layout:Qi,fields:t.children??[]}),[t]);(0,es.useEffect)(()=>{let S=i.current;if(!S)return;let x=()=>{let C=S.open;C||u(!0),f(C)};return S.addEventListener("toggle",x),()=>{S.removeEventListener("toggle",x)}},[]);let h=Mh(s,d&&c),g=(0,es.useCallback)(()=>{l.current=!0},[]),v=(0,es.useCallback)(()=>{if(!l.current||(u(!0),!i.current?.open))return;let S=h(),x=l_(o);S>0&&x&&(0,Fpe.speak)(x,"polite")},[h,o]),b=(0,Dpe.__experimentalUseFocusOutside)(v);if(!t.children)return null;let _=t.layout.summary??"",y=_?n.find(S=>S.id===_):void 0,w;return y&&y.render?w=(0,up.jsx)(y.render,{item:e,field:y}):w=t.label||(0,Mpe.__)("More details"),(0,up.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",...b,children:[(0,up.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,up.jsxs)(se,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[w,c&&(0,up.jsx)($5,{validity:o})]})}),(0,up.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onFocus:g,children:(0,up.jsx)(wa,{data:e,form:m,onChange:r,validity:o?.children})})]})}var Rb=a(E(),1),jWe=[{type:"regular",component:lpe,wrapper:({children:e})=>(0,Rb.jsx)(se,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Epe,wrapper:({children:e})=>(0,Rb.jsx)(se,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:Ipe,wrapper:({children:e})=>(0,Rb.jsx)(se,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:Npe,wrapper:({children:e,layout:t})=>(0,Rb.jsx)(se,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Rb.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Rb.jsx)(se,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:Lpe}];function kb(e){return jWe.find(t=>t.type===e)}var eN=a(E(),1),zWe=({children:e})=>(0,eN.jsx)(se,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function wa({data:e,form:t,onChange:r,validity:o,children:n,as:i}){let{fields:s}=(0,tN.useContext)(Hl),l=(0,tN.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??kb(t.layout.type)?.wrapper??zWe;return(0,eN.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=kb(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,eN.jsx)(f,{data:e,field:d,onChange:r,markWhenOptional:l,validity:o?.[d.id]},d.id)})})}var JU=a(E(),1);function NT({data:e,form:t,fields:r,onChange:o,validity:n}){let i=(0,QU.useMemo)(()=>G5(t),[t]),s=(0,QU.useMemo)(()=>ap(r),[r]);return t.fields?(0,JU.jsx)(ipe,{fields:s,children:(0,JU.jsx)(wa,{data:e,form:i,onChange:o,validity:n})}):null}var Vpe=a(dw(),1),jpe=a(Ya(),1);function Bpe(e=""){return(0,Vpe.default)(e.trim().toLowerCase())}var HWe=[];function $U(e,t,r){if(!e)return{data:HWe,paginationInfo:{totalItems:0,totalPages:0}};let o=ap(r),n=[...e];if(t.search){let u=Bpe(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=>Bpe(String(g)).includes(u))}))}t.filters&&t.filters?.length>0&&t.filters.forEach(u=>{let d=o.find(f=>f.id===u.field);if(d){u.operator===Yn&&(0,jpe.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 rN={};hae(rN,{RichTextControl:A5});var oN=a(G(),1);var zpe=a(j(),1);var dp=a(E(),1);function Hpe({form:e,header:t}){let{media:r,fields:o,onChange:n}=kw();if(!r||!n)return(0,dp.jsx)("div",{className:"media-editor-form media-editor-form--loading",children:(0,dp.jsx)(oN.Spinner,{})});let i=["title","alt_text","caption","description"],s=[...o.filter(u=>i.includes(u.id)),...o.filter(u=>!i.includes(u.id))],l={layout:{type:"panel"},fields:s.map(u=>i.includes(u.id)?{id:u.id,layout:{type:"regular",labelPosition:"top"}}:u.id)},c=e||l;return(0,dp.jsx)("div",{className:"media-editor-form",children:(0,dp.jsxs)(oN.__experimentalVStack,{spacing:4,children:[(0,dp.jsx)(Gt,{render:(0,dp.jsx)("h2",{}),children:(0,zpe.__)("Media details")}),t,(0,dp.jsx)(NT,{data:r,fields:o,form:c,onChange:n})]})})}var Upe=a(yf(),1),{lock:Wpe,unlock:iWt}=(0,Upe.__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 nN=a(K(),1);var Gpe={isOpen:!1,id:null,onUpdate:null,onClose:null};function Ype(e=Gpe,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 Gpe}return e}var eW={};Yr(eW,{closeMediaEditorModal:()=>WWe,openMediaEditorModal:()=>UWe});function UWe({id:e,onUpdate:t,onClose:r}){return{type:"OPEN_MEDIA_EDITOR_MODAL",id:e,onUpdate:t??null,onClose:r??null}}function WWe(){return{type:"CLOSE_MEDIA_EDITOR_MODAL"}}var tW={};Yr(tW,{getId:()=>YWe,getOnClose:()=>KWe,getOnUpdate:()=>qWe,isOpen:()=>GWe});function GWe(e){return e.isOpen}function YWe(e){return e.id}function qWe(e){return e.onUpdate}function KWe(e){return e.onClose}var qpe="core/media-editor";var c_=(0,nN.createReduxStore)(qpe,{reducer:Ype,actions:eW,selectors:tW});(0,nN.register)(c_);var Xhe=a(G(),1),QT=a(K(),1),XT=a(j(),1),Qhe=a(_a(),1),Jhe=a(It(),1);var ts=a(G(),1);var Khe=a(Te(),1),ZT=a(K(),1),bW=a(ae(),1),hn=a(U(),1),Jn=a(j(),1);var Zc=a(Mo(),1),VN=a(It(),1);var sW={};Yr(sW,{ActionItem:()=>Wl,ComplementaryArea:()=>Yl,ComplementaryAreaMoreMenuItem:()=>Bh,FullscreenMode:()=>mme,InterfaceSkeleton:()=>Ob,PinnedItems:()=>Vh,store:()=>je});var Gl=a(G(),1),LT=a(K(),1),mN=a(j(),1);var Sd=a(U(),1),nW=a(Xpe(),1),ume=a(Dt(),1),jh=a(Te(),1),dme=a(Dh(),1);var rme=a(G(),1),lN=a(K(),1),ome=a(Dh(),1);var aN=a(K(),1);var rW={};Yr(rW,{closeModal:()=>nGe,disableComplementaryArea:()=>QWe,enableComplementaryArea:()=>XWe,openModal:()=>oGe,pinItem:()=>JWe,setDefaultComplementaryArea:()=>ZWe,setFeatureDefaults:()=>rGe,setFeatureValue:()=>tGe,toggleFeature:()=>eGe,unpinItem:()=>$We});var sN=a(Ya(),1),Ul=a(Dt(),1);var iN=a(Ya(),1);function _d(e){return["core/edit-post","core/edit-site"].includes(e)?((0,iN.default)(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function Ab(e,t){return e==="core"&&t==="edit-site/template"?((0,iN.default)("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):e==="core"&&t==="edit-site/block-inspector"?((0,iN.default)("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}var ZWe=(e,t)=>(e=_d(e),t=Ab(e,t),{type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),XWe=(e,t)=>({registry:r,dispatch:o})=>{if(!t)return;e=_d(e),t=Ab(e,t),r.select(Ul.store).get(e,"isComplementaryAreaVisible")||r.dispatch(Ul.store).set(e,"isComplementaryAreaVisible",!0),o({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},QWe=e=>({registry:t})=>{e=_d(e),t.select(Ul.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(Ul.store).set(e,"isComplementaryAreaVisible",!1)},JWe=(e,t)=>({registry:r})=>{if(!t)return;e=_d(e),t=Ab(e,t);let o=r.select(Ul.store).get(e,"pinnedItems");o?.[t]!==!0&&r.dispatch(Ul.store).set(e,"pinnedItems",{...o,[t]:!0})},$We=(e,t)=>({registry:r})=>{if(!t)return;e=_d(e),t=Ab(e,t);let o=r.select(Ul.store).get(e,"pinnedItems");r.dispatch(Ul.store).set(e,"pinnedItems",{...o,[t]:!1})};function eGe(e,t){return function({registry:r}){(0,sN.default)("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),r.dispatch(Ul.store).toggle(e,t)}}function tGe(e,t,r){return function({registry:o}){(0,sN.default)("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),o.dispatch(Ul.store).set(e,t,!!r)}}function rGe(e,t){return function({registry:r}){(0,sN.default)("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),r.dispatch(Ul.store).setDefaults(e,t)}}function oGe(e){return{type:"OPEN_MODAL",name:e}}function nGe(){return{type:"CLOSE_MODAL"}}var oW={};Yr(oW,{getActiveComplementaryArea:()=>iGe,isComplementaryAreaLoading:()=>sGe,isFeatureActive:()=>lGe,isItemPinned:()=>aGe,isModalActive:()=>cGe});var MT=a(K(),1),Jpe=a(Ya(),1),FT=a(Dt(),1);var iGe=(0,MT.createRegistrySelector)(e=>(t,r)=>{r=_d(r);let o=e(FT.store).get(r,"isComplementaryAreaVisible");if(o!==void 0)return o===!1?null:t?.complementaryAreas?.[r]}),sGe=(0,MT.createRegistrySelector)(e=>(t,r)=>{r=_d(r);let o=e(FT.store).get(r,"isComplementaryAreaVisible"),n=t?.complementaryAreas?.[r];return o&&n===void 0}),aGe=(0,MT.createRegistrySelector)(e=>(t,r,o)=>(r=_d(r),o=Ab(r,o),e(FT.store).get(r,"pinnedItems")?.[o]??!0)),lGe=(0,MT.createRegistrySelector)(e=>(t,r,o)=>((0,Jpe.default)("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(FT.store).get(r,o)));function cGe(e,t){return e.activeModal===t}var $pe=a(K(),1);function uGe(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 dGe(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}var eme=(0,$pe.combineReducers)({complementaryAreas:uGe,activeModal:dGe});var tme="core/interface";var je=(0,aN.createReduxStore)(tme,{reducer:eme,actions:rW,selectors:oW});(0,aN.register)(je);var nme=a(E(),1);function fGe(e){return["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(e)}function u_({as:e=rme.Button,scope:t,identifier:r,icon:o,selectedIcon:n,name:i,shortcut:s,...l}){let c=e,u=(0,ome.usePluginContext)(),d=o||u.icon,f=r||`${u.name}/${i}`,m=(0,lN.useSelect)(v=>v(je).getActiveComplementaryArea(t)===f,[f,t]),{enableComplementaryArea:h,disableComplementaryArea:g}=(0,lN.useDispatch)(je);return(0,nme.jsx)(c,{icon:n&&m?n:d,"aria-controls":f.replace("/",":"),"aria-checked":fGe(l.role)?m:void 0,onClick:()=>{m?g(t):h(t,f)},shortcut:s,...l})}var cN=a(E(),1),pGe=({children:e,className:t,toggleButtonProps:r})=>{let o=(0,cN.jsx)(u_,{icon:Mi,...r});return(0,cN.jsxs)("div",{className:J("components-panel__header","interface-complementary-area-header",t),tabIndex:-1,children:[e,o]})},ime=pGe;var lme=a(G(),1);var Lh=a(G(),1),uN=a(U(),1),DT=a(E(),1),sme=()=>{};function mGe({name:e,as:t=Lh.MenuGroup,fillProps:r={},bubblesVirtually:o,...n}){return(0,DT.jsx)(Lh.Slot,{name:e,bubblesVirtually:o,fillProps:r,children:i=>{if(!uN.Children.toArray(i).length)return null;let s=[];uN.Children.forEach(i,({props:{__unstableExplicitMenuItem:c,__unstableTarget:u}})=>{u&&c&&s.push(u)});let l=uN.Children.map(i,c=>!c.props.__unstableExplicitMenuItem&&s.includes(c.props.__unstableTarget)?null:c);return(0,DT.jsx)(t,{...n,children:l})}})}function ame({name:e,as:t=Lh.Button,onClick:r,...o}){return(0,DT.jsx)(Lh.Fill,{name:e,children:({onClick:n})=>(0,DT.jsx)(t,{onClick:r||n?(...i)=>{(r||sme)(...i),(n||sme)(...i)}:void 0,...o})})}ame.Slot=mGe;var Wl=ame;var dN=a(E(),1),hGe=({__unstableExplicitMenuItem:e,__unstableTarget:t,...r})=>(0,dN.jsx)(lme.MenuItem,{...r});function Bh({scope:e,target:t,__unstableExplicitMenuItem:r,...o}){return(0,dN.jsx)(u_,{as:n=>(0,dN.jsx)(Wl,{__unstableExplicitMenuItem:r,__unstableTarget:`${e}/${t}`,as:hGe,name:`${e}/plugin-more-menu`,...n}),role:"menuitemcheckbox",selectedIcon:Oo,name:t,scope:e,...o})}var pN=a(G(),1),fN=a(E(),1);function cme({scope:e,...t}){return(0,fN.jsx)(pN.Fill,{name:`PinnedItems/${e}`,...t})}function gGe({scope:e,className:t,...r}){return(0,fN.jsx)(pN.Slot,{name:`PinnedItems/${e}`,...r,children:o=>o?.length>0&&(0,fN.jsx)("div",{className:J(t,"interface-pinned-items"),children:o})})}cme.Slot=gGe;var Vh=cme;var pn=a(E(),1),vGe=.3;function bGe({scope:e,...t}){return(0,pn.jsx)(Gl.Slot,{name:`ComplementaryArea/${e}`,...t})}var fme=280,yGe={open:{width:fme},closed:{width:0},mobileOpen:{width:"100vw"}};function wGe({activeArea:e,isActive:t,scope:r,children:o,className:n,id:i}){let s=(0,jh.useReducedMotion)(),l=(0,jh.useViewportMatch)("medium","<"),c=(0,jh.usePrevious)(e),u=(0,jh.usePrevious)(t),[,d]=(0,Sd.useState)({});(0,Sd.useEffect)(()=>{d({})},[t]);let f={type:"tween",duration:s||l||c&&e&&e!==c?0:vGe,ease:[.6,0,.4,1]};return(0,pn.jsx)(Gl.Fill,{name:`ComplementaryArea/${r}`,children:(0,pn.jsx)(Gl.__unstableAnimatePresence,{initial:!1,children:(u||t)&&(0,pn.jsx)(Gl.__unstableMotion.div,{variants:yGe,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":fme},children:o})})})})}function _Ge(e,t,r,o,n){let i=(0,Sd.useRef)(!1),s=(0,Sd.useRef)(!1),{enableComplementaryArea:l,disableComplementaryArea:c}=(0,LT.useDispatch)(je);(0,Sd.useEffect)(()=>{o&&n&&!i.current?(c(e),s.current=!0):s.current&&!n&&i.current?(s.current=!1,l(e,t)):s.current&&r&&r!==t&&(s.current=!1),n!==i.current&&(i.current=n)},[o,n,e,t,r,c,l])}function pme({children:e,className:t,closeLabel:r=(0,mN.__)("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,dme.usePluginContext)(),v=s||g.icon,b=o||`${g.name}/${d}`,[_,y]=(0,Sd.useState)(!1),{isLoading:w,isActive:S,isPinned:x,activeArea:C,isSmall:I,isLarge:k,showIconLabels:R}=(0,LT.useSelect)(F=>{let{getActiveComplementaryArea:V,isComplementaryAreaLoading:z,isItemPinned:D}=F(je),{get:O}=F(ume.store),L=V(u);return{isLoading:z(u),isActive:L===b,isPinned:D(u,b),activeArea:L,isSmall:F(nW.store).isViewportMatch("< medium"),isLarge:F(nW.store).isViewportMatch("large"),showIconLabels:O("core","showIconLabels")}},[b,u]),A=(0,jh.useViewportMatch)("medium","<");_Ge(u,b,C,S,I);let{enableComplementaryArea:P,disableComplementaryArea:T,pinItem:M,unpinItem:B}=(0,LT.useDispatch)(je);if((0,Sd.useEffect)(()=>{h&&C===void 0&&!I?P(u,b):C===void 0&&I&&T(u,b),y(!0)},[C,h,u,b,I,P,T]),!!_)return(0,pn.jsxs)(pn.Fragment,{children:[l&&(0,pn.jsx)(Vh,{scope:u,children:x&&(0,pn.jsx)(u_,{scope:u,identifier:b,isPressed:S&&(!R||k),"aria-expanded":S,"aria-disabled":w,label:f,icon:R?Oo:v,showTooltip:!R,variant:R?"tertiary":void 0,size:"compact",shortcut:m})}),d&&l&&(0,pn.jsx)(Bh,{target:d,scope:u,icon:v,identifier:b,children:f}),(0,pn.jsxs)(wGe,{activeArea:C,isActive:S,className:J("interface-complementary-area",t),scope:u,id:b.replace("/",":"),children:[(0,pn.jsx)(ime,{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&&!A&&(0,pn.jsx)(Gl.Button,{className:"interface-complementary-area__pin-unpin-item",icon:x?d8:c8,label:x?(0,mN.__)("Unpin from toolbar"):(0,mN.__)("Pin to toolbar"),onClick:()=>(x?B:M)(u,b),isPressed:x,"aria-expanded":x,size:"compact"})]})}),(0,pn.jsx)(Gl.Panel,{className:c,children:e})]})]})}pme.Slot=bGe;var Yl=pme;var iW=a(U(),1),SGe=({isActive:e})=>((0,iW.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,iW.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),mme=SGe;var hme=a(U(),1),gme=a(E(),1),vme=(0,hme.forwardRef)(({children:e,className:t,ariaLabel:r,as:o="div",...n},i)=>(0,gme.jsx)(o,{ref:i,className:J("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...n,children:e}));vme.displayName="NavigableRegion";var zh=vme;var hN=a(U(),1),Ib=a(G(),1),Hh=a(j(),1),d_=a(Te(),1),Fs=a(E(),1),yme=.25,bme={type:"tween",duration:yme,ease:[.6,0,.4,1]};function xGe(e){(0,hN.useEffect)(()=>{let t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}var CGe={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...bme,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...bme,delay:.8,delayChildren:.8}}};function TGe({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,d_.useResizeObserver)(),h=(0,d_.useViewportMatch)("medium","<"),v={type:"tween",duration:(0,d_.useReducedMotion)()?0:yme,ease:[.6,0,.4,1]};xGe("interface-interface-skeleton__html-container");let _={...{header:(0,Hh._x)("Header","header landmark area"),body:(0,Hh.__)("Content"),secondarySidebar:(0,Hh.__)("Block Library"),sidebar:(0,Hh._x)("Settings","settings landmark area"),actions:(0,Hh.__)("Publish"),footer:(0,Hh.__)("Footer")},...c};return(0,Fs.jsxs)("div",{ref:d,className:J(u,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,Fs.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,Fs.jsx)(Ib.__unstableAnimatePresence,{initial:!1,children:!!r&&(0,Fs.jsx)(zh,{as:Ib.__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:CGe,transition:v,children:r})}),e&&(0,Fs.jsx)("div",{className:"interface-interface-skeleton__header",children:o}),(0,Fs.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,Fs.jsx)(Ib.__unstableAnimatePresence,{initial:!1,children:!!i&&(0,Fs.jsx)(zh,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:_.secondarySidebar,as:Ib.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:m.width},closed:{width:0}},transition:v,children:(0,Fs.jsxs)(Ib.__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,Fs.jsx)(zh,{className:"interface-interface-skeleton__content",ariaLabel:_.body,children:s}),!!n&&(0,Fs.jsx)(zh,{className:"interface-interface-skeleton__sidebar",ariaLabel:_.sidebar,children:n}),!!l&&(0,Fs.jsx)(zh,{className:"interface-interface-skeleton__actions",ariaLabel:_.actions,children:l})]})]}),!!t&&(0,Fs.jsx)(zh,{className:"interface-interface-skeleton__footer",ariaLabel:_.footer,children:t})]})}var Ob=(0,hN.forwardRef)(TGe);var kd=a(U(),1),khe=a(G(),1),Rhe=a(j(),1);var xd=a(j(),1),fp=1,BT=.1,al=10,aW=16,_me=44,Sme=.8,xme=8,gN=1,Cme=.0025,VT=.01,vN=10,jT=45,EGe={x:0,y:0,width:1,height:1},PGe={horizontal:!1,vertical:!1},wme={x:0,y:0},f_={image:null,pan:{...wme},zoom:fp,rotation:0,basePan:{...wme},baseZoom:fp,baseRotation:0,flip:{...PGe},cropRect:{...EGe}},zT=-1,HT=[{label:(0,xd.__)("Free"),value:0},{label:(0,xd.__)("Original"),value:zT},{label:(0,xd.__)("Square (1:1)"),value:1},{label:(0,xd.__)("Landscape (16:9)"),value:16/9},{label:(0,xd.__)("Portrait (9:16)"),value:9/16},{label:(0,xd.__)("Classic (4:3)"),value:4/3},{label:(0,xd.__)("Classic portrait (3:4)"),value:3/4},{label:(0,xd.__)("Photo (3:2)"),value:3/2},{label:(0,xd.__)("Photo portrait (2:3)"),value:2/3}];var Cd=1e-6,Td=typeof Float32Array<"u"?Float32Array:Array,Tme=Math.random;function lW(e){return e>=0?Math.round(e):e%.5===0?Math.floor(e):Math.round(e)}var lGt=Math.PI/180,cGt=180/Math.PI;var Xr={};Yr(Xr,{add:()=>WGe,clone:()=>RGe,copy:()=>AGe,create:()=>kGe,determinant:()=>FGe,equals:()=>KGe,exactEquals:()=>qGe,frob:()=>UGe,fromRotation:()=>VGe,fromScaling:()=>jGe,fromTranslation:()=>zGe,fromValues:()=>OGe,identity:()=>IGe,invert:()=>MGe,mul:()=>ZGe,multiply:()=>Pme,multiplyScalar:()=>GGe,multiplyScalarAndAdd:()=>YGe,rotate:()=>DGe,scale:()=>LGe,set:()=>NGe,str:()=>HGe,sub:()=>XGe,subtract:()=>kme,translate:()=>BGe});function kGe(){var e=new Td(6);return Td!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function RGe(e){var t=new Td(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function AGe(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 IGe(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function OGe(e,t,r,o,n,i){var s=new Td(6);return s[0]=e,s[1]=t,s[2]=r,s[3]=o,s[4]=n,s[5]=i,s}function NGe(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 MGe(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 FGe(e){return e[0]*e[3]-e[1]*e[2]}function Pme(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 DGe(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 LGe(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 BGe(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 VGe(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 jGe(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 zGe(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 HGe(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function UGe(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 WGe(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 kme(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 GGe(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 YGe(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 qGe(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 KGe(e,t){var r=e[0],o=e[1],n=e[2],i=e[3],s=e[4],l=e[5],c=t[0],u=t[1],d=t[2],f=t[3],m=t[4],h=t[5];return Math.abs(r-c)<=Cd*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(o-u)<=Cd*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(n-d)<=Cd*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-f)<=Cd*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(s-m)<=Cd*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(l-h)<=Cd*Math.max(1,Math.abs(l),Math.abs(h))}var ZGe=Pme,XGe=kme;var Ds={};Yr(Ds,{add:()=>tYe,angle:()=>_Ye,ceil:()=>rYe,clone:()=>QGe,copy:()=>$Ge,create:()=>Rme,cross:()=>pYe,dist:()=>IYe,distance:()=>Nme,div:()=>AYe,divide:()=>Ome,dot:()=>fYe,equals:()=>EYe,exactEquals:()=>TYe,floor:()=>oYe,forEach:()=>MYe,fromValues:()=>JGe,inverse:()=>uYe,len:()=>PYe,length:()=>Fme,lerp:()=>mYe,max:()=>iYe,min:()=>nYe,mul:()=>RYe,multiply:()=>Ime,negate:()=>cYe,normalize:()=>dYe,random:()=>hYe,rotate:()=>wYe,round:()=>sYe,scale:()=>aYe,scaleAndAdd:()=>lYe,set:()=>eYe,signedAngle:()=>SYe,sqrDist:()=>OYe,sqrLen:()=>NYe,squaredDistance:()=>Mme,squaredLength:()=>Dme,str:()=>CYe,sub:()=>kYe,subtract:()=>Ame,transformMat2:()=>gYe,transformMat2d:()=>vYe,transformMat3:()=>bYe,transformMat4:()=>yYe,zero:()=>xYe});function Rme(){var e=new Td(2);return Td!=Float32Array&&(e[0]=0,e[1]=0),e}function QGe(e){var t=new Td(2);return t[0]=e[0],t[1]=e[1],t}function JGe(e,t){var r=new Td(2);return r[0]=e,r[1]=t,r}function $Ge(e,t){return e[0]=t[0],e[1]=t[1],e}function eYe(e,t,r){return e[0]=t,e[1]=r,e}function tYe(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function Ame(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function Ime(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function Ome(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function rYe(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function oYe(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function nYe(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function iYe(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function sYe(e,t){return e[0]=lW(t[0]),e[1]=lW(t[1]),e}function aYe(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function lYe(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e}function Nme(e,t){var r=t[0]-e[0],o=t[1]-e[1];return Math.sqrt(r*r+o*o)}function Mme(e,t){var r=t[0]-e[0],o=t[1]-e[1];return r*r+o*o}function Fme(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function Dme(e){var t=e[0],r=e[1];return t*t+r*r}function cYe(e,t){return e[0]=-t[0],e[1]=-t[1],e}function uYe(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function dYe(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 fYe(e,t){return e[0]*t[0]+e[1]*t[1]}function pYe(e,t,r){var o=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=o,e}function mYe(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 hYe(e,t){t=t===void 0?1:t;var r=Tme()*2*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function gYe(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 vYe(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 bYe(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 yYe(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 wYe(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 _Ye(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 SYe(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 xYe(e){return e[0]=0,e[1]=0,e}function CYe(e){return"vec2("+e[0]+", "+e[1]+")"}function TYe(e,t){return e[0]===t[0]&&e[1]===t[1]}function EYe(e,t){var r=e[0],o=e[1],n=t[0],i=t[1];return Math.abs(r-n)<=Cd*Math.max(1,Math.abs(r),Math.abs(n))&&Math.abs(o-i)<=Cd*Math.max(1,Math.abs(o),Math.abs(i))}var PYe=Fme,kYe=Ame,RYe=Ime,AYe=Ome,IYe=Nme,OYe=Mme,NYe=Dme,MYe=(function(){var e=Rme();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 p_(e){return e>=0?e%360:(360+e%360)%360}function Yc(e){return e*Math.PI/180}var bN=1e6;function Xn(e,t){return!Number.isFinite(e)||Math.abs(e)>bN?t:e}function yN(e){return Number.isFinite(e)&&Math.abs(e)<=bN}function mn(e){return Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>=Number.EPSILON&&e.height>=Number.EPSILON&&e.width<=bN&&e.height<=bN}function wN(e){let t=Xn(e.x,0),r=Xn(e.y,0),o=Xn(e.width,0),n=Xn(e.height,0);return t===e.x&&r===e.y&&o===e.width&&n===e.height?e:{x:t,y:r,width:o,height:n}}function Sa(e){let t=Xn(e.pan.x,0),r=Xn(e.pan.y,0),o=Xn(e.basePan.x,0),n=Xn(e.basePan.y,0),i=Xn(e.rotation,0),s=Xn(e.baseRotation,0),l=Xn(e.zoom,1),c=l>=Number.EPSILON?l:1,u=Xn(e.baseZoom,1),d=u>=Number.EPSILON?u:1,f=wN(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 gGt=Xr.create(),vGt=Ds.create();function Qn(e,t,r){if(!yN(e)||!yN(t)||!yN(r)||e<=0||t<=0)return{width:0,height:0};let o=Yc(r),n=Math.abs(Math.cos(o)),i=Math.abs(Math.sin(o));return{width:n*e+i*t,height:i*e+n*t}}function Lme(e,t,r){if(!mn(e)||!mn(t))return{elementSize:{width:0,height:0},visualSize:{width:0,height:0}};let o=Xn(r,0),n=Math.round(o/90)*90,i=Qn(t.width,t.height,n);if(i.width===0||i.height===0)return{elementSize:{width:0,height:0},visualSize:{width:0,height:0}};let s=Math.min(e.width/i.width,e.height/i.height),l=t.width*s,c=t.height*s,u=Qn(l,c,n);return{elementSize:{width:l,height:c},visualSize:u}}function Bme(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 Uh(e,t,r){let o=Xr.create();if(!mn(t)||!mn(r))return o;let n=Sa(e),i=Math.round(n.rotation/90)*90,s=Qn(r.width,r.height,i);if(s.width===0||s.height===0)return o;let l=Math.min(t.width/s.width,t.height/s.height),c=r.width*l,u=r.height*l,{width:d,height:f}=Qn(c,u,i);return Xr.translate(o,o,[t.width/2,t.height/2]),Xr.translate(o,o,[n.pan.x*d,n.pan.y*f]),Xr.scale(o,o,[n.flip.horizontal?-1:1,n.flip.vertical?-1:1]),Xr.rotate(o,o,Yc(n.rotation)),Xr.scale(o,o,[n.zoom,n.zoom]),Xr.translate(o,o,[-c/2,-u/2]),Xr.scale(o,o,[c,u]),o}function FYe(e,t){let r=t.map(l=>{let c=Ds.create();return Ds.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 UT(e){return FYe(e,[[0,0],[1,0],[1,1],[0,1]])}function Vme(e,t,r){let o=Xr.create();if(!mn(t)||!mn(r))return o;let{rotation:n,flip:i,cropRect:s,zoom:l,pan:c}=Sa(e),u=Math.round(n/90)*90,{width:d,height:f}=Qn(t.width,t.height,u),m=s.width*d,h=s.height*f,g=m>0?r.width/m:1,v=h>0?r.height/h:1,b=s.x*d+r.width/2/g,_=s.y*f+r.height/2/v,y=d/2+c.x*d,w=f/2+c.y*f;return Xr.scale(o,o,[g,v]),Xr.translate(o,o,[y-b+r.width/2/g,w-_+r.height/2/v]),Xr.scale(o,o,[i.horizontal?-1:1,i.vertical?-1:1]),Xr.rotate(o,o,Yc(n)),Xr.scale(o,o,[l,l]),Xr.translate(o,o,[-t.width/2,-t.height/2]),o}var jme=.92;function DYe(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 LYe(e,t){let{naturalWidth:r,naturalHeight:o}=e,{rotation:n,cropRect:i}=t,s={width:r,height:o},l=Math.round(n/90)*90,c=Qn(r,o,l),u=Math.round(i.width*c.width),d=Math.round(i.height*c.height),f=document.createElement("canvas");f.width=u,f.height=d;let m=f.getContext("2d");if(!m)throw new Error("Could not obtain a 2D context for the export canvas.");let h=Vme(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 BYe(e,t="image/png",r=jme){return new Promise((o,n)=>{e.toBlob(i=>{i?o(i):n(new Error("Canvas toBlob returned null."))},t,r)})}async function _N(e,t,r="image/png",o=jme){let n=await DYe(e),i=LYe(n,t);return BYe(i,r,o)}var pp=1e-9;function SN(e,t){let r=Yc(e),o=Math.abs(Math.cos(r)),n=Math.abs(Math.sin(r)),i=Qn(t,1,e);return{visualW:i.width,visualH:i.height,absC:o,absS:n}}function Wme(e,t,r){let o=Math.max(t,Number.EPSILON),n=Math.round(e/90)*90,{visualW:i,visualH:s}=SN(n,o),{absC:l,absS:c}=SN(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 m_(e){if(!e.image)return fp;let t={width:e.image.naturalWidth,height:e.image.naturalHeight};if(!mn(t))return fp;let r=Sa(e),o=t.width/t.height;return Math.max(BT,Wme(r.rotation,o,r.cropRect))}function Gme(e,t,r){if(!mn(t)||!mn(r))return{minX:0,minY:0,maxX:1,maxY:1};let o=Sa(e),n=o.pan.x*r.width,i=o.pan.y*r.height,s=Yc(o.rotation),l=Math.cos(s),c=Math.sin(s),u=o.flip.horizontal?-1:1,d=o.flip.vertical?-1:1,f=o.zoom,m=u*l*f,h=d*c*f,g=-u*c*f,v=d*l*f,b=t.width/2,_=t.height/2,y=[[-b,-_],[b,-_],[b,_],[-b,_]],w=1/0,S=-1/0,x=1/0,C=-1/0;for(let[I,k]of y){let R=m*I+g*k+n,A=h*I+v*k+i,P=R/r.width+.5,T=A/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 Yme(e,t,r,o){let n=wN(e),i=Xn(t,1),s=i>=Number.EPSILON?i:1,l=Xn(r,0),c=Xn(o,1),u=Math.max(c,Number.EPSILON),d=Math.round(l/90)*90,{visualW:f,visualH:m}=SN(d,u),{absC:h,absS:g}=SN(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,I=1;if(w>0&&(I=Math.min(I,x/w)),S>0&&(I=Math.min(I,C/S)),I>=1-pp)return n;let k=v*I,R=b*I,A=n.x+v/2,P=n.y+b/2,T=A-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 zme={width:1e3,height:1e3},Hme=Xr.create(),Ume=Ds.create();function Ls(e,t,r){let o=Sa(e),n=wN(r),i=mn(t)?t.width/t.height:1,s=Math.max(BT,Wme(o.rotation,i,n)),l=Math.min(al,Math.max(o.zoom,s)),c={...o,zoom:l},u=Uh(c,zme,t),d=Math.round(o.rotation/90)*90,f=Uh({...c,pan:{x:0,y:0},zoom:1,rotation:d},zme,t),m=UT(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]];Xr.invert(Hme,u);let g=1/0,v=-1/0,b=1/0,_=-1/0;for(let k of h){Ds.transformMat2d(Ume,k,Hme);let R=Ume;R[0]<g&&(g=R[0]),R[0]>v&&(v=R[0]),R[1]<b&&(b=R[1]),R[1]>_&&(_=R[1])}if(g>=-pp&&v<=1+pp&&b>=-pp&&_<=1+pp)return{pan:o.pan,zoom:l};let y=0,w=0;g<0&&v<=1+pp?y=-g:v>1&&g>=-pp?y=1-v:g<0&&v>1&&(y=(1-v-g)/2),b<0&&_<=1+pp?w=-b:_>1&&b>=-pp?w=1-_:b<0&&_>1&&(w=(1-_-b)/2);let S=u[0]*y+u[2]*w,x=u[1]*y+u[3]*w,C=o.pan.x-(m.width>0?S/m.width:0),I=o.pan.y-(m.height>0?x/m.height:0);return{pan:{x:C,y:I},zoom:l}}var VYe=1e-6;function Wh(e,t){return Math.abs(e-t)<VYe}function h_(e,t){let r=e.image,o=t.image;return r?.src===o?.src&&r?.naturalWidth===o?.naturalWidth&&r?.naturalHeight===o?.naturalHeight&&Wh(e.pan.x,t.pan.x)&&Wh(e.pan.y,t.pan.y)&&Wh(e.zoom,t.zoom)&&Wh(e.rotation,t.rotation)&&e.flip.horizontal===t.flip.horizontal&&e.flip.vertical===t.flip.vertical&&Wh(e.cropRect.x,t.cropRect.x)&&Wh(e.cropRect.y,t.cropRect.y)&&Wh(e.cropRect.width,t.cropRect.width)&&Wh(e.cropRect.height,t.cropRect.height)}function qme(e,t){return e.image?Math.min(al,Math.max(BT,t)):Math.min(al,Math.max(fp,t))}function jYe(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:p_(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 xa(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}=Ls(e,t,e.cropRect),i=Yme(e.cropRect,n,e.rotation,r),s=o;return i!==e.cropRect&&({pan:s}=Ls({...e,zoom:n,cropRect:i},t,i)),s.x===e.pan.x&&s.y===e.pan.y&&n===e.zoom&&i===e.cropRect?e:{...e,pan:s,zoom:n,cropRect:i}}function mp(e){return e.basePan.x===e.pan.x&&e.basePan.y===e.pan.y&&e.baseZoom===e.zoom&&e.baseRotation===e.rotation?e:{...e,basePan:{x:e.pan.x,y:e.pan.y},baseZoom:e.zoom,baseRotation:e.rotation}}function Nb(e,t){switch(t.type){case"SET_IMAGE":return mp(xa({...e,image:t.payload}));case"SET_PAN":return mp(xa({...e,pan:t.payload}));case"SET_ZOOM":{let r=qme(e,t.payload);return mp(xa({...e,zoom:r}))}case"SET_ZOOM_AT_POINT":{let r=qme(e,t.payload.zoom);return mp(xa({...e,zoom:r,pan:t.payload.pan}))}case"SET_ROTATION":{let r=p_(t.payload),o=e.flip.horizontal!==e.flip.vertical,n=Yc(r-e.baseRotation),i=Math.cos(n),s=Math.sin(n)*(o?-1:1),l=e.cropRect.x+e.cropRect.width/2,c=e.cropRect.y+e.cropRect.height/2,u=l-.5,d=c-.5,f=e.basePan.x-u,m=e.basePan.y-d;return xa({...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=p_(e.rotation+n*90),s=e.cropRect,l=s.x+s.width/2,c=s.y+s.height/2,u=r===1?-e.pan.y:e.pan.y,d=r===1?e.pan.x:-e.pan.x;return mp(xa({...e,rotation:i,zoom:e.baseZoom,pan:{x:u,y:d},cropRect:{x:l-s.height/2,y:c-s.width/2,width:s.height,height:s.width}}))}case"SET_FLIP":{let r=e.flip,o=t.payload,n=r.horizontal!==o.horizontal,i=r.vertical!==o.vertical,s=e.cropRect;return mp(xa({...e,flip:o,pan:{x:n?-e.pan.x:e.pan.x,y:i?-e.pan.y:e.pan.y},cropRect:{x:n?1-s.x-s.width:s.x,y:i?1-s.y-s.height:s.y,width:s.width,height:s.height}}))}case"SET_CROP_RECT":return mp(xa({...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 mp(xa({...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 Nb(e,jYe(e,t.payload));case"RESET":return mp(xa({...f_,image:e.image,...t.payload}))}}function Kme(e,t){let r=Math.min(al,Math.max(m_(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}=Ls({...e,zoom:r,pan:{x:l,y:c}},u,e.cropRect);return{type:"SET_ZOOM_AT_POINT",payload:{zoom:r,pan:d}}}function xN(e,t){return{setPan:r=>e({type:"SET_PAN",payload:r}),setZoom:r=>{let o=Kme(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),dW=a(j(),1);function Mb(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 Zme(e){return e<=0?aW:Math.max(aW,_me/e)}var cW={width:.05,height:.05};function CN(e,t,r,o,n,i=cW){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 uW(e,t,r,o,n,i,s=cW,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 A=g>0?m:m-y,P=v>0?h:h-w;return{x:A,y:P,width:y,height:w}}function Xme(e,t,r,o,n,i=cW){let s=e.startRect,l=s.width*o.width;if(s.height*o.height<=0||l<=0)return CN(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 uW(e,t,r,o,n,u,i);let f=CN(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 I=d==="n"?s.y+s.height-y:s.y;return{x:S-w/2,y:I,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 Qr=a(U(),1);var Qme=300,zYe=30,HYe=200;function hp(e){return e.image?{width:e.image.naturalWidth,height:e.image.naturalHeight}:{width:1,height:1}}function TN(e,t){let r=e.clientX-t.clientX,o=e.clientY-t.clientY;return Math.sqrt(r*r+o*o)}var Jme=class{options;isDragging=!1;isZooming=!1;drag=null;touch=null;touchCleanup=null;pointerCleanup=null;lastTap=null;zoomTimer;wheelGestureTimer;wheelGestureActive=!1;rafId=0;constructor(e){this.options=e}get minZoom(){return this.options.minZoom??fp}get maxZoom(){return this.options.maxZoom??al}get zoomSpeed(){return this.options.zoomSpeed??Cme}get keyboardStep(){return this.options.keyboardStep??VT}getKeyboardStep(e){return e.shiftKey?this.keyboardStep*vN: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}=Ls({...d,pan:{x:c.startPanX+g,y:c.startPanY+v}},hp(d),d.cropRect);this.options.actions.setPan(b)})},i=()=>{t.removeEventListener("pointermove",n),t.removeEventListener("pointerup",s),t.removeEventListener("lostpointercapture",s)},s=()=>{this.setStatus({isDragging:!1}),this.options.onGestureEnd?.(),this.drag=null,cancelAnimationFrame(this.rafId),i(),this.pointerCleanup=null};t.addEventListener("pointermove",n),t.addEventListener("pointerup",s),t.addEventListener("lostpointercapture",s),this.pointerCleanup=i}handleWheel(e){if(e.preventDefault(),this.drag)return;this.wheelGestureActive||(this.wheelGestureActive=!0,this.options.onGestureStart?.()),clearTimeout(this.wheelGestureTimer),this.wheelGestureTimer=setTimeout(()=>{this.wheelGestureActive=!1,this.options.onGestureEnd?.()},Qme);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}=Ls({...t,zoom:o,pan:{x:g,y:v}},hp(t),t.cropRect);this.options.actions.setZoomAtPoint(o,b)}else this.options.actions.setZoom(o)}handleTouchStart(e,t,r=document){if(this.touch&&e.touches.length===2){let n=this.options.getState(),i=TN(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=TN(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=TN(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=TN(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:I}=Ls({...r,zoom:u,pan:{x,y:C}},hp(r),r.cropRect);this.options.actions.setZoomAtPoint(u,I)}else u!==r.zoom&&this.options.actions.setZoom(u)}else if(e.touches.length===1&&!t.didPinch){t.moved||(t.moved=!0,this.setStatus({isDragging:!0}));let o=this.options.getImageSize(),n=this.options.getContainerSize(),i=o??n,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}=Ls({...r,pan:{x:t.startPanX+s,y:t.startPanY+l}},hp(r),r.cropRect);this.options.actions.setPan(c)}}))};tryDoubleTap(e,t,r,o){let n=Date.now(),i=this.lastTap;if(!i)return this.lastTap={time:n,x:t,y:r},!1;let s=n-i.time,l=Math.sqrt((t-i.x)**2+(r-i.y)**2);if(!(s<Qme&&l<zYe))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})},HYe),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}=Ls({...u,zoom:m,pan:{x:w,y:S}},hp(u),u.cropRect);this.options.actions.setZoomAtPoint(m,x)}else this.options.actions.setZoom(m);return this.options.onGestureEnd?.(),!0}handleKeyDown(e){let t=this.options.getState();switch(e.key){case"ArrowUp":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Ls({...t,pan:{x:t.pan.x,y:t.pan.y+r}},hp(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowDown":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Ls({...t,pan:{x:t.pan.x,y:t.pan.y-r}},hp(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowLeft":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Ls({...t,pan:{x:t.pan.x+r,y:t.pan.y}},hp(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowRight":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Ls({...t,pan:{x:t.pan.x-r,y:t.pan.y}},hp(t),t.cropRect);this.options.actions.setPan(o);break}case"+":case"=":{e.preventDefault();let r=Math.min(this.maxZoom,Math.max(this.minZoom,t.zoom+.5));this.options.actions.setZoom(r);break}case"-":case"_":{e.preventDefault();let r=Math.min(this.maxZoom,Math.max(this.minZoom,t.zoom-.5));this.options.actions.setZoom(r);break}case"r":case"R":{if(e.metaKey||e.ctrlKey||e.altKey)break;e.preventDefault(),this.options.actions.snapRotate90(e.shiftKey?-1:1);break}case"h":case"H":{if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)break;e.preventDefault(),this.options.actions.toggleFlip?.("horizontal");break}case"v":case"V":{if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)break;e.preventDefault(),this.options.actions.toggleFlip?.("vertical");break}}}destroy(){cancelAnimationFrame(this.rafId),clearTimeout(this.zoomTimer),clearTimeout(this.wheelGestureTimer),this.touchCleanup?.(),this.touchCleanup=null,this.pointerCleanup?.(),this.pointerCleanup=null,this.drag=null,this.touch=null,this.lastTap=null}};var UYe=300;function WYe(e){switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":return!0;default:return!1}}function GYe(e){switch(e.key){case"+":case"=":case"-":case"_":return!0;default:return!1}}function $me(e,t,r,o,n){let[i,s]=(0,Qr.useState)(!1),[l,c]=(0,Qr.useState)(!1),[u,d]=(0,Qr.useState)(!1),[f,m]=(0,Qr.useState)(!1),h=(0,Qr.useRef)(),g=(0,Qr.useRef)(!1),v=(0,Qr.useRef)(e);v.current=e;let b=(0,Qr.useRef)(r);b.current=r;let _=(0,Qr.useRef)(o);_.current=o;let y=(0,Qr.useRef)(n);y.current=n;let w=(0,Qr.useRef)(t);w.current=t;let S=(0,Qr.useRef)(null),x=(0,Qr.useCallback)(()=>{d(!0)},[]),C=(0,Qr.useCallback)(()=>{d(!1)},[]),I=(0,Qr.useCallback)(()=>{g.current||(g.current=!0,y.current?.onGestureStart?.()),clearTimeout(h.current),h.current=setTimeout(()=>{g.current=!1,m(!1),y.current?.onGestureEnd?.()},UYe)},[]);(0,Qr.useEffect)(()=>()=>{clearTimeout(h.current)},[]),(0,Qr.useEffect)(()=>{let T=new Jme({getState:()=>v.current,actions:{setPan:M=>w.current.setPan(M),setZoom:M=>w.current.setZoom(M),setZoomAtPoint:(M,B)=>w.current.setZoomAtPoint(M,B),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,Qr.useCallback)(T=>{let M=T.currentTarget;S.current?.handlePointerDown(T.nativeEvent,M)},[]),R=(0,Qr.useCallback)(T=>{let M=T.currentTarget,B=M.getBoundingClientRect();S.current?.handleTouchStart(T.nativeEvent,B,M.ownerDocument)},[]),A=(0,Qr.useCallback)(T=>{WYe(T.nativeEvent)?(m(!0),I()):GYe(T.nativeEvent)&&I(),S.current?.handleKeyDown(T.nativeEvent)},[I]),P=(0,Qr.useCallback)(T=>{S.current?.handleWheel(T)},[]);return{handlers:{onPointerDown:k,onTouchStart:R,onKeyDown:A},onWheelNative:P,isDragging:i,isZooming:l,isPlacementActive:u||f||l}}var the=a(U(),1);var YYe="matrix(1, 0, 0, 1, 0, 0)";function ehe(e,t){if(!mn(t))return YYe;let r=Sa(e),o=r.pan.x*t.width,n=r.pan.y*t.height,i=Yc(r.rotation),s=Math.cos(i),l=Math.sin(i),c=r.flip.horizontal?-1:1,u=r.flip.vertical?-1:1,d=r.zoom,f=c*s*d,m=u*l*d,h=-c*l*d,g=u*s*d;return`matrix(${f}, ${m}, ${h}, ${g}, ${o}, ${n})`}function rhe(e,t){return(0,the.useMemo)(()=>ehe(e,t),[e,t])}var she=a(na(),1),gp=a(U(),1),Bs=a(j(),1);function Fb(e,t){let r=Sa(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=Uh(r,o,t),i=Xr.create();Xr.invert(i,n);let s=Uh({...r,pan:{x:0,y:0},zoom:1},o,t),l=UT(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=Ds.create();Ds.transformMat2d(f,[u,d],i);let m=Math.round(r.rotation/90)*90,{width:h,height:g}=Qn(t.width,t.height,m),v=c.width*h/r.zoom,b=c.height*g/r.zoom;return{x:f[0]*t.width-v/2,y:f[1]*t.height-b/2,width:v,height:b,rotation:r.rotation,flip:{...r.flip},zoom:r.zoom}}function qYe(e,t,r){if(!mn(t)||r.width<=0||r.height<=0)return null;let o=Sa(e),n={width:1e3,height:1e3},i=Uh({...o,pan:{x:0,y:0},zoom:1},n,t),s=UT(i);if(s.width<=0||s.height<=0)return null;let l=Ds.fromValues((r.x+r.width/2)/t.width,(r.y+r.height/2)/t.height),c=Ds.create(),u=Uh(o,n,t);Ds.transformMat2d(c,l,u);let d=Math.round(o.rotation/90)*90,{width:f,height:m}=Qn(t.width,t.height,d);if(f<=0||m<=0)return null;let h=r.width*o.zoom/f,g=r.height*o.zoom/m,v=(c[0]-s.left)/s.width,b=(c[1]-s.top)/s.height;return{x:v-h/2,y:b-g/2,width:h,height:g}}var KYe=1e-6;function ZYe(e){let t=p_(e),r=Math.round(t/90)*90;return Math.abs(t-r)<KYe}function ohe(e,t,r,o){let n=Sa(e);return ZYe(n.rotation)?ihe(n,t,r,{left:o.includes("w"),top:o.includes("n"),right:o.includes("e"),bottom:o.includes("s")}):r}function nhe(e,t,r){return ihe(e,t,r,{left:!0,top:!0,right:!0,bottom:!0})}function ihe(e,t,r,o){if(!mn(t))return r;let n=Sa({...e,cropRect:r}),i=Fb(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=qYe(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 XYe=300;function QYe(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,Bs.__)("Flipped horizontally and vertically"):r?(0,Bs.__)("Flipped horizontally"):o?(0,Bs.__)("Flipped vertically"):(0,Bs.__)("Flip removed")}function JYe(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,Bs.__)("Rotation 0 degrees"):void 0:n>0?(0,Bs.sprintf)((0,Bs.__)("Rotated %d degrees clockwise"),n):(0,Bs.sprintf)((0,Bs.__)("Rotated %d degrees counterclockwise"),Math.abs(n))}function $Ye(e,t){if(!e.image)return;let r={width:e.image.naturalWidth,height:e.image.naturalHeight},o=Fb(e,r);if(t?.image){let n=Fb({...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,Bs.sprintf)((0,Bs.__)("Crop %1$d by %2$d pixels"),Math.round(o.width),Math.round(o.height))}function eqe(e,t){if(!(t&&Math.round(t.zoom*100)===Math.round(e.zoom*100)))return(0,Bs.sprintf)((0,Bs.__)("Zoom %d%%"),Math.round(e.zoom*100))}function tqe(e,t){let r=QYe(e,t);return r||[JYe(e,t),eqe(e,t),$Ye(e,t)].filter(n=>n!==void 0).join(", ")}function ahe(e){let t=(0,gp.useRef)(),r=(0,gp.useRef)(""),o=(0,gp.useRef)(null),n=(0,gp.useRef)(e);(0,gp.useLayoutEffect)(()=>{n.current=e},[e]),(0,gp.useEffect)(()=>(clearTimeout(t.current),t.current=setTimeout(()=>{let i=n.current,s=tqe(i,o.current);o.current=i,s!==r.current&&(r.current=s,(0,she.speak)(s))},XYe),()=>{clearTimeout(t.current)}),[e.zoom,e.rotation,e.cropRect.width,e.cropRect.height,e.flip.horizontal,e.flip.vertical])}var An=a(U(),1),Ed=a(j(),1);var EN={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0};var g_=a(E(),1),rqe=["nw","ne","se","sw"],oqe=["nw","n","ne","e","se","s","sw","w"];function nqe(e){switch(e){case"n":return(0,Ed.__)("Resize from top edge");case"s":return(0,Ed.__)("Resize from bottom edge");case"e":return(0,Ed.__)("Resize from right edge");case"w":return(0,Ed.__)("Resize from left edge");case"nw":return(0,Ed.__)("Resize from top-left corner");case"ne":return(0,Ed.__)("Resize from top-right corner");case"sw":return(0,Ed.__)("Resize from bottom-left corner");case"se":return(0,Ed.__)("Resize from bottom-right corner")}}var iqe=500;function lhe({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)(),I=!!(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),A=(0,An.useMemo)(()=>!I||r.width===0?0:s*r.height/r.width,[s,I,r.width,r.height]),P=(t.width-r.width)/2,T=(t.height-r.height)/2,M=P+e.x*r.width,B=T+e.y*r.height,F=e.width*r.width,V=e.height*r.height,z=(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 ue=Q.currentTarget.ownerDocument;ue.activeElement instanceof HTMLElement&&ue.activeElement.blur();let te=Q.currentTarget;te.setPointerCapture(Q.pointerId);let de={handle:Z,startX:Q.clientX,startY:Q.clientY,startRect:{...e}},pe=0,$=Q.clientX,ee=Q.clientY,fe=Q.shiftKey,ve=ie=>{let le=ie;$=le.clientX,ee=le.clientY,fe=le.shiftKey,!pe&&(pe=requestAnimationFrame(()=>{pe=0;let Oe=R.current;if(!Oe)return;let ke;Oe.hasLockedRatio?ke=Oe.computeLockedRect(de,$,ee):fe?ke=Oe.computeShiftLockedRect(de,$,ee):(ke=Oe.computeFreeRect(de,$,ee),ke=Oe.snapCropRect?.(ke,de.handle)??ke),Oe.onCropChange(ke)}))},we=!1,oe=(ie=!0,le=!0)=>{we||(we=!0,pe&&(cancelAnimationFrame(pe),pe=0),te.removeEventListener("pointermove",ve),te.removeEventListener("pointerup",ce),te.removeEventListener("lostpointercapture",ce),k.current=null,ie&&R.current?.onResizeEnd?.(),le&&te.focus({preventScroll:!0}))},re=(ie=!0)=>oe(ie,!1),ce=()=>oe();te.addEventListener("pointermove",ve),te.addEventListener("pointerup",ce),te.addEventListener("lostpointercapture",ce),k.current={cancel:re},n?.(Z),clearTimeout(S.current),x.current=!1},[e,c,n]),D=(0,An.useCallback)((Z,Q,ue)=>CN(Z,Q,ue,r,w,m),[r,w,m]),O=(0,An.useCallback)((Z,Q,ue,te)=>uW(Z,Q,ue,r,w,A,m,te),[r,w,A,m]),L=(0,An.useCallback)((Z,Q,ue)=>Xme(Z,Q,ue,r,w,m),[r,w,m]);R.current={hasLockedRatio:I,computeLockedRect:O,computeFreeRect:D,computeShiftLockedRect:L,onCropChange:o,onResizeEnd:i,snapCropRect:h};let W=(0,An.useCallback)((Z,Q)=>{let ue=Q.key;if(c)return;if(ue==="Escape"){Q.preventDefault(),Q.stopPropagation(),f?.();return}if(ue!=="ArrowUp"&&ue!=="ArrowDown"&&ue!=="ArrowLeft"&&ue!=="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?.()},iqe)},de=Q.shiftKey?vN:1,pe=g?.width??VT,$=g?.height??VT,ee=pe*de,fe=$*de,ve=0,we=0;ue==="ArrowLeft"&&(ve=-ee),ue==="ArrowRight"&&(ve=ee),ue==="ArrowUp"&&(we=-fe),ue==="ArrowDown"&&(we=fe);let oe=ve!==0?"width":"height";if(I){let re={handle:Z,startX:0,startY:0,startRect:{...e}},ce=ve*r.width,ie=we*r.height;o(O(re,ce,ie,oe)),te()}else{let re={handle:Z,startX:0,startY:0,startRect:{...e}},ce=ve*r.width,ie=we*r.height,le=D(re,ce,ie);o(h?.(le,Z)??le),te()}},[e,I,r.width,r.height,O,D,o,n,i,f,g,h,c]);if(t.width===0||t.height===0)return null;let q=I?rqe:oqe;return(0,g_.jsxs)("div",{className:"wp-media-editor-image-editor__stencil","data-testid":"cropper-stencil",style:{left:M,top:B,width:F,height:V,transition:u},children:[l&&(0,g_.jsx)("div",{id:C,style:EN,children:(0,Ed.__)("Use arrow keys to resize the crop area. Hold Shift for larger steps.")}),(0,g_.jsx)("div",{className:"wp-media-editor-image-editor__stencil-rect",style:{width:"100%",height:"100%",top:0,left:0}}),l&&q.map(Z=>(0,g_.jsx)("button",{type:"button",className:`wp-media-editor-image-editor__handle wp-media-editor-image-editor__handle--${Z}`,onPointerDown:Q=>z(Z,Q),onTouchStart:Q=>{Q.touches.length<2&&Q.stopPropagation()},onKeyDown:Q=>W(Z,Q),"aria-label":nqe(Z),"aria-describedby":C},Z))]})}var che=a(E(),1);function uhe({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,che.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 Db=a(E(),1);function dhe({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,Db.jsxs)("div",{className:"wp-media-editor-image-editor__grid","data-testid":"cropper-grid",style:{left:i,top:s,width:l,height:c},children:[(0,Db.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d}}),(0,Db.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d*2}}),(0,Db.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u}}),(0,Db.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u*2}})]})}var v_=a(U(),1),ghe=a(E(),1),PN=12,fhe={before:"-100%",center:"-50%",after:"0"},phe={before:-1,center:0,after:1},sqe={before:"after",center:"center",after:"before"};function aqe(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 mhe(e,t,r){return e==="before"?t-PN-r:e==="after"?t+PN:t-r/2}function hhe(e,t,r,o){let n=c=>{let u=mhe(c,t,r);return u>=0&&u+r<=o};if(n(e))return e;let i=sqe[e];if(i!==e&&n(i))return i;if(e!=="center"&&n("center"))return"center";let s=c=>{let u=mhe(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 vhe({cropRect:e,containerSize:t,imageSize:r,activeHandle:o,outputWidth:n,outputHeight:i}){let s=(0,v_.useRef)(null),[l,c]=(0,v_.useState)(null);if((0,v_.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 _=aqe(o),y=l?{x:hhe(_.x,v,l.width,t.width),y:hhe(_.y,b,l.height,t.height)}:_;return(0,ghe.jsx)("div",{ref:s,className:"wp-media-editor-image-editor__dimensions-tooltip","data-testid":"cropper-dimensions-tooltip",style:{left:v+phe[y.x]*PN,top:b+phe[y.y]*PN,transform:`translate(${fhe[y.x]}, ${fhe[y.y]})`},"aria-hidden":"true",children:`W: ${Math.round(n)}px H: ${Math.round(i)}px`})}var kN=a(U(),1);var Gh=a(U(),1);var b_={zoom:1,pan:{x:0,y:0}};function bhe(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===b_.zoom&&e.pan.x===b_.pan.x&&e.pan.y===b_.pan.y?e:b_}}function yhe(){let[e,t]=(0,Gh.useReducer)(bhe,b_),r=(0,Gh.useCallback)(i=>{t({type:"SET_VIEWPORT_ZOOM",payload:i})},[]),o=(0,Gh.useCallback)(i=>{t({type:"SET_VIEWPORT_PAN",payload:i})},[]),n=(0,Gh.useCallback)(()=>{t({type:"RESET_VIEWPORT"})},[]);return(0,Gh.useMemo)(()=>({viewport:e,setViewportZoom:r,setViewportPan:o,resetViewport:n}),[e,r,o,n])}var whe=a(E(),1),_he=(0,kN.createContext)(null);function She({children:e}){let t=yhe();return(0,whe.jsx)(_he.Provider,{value:t,children:e})}function xhe(){let e=(0,kN.useContext)(_he);if(!e)throw new Error("useViewport must be used within a ViewportProvider.");return e}var ll=a(E(),1),ql=1e-6,lqe=1e-6,y_=200,cqe=y_+100,Che=`transform ${y_}ms ease-out`,uqe=[`left ${y_}ms ease-out`,`top ${y_}ms ease-out`,`width ${y_}ms ease-out`,`height ${y_}ms ease-out`].join(", ");function dqe({src:e,controller:t,stencil:r=lhe,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:I}=t,{viewport:k,setViewportPan:R,resetViewport:A}=xhe(),P=(0,Qe.useRef)(null),T=(0,Qe.useId)(),[M,B]=(0,Qe.useState)(f),[F,V]=(0,Qe.useState)(!1),[z,D]=(0,Qe.useState)({width:0,height:0});(0,Qe.useLayoutEffect)(()=>{f&&P.current?.focus({preventScroll:!0})},[f]);let O=(0,Qe.useCallback)(Ce=>{let it=Ce.target;it===Ce.currentTarget&&B(!0),Ce.relatedTarget!==null&&it.matches(":focus-visible")&&V(!0)},[]),L=(0,Qe.useCallback)(Ce=>{Ce.target===Ce.currentTarget&&B(!1),Ce.currentTarget.contains(Ce.relatedTarget)||V(!1)},[]);(0,Qe.useEffect)(()=>{let Ce=P.current;if(!Ce)return;let it=new ResizeObserver(ht=>{for(let bt of ht){let{width:Rr,height:Gr}=bt.contentRect;D(oo=>oo.width===Rr&&oo.height===Gr?oo:{width:Rr,height:Gr})}});return it.observe(Ce),()=>{it.disconnect()}},[]),(0,Qe.useEffect)(()=>{h?.(y)},[y,h]),ahe(y);let W=y.image?.naturalWidth??0,q=y.image?.naturalHeight??0,{elementSize:Z,visualSize:Q}=(0,Qe.useMemo)(()=>Lme(z,{width:W,height:q},y.rotation),[z,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 Ce=Mb(u,Q),it=y.cropRect;Math.abs(it.x-Ce.x)<ql&&Math.abs(it.y-Ce.y)<ql&&Math.abs(it.width-Ce.width)<ql&&Math.abs(it.height-Ce.height)<ql||I(Ce)},[d,u,Q,I,y.cropRect]);let ue=(0,Qe.useRef)(u);(0,Qe.useEffect)(()=>{if(ue.current===u||(ue.current=u,!d||Q.width===0||Q.height===0||!u||u<=0))return;let Ce=Mb(u,Q),it=y.cropRect;Math.abs(it.x-Ce.x)<ql&&Math.abs(it.y-Ce.y)<ql&&Math.abs(it.width-Ce.width)<ql&&Math.abs(it.height-Ce.height)<ql||I(Ce)},[u,d,Q,I,y.cropRect]);let te=(0,Qe.useMemo)(()=>{if(!(!y.image||Z.width===0))return Gme(y,Z,Q)},[y,Z,Q]),de=l!==void 0?l:m_(y),[pe,$]=(0,Qe.useState)(!1),ee=(0,Qe.useRef)(!1),fe=(0,Qe.useRef)(!1),[ve,we]=(0,Qe.useState)(!1),oe=(0,Qe.useRef)(!1),re=(0,Qe.useCallback)(Ce=>{oe.current=Ce,we(Ce)},[]),[ce,ie]=(0,Qe.useState)(null),le=(0,Qe.useMemo)(()=>Bme(y.cropRect,z,Q,Sme,xme),[y.cropRect,z,Q]),[Oe,ke]=(0,Qe.useState)(1),Me=pe?Oe:le,Ne=(0,Qe.useMemo)(()=>({width:Q.width*Me,height:Q.height*Me}),[Q.width,Q.height,Me]),Fe=W>0?Z.width/W*y.zoom*Me:0,X=(0,Qe.useMemo)(()=>{if(Fe<gN||u&&u>0||W<=0||q<=0)return;let Ce=Math.round(y.rotation/90)*90;if(Math.abs(y.rotation-Ce)>=lqe)return;let it=Qn(W,q,Ce);if(!(it.width<=0||it.height<=0))return{width:y.zoom/it.width,height:y.zoom/it.height}},[Fe,u,W,q,y.rotation,y.zoom]),ge=(0,Qe.useMemo)(()=>{if(W<=0||q<=0)return;let Ce=Math.round(y.rotation/90)*90,it=Qn(W,q,Ce),ht=Zme(Fe);return{width:Math.min(1,ht*y.zoom/it.width),height:Math.min(1,ht*y.zoom/it.height)}},[W,q,y.rotation,y.zoom,Fe]),Ue=(0,Qe.useCallback)((Ce,it)=>Fe<gN||W<=0||q<=0?Ce:ohe(y,{width:W,height:q},Ce,it),[Fe,W,q,y]),Ye=(0,Qe.useRef)(!1);(0,Qe.useEffect)(()=>{let Ce=d&&(!u||u<=0)&&Fe>=gN&&W>0&&q>0,it=Ye.current;if(Ye.current=Ce,!Ce||it)return;let ht=nhe(y,{width:W,height:q},y.cropRect),bt=y.cropRect;Math.abs(bt.x-ht.x)<ql&&Math.abs(bt.y-ht.y)<ql&&Math.abs(bt.width-ht.width)<ql&&Math.abs(bt.height-ht.height)<ql||S(ht)},[u,Fe,d,W,q,S,y]);let{handlers:st,onWheelNative:St,isDragging:dt,isZooming:xt,isPlacementActive:Kt}=$me(y,t,z,Ne,{minZoom:de,maxZoom:c,onGestureStart:g,onGestureEnd:v}),Xe={...st,onPointerDownCapture:()=>{V(!1)},onTouchStartCapture:Ce=>{Ce.touches.length>1&&re(!0)},onTouchMoveCapture:Ce=>{Ce.touches.length>1&&re(!0)},onTouchEndCapture:Ce=>{Ce.touches.length===0&&re(!1)},onTouchCancelCapture:Ce=>{Ce.touches.length===0&&re(!1)},onKeyDownCapture:Ce=>{["Shift","Control","Alt","Meta"].includes(Ce.key)||V(!0)},onPointerDown:Ce=>{if(ee.current||oe.current||Ce.pointerType==="touch"&&Ce.isPrimary===!1){Ce.preventDefault();return}st.onPointerDown?.(Ce),V(!1)}};(0,Qe.useEffect)(()=>{let Ce=P.current;if(!Ce)return;let it=ht=>{if(ee.current||fe.current){ht.preventDefault();return}St(ht)};return Ce.addEventListener("wheel",it,{passive:!1}),()=>{Ce.removeEventListener("wheel",it)}},[St]);let ds=rhe(y,Q),Wa=(0,Qe.useCallback)(Ce=>{let it=Ce.currentTarget,ht={width:it.naturalWidth,height:it.naturalHeight};w({src:e,naturalWidth:ht.width,naturalHeight:ht.height}),m?.(ht)},[e,w,m]),kr=(0,Qe.useCallback)(Ce=>{if(!oe.current&&(S(Ce),ee.current&&Ne.width>0&&Ne.height>0)){let it=(z.width-Ne.width)/2,ht=(z.height-Ne.height)/2,bt=Math.max(0,it+(Ce.x+Ce.width)*Ne.width-z.width),Rr=Math.max(0,-(it+Ce.x*Ne.width)),Gr=Math.max(0,ht+(Ce.y+Ce.height)*Ne.height-z.height),oo=Math.max(0,-(ht+Ce.y*Ne.height));R({x:-bt+Rr,y:-Gr+oo})}},[S,R,z,Ne]),[Ai,sn]=(0,Qe.useState)(!1),vt=(0,Qe.useRef)(),Ft=(0,Qe.useCallback)(()=>{clearTimeout(vt.current),fe.current=!1,sn(!1)},[]);(0,Qe.useEffect)(()=>()=>{clearTimeout(vt.current)},[]);let ne=o==="interactive",xe=ne&&(Kt||pe||n),H=(0,Qe.useMemo)(()=>{if(!s||!ce||!y.image)return null;let Ce=Fb(y,{width:y.image.naturalWidth,height:y.image.naturalHeight});return{width:Ce.width,height:Ce.height}},[s,ce,y]),Pe=(0,Qe.useCallback)(()=>{V(!0),P.current?.focus({preventScroll:!0})},[]),Bt=(0,Qe.useCallback)(Ce=>{oe.current||(ke(le),ee.current=!0,$(!0),ie(Ce??null),Ft(),A(),g?.())},[Ft,g,A,le]),Ee=(0,Qe.useCallback)(()=>{let Ce=oe.current;if(ee.current=!1,$(!1),ie(null),clearTimeout(vt.current),Ce){Ft(),A();return}fe.current=!0,sn(!0),A(),x(),v?.(),vt.current=setTimeout(Ft,cqe)},[Ft,x,v,A]),Ro=(0,Qe.useCallback)(Ce=>{!fe.current||Ce.propertyName!=="transform"||Ft()},[Ft]),Ie;Ai?Ie=Che:xt&&(Ie="transform 150ms linear");let pr=Ai?uqe:void 0,me=(0,Qe.useMemo)(()=>{if(Z.width===0||Z.height===0)return{};let Ce=(z.width-Z.width)/2,it=(z.height-Z.height)/2;return{width:Z.width,height:Z.height,maxWidth:Z.width,maxHeight:Z.height,left:Ce,top:it,transform:`scale(${Me}) ${ds}`,transition:Ie,imageRendering:Fe>1?"pixelated":void 0}},[z,Z,ds,Ie,Fe,Me]),he=Ai?Che:void 0,Js=pe||Ai?"transform":void 0,Wt;k.pan.x!==0||k.pan.y!==0?Wt={transform:`translate(${k.pan.x}px, ${k.pan.y}px)`,transition:he,willChange:Js}:Ai&&(Wt={transform:"translate(0px, 0px)",transition:he,willChange:Js});let He=(0,Qe.useCallback)(Ce=>{typeof _=="function"?_(Ce):_&&(_.current=Ce)},[_]);return(0,ll.jsx)("div",{ref:He,className:J("wp-media-editor-image-editor",dt&&"wp-media-editor-image-editor--dragging",b),children:(0,ll.jsxs)("div",{ref:P,className:J("wp-media-editor-image-editor__canvas",ne&&"wp-media-editor-image-editor__canvas--grid-interactive",xe&&"wp-media-editor-image-editor__canvas--show-grid",Ai&&"wp-media-editor-image-editor__canvas--settling",F&&"wp-media-editor-image-editor__canvas--focus-visible"),tabIndex:0,role:"group","aria-label":(0,dW.__)("Crop area"),"aria-describedby":M?T:void 0,onFocus:O,onBlur:L,...Xe,children:[(0,ll.jsx)("div",{id:T,style:EN,children:(0,dW.__)("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:Wt,onTransitionEnd:Ro,children:[(0,ll.jsx)("img",{className:"wp-media-editor-image-editor__image","data-testid":"cropper-image",src:e,alt:"",onLoad:Wa,style:me,draggable:!1}),i&&(0,ll.jsx)(uhe,{cropRect:y.cropRect,containerSize:z,imageSize:Ne,transition:pr}),(0,ll.jsx)(r,{cropRect:y.cropRect,containerSize:z,imageSize:Ne,onCropChange:kr,onResizeStart:Bt,onResizeEnd:Ee,onEscape:Pe,aspectRatio:u,freeformCrop:d,isResizeDisabled:ve,stencilTransition:pr,cropBounds:te,minCropSize:ge,snapCropRect:Ue,keyboardResizeStep:X}),(o===!0||ne)&&(0,ll.jsx)(dhe,{cropRect:y.cropRect,containerSize:z,imageSize:Ne}),ce&&H&&(0,ll.jsx)(vhe,{cropRect:y.cropRect,containerSize:z,imageSize:Ne,activeHandle:ce,outputWidth:H.width,outputHeight:H.height})]})]})})}var fqe=(0,Qe.forwardRef)(dqe),RN=(0,Qe.forwardRef)((e,t)=>(0,ll.jsx)(She,{children:(0,ll.jsx)(fqe,{...e,ref:t})}));var or=a(U(),1);var AN={aspectRatioValue:"0"};function IN(e,t){switch(t.type){case"CROPPER":{let r=Nb(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=Mb(o,n);return{cropper:Nb(e.cropper,{type:"SET_CROP_RECT",payload:l}),cropOptions:s}}case"RESET_CROP_OPTIONS":return e.cropOptions.aspectRatioValue===AN.aspectRatioValue?e:{...e,cropOptions:{...AN}};case"RESTORE_SNAPSHOT":return t.payload;case"VIEWPORT_ADJUST_CROP_RECT":{let r=Nb(e.cropper,{type:"SET_CROP_RECT",payload:t.payload});return r===e.cropper?e:{...e,cropper:r}}}}function WT(e,t){return e===t?!0:h_(e.cropper,t.cropper)&&e.cropOptions.aspectRatioValue===t.cropOptions.aspectRatioValue}function The(e,t){return{cropper:e,cropOptions:{...AN,...t}}}function w_(e,t){let r=parseFloat(e);if(!(r===0||Number.isNaN(r))){if(r===zT)return t&&t.naturalWidth>0&&t.naturalHeight>0?t.naturalWidth/t.naturalHeight:void 0;if(r>0)return r}}function mqe(e,t){return e?.src===t?.src&&e?.naturalWidth===t?.naturalWidth&&e?.naturalHeight===t?.naturalHeight}function fW(e){let[t,r]=(0,or.useReducer)(IN,null,()=>The(xa({...f_,...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)(z=>{let D=l.current[l.current.length-1];D&&WT(D,z)||(l.current=[...l.current,z],c.current=[],d(!0),m(!1))},[]),b=(0,or.useCallback)((z,D=!0)=>{let O=i.current,L=IN(O,z);D&&(WT(O,L)||(h.current?g.current===null&&(g.current=O):v(O))),i.current=L,r(z)},[v]),_=(0,or.useCallback)(()=>{h.current||(h.current=!0,g.current=null)},[]),y=(0,or.useCallback)(()=>{let z=g.current;z&&!WT(z,i.current)&&v(z),g.current=null,h.current=!1},[v]),w=(0,or.useCallback)(z=>{b({type:"CROPPER",action:z})},[b]),S=(0,or.useMemo)(()=>xN(w,()=>i.current.cropper),[w]),x=(0,or.useCallback)(z=>{if(mqe(i.current.cropper.image,z))return;let D={type:"CROPPER",action:{type:"SET_IMAGE",payload:z}},O=IN(i.current,D);i.current=O,r(D),n(O),h.current=!1,g.current=null,l.current=[],c.current=[],d(!1),m(!1)},[]),C=(0,or.useCallback)(z=>{b({type:"CROPPER",action:{type:"RESET",payload:z}})},[b]),I=(0,or.useCallback)(z=>{let D=w_(z,i.current.cropper.image);b({type:"SET_ASPECT_RATIO_VALUE",payload:{presetKey:z,resolved:D,visualSize:s.current}})},[b]),k=(0,or.useCallback)(()=>{b({type:"RESET_CROP_OPTIONS"})},[b]),R=(0,or.useCallback)(()=>{y();let z=l.current[l.current.length-1];z&&(c.current=[i.current,...c.current],l.current=l.current.slice(0,-1),d(l.current.length>0),m(!0),i.current=z,r({type:"RESTORE_SNAPSHOT",payload:z}))},[y]),A=(0,or.useCallback)(()=>{y();let z=c.current[0];z&&(l.current=[...l.current,i.current],c.current=c.current.slice(1),d(!0),m(c.current.length>0),i.current=z,r({type:"RESTORE_SNAPSHOT",payload:z}))},[y]),P=(0,or.useCallback)(z=>{s.current=z},[]),T=(0,or.useCallback)(z=>{b({type:"VIEWPORT_ADJUST_CROP_RECT",payload:z},!1)},[b]),M=!WT(t,o),B=!h_(t.cropper,o.cropper),F=(0,or.useCallback)((z,D)=>t.cropper.image?_N(t.cropper.image.src,t.cropper,z,D):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:I,resetCropOptions:k,isCropperDirty:B,hasUndo:u,hasRedo:f,undo:R,redo:A,beginGesture:_,endGesture:y,setVisualSize:P,adjustCropRectForViewport:T}),[S,t.cropper,x,C,M,F,t.cropOptions,I,k,B,u,f,R,A,_,y,P,T])}var ON=a(U(),1);var Ehe=a(E(),1),Phe=(0,ON.createContext)(null);function pW({initialCropperState:e,initialCropOptions:t,children:r}){let o=fW({cropper:e,cropOptions:t});return(0,Ehe.jsx)(Phe.Provider,{value:o,children:r})}function Ca(){let e=(0,ON.useContext)(Phe);if(!e)throw new Error("useMediaEditor must be used within a MediaEditorStateProvider.");return e}var Pd=a(E(),1);function Ahe({focusOnMount:e,isPlacementActive:t=!1,onGestureStart:r,onGestureEnd:o}){let{media:n}=kw(),i=Ca(),{aspectRatioValue:s}=i.cropOptions,l=i.state.image,{beginGesture:c,endGesture:u,setImage:d}=i,[f,m]=(0,kd.useState)("loading"),h=(0,kd.useMemo)(()=>w_(s,l),[s,l]),g=(0,kd.useCallback)(()=>{c(),r?.()},[c,r]),v=(0,kd.useCallback)(()=>{u(),o?.()},[u,o]),b=n?.source_url,_=tb(n?.mime_type),y=Number(n?.media_details?.width),w=Number(n?.media_details?.height);(0,kd.useEffect)(()=>{l||!b||!Number.isFinite(y)||!Number.isFinite(w)||y<=0||w<=0||d({src:b,naturalWidth:y,naturalHeight:w})},[l,b,y,w,d]);let S=_.type==="image";return(0,kd.useEffect)(()=>{if(!b||!S)return;m("loading");let x=new window.Image;return x.onload=()=>m("loaded"),x.onerror=()=>m("error"),x.src=b,x.complete&&m(x.naturalWidth>0?"loaded":"error"),()=>{x.onload=null,x.onerror=null}},[b,S]),!b||!S?null:f==="error"?(0,Pd.jsx)("div",{className:"media-editor-canvas",children:(0,Pd.jsx)("div",{className:"media-editor-canvas__error",role:"alert",children:(0,Pd.jsx)("p",{children:(0,Rhe.__)("Failed to load image.")})})}):(0,Pd.jsxs)("div",{className:"media-editor-canvas",children:[f==="loading"&&(0,Pd.jsx)("div",{className:"media-editor-canvas__spinner",children:(0,Pd.jsx)(khe.Spinner,{})}),(0,Pd.jsx)("div",{className:J("media-editor-canvas__cropper",{"is-loaded":f==="loaded"}),children:(0,Pd.jsx)(RN,{src:b,controller:i,aspectRatio:h,freeformCrop:!0,focusOnMount:e&&f==="loaded",showGrid:"interactive",isPlacementActive:t,onGestureStart:g,onGestureEnd:v})})]})}var Dhe=a(j(),1);var qc=a(U(),1);var GT="data-crop-control",hqe=300;function Ihe(e={}){let{commitOnKeyUp:t=!0}=e,{beginGesture:r,endGesture:o}=Ca(),n=(0,qc.useRef)(),i=(0,qc.useCallback)(()=>{clearTimeout(n.current)},[]),s=(0,qc.useCallback)(()=>{i(),n.current=setTimeout(()=>{o()},hqe)},[i,o]);(0,qc.useEffect)(()=>i,[i]);let l=(0,qc.useCallback)(()=>{i(),r()},[r,i]),c=(0,qc.useCallback)(()=>{i(),o()},[i,o]),u=(0,qc.useCallback)(()=>{r(),t||s()},[r,t,s]),d=(0,qc.useCallback)(()=>{if(t){o();return}s()},[t,o,s]);return{[GT]:!0,onPointerDownCapture:l,onPointerUp:c,onPointerCancel:c,onKeyDownCapture:u,onKeyUp:d}}var Lb=a(U(),1);var vp=a(U(),1);function gqe(e,t,r){return-e/t*r}function NN(e,t,r){return e<t?t:e>r?r:e}function vqe(e,t){return Math.round(e/t)*t}function Ohe(e){let{value:t,onChange:r,min:o,max:n,step:i,pixelsPerStep:s,disabled:l,onPointerDownStart:c}=e,u=(0,vp.useRef)({value:t,startX:0,startValue:0,activeStep:i,dragging:!1,captureElement:null,capturePointerId:0,windowPointerUp:null});(0,vp.useEffect)(()=>{u.current.value=t},[t]);let d=(0,vp.useCallback)(()=>{let h=u.current;h.dragging&&(h.dragging=!1,h.captureElement&&h.captureElement.hasPointerCapture(h.capturePointerId)&&h.captureElement.releasePointerCapture(h.capturePointerId),h.captureElement=null,h.windowPointerUp&&(window.removeEventListener("pointerup",h.windowPointerUp),window.removeEventListener("pointercancel",h.windowPointerUp),h.windowPointerUp=null))},[]);(0,vp.useEffect)(()=>d,[d]);let f=(0,vp.useCallback)(h=>{if(l||h.button!==0)return;let g=u.current;h.currentTarget.setPointerCapture(h.pointerId),g.captureElement=h.currentTarget,g.capturePointerId=h.pointerId,g.startX=h.clientX,g.startValue=g.value,g.activeStep=h.shiftKey?i/2:i,g.dragging=!0,c?.();let v=()=>d();g.windowPointerUp=v,window.addEventListener("pointerup",v),window.addEventListener("pointercancel",v)},[l,c,d,i]),m=(0,vp.useCallback)(h=>{let g=u.current;if(!g.dragging)return;let v=h.shiftKey?i/2:i;v!==g.activeStep&&(g.startX=h.clientX,g.startValue=g.value,g.activeStep=v);let b=h.clientX-g.startX,_=gqe(b,s,g.activeStep),y=g.startValue+_,w=vqe(y,g.activeStep),S=NN(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),MN=32,bqe=11,Nhe=15,yqe=4,wqe=8,_qe=14;function Sqe(e,t){return(0,Lb.useMemo)(()=>{let r=[];for(let o=Math.ceil(e);o<=Math.floor(t);o+=1){let n="minor",i=yqe;o%15===0?(n="major",i=_qe):o%5===0&&(n="mid",i=wqe),r.push({value:o,kind:n,height:i})}return r},[e,t])}function Mhe(e){let t=Math.round(e*10)/10;return Number.isInteger(t)?t.toFixed(0):t.toFixed(1)}function Fhe(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,Lb.useRef)(null),h=(0,Lb.useId)(),g=d??h,v=Ohe({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 B=T?1:-1,F=P.shiftKey?i/2:i,V=NN(t+B*F,o,n);V!==t&&r(V)},_=`${Mhe(t)}${l}`,y=Sqe(o,n),w=c/i,S=(0,Lb.useMemo)(()=>({transform:`translateX(calc(-50% + ${-t*w}px))`}),[t,w]),x=Math.round(t/Nhe)*Nhe,I=Math.abs(t-x)<.01?`${x}`:Mhe(t),k=I.startsWith("-"),R=k?I.slice(1):I,A=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(NN(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:MN,viewBox:`${o*w} 0 ${(n-o)*w} ${MN}`,preserveAspectRatio:"xMidYMid meet",children:[y.map(P=>(0,cl.jsx)("line",{x1:P.value*w,x2:P.value*w,y1:MN-P.height,y2:MN,className:`rotation-ruler__tick rotation-ruler__tick--${P.kind}`},P.value)),A.map(P=>(0,cl.jsxs)("text",{x:P.value*w,y:bqe,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 mW=a(E(),1);function Lhe({onPlacementControlInteraction:e}){let{state:t,setRotation:r}=Ca(),o=Ihe({commitOnKeyUp:!1}),n=Math.round(t.rotation/90)*90,s=t.flip.horizontal!==t.flip.vertical?-1:1,l=(t.rotation-n)*s,c=u=>{let f=Math.max(-jT+.01,Math.min(jT-.01,u));e?.(),r(n+f*s)};return(0,mW.jsx)("div",{role:"presentation",className:"media-editor-fine-rotation",...o,children:(0,mW.jsx)(Fhe,{label:(0,Dhe.__)("Fine rotation"),min:-jT,max:jT,value:l,onChange:c})})}var ul=a(G(),1),Vs=a(j(),1);var hW=a(U(),1);function xqe(e){return[...HT.filter(t=>t.value<=0),...e??HT.filter(t=>t.value>0)]}function FN({aspectRatioPresets:e}={}){let t=Ca(),{aspectRatioValue:r}=t.cropOptions,o=t.state.image,n=(0,hW.useMemo)(()=>xqe(e),[e]),i=(0,hW.useMemo)(()=>w_(r,o),[r,o]);return{aspectRatioValue:r,setAspectRatioValue:t.setAspectRatioValue,aspectRatioOptions:n,resolvedAspectRatio:i,resetCropOptions:t.resetCropOptions}}var lr=a(E(),1),Cqe=1.2;function DN({withLabels:e=!1,showAspectRatioControl:t=!1,aspectRatioPresets:r,zoomFactor:o=Cqe}){let{state:n,setFlip:i,snapRotate90:s,setZoom:l}=Ca(),{aspectRatioValue:c,setAspectRatioValue:u,aspectRatioOptions:d}=FN({aspectRatioPresets:r}),f=!e&&t,m=m_(n),h=y=>{l(Math.min(al,Math.max(m,n.zoom*y)))},g=(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(ul.Button,{size:"compact",icon:R1,label:(0,Vs.__)("Rotate 90\xB0 counter-clockwise"),showTooltip:!0,onClick:()=>s(-1)}),(0,lr.jsx)(ul.Button,{size:"compact",icon:A1,label:(0,Vs.__)("Rotate 90\xB0 clockwise"),showTooltip:!0,onClick:()=>s(1)})]}),v=(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(ul.Button,{size:"compact",icon:iV,label:(0,Vs.__)("Flip horizontal"),showTooltip:!0,isPressed:n.flip.horizontal,onClick:()=>i({horizontal:!n.flip.horizontal,vertical:n.flip.vertical})}),(0,lr.jsx)(ul.Button,{size:"compact",icon:aV,label:(0,Vs.__)("Flip vertical"),showTooltip:!0,isPressed:n.flip.vertical,onClick:()=>i({horizontal:n.flip.horizontal,vertical:!n.flip.vertical})})]}),b=(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(ul.Button,{size:"compact",icon:Tc,label:(0,Vs.__)("Zoom in"),showTooltip:!0,disabled:n.zoom>=al,accessibleWhenDisabled:!0,onClick:()=>h(o)}),(0,lr.jsx)(ul.Button,{size:"compact",icon:SV,label:(0,Vs.__)("Zoom out"),showTooltip:!0,disabled:n.zoom<=m,accessibleWhenDisabled:!0,onClick:()=>h(1/o)})]}),_=f?(0,lr.jsx)(ul.DropdownMenu,{icon:uB,label:(0,Vs.__)("Aspect ratio"),popoverProps:{placement:"top"},toggleProps:{size:"compact"},children:({onClose:y})=>(0,lr.jsx)(ul.MenuGroup,{label:(0,Vs.__)("Aspect ratio"),children:d.map(w=>{let S=w.value.toString(),x=S===c;return(0,lr.jsx)(ul.MenuItem,{role:"menuitemradio",isSelected:x,icon:x?Oo:void 0,onClick:()=>{u(S),y()},children:w.label},S)})})}):null;return e?(0,lr.jsxs)("div",{className:"media-editor-image-controls is-stacked",children:[(0,lr.jsxs)("div",{className:"media-editor-image-controls__transforms",children:[(0,lr.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,Vs.__)("Rotate"),children:[(0,lr.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,Vs.__)("Rotate")}),(0,lr.jsx)("div",{className:"media-editor-image-controls__buttons",children:g})]}),(0,lr.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,Vs.__)("Flip"),children:[(0,lr.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,Vs.__)("Flip")}),(0,lr.jsx)("div",{className:"media-editor-image-controls__buttons",children:v})]})]}),(0,lr.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,Vs.__)("Zoom"),children:[(0,lr.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,Vs.__)("Zoom")}),(0,lr.jsx)("div",{className:"media-editor-image-controls__buttons",children:b})]})]}):(0,lr.jsxs)("div",{className:"media-editor-image-controls",children:[g,v,b,_]})}var Bhe=a(G(),1);var gW=a(j(),1);var Bb=a(E(),1);function Vhe({aspectRatioValue:e,onAspectRatioChange:t,aspectRatioOptions:r,showTransformControls:o=!1}){return(0,Bb.jsxs)(se,{direction:"column",gap:"xl",[GT]:!0,children:[(0,Bb.jsx)(Gt,{render:(0,Bb.jsx)("h2",{}),children:(0,gW.__)("Crop options")}),o&&(0,Bb.jsx)(DN,{withLabels:!0}),(0,Bb.jsx)(Bhe.SelectControl,{label:(0,gW.__)("Aspect ratio"),value:e,onChange:t,options:r.map(n=>({label:n.label,value:n.value.toString()}))})]})}var jhe=a(G(),1),zhe=a(U(),1),js=a(j(),1),YT=a(Mo(),1),Kc=a(E(),1),Tqe=[{description:(0,js.__)("Undo"),keyCombination:{modifier:"primary",character:"z"}},{description:(0,js.__)("Redo"),keyCombination:{modifier:"primaryShift",character:"z"}},{description:(0,js.__)("Pan"),keyCombination:{character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,js.__)("Arrow keys")}},{description:(0,js.__)("Zoom in"),keyCombination:{character:"+"}},{description:(0,js.__)("Zoom out"),keyCombination:{character:"-"}},{description:(0,js.__)("Rotate 90\xB0 clockwise"),keyCombination:{character:"R"}},{description:(0,js.__)("Rotate 90\xB0 counter-clockwise"),keyCombination:{modifier:"shift",character:"R"}},{description:(0,js.__)("Flip horizontal"),keyCombination:{character:"H"}},{description:(0,js.__)("Flip vertical"),keyCombination:{character:"V"}},{description:(0,js.__)("Pan or resize crop (large step)"),keyCombination:{modifier:"shift",character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,js.__)("Shift + Arrow keys")}}];function Eqe({keyCombination:e}){let{modifier:t,character:r,ariaLabel:o}=e,n;Array.isArray(r)?t?n=[...YT.displayShortcutList[t](r[0]).slice(0,-1),...r]:n=r:n=t?YT.displayShortcutList[t](r):[r];let i=Array.isArray(r)?r.join(""):r,s;return o?s=o:t?s=YT.shortcutAriaLabel[t](i):s=i,(0,Kc.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-term","aria-label":s,children:n.map((l,c)=>l==="+"&&t?(0,Kc.jsx)(zhe.Fragment,{children:l},c):(0,Kc.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-key",children:l},c))})}function Hhe({onClose:e}){return(0,Kc.jsxs)(jhe.Modal,{className:"media-editor-keyboard-shortcuts-modal",title:(0,js.__)("Keyboard shortcuts"),onRequestClose:e,children:[(0,Kc.jsx)("p",{className:"media-editor-keyboard-shortcuts-modal__note",children:(0,js.__)("These shortcuts work when the image editor has focus.")}),(0,Kc.jsx)("ul",{className:"media-editor-keyboard-shortcuts-modal__shortcut-list",role:"list",children:Tqe.map(({description:t,keyCombination:r},o)=>(0,Kc.jsxs)("li",{className:"media-editor-keyboard-shortcuts-modal__shortcut",children:[(0,Kc.jsx)("span",{className:"media-editor-keyboard-shortcuts-modal__shortcut-description",children:t}),(0,Kc.jsx)(Eqe,{keyCombination:r})]},o))})]})}var Whe=a(Bu(),1),qT=a(K(),1),vW=a(ae(),1),BN=a(U(),1),Vb=a(j(),1),Ghe=a(It(),1);var LN=.1;function Uhe(e,t){let r=[];if(t.width===0||t.height===0)return r;let{cropRect:o,pan:n,zoom:i,flip:s}=e,l=s.horizontal,c=s.vertical;(l||c)&&r.push({type:"flip",args:{flip:{horizontal:l,vertical:c}}});let u=(e.rotation%360+360)%360,f=l!==c?(360-u)%360:u;f!==0&&r.push({type:"rotate",args:{angle:f}});let m=Math.round(e.rotation/90)*90,{width:h,height:g}=Qn(t.width,t.height,m),{width:v,height:b}=Qn(t.width,t.height,e.rotation),_=.5+n.x-i/2,y=.5+n.y-i/2,w=(o.x-_)/i*h,S=(o.y-y)/i*g,x=o.width/i*h,C=o.height/i*g,I=(v-h)/2,k=(b-g)/2,R=w+I,A=S+k,P=R/v*100,T=A/b*100,M=x/v*100,B=C/b*100;return P<=LN&&T<=LN&&M>=100-LN&&B>=100-LN||r.push({type:"crop",args:{left:P,top:T,width:M,height:B}}),r}var Pqe=["title","caption","description","alt_text","post"],KT="media-editor";function kqe(e){return!e.isCropperDirty||!e.state.image?[]:Uhe(e.state,{width:e.state.image.naturalWidth,height:e.state.image.naturalHeight})}function Rqe(e,t){let r={};for(let o of Pqe)e&&o in e&&(r[o]=e[o]);return!("post"in r)&&t?.post!==void 0&&(r.post=t.post),r}function Yhe({cropper:e,id:t,isImage:r,media:o,onSaved:n}){let i=(0,qT.useRegistry)(),{clearEntityRecordEdits:s,receiveEntityRecords:l,saveEditedEntityRecord:c}=(0,qT.useDispatch)(vW.store),{createErrorNotice:u,removeAllNotices:d}=(0,qT.useDispatch)(Ghe.store),[f,m]=(0,BN.useState)(!1),h=(0,BN.useCallback)(async()=>{d("snackbar",KT),m(!0);try{let g,v=kqe(e),b=v.length>0&&o?{id:t,url:o.source_url}:void 0;if(v.length>0){let y=i.select(vW.store).getEntityRecordNonTransientEdits("postType","attachment",t),w=Rqe(y,o);g=await(0,Whe.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,Vb.__)("An unknown error occurred.");u(r?(0,Vb.sprintf)((0,Vb.__)("Could not save image. %s"),v):(0,Vb.sprintf)((0,Vb.__)("Could not save media. %s"),v),{type:"snackbar",context:KT})}finally{m(!1)}},[s,u,e,t,r,o,n,l,i,d,c]);return{isSaving:f,save:h}}var ct=a(E(),1),qhe={_embed:"author,wp:attached-to"},Aqe=300;function Iqe({tabs:e}){return(0,ct.jsx)(Yl,{scope:"media-editor",identifier:"media-editor/details",title:(0,Jn.__)("Details"),icon:Sf,isActiveByDefault:!0,className:"media-editor__sidebar",panelClassName:"media-editor__sidebar-panel",headerClassName:"media-editor__sidebar-header",closeLabel:(0,Jn.__)("Close media panel"),header:(0,ct.jsx)(Cn.List,{variant:"minimal",children:e.map(t=>(0,ct.jsx)(Cn.Tab,{value:t.id,children:t.title},t.id))}),children:e.map(t=>(0,ct.jsx)(Cn.Panel,{value:t.id,tabIndex:-1,children:t.panel},t.id))})}function Oqe({isSaving:e,isImage:t,showCloseButton:r=!1,onCancel:o}){let[n,i]=(0,hn.useState)(!1);return(0,ct.jsxs)(ts.Flex,{className:"media-editor__header-actions",justify:"flex-end",expanded:!1,gap:2,children:[t&&(0,ct.jsx)(ts.Button,{size:"compact",icon:S1,label:(0,Jn.__)("Keyboard shortcuts"),onClick:()=>i(!0)}),(0,ct.jsx)(Vh.Slot,{scope:"media-editor"}),r&&(0,ct.jsx)(ts.Button,{size:"compact",icon:g1,label:(0,Jn.__)("Close"),onClick:o,disabled:e,accessibleWhenDisabled:!0}),n&&(0,ct.jsx)(Hhe,{onClose:()=>i(!1)})]})}function Nqe({isUndoRedoDisabled:e=!1,onReset:t}){let{reset:r,isDirty:o,hasUndo:n,hasRedo:i,undo:s,redo:l,beginGesture:c,endGesture:u}=Ca(),d=()=>{e||s()},f=()=>{e||l()};return(0,ct.jsxs)(ts.Flex,{className:"media-editor__history-actions",expanded:!1,gap:2,children:[(0,ct.jsx)(ts.Button,{size:"compact",variant:"tertiary",disabled:!o,accessibleWhenDisabled:!0,onClick:()=>{c(),r(),t(),u()},children:(0,Jn.__)("Reset")}),(0,ct.jsx)(ts.Button,{size:"compact",icon:hv,label:(0,Jn.__)("Undo"),showTooltip:!0,shortcut:Zc.displayShortcut.primary("z"),disabled:e||!n,accessibleWhenDisabled:!0,onClick:d}),(0,ct.jsx)(ts.Button,{size:"compact",icon:pv,label:(0,Jn.__)("Redo"),showTooltip:!0,shortcut:(0,Zc.isAppleOS)()?Zc.displayShortcut.primaryShift("z"):Zc.displayShortcut.primary("y"),disabled:e||!i,accessibleWhenDisabled:!0,onClick:f})]})}function Mqe({isSaving:e,hasMedia:t,hasChanges:r,onCancel:o,onSave:n}){let i=e||!t||!r;return(0,ct.jsxs)(ts.Flex,{className:"media-editor__footer-actions",justify:"flex-end",expanded:!1,gap:2,children:[(0,ct.jsx)(ts.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:o,disabled:e,accessibleWhenDisabled:!0,children:(0,Jn.__)("Cancel")}),(0,ct.jsx)(ts.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:n,isBusy:e,disabled:i,accessibleWhenDisabled:!0,children:(0,Jn.__)("Save")})]})}function Fqe({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=Ca(),f=(0,Khe.useViewportMatch)("small"),m=f?"wide":"narrow",{media:h,hasEdits:g}=(0,ZT.useSelect)(le=>{let{getEditedEntityRecord:Oe,getEntityRecord:ke,hasEditsForEntityRecord:Me}=le(bW.store);return ke("postType","attachment",t,qhe),{media:Oe("postType","attachment",t),hasEdits:Me("postType","attachment",t)}},[t]),v=d.isCropperDirty||g,{clearEntityRecordEdits:b,editEntityRecord:_,invalidateResolution:y}=(0,ZT.useDispatch)(bW.store),{removeAllNotices:w}=(0,ZT.useDispatch)(VN.store),[S,x]=(0,hn.useState)(!1),[C,I]=(0,hn.useState)(!1),[k,R]=(0,hn.useState)(!1),A=(0,hn.useRef)(),P=(0,hn.useCallback)(()=>{I(!0),clearTimeout(A.current),A.current=setTimeout(()=>{I(!1)},Aqe)},[]),T=(0,hn.useCallback)(()=>{R(!0)},[]),M=(0,hn.useCallback)(()=>{R(!1)},[]),B=C||k;(0,hn.useEffect)(()=>()=>{clearTimeout(A.current)},[]),(0,hn.useEffect)(()=>{I(!1),R(!1)},[t]),(0,hn.useEffect)(()=>{y("getEntityRecord",["postType","attachment",t,qhe])},[t,y]);let F=tb(h?.mime_type).type,V=!!h&&F==="image",{aspectRatioValue:z,setAspectRatioValue:D,aspectRatioOptions:O,resetCropOptions:L}=FN({aspectRatioPresets:r}),{isSaving:W,save:q}=Yhe({cropper:d,id:t,isImage:V,media:h,onSaved:n}),Z=(0,hn.useMemo)(()=>{let le={id:"details",title:(0,Jn.__)("Details"),panel:(0,ct.jsx)(se,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,ct.jsx)(Hpe,{})})};return V?[{id:"crop",title:(0,Jn.__)("Crop"),panel:(0,ct.jsx)(se,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,ct.jsx)(Vhe,{aspectRatioValue:z,onAspectRatioChange:D,aspectRatioOptions:O,showTransformControls:f})})},le]:[le]},[V,z,D,O,f]),[Q,ue]=(0,hn.useState)(),te=Q??Z[0]?.id,de=le=>{_("postType","attachment",t,le)},pe=()=>{w("snackbar",KT),b("postType","attachment",t),o?.()},$=()=>{if(!W){if(v){x(!0);return}pe()}},ee=le=>{let Oe=Zc.isKeyboardEvent.primary(le,"z"),ke=Zc.isKeyboardEvent.primaryShift(le,"z")||!(0,Zc.isAppleOS)()&&Zc.isKeyboardEvent.primary(le,"y");if((Oe||ke)&&V){let Me=le.target;if(!((Me.tagName==="INPUT"||Me.tagName==="TEXTAREA"||Me.isContentEditable)&&!Me.closest(`[${GT}]`))){if(le.preventDefault(),B)return;ke?d.redo():d.undo()}}if(u){if(le.code!=="Escape"&&le.key!=="Escape")return;if(W){le.preventDefault();return}v&&(le.preventDefault(),x(!0))}},fe=(0,ct.jsx)(VN.SnackbarNotices,{className:s,context:KT}),ve=V?(0,ct.jsx)(Lhe,{onPlacementControlInteraction:P}):null,we=(0,ct.jsxs)(Qse,{value:h??void 0,onChange:de,settings:{fields:e},children:[h?(0,ct.jsxs)(Cn.Root,{className:"media-editor",value:te,onValueChange:le=>ue(le),children:[(0,ct.jsx)(Iqe,{tabs:Z}),(0,ct.jsx)(Ob,{className:"media-editor__skeleton",labels:{body:V?(0,Jn.__)("Image editor"):(0,Jn.__)("Media preview"),sidebar:(0,Jn.__)("Media details")},content:(0,ct.jsxs)("div",{className:"media-editor__content",children:[(0,ct.jsx)("div",{className:"media-editor__canvas-area",children:V?(0,ct.jsx)(Ahe,{focusOnMount:!0,isPlacementActive:C,onGestureStart:T,onGestureEnd:M}):(0,ct.jsx)(eae,{})}),V&&(0,ct.jsx)("div",{className:"media-editor__canvas-toolbar",children:ve})]}),sidebar:(0,ct.jsx)(Yl.Slot,{scope:"media-editor"})})]}):(0,ct.jsx)("div",{className:"media-editor",children:(0,ct.jsx)("div",{className:"media-editor__loading",children:(0,ct.jsx)(ts.Spinner,{})})}),(0,ct.jsx)(ts.__experimentalConfirmDialog,{isOpen:S,confirmButtonText:(0,Jn.__)("Discard"),cancelButtonText:(0,Jn.__)("Keep editing"),onCancel:()=>x(!1),onConfirm:()=>{x(!1),pe()},children:(0,Jn.__)("Are you sure you want to discard your unsaved changes?")}),l?(0,hn.createPortal)(fe,l):fe]}),oe=V?(0,ct.jsx)(Nqe,{isUndoRedoDisabled:B,onReset:L}):null,re=V?(0,ct.jsx)(DN,{showAspectRatioControl:!0,aspectRatioPresets:r}):null,ce=(0,ct.jsx)(Mqe,{isSaving:W,hasMedia:!!h,hasChanges:v,onCancel:$,onSave:q}),ie;return m==="wide"?ie=(0,ct.jsxs)(ct.Fragment,{children:[oe,ce]}):ie=(0,ct.jsxs)(ct.Fragment,{children:[re,(0,ct.jsxs)("div",{className:"media-editor-modal__footer-row",children:[oe,ce]})]}),i({children:we,headerActions:(0,ct.jsx)(Oqe,{isSaving:W,isImage:V,showCloseButton:c,onCancel:$}),footerActions:ie,footerLayout:m,onRequestClose:$,onKeyDown:ee,shouldCloseOnClickOutside:!v&&!W,isSaving:W,hasChanges:v,hasMedia:!!h})}function yW(e){return(0,ct.jsx)(pW,{children:(0,ct.jsx)(Fqe,{...e})},e.id)}var Zhe=yW;var __=a(E(),1);function $he({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(c_);return{isModalOpen:m(),id:h(),onUpdate:g(),onClose:v()}},[]),{closeMediaEditorModal:s}=(0,QT.useDispatch)(c_),{createSuccessNotice:l}=(0,QT.useDispatch)(Jhe.store);if(!r||!o)return null;let c=typeof document>"u"?null:document.body,u=f=>{f.stopPropagation()},d=()=>{s(),i?.()};return(0,__.jsx)(Zhe,{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,XT.__)("Image edited."),{type:"snackbar",actions:[{label:(0,XT.__)("Undo"),onClick:()=>{n({id:h.id,url:h.url})}}]})},renderFrame:({children:f,headerActions:m,footerActions:h,footerLayout:g,onRequestClose:v,onKeyDown:b,shouldCloseOnClickOutside:_})=>(0,__.jsx)(Qhe.ShortcutProvider,{className:"media-editor-modal__shortcut-scope",onKeyDown:u,children:(0,__.jsxs)(Xhe.Modal,{className:"media-editor-modal",title:(0,XT.__)("Edit media"),size:"fill",isDismissible:!1,shouldCloseOnClickOutside:_,onKeyDown:b,onRequestClose:v,headerActions:m,children:[f,(0,__.jsx)("div",{className:`media-editor-modal__footer is-${g}`,role:"region","aria-label":(0,XT.__)("Editor actions"),children:h})]})})})}var S_={};Wpe(S_,{store:c_,MediaEditor:yW,MediaEditorModal:$he});var co=a(j(),1),Xc=a(K(),1),jN=a(Vt(),1),qh=a(ae(),1),Yh=(e,t)=>`<a ${wW(e)}>${t}</a>`,wW=e=>`href="${e}" target="_blank" rel="noopener"`,Dqe=(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},Lqe=e=>{let{title:t,foreign_landing_url:r,creator:o,creator_url:n,license:i,license_version:s,license_url:l}=e,c=Dqe(i,s),u=(0,jN.decodeEntities)(o),d;return u?d=t?(0,co.sprintf)((0,co._x)('"%1$s" by %2$s/ %3$s',"caption"),Yh(r,(0,jN.decodeEntities)(t)),n?Yh(n,u):u,l?Yh(`${l}?ref=openverse`,c):c):(0,co.sprintf)((0,co._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),wW(r),n?Yh(n,u):u,l?Yh(`${l}?ref=openverse`,c):c):d=t?(0,co.sprintf)((0,co._x)('"%1$s"/ %2$s',"caption"),Yh(r,(0,jN.decodeEntities)(t)),l?Yh(`${l}?ref=openverse`,c):c):(0,co.sprintf)((0,co._x)("<a %1$s>Work</a>/ %2$s","caption"),wW(r),l?Yh(`${l}?ref=openverse`,c):c),d.replace(/\s{2}/g," ")},_W=(e={})=>({...e,orderBy:e?.search?"relevance":"date"}),Bqe=async(e={})=>{let t=_W(e),r=await(0,Xc.resolveSelect)(qh.store).getEntityRecords("postType","attachment",t),o=(0,Xc.select)(qh.store).getEntityRecordsTotalItems("postType","attachment",t),n=(0,Xc.select)(qh.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}},rge=(e,t={})=>({...t,media_type:"image",parent:e}),Vqe=e=>{let t=typeof e=="number"?e:Number(e);return Number.isInteger(t)&&t>0?t:void 0},ege=(e,t)=>(0,Xc.dispatch)(qh.store).saveEntityRecord("postType","attachment",{id:e,post:t},{throwOnError:!0}),jqe=e=>e?.media_type||e?.mime_type?.split("/")[0]||e?.type,zqe=e=>[...new Set((Array.isArray(e)?e:[e]).filter(t=>jqe(t)==="image").map(t=>t?.id).filter(Boolean))],Hqe=(e,t={})=>{let{invalidateResolution:r}=(0,Xc.dispatch)(qh.store);r("getEntityRecords",["postType","attachment",_W(rge(e,t))])},Uqe=(e,t)=>{let r=()=>(0,Xc.select)(qh.store).hasFinishedResolution("getEntityRecords",e),o=r();return(0,Xc.subscribe)(()=>{let n=r();o&&!n&&t(),o=n},qh.store)},zN=({getQuery:e,...t})=>({...t,async fetch(r={}){return Bqe(e(r))},subscribe(r,o={}){return Uqe(["postType","attachment",_W(e(o))],r)}}),Wqe=(e,t)=>zN({name:"attached-images",labels:{name:(0,co.__)("Attached images"),search_items:(0,co.__)("Search attachments")},mediaType:"image",getQuery:r=>rge(e,r),postTypeLabel:t,emptyMessage:t?(0,co.sprintf)((0,co.__)("No images attached to this %s."),t):(0,co.__)("No images attached to this post."),async attach(r){let o=zqe(r);return await Promise.all(o.map(n=>ege(n,e))),o.length},async detach(r){await ege(r.id,0)},invalidate(r={}){Hqe(e,r)}}),tge=[zN({name:"images",labels:{name:(0,co.__)("Images"),search_items:(0,co.__)("Search images")},mediaType:"image",getQuery:e=>({...e,media_type:"image"})}),zN({name:"videos",labels:{name:(0,co.__)("Videos"),search_items:(0,co.__)("Search videos")},mediaType:"video",getQuery:e=>({...e,media_type:"video"})}),zN({name:"audio",labels:{name:(0,co.__)("Audio"),search_items:(0,co.__)("Search audio")},mediaType:"audio",getQuery:e=>({...e,media_type:"audio"})}),{name:"openverse",labels:{name:(0,co.__)("Openverse"),search_items:(0,co.__)("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:Lqe(c),previewUrl:c.thumbnail}))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}];function oge(e,t){let r=Vqe(e);return!r||!t?tge:[Wqe(r,t),...tge]}var bi=[];for(let e=0;e<256;++e)bi.push((e+256).toString(16).slice(1));function nge(e,t=0){return(bi[e[t+0]]+bi[e[t+1]]+bi[e[t+2]]+bi[e[t+3]]+"-"+bi[e[t+4]]+bi[e[t+5]]+"-"+bi[e[t+6]]+bi[e[t+7]]+"-"+bi[e[t+8]]+bi[e[t+9]]+"-"+bi[e[t+10]]+bi[e[t+11]]+bi[e[t+12]]+bi[e[t+13]]+bi[e[t+14]]+bi[e[t+15]]).toLowerCase()}var Gqe=new Uint8Array(16);function SW(){return crypto.getRandomValues(Gqe)}function Yqe(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():qqe(e,t,r)}function qqe(e,t,r){e=e||{};let o=e.random??e.rng?.()??SW();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 nge(o)}var xW=Yqe;var JT=a(K(),1),uge=a(ae(),1),dge=a(Mf(),1);var sge=a(U(),1),zs=null,CW=new Set;function age(){CW.forEach(e=>e())}function lge(e){e.length&&(zs||(zs={total:0,completed:0,pending:[]}),zs={total:zs.total+e.length,completed:zs.completed,pending:[...zs.pending,...e]},age())}function TW(e){if(!zs||e<=0)return;let t=Math.min(zs.total,zs.completed+e),r=zs.pending.slice(e);t>=zs.total?zs=null:zs={total:zs.total,completed:t,pending:r},age()}function ige(){return zs}function Kqe(e){return CW.add(e),()=>{CW.delete(e)}}function cge(){return(0,sge.useSyncExternalStore)(Kqe,ige,ige)}var Zqe=()=>{};function HN({additionalData:e={},allowedTypes:t,filesList:r,maxUploadFileSize:o,onError:n=Zqe,onFileChange:i,onSuccess:s,multiple:l=!0,isTransportOnly:c=!1}){let{receiveEntityRecords:u}=(0,JT.dispatch)(uge.store),{getCurrentPost:d,getEditorSettings:f}=(0,JT.select)(N),{lockPostAutosaving:m,unlockPostAutosaving:h,lockPostSaving:g,unlockPostSaving:v}=(0,JT.dispatch)(N),b=f().allowedMimeTypes,_=`image-upload-${xW()}`;o=o||f().maxUploadFileSize;let y=d(),w=typeof y?.id=="number"?y.id:y?.wp_id,S=()=>{v(_),h(_)};c||(g(_),m(_));let x=w?{post:w}:{};if(!c){let I=Array.from(r).map(k=>k?.name||"");lge(I)}let C=0;(0,dge.uploadMedia)({allowedTypes:t,filesList:r,onFileChange:I=>{i?.(I);let k=I.filter(R=>R?.id);if(k?.length&&u("postType","attachment",k,void 0,!0),!c&&k.length===I.length&&S(),!c){let R=k.length;R>C&&(TW(R-C),C=R)}},onSuccess:s,additionalData:{...x,...e},maxUploadFileSize:o,onError:({message:I})=>{c||(S(),TW(1)),n(I)},wpAllowedMimeTypes:b,multiple:l})}var fge=a(bo(),1),pge=a(Ya(),1);function mge(e){return(0,pge.default)("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,fge.cleanForSlug)(e)}var hge=a(K(),1),gge=a(ae(),1);function vge(e){let{invalidateResolution:t}=(0,hge.dispatch)(gge.store);for(let r of e)r.id&&(t("getEntityRecord",["postType","attachment",r.id,{context:"view"}]),t("getEntityRecord",["postType","attachment",r.id]))}var bge=a(Mf(),1);var{sideloadMedia:Xqe}=Y(bge.privateApis),yge=Xqe;var wge=a(Bu(),1),_ge=a(K(),1),Sge=a(Mf(),1);var Qqe=()=>{};function xge({url:e,onSuccess:t,onError:r=Qqe}){let o=(0,_ge.select)(N).getCurrentPost(),n=typeof o?.id=="number"?o.id:o?.wp_id;(0,wge.default)({path:"/wp/v2/media",method:"POST",data:{url:e,...n?{post:n}:{}}}).then(s=>{t?.((0,Sge.transformAttachment)(s))}).catch(s=>{r(s?.message||s)})}var Cge=a(Bu(),1),Tge=a(Mf(),1);async function Ege(e,t=[]){let r=await(0,Cge.default)({path:`/wp/v2/media/${e}/finalize`,method:"POST",data:{sub_sizes:t}});return r?(0,Tge.transformAttachment)(r):void 0}var Pge=a(Bu(),1);async function kge(e){await(0,Pge.default)({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"})}var w0e=a(ae(),1),_0e=a(K(),1),lG=a(U(),1);var U_=a(G(),1),DM=a(Pt(),1),f0e=a(K(),1),p0e=a(be(),1),og=a(U(),1),oG=a(Te(),1);var EW=a(U(),1);var Rge=a(U(),1),rn=(0,Rge.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var Age=a(E(),1);function $T({children:e,value:t,baseValue:r,onChange:o,fontLibraryEnabled:n}){let i=(0,EW.useMemo)(()=>Oi(r,t),[r,t]),s=(0,EW.useMemo)(()=>({user:t,base:r,merged:i,onChange:o,fontLibraryEnabled:n}),[t,r,i,o,n]);return(0,Age.jsx)(rn.Provider,{value:s,children:e})}var Co=a(G(),1),Wb=a(j(),1);var eve=a(K(),1),tve=a(ae(),1);var Ige=a(E(),1);function eE({className:e,...t}){return(0,Ige.jsx)(xn,{className:J(e,"global-styles-ui-icon-with-current-color"),...t})}var Kh=a(G(),1);var jb=a(E(),1);function Jqe({icon:e,children:t,...r}){return(0,jb.jsxs)(Kh.__experimentalItem,{...r,children:[e&&(0,jb.jsxs)(Kh.__experimentalHStack,{justify:"flex-start",children:[(0,jb.jsx)(eE,{icon:e,size:24}),(0,jb.jsx)(Kh.FlexItem,{children:t})]}),!e&&t]})}function xo(e){return(0,jb.jsx)(Kh.Navigator.Button,{as:Jqe,...e})}var Uge=a(G(),1);var zb=a(j(),1),Wge=a(be(),1);var PW=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},kW=function(e){return .2126*PW(e.r)+.7152*PW(e.g)+.0722*PW(e.b)};function UN(e){e.prototype.luminance=function(){return t=kW(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=kW(i),c=kW(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 Kl=a(U(),1),jge=a(K(),1),zge=a(ae(),1),AW=a(j(),1);var on=a(j(),1);var Oge=a(yf(),1),{lock:$Kt,unlock:Et}=(0,Oge.__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:$qe}=Et(Du),Nge={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")}]},Mge={"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")}]},eKe=[{value:"@tablet",label:(0,on.__)("Tablet")},{value:"@mobile",label:(0,on.__)("Mobile")}];function Dge(e){return Mge[e]?Mge[e]??[]:Nge[e]?Nge[e]:[]}function Lge(e){let t=$qe(e);return eKe.filter(r=>(r.value!=="@tablet"||t.tablet!==void 0)&&(r.value!=="@mobile"||t.mobile!==void 0))}function RW(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"&&RW(e[r],t);return e}var WN=(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=WN(e[o],t);Object.keys(n).length&&(r[o]=n)}}),r};function tE(e,t){let r=WN(structuredClone(e),t);return lv(r,e)}function Fge(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 Bge(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=Fge(o,n),s=e?.styles?.elements?.heading?.typography?.fontFamily,l;return s?l=Fge(o,e?.styles?.elements?.heading?.typography?.fontFamily):l=i,[i,l]}function Vge(e){return e?`is-style-${e}`:""}function GN(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}Tk([UN]);function qe(e,t,r="merged",o=!0,n){let{user:i,base:s,merged:l,onChange:c}=(0,Kl.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,Kl.useMemo)(()=>{let b=dm(h,m,t,o);return d?b?.[d]??{}:b},[h,m,t,o,d]),v=(0,Kl.useCallback)(b=>{let _=b;d&&(_={...dm(i,m,t,!1),[d]:b});let y=n1(i,m,_,t);c(y)},[i,c,m,t,d]);return[g,v]}function Le(e,t,r="merged"){let{user:o,base:n,merged:i,onChange:s}=(0,Kl.useContext)(rn),l=i;r==="base"?l=n:r==="user"&&(l=o);let c=(0,Kl.useMemo)(()=>iv(l,e,t),[l,e,t]),u=(0,Kl.useCallback)(d=>{let f=t1(o,e,d,t);s(f)},[o,s,e,t]);return[c,u]}var tKe=[];function rKe({title:e,settings:t,styles:r}){return e===(0,AW.__)("Default")||Object.keys(t||{}).length>0||Object.keys(r||{}).length>0}function YN(e=[]){let{variationsFromTheme:t}=(0,jge.useSelect)(o=>({variationsFromTheme:o(zge.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||tKe}),[]),{user:r}=(0,Kl.useContext)(rn);return(0,Kl.useMemo)(()=>{let o=structuredClone(r),n=RW(o,e);n.title=(0,AW.__)("Default");let i=t.filter(l=>tE(l,e)).map(l=>Oi(n,l)),s=[n,...i];return s?.length?s.filter(rKe):[]},[e,r,t])}function Hge(e){let[t,r]=Le("color.palette.theme",e),o=(0,Kl.useCallback)(()=>{if(!t||!t.length)return;let n=Math.floor(Math.random()*225),i=t.map(s=>{let{color:l}=s,c=Io(l).rotate(n).toHex();return{...s,color:c}});r(i)},[t,r]);return window.__experimentalEnableColorRandomizer?[o]:[]}var Qc=a(E(),1),{useHasDimensionsPanel:oKe,useHasTypographyPanel:nKe,useHasColorPanel:iKe,useSettingsForBlockElement:sKe,useHasBackgroundPanel:aKe}=Et(Wge.privateApis);function lKe(){let[e]=Le(""),t=sKe(e),r=aKe(e),o=nKe(t),n=iKe(t),i=!0,l=oKe(t);return(0,Qc.jsx)(Qc.Fragment,{children:(0,Qc.jsxs)(Uge.__experimentalItemGroup,{children:[o&&(0,Qc.jsx)(xo,{icon:y8,path:"/typography",children:(0,zb.__)("Typography")}),n&&(0,Qc.jsx)(xo,{icon:zB,path:"/colors",children:(0,zb.__)("Colors")}),r&&(0,Qc.jsx)(xo,{icon:mB,path:"/background","aria-label":(0,zb.__)("Background styles"),children:(0,zb.__)("Background")}),i&&(0,Qc.jsx)(xo,{icon:N1,path:"/shadows",children:(0,zb.__)("Shadows")}),l&&(0,Qc.jsx)(xo,{icon:Cc,path:"/layout",children:(0,zb.__)("Layout")})]})})}var Gge=lKe;var Rd=a(G(),1);function x_(){let[e="black"]=qe("color.text"),[t="white"]=qe("color.background"),[r=e]=qe("elements.h1.color.text"),[o=r]=qe("elements.link.color.text"),[n=o]=qe("elements.button.color.background"),[i]=Le("color.palette.core")||[],[s]=Le("color.palette.theme")||[],[l]=Le("color.palette.custom")||[],c=(s??[]).concat(l??[]).concat(i??[]),u=c.filter(({color:m})=>m===e),d=c.filter(({color:m})=>m===n),f=u.concat(d).concat(c).filter(({color:m})=>m!==t).slice(0,2);return{paletteColors:c,highlightedColors:f}}var Kge=a(U(),1),Zge=a(G(),1),OW=a(j(),1);function cKe(e,t){return t.length===0?null:(t.sort((r,o)=>Math.abs(e-r)-Math.abs(e-o)),t[0])}function uKe(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 Yge(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 IW(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 Hb(e){let t={fontFamily:Yge(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=uKe(r),n=cKe(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 qge(e){return{fontFamily:Yge(e.fontFamily),fontStyle:e.fontStyle||"normal",fontWeight:e.fontWeight||"400"}}var rE=a(E(),1);function qN({fontSize:e,variation:t}){let{base:r}=(0,Kge.useContext)(rn),o=r;t&&(o={...r,...t});let[n]=qe("color.text"),[i,s]=Bge(o),l=i?Hb(i):{},c=s?Hb(s):{};return n&&(l.color=n,c.color=n),e&&(l.fontSize=e,c.fontSize=e),(0,rE.jsxs)(Zge.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,rE.jsx)("span",{style:c,children:(0,OW._x)("A","Uppercase letter A")}),(0,rE.jsx)("span",{style:l,children:(0,OW._x)("a","Lowercase letter A")})]})}var Xge=a(G(),1);var Qge=a(E(),1);function Jge({normalizedColorSwatchSize:e,ratio:t}){let{highlightedColors:r}=x_(),o=e*t;return r.map(({slug:n,color:i},s)=>(0,Qge.jsx)(Xge.__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 $ge=a(G(),1),C_=a(Te(),1),Ub=a(U(),1);var bp=a(E(),1),NW=248,MW=152,dKe={leading:!0,trailing:!0};function fKe({children:e,label:t,isFocused:r,withHoverView:o}){let[n="white"]=qe("color.background"),[i]=qe("color.gradient"),s=(0,C_.useReducedMotion)(),[l,c]=(0,Ub.useState)(!1),[u,{width:d}]=(0,C_.useResizeObserver)(),[f,m]=(0,Ub.useState)(d),[h,g]=(0,Ub.useState)(),v=(0,C_.useThrottle)(m,250,dKe);(0,Ub.useLayoutEffect)(()=>{d&&v(d)},[d,v]),(0,Ub.useLayoutEffect)(()=>{let w=f?f/NW:1,S=w-(h||0);(Math.abs(S)>.1||!h)&&g(w)},[f,h]);let b=d?d/NW:1,_=h||b,y=!!d;return(0,bp.jsxs)(bp.Fragment,{children:[(0,bp.jsx)("div",{style:{position:"relative"},children:u}),!y&&(0,bp.jsx)(tj,{className:"global-styles-ui-preview__wrapper",style:{aspectRatio:NW/MW}}),y&&(0,bp.jsx)("div",{className:J("global-styles-ui-preview__wrapper",{"is-hoverable":o}),style:{height:MW*_},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:(0,bp.jsx)($ge.__unstableMotion.div,{style:{height:MW*_,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 T_=fKe;var Ta=a(E(),1),pKe={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},mKe={hover:{opacity:1},start:{opacity:.5}},hKe={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function gKe({label:e,isFocused:t,withHoverView:r,variation:o}){let[n]=qe("typography.fontWeight"),[i="serif"]=qe("typography.fontFamily"),[s=i]=qe("elements.h1.typography.fontFamily"),[l=n]=qe("elements.h1.typography.fontWeight"),[c="black"]=qe("color.text"),[u=c]=qe("elements.h1.color.text"),{paletteColors:d}=x_();return(0,Ta.jsxs)(T_,{label:e,isFocused:t,withHoverView:r,children:[({ratio:f,key:m})=>(0,Ta.jsx)(Rd.__unstableMotion.div,{variants:pKe,style:{height:"100%",overflow:"hidden"},children:(0,Ta.jsxs)(Rd.__experimentalHStack,{spacing:10*f,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,Ta.jsx)(qN,{fontSize:65*f,variation:o}),(0,Ta.jsx)(Rd.__experimentalVStack,{spacing:4*f,children:(0,Ta.jsx)(Jge,{normalizedColorSwatchSize:32,ratio:f})})]})},m),({key:f})=>(0,Ta.jsx)(Rd.__unstableMotion.div,{variants:r?mKe:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,Ta.jsx)(Rd.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:d.slice(0,4).map(({color:m},h)=>(0,Ta.jsx)("div",{style:{height:"100%",background:m,flexGrow:1}},h))})},f),({ratio:f,key:m})=>(0,Ta.jsx)(Rd.__unstableMotion.div,{variants:hKe,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,Ta.jsx)(Rd.__experimentalVStack,{spacing:3*f,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*f,boxSizing:"border-box"},children:e&&(0,Ta.jsx)("div",{style:{fontSize:40*f,fontFamily:s,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},m)]})}var KN=gKe;var Ho=a(E(),1);function vKe(){let e=(0,eve.useSelect)(t=>{let{__experimentalGetCurrentThemeGlobalStylesVariations:r}=t(tve.store);return!!r()?.length},[]);return(0,Ho.jsxs)(Co.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-root",isRounded:!1,children:[(0,Ho.jsx)(Co.CardBody,{children:(0,Ho.jsxs)(Co.__experimentalVStack,{spacing:4,children:[(0,Ho.jsx)(Co.Card,{className:"global-styles-ui-screen-root__active-style-tile",children:(0,Ho.jsx)(Co.CardMedia,{className:"global-styles-ui-screen-root__active-style-tile-preview",children:(0,Ho.jsx)(KN,{})})}),e&&(0,Ho.jsx)(Co.__experimentalItemGroup,{children:(0,Ho.jsx)(xo,{path:"/variations",children:(0,Ho.jsxs)(Co.__experimentalHStack,{justify:"space-between",children:[(0,Ho.jsx)(Co.FlexItem,{children:(0,Wb.__)("Browse styles")}),(0,Ho.jsx)(eE,{icon:(0,Wb.isRTL)()?Ar:mr})]})})}),(0,Ho.jsx)(Gge,{})]})}),(0,Ho.jsx)(Co.CardDivider,{}),(0,Ho.jsxs)(Co.CardBody,{children:[(0,Ho.jsx)(Co.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4,children:(0,Wb.__)("Customize the appearance of specific blocks for the whole site.")}),(0,Ho.jsx)(Co.__experimentalItemGroup,{children:(0,Ho.jsx)(xo,{path:"/blocks",children:(0,Ho.jsxs)(Co.__experimentalHStack,{justify:"space-between",children:[(0,Ho.jsx)(Co.FlexItem,{children:(0,Wb.__)("Blocks")}),(0,Ho.jsx)(eE,{icon:(0,Wb.isRTL)()?Ar:mr})]})})})]})]})}var rve=vKe;var DW=a(Pt(),1),Ad=a(j(),1),Zh=a(G(),1),LW=a(K(),1),Id=a(U(),1),XN=a(be(),1),lve=a(Te(),1),cve=a(na(),1);var ove=a(Pt(),1),nve=a(K(),1),ive=a(G(),1);var FW=a(E(),1);function bKe(e,t){return e?.filter(r=>r.source==="block"||t.includes(r.name))||[]}function oE(e){let t=(0,nve.useSelect)(n=>{let{getBlockStyles:i}=n(ove.store);return i(e)},[e]),[r]=qe("variations",e),o=Object.keys(r??{});return bKe(t,o)}function sve({name:e}){let t=oE(e);return(0,FW.jsx)(ive.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((r,o)=>r?.isDefault?null:(0,FW.jsx)(xo,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(r.name),children:r.label},o))})}var $n=a(G(),1),ZN=a(j(),1);var ave=a(be(),1);var Hs=a(E(),1),{StateControl:yKe,StateControlBadges:wKe}=Et(ave.privateApis);function nr({title:e,description:t,onBack:r,viewportStates:o,pseudoStates:n,selectedViewport:i="default",selectedPseudoState:s="default",onChangeViewport:l,onChangePseudoState:c,showResponsiveStateControls:u=!0}){return(0,Hs.jsx)($n.__experimentalVStack,{spacing:0,children:(0,Hs.jsx)($n.__experimentalView,{children:(0,Hs.jsx)($n.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Hs.jsxs)($n.__experimentalVStack,{spacing:2,children:[(0,Hs.jsxs)($n.__experimentalHStack,{spacing:2,alignment:"top",children:[(0,Hs.jsx)($n.Navigator.BackButton,{icon:(0,ZN.isRTL)()?mr:Ar,size:"small",label:(0,ZN.__)("Back"),onClick:r}),(0,Hs.jsx)($n.__experimentalSpacer,{children:(0,Hs.jsxs)($n.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,Hs.jsx)($n.__experimentalHeading,{className:"global-styles-ui-header",level:2,size:13,children:e}),(0,Hs.jsxs)($n.__experimentalVStack,{spacing:2,alignment:"right",children:[(0,Hs.jsx)(yKe,{viewportStates:u?o:[],pseudoStates:n,viewportValue:i,pseudoStateValue:s,onChangeViewport:l,onChangePseudoState:c}),(0,Hs.jsx)(wKe,{viewportStates:o,pseudoStates:n,viewportValue:i,pseudoStateValue:s})]})]})})]}),t&&(0,Hs.jsx)($n.__experimentalText,{className:"global-styles-ui-header__description",children:t})]})})})})}var Us=a(E(),1),{useHasDimensionsPanel:_Ke,useHasTypographyPanel:SKe,useHasBorderPanel:xKe,useSettingsForBlockElement:CKe,useHasColorPanel:TKe,useHasBackgroundPanel:EKe}=Et(XN.privateApis);function PKe(){let e=(0,LW.useSelect)(n=>n(DW.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 kKe(e){let[t]=Le("",e),r=CKe(t,e),o=SKe(r),n=TKe(r),i=EKe(r),s=xKe(r),l=_Ke(r),c=s||l,u=!!oE(e)?.length;return o||n||i||c||u}function RKe({block:e}){return kKe(e.name)?(0,Us.jsx)(xo,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,Us.jsxs)(Zh.__experimentalHStack,{justify:"flex-start",children:[(0,Us.jsx)(XN.BlockIcon,{icon:e.icon}),(0,Us.jsx)(Zh.FlexItem,{children:e.title})]})}):null}function AKe({filterValue:e}){let t=PKe(),r=(0,lve.useDebounce)(cve.speak,500),{isMatchingSearchTerm:o}=(0,LW.useSelect)(DW.store),n=e?t.filter(s=>o(s,e)):t,i=(0,Id.useRef)(null);return(0,Id.useEffect)(()=>{if(!e)return;let s=i.current?.childElementCount||0,l=(0,Ad.sprintf)((0,Ad._n)("%d result found.","%d results found.",s),s);r(l,"polite")},[e,r]),(0,Us.jsx)("div",{ref:i,className:"global-styles-ui-block-types-item-list",role:"list",children:n.length===0?(0,Us.jsx)(Zh.__experimentalText,{align:"center",as:"p",children:(0,Ad.__)("No blocks found.")}):n.map(s=>(0,Us.jsx)(RKe,{block:s},"menu-itemblock-"+s.name))})}var IKe=(0,Id.memo)(AKe);function OKe(){let[e,t]=(0,Id.useState)(""),r=(0,Id.useDeferredValue)(e);return(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(nr,{title:(0,Ad.__)("Blocks"),description:(0,Ad.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,Us.jsx)(Zh.SearchControl,{className:"global-styles-ui-block-types-search",onChange:t,value:e,label:(0,Ad.__)("Search"),placeholder:(0,Ad.__)("Search")}),(0,Us.jsx)(IKe,{filterValue:r})]})}var uve=OKe;var bve=a(Pt(),1),yve=a(be(),1),Jc=a(U(),1),wve=a(K(),1),_ve=a(ae(),1),Gb=a(G(),1),E_=a(j(),1);var pve=a(be(),1),JN=a(Pt(),1),mve=a(G(),1),BW=a(U(),1);var QN=a(E(),1),{getViewportBreakpoints:NKe,getViewportBreakpointValueInPixels:dve}=Et(Du),fve={default:783,"@tablet":600,"@mobile":480};function MKe(e,t){let r=NKe(t),o=dve(r.mobile);if(e==="@mobile"&&o)return o;let n=dve(r.tablet);if(e==="@tablet"&&n)return o?r.mobile==="480px"&&r.tablet==="782px"?fve["@tablet"]:Math.round((o+n)/2):n;if(e==="default"){let i=n??o;if(i)return i+1}return fve[e]}var FKe=({name:e,variation:t="",selectedViewport:r="default",selectedState:o="default",stateStyles:n,viewportSettings:i})=>{let s=(0,JN.getBlockType)(e)?.example,l=(0,BW.useMemo)(()=>{if(!s)return null;let _={...s,attributes:{...s.attributes,style:void 0,className:t?Vge(t):s.attributes?.className}};return(0,JN.getBlockFromExample)(e,_)},[e,s,t]),c=(0,BW.useMemo)(()=>o==="default"||!n?"":G4(n,e),[o,n,e]);if(!s)return null;let u=MKe(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)(mve.__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)(pve.BlockPreview,{blocks:l,viewportWidth:u,minHeight:h,additionalStyles:[{css:` |
| 44 |
body{ |
| 45 |
padding: ${m}px; |
| 46 |
min-height:${Math.round(b)}px; |
| 47 |
display:flex; |
| 48 |
} |
| 49 |
.is-root-container { |
| 50 |
width: ${100/f}%; |
| 51 |
transform: scale(${f}); |
| 52 |
transform-origin: top left; |
| 53 |
} |
| 54 |
${c} |
| 55 |
`}]})})})},hve=FKe;var gve=a(G(),1),vve=a(E(),1);function Uo({children:e,level:t=2}){return(0,vve.jsx)(gve.__experimentalHeading,{className:"global-styles-ui-subtitle",level:t,children:e})}var gn=a(E(),1),DKe={backgroundSize:"cover",backgroundPosition:"50% 50%"};function nE(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 LKe(e){return e&&((0,Gb.__experimentalHasSplitBorders)(e)?{top:nE(e.top),right:nE(e.right),bottom:nE(e.bottom),left:nE(e.left)}:nE(e))}var{useHasDimensionsPanel:BKe,useHasTypographyPanel:VKe,useHasBorderPanel:jKe,useSettingsForBlockElement:zKe,useHasColorPanel:HKe,useHasFiltersPanel:UKe,useHasImageSettingsPanel:WKe,useHasBackgroundPanel:GKe,BackgroundPanel:YKe,BorderPanel:qKe,ColorPanel:KKe,TypographyPanel:ZKe,DimensionsPanel:XKe,FiltersPanel:QKe,ImageSettingsPanel:JKe,AdvancedPanel:$Ke}=Et(yve.privateApis);function eZe({name:e,variation:t,selectedViewport:r,showResponsiveStateControls:o=!0}){let{user:n,merged:i,onChange:s}=(0,Jc.useContext)(rn),l=[];t&&(l=["variations",t].concat(l));let c=l.join("."),[u,d]=(0,Jc.useState)("default"),[f,m]=(0,Jc.useState)("default"),h=r??u,g=i.settings?.viewport,v=(0,Jc.useMemo)(()=>Lge(g),[g]),b=h==="default"||v.some(we=>we.value===h)?h:"default",_=(0,Jc.useMemo)(()=>Dge(e),[e]),y=[b,f].filter(we=>we!=="default").join("."),w=y.length>0,[S,x]=qe(c,e,"user",!1,w?y:void 0),[C]=qe(c,e,"merged",!1,w?y:void 0),[I]=Le("",e,"user"),[k,R]=Le("",e),A=zKe(k,e),P=(0,bve.getBlockType)(e),T=!1;A?.spacing?.blockGap&&P?.supports?.spacing?.blockGap&&(P?.supports?.spacing?.__experimentalSkipSerialization===!0||P?.supports?.spacing?.__experimentalSkipSerialization?.some?.(we=>we==="blockGap"))&&(T=!0);let M=!1;A?.dimensions?.aspectRatio&&e==="core/group"&&(M=!0);let B=(0,Jc.useMemo)(()=>{let we=structuredClone(A);return T&&(we.spacing.blockGap=!1),M&&(we.dimensions.aspectRatio=!1),we},[A,T,M]),F=oE(e),V=GKe(B),z=VKe(B),D=HKe(B),O=jKe(B),L=BKe(B),q=UKe(B)&&b==="default",Z=WKe(e,I,B),Q=!!F?.length&&!t&&!w,{canEditCSS:ue}=(0,wve.useSelect)(we=>{let{getEntityRecord:oe,__experimentalGetCurrentGlobalStylesId:re}=we(_ve.store),ce=re();return{canEditCSS:!!(ce?oe("root","globalStyles",ce):void 0)?._links?.["wp:action-edit-css"]}},[]),te=t?F.find(we=>we.name===t):null,de=(0,Jc.useMemo)(()=>({...C,layout:B.layout}),[C,B.layout]),pe=(0,Jc.useMemo)(()=>({...S,layout:I.layout}),[S,I.layout]),$=we=>{let oe={...we};delete oe.layout,x(oe),we.layout!==I.layout&&R({...I,layout:we.layout})},ee=we=>{R(we===void 0?{...k,lightbox:void 0}:{...k,lightbox:{...k.lightbox,...we}})},fe=we=>{let{settings:oe,...re}=we;if(oe?.typography){let ce=[c,y].filter(Boolean).join("."),ie=n1(n,ce,re,e);ie=t1(ie,"typography",{...I.typography,...oe.typography},e),s(ie)}else x(re)},ve=we=>{if(!we?.border){x(we);return}let{radius:oe,...re}=we.border,ce=LKe(re),ie=(0,Gb.__experimentalHasSplitBorders)(ce)?{color:null,style:null,width:null,...ce}:{top:ce,right:ce,bottom:ce,left:ce};x({...we,border:{...ie,radius:oe}})};return(0,gn.jsxs)(gn.Fragment,{children:[(0,gn.jsx)(nr,{title:t?te?.label:P?.title,viewportStates:v,pseudoStates:_,selectedViewport:b,selectedPseudoState:f,onChangeViewport:o?d:void 0,onChangePseudoState:m,showResponsiveStateControls:o}),(0,gn.jsx)(hve,{name:e,variation:t,selectedViewport:b,selectedState:w?y:"default",stateStyles:w?C:void 0,viewportSettings:g}),Q&&(0,gn.jsx)("div",{className:"global-styles-ui-screen-variations",children:(0,gn.jsxs)(Gb.__experimentalVStack,{spacing:3,children:[(0,gn.jsx)(Uo,{children:(0,E_.__)("Style Variations")}),(0,gn.jsx)(sve,{name:e})]})}),z&&(0,gn.jsx)(ZKe,{inheritedValue:C,value:S,onChange:fe,settings:B,isGlobalStyles:!w,showInheritanceLabelIndicators:!1}),V&&(0,gn.jsx)(YKe,{inheritedValue:C,value:S,onChange:x,settings:B,defaultValues:DKe,showInheritanceLabelIndicators:!1}),q&&(0,gn.jsx)(QKe,{inheritedValue:de,value:pe,onChange:x,settings:B,includeLayoutControls:!0,showInheritanceLabelIndicators:!1}),L&&(0,gn.jsx)(XKe,{inheritedValue:de,value:pe,onChange:$,settings:B,includeLayoutControls:!0,showInheritanceLabelIndicators:!1}),O&&(0,gn.jsx)(qKe,{inheritedValue:C,value:S,onChange:ve,settings:B,showInheritanceLabelIndicators:!1}),D&&(0,gn.jsx)(KKe,{inheritedValue:C,value:S,onChange:x,settings:B,showInheritanceLabelIndicators:!1}),Z&&!w&&(0,gn.jsx)(JKe,{onChange:ee,value:I,inheritedValue:B}),ue&&(0,gn.jsx)(Gb.PanelBody,{title:(0,E_.__)("Advanced"),initialOpen:!1,children:(0,gn.jsx)($Ke,{value:S,onChange:x,inheritedValue:C,help:(0,E_.sprintf)((0,E_.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value."),P?.title)})})]})}var VW=eZe;var CM=a(j(),1),Fbe=a(G(),1),Dbe=a(U(),1);var Sve=a(G(),1);var xve=a(E(),1);function Xh({children:e,className:t}){return(0,xve.jsx)(Sve.__experimentalSpacer,{className:J("global-styles-ui-screen-body",t),padding:4,children:e})}var Qh=a(j(),1),yp=a(G(),1);var Ea=a(E(),1);function iE({parentMenu:e,element:t,label:r}){let o=t==="text"||!t?"":`elements.${t}.`,n=t==="link"?{textDecoration:"underline"}:{},[i]=qe(o+"typography.fontFamily"),[s]=qe(o+"typography.fontStyle"),[l]=qe(o+"typography.fontWeight"),[c]=qe(o+"color.background"),[u]=qe("color.background"),[d]=qe(o+"color.gradient"),[f]=qe(o+"color.text");return(0,Ea.jsx)(xo,{path:e+"/typography/"+t,children:(0,Ea.jsxs)(yp.__experimentalHStack,{justify:"flex-start",children:[(0,Ea.jsx)(yp.FlexItem,{className:"global-styles-ui-screen-typography__indicator","aria-hidden":"true",style:{fontFamily:i??"serif",background:d??c??u,color:f,fontStyle:s,fontWeight:l,...n},children:(0,Qh.__)("Aa")}),(0,Ea.jsx)(yp.FlexItem,{children:r})]})})}function tZe(){return(0,Ea.jsxs)(yp.__experimentalVStack,{spacing:3,children:[(0,Ea.jsx)(Uo,{level:3,children:(0,Qh.__)("Elements")}),(0,Ea.jsxs)(yp.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,Ea.jsx)(iE,{parentMenu:"",element:"text",label:(0,Qh.__)("Text")}),(0,Ea.jsx)(iE,{parentMenu:"",element:"link",label:(0,Qh.__)("Links")}),(0,Ea.jsx)(iE,{parentMenu:"",element:"heading",label:(0,Qh.__)("Headings")}),(0,Ea.jsx)(iE,{parentMenu:"",element:"caption",label:(0,Qh.__)("Captions")}),(0,Ea.jsx)(iE,{parentMenu:"",element:"button",label:(0,Qh.__)("Buttons")})]})]})}var Cve=tZe;var tM=a(G(),1);var Tve=a(G(),1);var $N=a(E(),1),rZe=({variation:e,isFocused:t,withHoverView:r})=>(0,$N.jsx)(T_,{label:e.title,isFocused:t,withHoverView:r,children:({ratio:o,key:n})=>(0,$N.jsx)(Tve.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,$N.jsx)(qN,{variation:e,fontSize:85*o})},n)}),Eve=rZe;var Yb=a(U(),1),Pve=a(Mo(),1),eM=a(j(),1);var Jh=a(E(),1);function P_({variation:e,children:t,isPill:r=!1,properties:o,showTooltip:n=!1}){let[i,s]=(0,Yb.useState)(!1),{base:l,user:c,onChange:u}=(0,Yb.useContext)(rn),d=(0,Yb.useMemo)(()=>{let b=Oi(l,e);return o&&(b=WN(b,o)),{user:e,base:l,merged:b,onChange:()=>{}}},[e,l,o]),f=()=>u(e),m=b=>{b.keyCode===Pve.ENTER&&(b.preventDefault(),f())},h=(0,Yb.useMemo)(()=>lv(c,e),[c,e]),g=e?.title;e?.description&&(g=(0,eM.sprintf)((0,eM._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));let v=(0,Jh.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,Jh.jsx)("div",{className:J("global-styles-ui-variations_item-preview",{"is-pill":r}),children:t(i)})});return(0,Jh.jsx)(rn.Provider,{value:d,children:n?(0,Jh.jsxs)(Ze.Root,{children:[(0,Jh.jsx)(Ze.Trigger,{render:v}),(0,Jh.jsx)(Ze.Popup,{children:e?.title})]}):v})}var qb=a(E(),1),kve=["typography"];function k_({title:e,gap:t=2}){let r=YN(kve);return r?.length<=1?null:(0,qb.jsxs)(tM.__experimentalVStack,{spacing:3,children:[e&&(0,qb.jsx)(Uo,{level:3,children:e}),(0,qb.jsx)(tM.__experimentalGrid,{columns:3,gap:t,className:"global-styles-ui-style-variations-container",children:r.map((o,n)=>(0,qb.jsx)(P_,{variation:o,properties:kve,showTooltip:!0,children:()=>(0,qb.jsx)(Eve,{variation:o})},n))})]})}var Jb=a(j(),1),eu=a(G(),1);var Obe=a(U(),1);var _p=a(U(),1),tg=a(K(),1),eg=a(ae(),1),UW=a(j(),1);var jW=a(Bu(),1),Rve=a(ae(),1),Ave="/wp/v2/font-families";function Ive(e){let{receiveEntityRecords:t}=e.dispatch(Rve.store);t("postType","wp_font_family",[],void 0,!0)}async function Ove(e,t){let o=await(0,jW.default)({path:Ave,method:"POST",body:e});return Ive(t),{id:o.id,...o.font_family_settings,fontFace:[]}}async function Nve(e,t,r){let o={path:`${Ave}/${e}/font-faces`,method:"POST",body:t},n=await(0,jW.default)(o);return Ive(r),{id:n.id,...n.font_face_settings}}var Dve=a(G(),1);var Zl=a(j(),1),zW=["otf","ttf","woff","woff2"],Mve={100:(0,Zl._x)("Thin","font weight"),200:(0,Zl._x)("Extra-light","font weight"),300:(0,Zl._x)("Light","font weight"),400:(0,Zl._x)("Normal","font weight"),500:(0,Zl._x)("Medium","font weight"),600:(0,Zl._x)("Semi-bold","font weight"),700:(0,Zl._x)("Bold","font weight"),800:(0,Zl._x)("Extra-bold","font weight"),900:(0,Zl._x)("Black","font weight")},Fve={normal:(0,Zl._x)("Normal","font style"),italic:(0,Zl._x)("Italic","font style")};var{File:Lve}=window,{kebabCase:oZe}=Et(Dve.privateApis);function wp(e,t={}){return!e.name&&(e.fontFamily||e.slug)&&(e.name=e.fontFamily||e.slug),{...e,...t}}function nZe(e){return typeof e!="string"?!1:e!==decodeURIComponent(e)}function rM(e){let t=Mve[e.fontWeight??""]||e.fontWeight,r=e.fontStyle==="normal"?"":Fve[e.fontStyle??""]||e.fontStyle;return`${t} ${r}`}function iZe(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 Bve(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=iZe(s.fontFace,n);r.set(o.slug,{...i,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function $h(e,t,r="all"){let o;if(typeof t=="string")o=`url(${t})`;else if(t instanceof Lve)o=await t.arrayBuffer();else return;let i=await new window.FontFace(IW(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 sE(e,t="all"){let r=o=>{o.forEach(n=>{n.family===IW(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 R_(e){if(!e)return;let t;if(Array.isArray(e)?t=e[0]:t=e,!t.startsWith("file:."))return nZe(t)||(t=encodeURI(t)),t}function Vve(e){let t=new FormData,{fontFace:r,category:o,...n}=e,i={...n,slug:oZe(e.slug)};return t.append("font_family_settings",JSON.stringify(i)),t}function jve(e){return(e?.fontFace??[]).map((r,o)=>{let n={...r},i=new FormData;if(n.file){let s=Array.isArray(n.file)?n.file:[n.file],l=[];s.forEach((c,u)=>{let d=`file-${o}-${u}`;i.append(d,c,c.name),l.push(d)}),n.src=l.length===1?l[0]:l,delete n.file,i.append("font_face_settings",JSON.stringify(n))}else i.append("font_face_settings",JSON.stringify(n));return i})}async function zve(e,t,r){let o=[];for(let i of t)try{let s=await Nve(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 Hve(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 Lve([o],n,{type:o.type})})));return t.length===1?t[0]:t}function HW(e,t){return t.findIndex(r=>r.fontWeight===e.fontWeight&&r.fontStyle===e.fontStyle)!==-1}function Uve(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 oM(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 Wve=a(E(),1),yi=(0,_p.createContext)({});yi.displayName="FontLibraryContext";function sZe({children:e}){let t=(0,tg.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,tg.useDispatch)(eg.store),{globalStylesId:n}=(0,tg.useSelect)(O=>{let{__experimentalGetCurrentGlobalStylesId:L}=O(eg.store);return{globalStylesId:L()}},[]),i=(0,eg.useEntityRecord)("root","globalStyles",n),[s,l]=(0,_p.useState)(!1),{records:c=[],isResolving:u}=(0,eg.useEntityRecords)("postType","wp_font_family",{_embed:!0}),d=(c||[]).map(O=>({id:O.id,...O.font_family_settings||{},fontFace:O?._embedded?.font_faces?.map(L=>L.font_face_settings)||[]}))||[],[f,m]=Le("typography.fontFamilies"),h=async O=>{if(!i.record)return;let L=i.record,W=Uve(L??{},["settings","typography","fontFamilies"],O);await r("root","globalStyles",W)},[g,v]=(0,_p.useState)(""),[b,_]=(0,_p.useState)(void 0),y=f?.theme?f.theme.map(O=>wp(O,{source:"theme"})).sort((O,L)=>O.name.localeCompare(L.name)):[],w=f?.custom?f.custom.map(O=>wp(O,{source:"custom"})).sort((O,L)=>O.name.localeCompare(L.name)):[],S=d?d.map(O=>wp(O,{source:"custom"})).sort((O,L)=>O.name.localeCompare(L.name)):[];(0,_p.useEffect)(()=>{g||_(void 0)},[g]);let x=O=>{if(!O){_(void 0);return}let W=(O.source==="theme"?y:S).find(q=>q.slug===O.slug);_({...W||O,source:O.source})},[C]=(0,_p.useState)(new Set),I=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=>I(O==="theme"?y:w),R=(O,L,W,q)=>!L&&!W?!!k(q)[O]:!!k(q)[O]?.includes((L??"")+(W??"")),A=(O,L)=>k(L)[O]||[];async function P(O){l(!0);try{let L=[],W=[];for(let Z of O){let Q=!1,ue=await(0,tg.resolveSelect)(eg.store).getEntityRecords("postType","wp_font_family",{slug:Z.slug,per_page:1,_embed:!0}),te=ue&&ue.length>0?ue[0]:null,de=te?{id:te.id,...te.font_family_settings,fontFace:(te?._embedded?.font_faces??[]).map(fe=>fe.font_face_settings)||[]}:null;de||(Q=!0,de=await Ove(Vve(Z),t));let pe=de.fontFace&&Z.fontFace?de.fontFace.filter(fe=>fe&&Z.fontFace&&HW(fe,Z.fontFace)):[];de.fontFace&&Z.fontFace&&(Z.fontFace=Z.fontFace.filter(fe=>!HW(fe,de.fontFace)));let $=[],ee=[];if(Z?.fontFace?.length??!1){let fe=await zve(de.id,jve(Z),t);$=fe?.successes,ee=fe?.errors}($?.length>0||pe?.length>0)&&(de.fontFace=[...$],L.push(de)),de&&!Z?.fontFace?.length&&L.push(de),Q&&(Z?.fontFace?.length??0)>0&&$?.length===0&&await o("postType","wp_font_family",de.id,{force:!0}),W=W.concat(ee)}let q=W.reduce((Z,Q)=>Z.includes(Q.message)?Z:[...Z,Q.message],[]);if(L.length>0){let Z=B(L);await h(Z)}if(q.length>0){let Z=new Error((0,UW.__)("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,UW.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",O.id,{force:!0});let L=M(O);return await h(L),{deleted:!0}}catch(L){throw console.error("There was an error uninstalling the font family:",L),L}}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=>{sE(Z,"all")}),q},B=O=>{let L=F(O),W={...f,custom:Bve(f?.custom,L)};return m(W),V(L),W},F=O=>O.map(({id:L,fontFace:W,...q})=>({...q,...W&&W.length>0?{fontFace:W.map(({id:Z,...Q})=>Q)}:{}})),V=O=>{O.forEach(L=>{L.fontFace&&L.fontFace.forEach(W=>{let q=R_(W?.src??"");q&&$h(W,q,"all")})})},z=(O,L)=>{let W=f?.[O.source??""]??[],q=oM(O,L,W);m({...f,[O.source??""]:q});let Z=R(O.slug,L?.fontStyle??"",L?.fontWeight??"",O.source??"custom");if(L&&Z)sE(L,"all");else{let Q=R_(L?.src??"");L&&Q&&$h(L,Q,"all")}},D=async O=>{if(!O.src)return;let L=R_(O.src);!L||C.has(L)||($h(O,L,"document"),C.add(L))};return(0,Wve.jsx)(yi.Provider,{value:{libraryFontSelected:b,handleSetLibraryFontSelected:x,fontFamilies:f??{},baseCustomFonts:S,isFontActivated:R,getFontFacesActivated:A,loadFontFaceAsset:D,installFonts:P,uninstallFontFamily:T,toggleActivateFont:z,getAvailableFontsOutline:I,modalTabOpen:g,setModalTabOpen:v,saveFontFamilies:h,isResolvingLibrary:u,isInstalling:s},children:e})}var nM=sZe;var N_=a(j(),1),_M=a(G(),1),SM=a(ae(),1),Pbe=a(K(),1);var Rt=a(G(),1),lE=a(ae(),1),WW=a(K(),1),Md=a(U(),1),uo=a(j(),1);var I_=a(j(),1),sM=a(U(),1),Xl=a(G(),1);var Gve=a(G(),1),Od=a(U(),1);var iM=a(E(),1);function aZe(e){if(e.preview)return e.preview;if(e.src)return Array.isArray(e.src)?e.src[0]:e.src}function lZe(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 cZe({font:e,text:t}){let r=(0,Od.useRef)(null),o=lZe(e),n=Hb(e);t=t||("name"in e?e.name:"");let i=e.preview,[s,l]=(0,Od.useState)(!1),[c,u]=(0,Od.useState)(!1),{loadFontFaceAsset:d}=(0,Od.useContext)(yi),f=i??aZe(o),m=f&&f.match(/\.(png|jpg|jpeg|gif|svg)$/i),h=qge(o),g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...n,...h};return(0,Od.useEffect)(()=>{let v=new window.IntersectionObserver(([b])=>{l(b.isIntersecting)},{});return r.current&&v.observe(r.current),()=>v.disconnect()},[r]),(0,Od.useEffect)(()=>{(async()=>s&&(!m&&o.src&&await d(o),u(!0)))()},[o,s,d,m]),(0,iM.jsx)("div",{ref:r,children:m?(0,iM.jsx)("img",{src:f,loading:"lazy",alt:t,className:"font-library__font-variant_demo-image"}):(0,iM.jsx)(Gve.__experimentalText,{style:g,className:"font-library__font-variant_demo-text",children:t})})}var A_=cZe;var Nd=a(E(),1);function uZe({font:e,onClick:t,variantsText:r,navigatorPath:o,shouldFocus:n}){let i=e.fontFace?.length||1,s={cursor:t?"pointer":"default"},l=(0,Xl.useNavigator)(),c=(0,sM.useRef)(null);return(0,sM.useEffect)(()=>{n&&c.current?.focus()},[n]),(0,Nd.jsx)(Xl.Button,{ref:c,__next40pxDefaultSize:!0,onClick:()=>{t(),o&&l.goTo(o)},style:s,className:"font-library__font-card",children:(0,Nd.jsxs)(Xl.Flex,{justify:"space-between",wrap:!1,children:[(0,Nd.jsx)(A_,{font:e}),(0,Nd.jsxs)(Xl.Flex,{justify:"flex-end",children:[(0,Nd.jsx)(Xl.FlexItem,{children:(0,Nd.jsx)(Xl.__experimentalText,{className:"font-library__font-card__count",children:r||(0,I_.sprintf)((0,I_._n)("%d variant","%d variants",i),i)})}),(0,Nd.jsx)(Xl.FlexItem,{children:(0,Nd.jsx)(xn,{icon:(0,I_.isRTL)()?Ar:mr})})]})]})})}var aE=uZe;var aM=a(U(),1),lM=a(G(),1);var Kb=a(E(),1);function dZe({face:e,font:t}){let{isFontActivated:r,toggleActivateFont:o}=(0,aM.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+" "+rM(e),l=(0,aM.useId)();return(0,Kb.jsx)("div",{className:"font-library__font-card",children:(0,Kb.jsxs)(lM.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Kb.jsx)(lM.CheckboxControl,{checked:n,onChange:i,id:l}),(0,Kb.jsx)("label",{htmlFor:l,children:(0,Kb.jsx)(A_,{font:e,text:s,onClick:i})})]})})}var Yve=dZe;function qve(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 cM(e){return e.sort((t,r)=>t.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&t.fontStyle!=="normal"?1:t.fontStyle===r.fontStyle?qve(t.fontWeight?.toString()??"normal")-qve(r.fontWeight?.toString()??"normal"):!t.fontStyle||!r.fontStyle?t.fontStyle?-1:1:t.fontStyle.localeCompare(r.fontStyle))}var mt=a(E(),1);function Kve(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 fZe(){let{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:n,isInstalling:i,saveFontFamilies:s,getFontFacesActivated:l}=(0,Md.useContext)(yi),[c,u]=Le("typography.fontFamilies"),[d,f]=(0,Md.useState)(void 0),[m,h]=(0,Md.useState)(!1),[g,v]=(0,Md.useState)(null),[b]=Le("typography.fontFamilies",void 0,"base"),_=(0,WW.useSelect)(q=>{let{__experimentalGetCurrentGlobalStylesId:Z}=q(lE.store);return Z()},[]),y=(0,lE.useEntityRecord)("root","globalStyles",_),w=y?.edits?.settings?.typography?.fontFamilies,S=y?.record?.settings?.typography?.fontFamilies,x=(0,Md.useMemo)(()=>w===void 0?!1:Kve(w)!==Kve(S),[w,S]),C=c?.theme?c.theme.map(q=>wp(q,{source:"theme"})).sort((q,Z)=>q.name.localeCompare(Z.name)):[],I=new Set(C.map(q=>q.slug)),k=b?.theme?C.concat(b.theme.filter(q=>!I.has(q.slug)).map(q=>wp(q,{source:"theme"})).sort((q,Z)=>q.name.localeCompare(Z.name))):[],R=t?.source==="custom"&&t?.id,A=(0,WW.useSelect)(q=>{let{canUser:Z}=q(lE.store);return R&&Z("delete",{kind:"postType",name:"wp_font_family",id:R})},[R]),P=!!t&&t?.source!=="theme"&&A,T=()=>{h(!0)},M=async()=>{v(null);try{await s(c),v({type:"success",message:(0,uo.__)("Font family updated successfully.")})}catch(q){v({type:"error",message:(0,uo.sprintf)((0,uo.__)("There was an error updating the font family. %s"),q.message)})}},B=q=>q?!q.fontFace||!q.fontFace.length?[{fontFamily:q.fontFamily,fontStyle:"normal",fontWeight:"400"}]:cM(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,uo.sprintf)((0,uo.__)("%1$d of %2$d active"),Q,Z)};(0,Md.useEffect)(()=>{r(t)},[]);let V=t?l(t.slug,t.source).length:0,z=t?.fontFace?.length??(t?.fontFamily?1:0),D=V>0&&V!==z,O=V===z,L=()=>{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)sE(Q,"all");else{let ue=R_(Q?.src??"");ue&&$h(Q,ue,"all")}})},W=k.length>0||e.length>0;return(0,mt.jsxs)("div",{className:"font-library__tabpanel-layout",children:[n&&(0,mt.jsx)("div",{className:"font-library__loading",children:(0,mt.jsx)(Rt.ProgressBar,{})}),!n&&(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsxs)(Rt.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,mt.jsx)(Rt.Navigator.Screen,{path:"/",children:(0,mt.jsxs)(Rt.__experimentalVStack,{spacing:"8",children:[g&&(0,mt.jsx)(Rt.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),!W&&(0,mt.jsx)(Rt.__experimentalText,{as:"p",children:(0,uo.__)("No fonts installed.")}),k.length>0&&(0,mt.jsxs)(Rt.__experimentalVStack,{children:[(0,mt.jsx)("h2",{className:"font-library__fonts-title",children:(0,uo._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)(aE,{font:q,navigatorPath:"/fontFamily",variantsText:F(q),shouldFocus:q.slug===d,onClick:()=>{v(null),r(q)}})},q.slug))})]}),e.length>0&&(0,mt.jsxs)(Rt.__experimentalVStack,{children:[(0,mt.jsx)("h2",{className:"font-library__fonts-title",children:(0,uo._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)(aE,{font:q,navigatorPath:"/fontFamily",variantsText:F(q),shouldFocus:q.slug===d,onClick:()=>{v(null),r(q)}})},q.slug))})]})]})}),(0,mt.jsxs)(Rt.Navigator.Screen,{path:"/fontFamily",children:[t&&(0,mt.jsx)(pZe,{font:t,isOpen:m,setIsOpen:h,setNotice:v,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,mt.jsxs)(Rt.Flex,{justify:"flex-start",children:[(0,mt.jsx)(Rt.Navigator.BackButton,{icon:(0,uo.isRTL)()?mr:Ar,size:"small",onClick:()=>{f(t?.slug),r(void 0),v(null)},label:(0,uo.__)("Back")}),(0,mt.jsx)(Rt.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:t?.name})]}),g&&(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsx)(Rt.__experimentalSpacer,{margin:1}),(0,mt.jsx)(Rt.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),(0,mt.jsx)(Rt.__experimentalSpacer,{margin:1})]}),(0,mt.jsx)(Rt.__experimentalSpacer,{margin:4}),(0,mt.jsx)(Rt.__experimentalText,{children:(0,uo.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,mt.jsx)(Rt.__experimentalSpacer,{margin:4}),(0,mt.jsxs)(Rt.__experimentalVStack,{spacing:0,children:[(0,mt.jsx)(Rt.CheckboxControl,{className:"font-library__select-all",label:(0,uo.__)("Select all"),checked:O,onChange:L,indeterminate:D}),(0,mt.jsx)(Rt.__experimentalSpacer,{margin:8}),(0,mt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t&&B(t).map((q,Z)=>(0,mt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,mt.jsx)(Yve,{font:t,face:q},`face${Z}`)},`face${Z}`))})]})]})]}),(0,mt.jsxs)(Rt.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[i&&(0,mt.jsx)(Rt.ProgressBar,{}),P&&(0,mt.jsx)(Rt.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:T,children:(0,uo.__)("Delete")}),(0,mt.jsx)(Rt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:M,disabled:!x,accessibleWhenDisabled:!0,children:(0,uo.__)("Update")})]})]})]})}function pZe({font:e,isOpen:t,setIsOpen:r,setNotice:o,uninstallFontFamily:n,handleSetLibraryFontSelected:i}){let s=(0,Rt.useNavigator)(),l=async()=>{o(null),r(!1);try{await n(e),s.goBack(),i(void 0),o({type:"success",message:(0,uo.__)("Font family uninstalled successfully.")})}catch(u){o({type:"error",message:(0,uo.__)("There was an error uninstalling the font family.")+u.message})}},c=()=>{r(!1)};return(0,mt.jsx)(Rt.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,uo.__)("Cancel"),confirmButtonText:(0,uo.__)("Delete"),onCancel:c,onConfirm:l,size:"medium",children:e&&(0,uo.sprintf)((0,uo.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var uM=fZe;var In=a(U(),1),ut=a(G(),1),rbe=a(Te(),1),Jr=a(j(),1);var obe=a(ae(),1);function Zve(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 Xve(e){return e.reduce((t,r)=>({...t,[r.slug]:(r?.fontFace||[]).reduce((o,n)=>({...o,[`${n.fontStyle}-${n.fontWeight}`]:!0}),{})}),{})}function Qve(e,t,r){return t?!!r[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!r[e]}var cE=a(j(),1),Ws=a(G(),1),Ql=a(E(),1);function mZe(){let e=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,Ql.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,Ql.jsx)(Ws.Card,{children:(0,Ql.jsxs)(Ws.CardBody,{children:[(0,Ql.jsx)(Ws.__experimentalHeading,{level:2,children:(0,cE.__)("Connect to Google Fonts")}),(0,Ql.jsx)(Ws.__experimentalSpacer,{margin:6}),(0,Ql.jsx)(Ws.__experimentalText,{as:"p",children:(0,cE.__)("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,Ql.jsx)(Ws.__experimentalSpacer,{margin:3}),(0,Ql.jsx)(Ws.__experimentalText,{as:"p",children:(0,cE.__)("You can alternatively upload files directly on the Upload tab.")}),(0,Ql.jsx)(Ws.__experimentalSpacer,{margin:6}),(0,Ql.jsx)(Ws.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,cE.__)("Allow access to Google Fonts")})]})})})}var Jve=mZe;var $ve=a(U(),1),dM=a(G(),1);var Zb=a(E(),1);function hZe({face:e,font:t,handleToggleVariant:r,selected:o}){let n=()=>{if(t?.fontFace){r(t,e);return}r(t)},i=t.name+" "+rM(e),s=(0,$ve.useId)();return(0,Zb.jsx)("div",{className:"font-library__font-card",children:(0,Zb.jsxs)(dM.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Zb.jsx)(dM.CheckboxControl,{checked:o,onChange:n,id:s}),(0,Zb.jsx)("label",{htmlFor:s,children:(0,Zb.jsx)(A_,{font:e,text:i,onClick:n})})]})})}var ebe=hZe;var tt=a(E(),1),gZe={slug:"all",name:(0,Jr._x)("All","font categories")},tbe="wp-font-library-google-fonts-permission",vZe=500;function bZe({slug:e}){let t=e==="google-fonts",r=()=>window.localStorage.getItem(tbe)==="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,obe.useEntityRecord)("root","fontCollection",e);(0,In.useEffect)(()=>{let $=()=>{b(t&&!r())};return $(),window.addEventListener("storage",$),()=>window.removeEventListener("storage",$)},[e,t]);let x=()=>{window.localStorage.setItem(tbe,"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]),I=w?.categories??[],k=[gZe,...I],R=(0,In.useMemo)(()=>Zve(C,h),[C,h]),A=Math.max(window.innerHeight,vZe),P=Math.floor((A-417)/61),T=Math.ceil(R.length/P),M=(f-1)*P,B=f*P,F=R.slice(M,B),V=$=>{g({...h,category:$}),m(1)},D=(0,rbe.debounce)($=>{g({...h,search:$}),m(1)},300),O=($,ee)=>{let fe=oM($,ee,u);d(fe)},L=Xve(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,ue=()=>{let $=[];!Q&&o&&$.push(o),d($)},te=async()=>{c(null);let $=u[0];try{$?.fontFace&&await Promise.all($.fontFace.map(async ee=>{ee.src&&(ee.file=await Hve(ee.src))}))}catch{c({type:"error",message:(0,Jr.__)("Error installing the fonts, could not be downloaded.")});return}try{await _([$]),c({type:"success",message:(0,Jr.__)("Fonts were installed successfully.")})}catch(ee){c({type:"error",message:ee.message})}W()},de=$=>$?!$.fontFace||!$.fontFace.length?[{fontFamily:$.fontFamily,fontStyle:"normal",fontWeight:"400"}]:cM($.fontFace):[];if(v)return(0,tt.jsx)(Jve,{});let pe=e==="google-fonts"&&!v&&!o;return(0,tt.jsxs)("div",{className:"font-library__tabpanel-layout",children:[S&&(0,tt.jsx)("div",{className:"font-library__loading",children:(0,tt.jsx)(ut.ProgressBar,{})}),!S&&w&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsxs)(ut.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,tt.jsxs)(ut.Navigator.Screen,{path:"/",children:[(0,tt.jsxs)(ut.__experimentalHStack,{justify:"space-between",children:[(0,tt.jsxs)(ut.__experimentalVStack,{children:[(0,tt.jsx)(ut.__experimentalHeading,{level:2,size:13,children:w.name}),(0,tt.jsx)(ut.__experimentalText,{children:w.description})]}),pe&&(0,tt.jsx)(ut.DropdownMenu,{icon:yo,label:(0,Jr.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,Jr.__)("Revoke access to Google Fonts"),onClick:x}]})]}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:4}),(0,tt.jsxs)(ut.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,tt.jsx)(ut.SearchControl,{className:"font-library__search",value:h.search,placeholder:(0,Jr.__)("Font name\u2026"),label:(0,Jr.__)("Search"),onChange:D,hideLabelFromVision:!1}),(0,tt.jsx)(ut.SelectControl,{label:(0,Jr.__)("Category"),value:h.category,onChange:V,children:k&&k.map($=>(0,tt.jsx)("option",{value:$.slug,children:$.name},$.slug))})]}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:4}),!!w?.font_families?.length&&!R.length&&(0,tt.jsx)(ut.__experimentalText,{children:(0,Jr.__)("No fonts found. Try with a different search term.")}),(0,tt.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,tt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:F.map($=>(0,tt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,tt.jsx)(aE,{font:$.font_family_settings,navigatorPath:"/fontFamily",shouldFocus:$.font_family_settings.slug===i,onClick:()=>{n($.font_family_settings)}})},$.font_family_settings.slug))})})]}),(0,tt.jsxs)(ut.Navigator.Screen,{path:"/fontFamily",children:[(0,tt.jsxs)(ut.Flex,{justify:"flex-start",children:[(0,tt.jsx)(ut.Navigator.BackButton,{icon:(0,Jr.isRTL)()?mr:Ar,size:"small",onClick:()=>{s(o?.slug),n(null),c(null)},label:(0,Jr.__)("Back")}),(0,tt.jsx)(ut.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),l&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(ut.__experimentalSpacer,{margin:1}),(0,tt.jsx)(ut.Notice,{status:l.type,onRemove:()=>c(null),children:l.message}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:1})]}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:4}),(0,tt.jsx)(ut.__experimentalText,{children:(0,Jr.__)("Select font variants to install.")}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:4}),(0,tt.jsx)(ut.CheckboxControl,{className:"font-library__select-all",label:(0,Jr.__)("Select all"),checked:Q,onChange:ue,indeterminate:Z}),(0,tt.jsx)(ut.__experimentalVStack,{spacing:0,children:(0,tt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&de(o).map(($,ee)=>(0,tt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,tt.jsx)(ebe,{font:o,face:$,handleToggleVariant:O,selected:Qve(o.slug,o.fontFace?$:null,L)})},`face${ee}`))})}),(0,tt.jsx)(ut.__experimentalSpacer,{margin:16})]})]}),o&&(0,tt.jsx)(ut.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,tt.jsx)(ut.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:te,isBusy:y,disabled:u.length===0||y,accessibleWhenDisabled:!0,children:(0,Jr.__)("Install")})}),!o&&(0,tt.jsxs)(ut.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,tt.jsx)(ut.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,In.createInterpolateElement)((0,Jr.sprintf)((0,Jr._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",T),{div:(0,tt.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,tt.jsx)(ut.SelectControl,{"aria-label":(0,Jr.__)("Current page"),value:f.toString(),options:[...Array(T)].map(($,ee)=>({label:(ee+1).toString(),value:(ee+1).toString()})),onChange:$=>m(parseInt($)),size:"small",variant:"minimal"})})}),(0,tt.jsxs)(ut.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,tt.jsx)(ut.Button,{onClick:()=>m(f-1),disabled:f===1,accessibleWhenDisabled:!0,label:(0,Jr.__)("Previous page"),icon:(0,Jr.isRTL)()?kl:Rl,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,tt.jsx)(ut.Button,{onClick:()=>m(f+1),disabled:f===T,accessibleWhenDisabled:!0,label:(0,Jr.__)("Next page"),icon:(0,Jr.isRTL)()?Rl:kl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var fM=bZe;var O_=a(j(),1),rs=a(G(),1),dE=a(U(),1);var pM=(e=>typeof ta<"u"?ta:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof ta<"u"?ta:t)[r]}):e)(function(e){if(typeof ta<"u")return ta.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),nbe=(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 pM=="function"&&pM;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 pM=="function"&&pM,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,I=255,k=1080,R=18,A=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]),B=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function F(oe){var re;return oe.readBits(1)===0?16:(re=oe.readBits(3),re>0?17+re:(re=oe.readBits(3),re>0?8+re:17))}function V(oe){if(oe.readBits(1)){var re=oe.readBits(3);return re===0?1:oe.readBits(re)+(1<<re)}return 0}function z(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function D(oe){var re=new z,ce,ie,le;if(re.input_end=oe.readBits(1),re.input_end&&oe.readBits(1))return re;if(ce=oe.readBits(2)+4,ce===7){if(re.is_metadata=!0,oe.readBits(1)!==0)throw new Error("Invalid reserved bit");if(ie=oe.readBits(2),ie===0)return re;for(le=0;le<ie;le++){var Oe=oe.readBits(8);if(le+1===ie&&ie>1&&Oe===0)throw new Error("Invalid size byte");re.meta_block_length|=Oe<<le*8}}else for(le=0;le<ce;++le){var ke=oe.readBits(4);if(le+1===ce&&ce>4&&ke===0)throw new Error("Invalid size nibble");re.meta_block_length|=ke<<le*4}return++re.meta_block_length,!re.input_end&&!re.is_metadata&&(re.is_uncompressed=oe.readBits(1)),re}function O(oe,re,ce){var ie=re,le;return ce.fillBitWindow(),re+=ce.val_>>>ce.bit_pos_&I,le=oe[re].bits-C,le>0&&(ce.bit_pos_+=C,re+=oe[re].value,re+=ce.val_>>>ce.bit_pos_&(1<<le)-1),ce.bit_pos_+=oe[re].bits,oe[re].value}function L(oe,re,ce,ie){for(var le=0,Oe=v,ke=0,Me=0,Ne=32768,Fe=[],X=0;X<32;X++)Fe.push(new d(0,0));for(f(Fe,0,5,oe,R);le<re&&Ne>0;){var ge=0,Ue;if(ie.readMoreInput(),ie.fillBitWindow(),ge+=ie.val_>>>ie.bit_pos_&31,ie.bit_pos_+=Fe[ge].bits,Ue=Fe[ge].value&255,Ue<b)ke=0,ce[le++]=Ue,Ue!==0&&(Oe=Ue,Ne-=32768>>Ue);else{var Ye=Ue-14,st,St,dt=0;if(Ue===b&&(dt=Oe),Me!==dt&&(ke=0,Me=dt),st=ke,ke>0&&(ke-=2,ke<<=Ye),ke+=ie.readBits(Ye)+3,St=ke-st,le+St>re)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var xt=0;xt<St;xt++)ce[le+xt]=Me;le+=St,Me!==0&&(Ne-=St<<15-Me)}}if(Ne!==0)throw new Error("[ReadHuffmanCodeLengths] space = "+Ne);for(;le<re;le++)ce[le]=0}function W(oe,re,ce,ie){var le=0,Oe,ke=new Uint8Array(oe);if(ie.readMoreInput(),Oe=ie.readBits(2),Oe===1){for(var Me,Ne=oe-1,Fe=0,X=new Int32Array(4),ge=ie.readBits(2)+1;Ne;)Ne>>=1,++Fe;for(Me=0;Me<ge;++Me)X[Me]=ie.readBits(Fe)%oe,ke[X[Me]]=2;switch(ke[X[0]]=1,ge){case 1:break;case 3:if(X[0]===X[1]||X[0]===X[2]||X[1]===X[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(X[0]===X[1])throw new Error("[ReadHuffmanCode] invalid symbols");ke[X[1]]=1;break;case 4:if(X[0]===X[1]||X[0]===X[2]||X[0]===X[3]||X[1]===X[2]||X[1]===X[3]||X[2]===X[3])throw new Error("[ReadHuffmanCode] invalid symbols");ie.readBits(1)?(ke[X[2]]=3,ke[X[3]]=3):ke[X[0]]=2;break}}else{var Me,Ue=new Uint8Array(R),Ye=32,st=0,St=[new d(2,0),new d(2,4),new d(2,3),new d(3,2),new d(2,0),new d(2,4),new d(2,3),new d(4,1),new d(2,0),new d(2,4),new d(2,3),new d(3,2),new d(2,0),new d(2,4),new d(2,3),new d(4,5)];for(Me=Oe;Me<R&&Ye>0;++Me){var dt=A[Me],xt=0,Kt;ie.fillBitWindow(),xt+=ie.val_>>>ie.bit_pos_&15,ie.bit_pos_+=St[xt].bits,Kt=St[xt].value,Ue[dt]=Kt,Kt!==0&&(Ye-=32>>Kt,++st)}if(!(st===1||Ye===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");L(Ue,oe,ke,ie)}if(le=f(re,ce,C,ke,oe),le===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return le}function q(oe,re,ce){var ie,le;return ie=O(oe,re,ce),le=h.kBlockLengthPrefixCode[ie].nbits,h.kBlockLengthPrefixCode[ie].offset+ce.readBits(le)}function Z(oe,re,ce){var ie;return oe<P?(ce+=T[oe],ce&=3,ie=re[ce]+M[oe]):ie=oe-P+1,ie}function Q(oe,re){for(var ce=oe[re],ie=re;ie;--ie)oe[ie]=oe[ie-1];oe[0]=ce}function ue(oe,re){var ce=new Uint8Array(256),ie;for(ie=0;ie<256;++ie)ce[ie]=ie;for(ie=0;ie<re;++ie){var le=oe[ie];oe[ie]=ce[le],le&&Q(ce,le)}}function te(oe,re){this.alphabet_size=oe,this.num_htrees=re,this.codes=new Array(re+re*B[oe+31>>>5]),this.htrees=new Uint32Array(re)}te.prototype.decode=function(oe){var re,ce,ie=0;for(re=0;re<this.num_htrees;++re)this.htrees[re]=ie,ce=W(this.alphabet_size,this.codes,ie,oe),ie+=ce};function de(oe,re){var ce={num_htrees:null,context_map:null},ie,le=0,Oe,ke;re.readMoreInput();var Me=ce.num_htrees=V(re)+1,Ne=ce.context_map=new Uint8Array(oe);if(Me<=1)return ce;for(ie=re.readBits(1),ie&&(le=re.readBits(4)+1),Oe=[],ke=0;ke<k;ke++)Oe[ke]=new d(0,0);for(W(Me+le,Oe,0,re),ke=0;ke<oe;){var Fe;if(re.readMoreInput(),Fe=O(Oe,0,re),Fe===0)Ne[ke]=0,++ke;else if(Fe<=le)for(var X=1+(1<<Fe)+re.readBits(Fe);--X;){if(ke>=oe)throw new Error("[DecodeContextMap] i >= context_map_size");Ne[ke]=0,++ke}else Ne[ke]=Fe-le,++ke}return re.readBits(1)&&ue(Ne,oe),ce}function pe(oe,re,ce,ie,le,Oe,ke){var Me=ce*2,Ne=ce,Fe=O(re,ce*k,ke),X;Fe===0?X=le[Me+(Oe[Ne]&1)]:Fe===1?X=le[Me+(Oe[Ne]-1&1)]+1:X=Fe-2,X>=oe&&(X-=oe),ie[ce]=X,le[Me+(Oe[Ne]&1)]=X,++Oe[Ne]}function $(oe,re,ce,ie,le,Oe){var ke=le+1,Me=ce&le,Ne=Oe.pos_&c.IBUF_MASK,Fe;if(re<8||Oe.bit_pos_+(re<<3)<Oe.bit_end_pos_){for(;re-- >0;)Oe.readMoreInput(),ie[Me++]=Oe.readBits(8),Me===ke&&(oe.write(ie,ke),Me=0);return}if(Oe.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;Oe.bit_pos_<32;)ie[Me]=Oe.val_>>>Oe.bit_pos_,Oe.bit_pos_+=8,++Me,--re;if(Fe=Oe.bit_end_pos_-Oe.bit_pos_>>3,Ne+Fe>c.IBUF_MASK){for(var X=c.IBUF_MASK+1-Ne,ge=0;ge<X;ge++)ie[Me+ge]=Oe.buf_[Ne+ge];Fe-=X,Me+=X,re-=X,Ne=0}for(var ge=0;ge<Fe;ge++)ie[Me+ge]=Oe.buf_[Ne+ge];if(Me+=Fe,re-=Fe,Me>=ke){oe.write(ie,ke),Me-=ke;for(var ge=0;ge<Me;ge++)ie[ge]=ie[ke+ge]}for(;Me+re>=ke;){if(Fe=ke-Me,Oe.input_.read(ie,Me,Fe)<Fe)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");oe.write(ie,ke),re-=Fe,Me=0}if(Oe.input_.read(ie,Me,re)<re)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");Oe.reset()}function ee(oe){var re=oe.bit_pos_+7&-8,ce=oe.readBits(re-oe.bit_pos_);return ce==0}function fe(oe){var re=new s(oe),ce=new c(re);F(ce);var ie=D(ce);return ie.meta_block_length}i.BrotliDecompressedSize=fe;function ve(oe,re){var ce=new s(oe);re==null&&(re=fe(oe));var ie=new Uint8Array(re),le=new l(ie);return we(ce,le),le.pos<le.buffer.length&&(le.buffer=le.buffer.subarray(0,le.pos)),le.buffer}i.BrotliDecompressBuffer=ve;function we(oe,re){var ce,ie=0,le=0,Oe=0,ke,Me=0,Ne,Fe,X,ge,Ue=[16,15,11,4],Ye=0,st=0,St=0,dt=[new te(0,0),new te(0,0),new te(0,0)],xt,Kt,Xe,ds=128+c.READ_SIZE;Xe=new c(oe),Oe=F(Xe),ke=(1<<Oe)-16,Ne=1<<Oe,Fe=Ne-1,X=new Uint8Array(Ne+ds+u.maxDictionaryWordLength),ge=Ne,xt=[],Kt=[];for(var Wa=0;Wa<3*k;Wa++)xt[Wa]=new d(0,0),Kt[Wa]=new d(0,0);for(;!le;){var kr=0,Ai,sn=[1<<28,1<<28,1<<28],vt=[0],Ft=[1,1,1],ne=[0,1,0,1,0,1],xe=[0],H,Pe,Bt,Ee,Ro=null,Ie=null,pr,me=null,he,Js=0,Wt=null,He=0,Ce=0,it=null,ht=0,bt=0,Rr=0,Gr,oo;for(ce=0;ce<3;++ce)dt[ce].codes=null,dt[ce].htrees=null;Xe.readMoreInput();var vf=D(Xe);if(kr=vf.meta_block_length,ie+kr>re.buffer.length){var nv=new Uint8Array(ie+kr);nv.set(re.buffer),re.buffer=nv}if(le=vf.input_end,Ai=vf.is_uncompressed,vf.is_metadata){for(ee(Xe);kr>0;--kr)Xe.readMoreInput(),Xe.readBits(8);continue}if(kr!==0){if(Ai){Xe.bit_pos_=Xe.bit_pos_+7&-8,$(re,kr,ie,X,Fe,Xe),ie+=kr;continue}for(ce=0;ce<3;++ce)Ft[ce]=V(Xe)+1,Ft[ce]>=2&&(W(Ft[ce]+2,xt,ce*k,Xe),W(w,Kt,ce*k,Xe),sn[ce]=q(Kt,ce*k,Xe),xe[ce]=1);for(Xe.readMoreInput(),H=Xe.readBits(2),Pe=P+(Xe.readBits(4)<<H),Bt=(1<<H)-1,Ee=Pe+(48<<H),Ie=new Uint8Array(Ft[0]),ce=0;ce<Ft[0];++ce)Xe.readMoreInput(),Ie[ce]=Xe.readBits(2)<<1;var vo=de(Ft[0]<<S,Xe);pr=vo.num_htrees,Ro=vo.context_map;var fs=de(Ft[2]<<x,Xe);for(he=fs.num_htrees,me=fs.context_map,dt[0]=new te(_,pr),dt[1]=new te(y,Ft[1]),dt[2]=new te(Ee,he),ce=0;ce<3;++ce)dt[ce].decode(Xe);for(Wt=0,it=0,Gr=Ie[vt[0]],bt=m.lookupOffsets[Gr],Rr=m.lookupOffsets[Gr+1],oo=dt[1].htrees[0];kr>0;){var Ao,ps,$s,a0,w4,ea,Ga,bf,Jx,l0,$x;for(Xe.readMoreInput(),sn[1]===0&&(pe(Ft[1],xt,1,vt,ne,xe,Xe),sn[1]=q(Kt,k,Xe),oo=dt[1].htrees[vt[1]]),--sn[1],Ao=O(dt[1].codes,oo,Xe),ps=Ao>>6,ps>=2?(ps-=2,Ga=-1):Ga=0,$s=h.kInsertRangeLut[ps]+(Ao>>3&7),a0=h.kCopyRangeLut[ps]+(Ao&7),w4=h.kInsertLengthPrefixCode[$s].offset+Xe.readBits(h.kInsertLengthPrefixCode[$s].nbits),ea=h.kCopyLengthPrefixCode[a0].offset+Xe.readBits(h.kCopyLengthPrefixCode[a0].nbits),st=X[ie-1&Fe],St=X[ie-2&Fe],l0=0;l0<w4;++l0)Xe.readMoreInput(),sn[0]===0&&(pe(Ft[0],xt,0,vt,ne,xe,Xe),sn[0]=q(Kt,0,Xe),Js=vt[0]<<S,Wt=Js,Gr=Ie[vt[0]],bt=m.lookupOffsets[Gr],Rr=m.lookupOffsets[Gr+1]),Jx=m.lookup[bt+st]|m.lookup[Rr+St],He=Ro[Wt+Jx],--sn[0],St=st,st=O(dt[0].codes,dt[0].htrees[He],Xe),X[ie&Fe]=st,(ie&Fe)===Fe&&re.write(X,Ne),++ie;if(kr-=w4,kr<=0)break;if(Ga<0){var Jx;if(Xe.readMoreInput(),sn[2]===0&&(pe(Ft[2],xt,2,vt,ne,xe,Xe),sn[2]=q(Kt,2*k,Xe),Ce=vt[2]<<x,it=Ce),--sn[2],Jx=(ea>4?3:ea-2)&255,ht=me[it+Jx],Ga=O(dt[2].codes,dt[2].htrees[ht],Xe),Ga>=Pe){var _4,VK,e1;Ga-=Pe,VK=Ga&Bt,Ga>>=H,_4=(Ga>>1)+1,e1=(2+(Ga&1)<<_4)-4,Ga=Pe+(e1+Xe.readBits(_4)<<H)+VK}}if(bf=Z(Ga,Ue,Ye),bf<0)throw new Error("[BrotliDecompress] invalid distance");if(ie<ke&&Me!==ke?Me=ie:Me=ke,$x=ie&Fe,bf>Me)if(ea>=u.minDictionaryWordLength&&ea<=u.maxDictionaryWordLength){var e1=u.offsetsByLength[ea],jK=bf-Me-1,zK=u.sizeBitsByLength[ea],W5e=(1<<zK)-1,G5e=jK&W5e,HK=jK>>zK;if(e1+=G5e*ea,HK<g.kNumTransforms){var S4=g.transformDictionaryWord(X,$x,e1,ea,HK);if($x+=S4,ie+=S4,kr-=S4,$x>=ge){re.write(X,Ne);for(var pk=0;pk<$x-ge;pk++)X[pk]=X[ge+pk]}}else throw new Error("Invalid backward reference. pos: "+ie+" distance: "+bf+" len: "+ea+" bytes left: "+kr)}else throw new Error("Invalid backward reference. pos: "+ie+" distance: "+bf+" len: "+ea+" bytes left: "+kr);else{if(Ga>0&&(Ue[Ye&3]=bf,++Ye),ea>kr)throw new Error("Invalid backward reference. pos: "+ie+" distance: "+bf+" len: "+ea+" bytes left: "+kr);for(l0=0;l0<ea;++l0)X[ie&Fe]=X[ie-bf&Fe],(ie&Fe)===Fe&&re.write(X,Ne),++ie,--kr}st=X[ie-1&Fe],St=X[ie-2&Fe]}ie&=1073741823}}re.write(X,ie&Fe)}i.BrotliDecompress=we,u.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(o,n,i){var s=o("base64-js");i.init=function(){var l=o("./decode").BrotliDecompressBuffer,c=s.toByteArray(o("./dictionary.bin.js"));return l(c)}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(o,n,i){n.exports="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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,I,k,R,A,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,A=R,M[l]===1){for(S=0;S<A;++S)f[m+S]=new s(0,P[0]&65535);return A}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(I=A-1,C=-1,y=h+1,x=2;y<=l;++y,x<<=1)for(;T[y]>0;--T[y])(S&I)!==C&&(m+=R,k=d(T,y,h),R=1<<k,A+=R,C=S&I,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 A}},{}],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],I=x[1],k=new c(g(w,C,I)),R=0,A=I>0?C-4:C,P=0;P<A;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 I===2&&(S=l[w.charCodeAt(P)]<<2|l[w.charCodeAt(P+1)]>>4,k[R++]=S&255),I===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,I=[],k=S;k<x;k+=3)C=(w[k]<<16&16711680)+(w[k+1]<<8&65280)+(w[k+2]&255),I.push(b(C));return I.join("")}function y(w){for(var S,x=w.length,C=x%3,I=[],k=16383,R=0,A=x-C;R<A;R+=k)I.push(_(w,R,R+k>A?A:R+k));return C===1?(S=w[x-1],I.push(s[S>>2]+s[S<<4&63]+"==")):C===2&&(S=(w[x-2]<<8)+w[x-1],I.push(s[S>>10]+s[S>>4&63]+s[S<<2&63]+"=")),I.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,I=16,k=17,R=18,A=19,P=20;function T(F,V,z){this.prefix=new Uint8Array(F.length),this.transform=V,this.suffix=new Uint8Array(z.length);for(var D=0;D<F.length;D++)this.prefix[D]=F.charCodeAt(D);for(var D=0;D<z.length;D++)this.suffix[D]=z.charCodeAt(D)}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,` |
| 56 |
`),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("",I,""),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,` |
| 57 |
`),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 B(F,V){return F[V]<192?(F[V]>=97&&F[V]<=122&&(F[V]^=32),1):F[V]<224?(F[V+1]^=32,2):(F[V+2]^=5,3)}i.transformDictionaryWord=function(F,V,z,D,O){var L=M[O].prefix,W=M[O].suffix,q=M[O].transform,Z=q<w?0:q-(w-1),Q=0,ue=V,te;Z>D&&(Z=D);for(var de=0;de<L.length;)F[V++]=L[de++];for(z+=Z,D-=Z,q<=b&&(D-=q),Q=0;Q<D;Q++)F[V++]=s.dictionary[z+Q];if(te=V-D,q===_)B(F,te);else if(q===y)for(;D>0;){var pe=B(F,te);te+=pe,D-=pe}for(var $=0;$<W.length;)F[V++]=W[$++];return V-ue}},{"./dictionary":6}],12:[function(o,n,i){n.exports=o("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)})();var mM=(e=>typeof ta<"u"?ta:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof ta<"u"?ta:t)[r]}):e)(function(e){if(typeof ta<"u")return ta.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),ibe=(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 mM=="function"&&mM;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 mM=="function"&&mM,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,I,k,R,A,P,T,M,B,F,V,z,D,O;f=u.state,m=u.next_in,D=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,I=f.bits,k=f.lencode,R=f.distcode,A=(1<<f.lenbits)-1,P=(1<<f.distbits)-1;e:do{I<15&&(C+=D[m++]<<I,I+=8,C+=D[m++]<<I,I+=8),T=k[C&A];t:for(;;){if(M=T>>>24,C>>>=M,I-=M,M=T>>>16&255,M===0)O[g++]=T&65535;else if(M&16){B=T&65535,M&=15,M&&(I<M&&(C+=D[m++]<<I,I+=8),B+=C&(1<<M)-1,C>>>=M,I-=M),I<15&&(C+=D[m++]<<I,I+=8,C+=D[m++]<<I,I+=8),T=R[C&P];r:for(;;){if(M=T>>>24,C>>>=M,I-=M,M=T>>>16&255,M&16){if(F=T&65535,M&=15,I<M&&(C+=D[m++]<<I,I+=8,I<M&&(C+=D[m++]<<I,I+=8)),F+=C&(1<<M)-1,F>_){u.msg="invalid distance too far back",f.mode=s;break e}if(C>>>=M,I-=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(V=0,z=x,S===0){if(V+=y-M,M<B){B-=M;do O[g++]=x[V++];while(--M);V=g-F,z=O}}else if(S<M){if(V+=y+S-M,M-=S,M<B){B-=M;do O[g++]=x[V++];while(--M);if(V=0,S<B){M=S,B-=M;do O[g++]=x[V++];while(--M);V=g-F,z=O}}}else if(V+=S-M,M<B){B-=M;do O[g++]=x[V++];while(--M);V=g-F,z=O}for(;B>2;)O[g++]=z[V++],O[g++]=z[V++],O[g++]=z[V++],B-=3;B&&(O[g++]=z[V++],B>1&&(O[g++]=z[V++]))}else{V=g-F;do O[g++]=O[V++],O[g++]=O[V++],O[g++]=O[V++],B-=3;while(B>2);B&&(O[g++]=O[V++],B>1&&(O[g++]=O[V++]))}}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);B=I>>3,m-=B,I-=B<<3,C&=(1<<I)-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=I}},{}],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,I=-5,k=8,R=1,A=2,P=3,T=4,M=5,B=6,F=7,V=8,z=9,D=10,O=11,L=12,W=13,q=14,Z=15,Q=16,ue=17,te=18,de=19,pe=20,$=21,ee=22,fe=23,ve=24,we=25,oe=26,re=27,ce=28,ie=29,le=30,Oe=31,ke=32,Me=852,Ne=592,Fe=15,X=Fe;function ge(ne){return(ne>>>24&255)+(ne>>>8&65280)+((ne&65280)<<8)+((ne&255)<<24)}function Ue(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ye(ne){var xe;return!ne||!ne.state?S:(xe=ne.state,ne.total_in=ne.total_out=xe.total=0,ne.msg="",xe.wrap&&(ne.adler=xe.wrap&1),xe.mode=R,xe.last=0,xe.havedict=0,xe.dmax=32768,xe.head=null,xe.hold=0,xe.bits=0,xe.lencode=xe.lendyn=new s.Buf32(Me),xe.distcode=xe.distdyn=new s.Buf32(Ne),xe.sane=1,xe.back=-1,_)}function st(ne){var xe;return!ne||!ne.state?S:(xe=ne.state,xe.wsize=0,xe.whave=0,xe.wnext=0,Ye(ne))}function St(ne,xe){var H,Pe;return!ne||!ne.state||(Pe=ne.state,xe<0?(H=0,xe=-xe):(H=(xe>>4)+1,xe<48&&(xe&=15)),xe&&(xe<8||xe>15))?S:(Pe.window!==null&&Pe.wbits!==xe&&(Pe.window=null),Pe.wrap=H,Pe.wbits=xe,st(ne))}function dt(ne,xe){var H,Pe;return ne?(Pe=new Ue,ne.state=Pe,Pe.window=null,H=St(ne,xe),H!==_&&(ne.state=null),H):S}function xt(ne){return dt(ne,X)}var Kt=!0,Xe,ds;function Wa(ne){if(Kt){var xe;for(Xe=new s.Buf32(512),ds=new s.Buf32(32),xe=0;xe<144;)ne.lens[xe++]=8;for(;xe<256;)ne.lens[xe++]=9;for(;xe<280;)ne.lens[xe++]=7;for(;xe<288;)ne.lens[xe++]=8;for(d(m,ne.lens,0,288,Xe,0,ne.work,{bits:9}),xe=0;xe<32;)ne.lens[xe++]=5;d(h,ne.lens,0,32,ds,0,ne.work,{bits:5}),Kt=!1}ne.lencode=Xe,ne.lenbits=9,ne.distcode=ds,ne.distbits=5}function kr(ne,xe,H,Pe){var Bt,Ee=ne.state;return Ee.window===null&&(Ee.wsize=1<<Ee.wbits,Ee.wnext=0,Ee.whave=0,Ee.window=new s.Buf8(Ee.wsize)),Pe>=Ee.wsize?(s.arraySet(Ee.window,xe,H-Ee.wsize,Ee.wsize,0),Ee.wnext=0,Ee.whave=Ee.wsize):(Bt=Ee.wsize-Ee.wnext,Bt>Pe&&(Bt=Pe),s.arraySet(Ee.window,xe,H-Pe,Bt,Ee.wnext),Pe-=Bt,Pe?(s.arraySet(Ee.window,xe,H-Pe,Pe,0),Ee.wnext=Pe,Ee.whave=Ee.wsize):(Ee.wnext+=Bt,Ee.wnext===Ee.wsize&&(Ee.wnext=0),Ee.whave<Ee.wsize&&(Ee.whave+=Bt))),0}function Ai(ne,xe){var H,Pe,Bt,Ee,Ro,Ie,pr,me,he,Js,Wt,He,Ce,it,ht=0,bt,Rr,Gr,oo,vf,nv,vo,fs,Ao=new s.Buf8(4),ps,$s,a0=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!ne||!ne.state||!ne.output||!ne.input&&ne.avail_in!==0)return S;H=ne.state,H.mode===L&&(H.mode=W),Ro=ne.next_out,Bt=ne.output,pr=ne.avail_out,Ee=ne.next_in,Pe=ne.input,Ie=ne.avail_in,me=H.hold,he=H.bits,Js=Ie,Wt=pr,fs=_;e:for(;;)switch(H.mode){case R:if(H.wrap===0){H.mode=W;break}for(;he<16;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(H.wrap&2&&me===35615){H.check=0,Ao[0]=me&255,Ao[1]=me>>>8&255,H.check=c(H.check,Ao,2,0),me=0,he=0,H.mode=A;break}if(H.flags=0,H.head&&(H.head.done=!1),!(H.wrap&1)||(((me&255)<<8)+(me>>8))%31){ne.msg="incorrect header check",H.mode=le;break}if((me&15)!==k){ne.msg="unknown compression method",H.mode=le;break}if(me>>>=4,he-=4,vo=(me&15)+8,H.wbits===0)H.wbits=vo;else if(vo>H.wbits){ne.msg="invalid window size",H.mode=le;break}H.dmax=1<<vo,ne.adler=H.check=1,H.mode=me&512?D:L,me=0,he=0;break;case A:for(;he<16;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(H.flags=me,(H.flags&255)!==k){ne.msg="unknown compression method",H.mode=le;break}if(H.flags&57344){ne.msg="unknown header flags set",H.mode=le;break}H.head&&(H.head.text=me>>8&1),H.flags&512&&(Ao[0]=me&255,Ao[1]=me>>>8&255,H.check=c(H.check,Ao,2,0)),me=0,he=0,H.mode=P;case P:for(;he<32;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.head&&(H.head.time=me),H.flags&512&&(Ao[0]=me&255,Ao[1]=me>>>8&255,Ao[2]=me>>>16&255,Ao[3]=me>>>24&255,H.check=c(H.check,Ao,4,0)),me=0,he=0,H.mode=T;case T:for(;he<16;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.head&&(H.head.xflags=me&255,H.head.os=me>>8),H.flags&512&&(Ao[0]=me&255,Ao[1]=me>>>8&255,H.check=c(H.check,Ao,2,0)),me=0,he=0,H.mode=M;case M:if(H.flags&1024){for(;he<16;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.length=me,H.head&&(H.head.extra_len=me),H.flags&512&&(Ao[0]=me&255,Ao[1]=me>>>8&255,H.check=c(H.check,Ao,2,0)),me=0,he=0}else H.head&&(H.head.extra=null);H.mode=B;case B:if(H.flags&1024&&(He=H.length,He>Ie&&(He=Ie),He&&(H.head&&(vo=H.head.extra_len-H.length,H.head.extra||(H.head.extra=new Array(H.head.extra_len)),s.arraySet(H.head.extra,Pe,Ee,He,vo)),H.flags&512&&(H.check=c(H.check,Pe,He,Ee)),Ie-=He,Ee+=He,H.length-=He),H.length))break e;H.length=0,H.mode=F;case F:if(H.flags&2048){if(Ie===0)break e;He=0;do vo=Pe[Ee+He++],H.head&&vo&&H.length<65536&&(H.head.name+=String.fromCharCode(vo));while(vo&&He<Ie);if(H.flags&512&&(H.check=c(H.check,Pe,He,Ee)),Ie-=He,Ee+=He,vo)break e}else H.head&&(H.head.name=null);H.length=0,H.mode=V;case V:if(H.flags&4096){if(Ie===0)break e;He=0;do vo=Pe[Ee+He++],H.head&&vo&&H.length<65536&&(H.head.comment+=String.fromCharCode(vo));while(vo&&He<Ie);if(H.flags&512&&(H.check=c(H.check,Pe,He,Ee)),Ie-=He,Ee+=He,vo)break e}else H.head&&(H.head.comment=null);H.mode=z;case z:if(H.flags&512){for(;he<16;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(me!==(H.check&65535)){ne.msg="header crc mismatch",H.mode=le;break}me=0,he=0}H.head&&(H.head.hcrc=H.flags>>9&1,H.head.done=!0),ne.adler=H.check=0,H.mode=L;break;case D:for(;he<32;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}ne.adler=H.check=ge(me),me=0,he=0,H.mode=O;case O:if(H.havedict===0)return ne.next_out=Ro,ne.avail_out=pr,ne.next_in=Ee,ne.avail_in=Ie,H.hold=me,H.bits=he,w;ne.adler=H.check=1,H.mode=L;case L:if(xe===v||xe===b)break e;case W:if(H.last){me>>>=he&7,he-=he&7,H.mode=re;break}for(;he<3;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}switch(H.last=me&1,me>>>=1,he-=1,me&3){case 0:H.mode=q;break;case 1:if(Wa(H),H.mode=pe,xe===b){me>>>=2,he-=2;break e}break;case 2:H.mode=ue;break;case 3:ne.msg="invalid block type",H.mode=le}me>>>=2,he-=2;break;case q:for(me>>>=he&7,he-=he&7;he<32;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if((me&65535)!==(me>>>16^65535)){ne.msg="invalid stored block lengths",H.mode=le;break}if(H.length=me&65535,me=0,he=0,H.mode=Z,xe===b)break e;case Z:H.mode=Q;case Q:if(He=H.length,He){if(He>Ie&&(He=Ie),He>pr&&(He=pr),He===0)break e;s.arraySet(Bt,Pe,Ee,He,Ro),Ie-=He,Ee+=He,pr-=He,Ro+=He,H.length-=He;break}H.mode=L;break;case ue:for(;he<14;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(H.nlen=(me&31)+257,me>>>=5,he-=5,H.ndist=(me&31)+1,me>>>=5,he-=5,H.ncode=(me&15)+4,me>>>=4,he-=4,H.nlen>286||H.ndist>30){ne.msg="too many length or distance symbols",H.mode=le;break}H.have=0,H.mode=te;case te:for(;H.have<H.ncode;){for(;he<3;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.lens[a0[H.have++]]=me&7,me>>>=3,he-=3}for(;H.have<19;)H.lens[a0[H.have++]]=0;if(H.lencode=H.lendyn,H.lenbits=7,ps={bits:H.lenbits},fs=d(f,H.lens,0,19,H.lencode,0,H.work,ps),H.lenbits=ps.bits,fs){ne.msg="invalid code lengths set",H.mode=le;break}H.have=0,H.mode=de;case de:for(;H.have<H.nlen+H.ndist;){for(;ht=H.lencode[me&(1<<H.lenbits)-1],bt=ht>>>24,Rr=ht>>>16&255,Gr=ht&65535,!(bt<=he);){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(Gr<16)me>>>=bt,he-=bt,H.lens[H.have++]=Gr;else{if(Gr===16){for($s=bt+2;he<$s;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(me>>>=bt,he-=bt,H.have===0){ne.msg="invalid bit length repeat",H.mode=le;break}vo=H.lens[H.have-1],He=3+(me&3),me>>>=2,he-=2}else if(Gr===17){for($s=bt+3;he<$s;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}me>>>=bt,he-=bt,vo=0,He=3+(me&7),me>>>=3,he-=3}else{for($s=bt+7;he<$s;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}me>>>=bt,he-=bt,vo=0,He=11+(me&127),me>>>=7,he-=7}if(H.have+He>H.nlen+H.ndist){ne.msg="invalid bit length repeat",H.mode=le;break}for(;He--;)H.lens[H.have++]=vo}}if(H.mode===le)break;if(H.lens[256]===0){ne.msg="invalid code -- missing end-of-block",H.mode=le;break}if(H.lenbits=9,ps={bits:H.lenbits},fs=d(m,H.lens,0,H.nlen,H.lencode,0,H.work,ps),H.lenbits=ps.bits,fs){ne.msg="invalid literal/lengths set",H.mode=le;break}if(H.distbits=6,H.distcode=H.distdyn,ps={bits:H.distbits},fs=d(h,H.lens,H.nlen,H.ndist,H.distcode,0,H.work,ps),H.distbits=ps.bits,fs){ne.msg="invalid distances set",H.mode=le;break}if(H.mode=pe,xe===b)break e;case pe:H.mode=$;case $:if(Ie>=6&&pr>=258){ne.next_out=Ro,ne.avail_out=pr,ne.next_in=Ee,ne.avail_in=Ie,H.hold=me,H.bits=he,u(ne,Wt),Ro=ne.next_out,Bt=ne.output,pr=ne.avail_out,Ee=ne.next_in,Pe=ne.input,Ie=ne.avail_in,me=H.hold,he=H.bits,H.mode===L&&(H.back=-1);break}for(H.back=0;ht=H.lencode[me&(1<<H.lenbits)-1],bt=ht>>>24,Rr=ht>>>16&255,Gr=ht&65535,!(bt<=he);){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(Rr&&(Rr&240)===0){for(oo=bt,vf=Rr,nv=Gr;ht=H.lencode[nv+((me&(1<<oo+vf)-1)>>oo)],bt=ht>>>24,Rr=ht>>>16&255,Gr=ht&65535,!(oo+bt<=he);){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}me>>>=oo,he-=oo,H.back+=oo}if(me>>>=bt,he-=bt,H.back+=bt,H.length=Gr,Rr===0){H.mode=oe;break}if(Rr&32){H.back=-1,H.mode=L;break}if(Rr&64){ne.msg="invalid literal/length code",H.mode=le;break}H.extra=Rr&15,H.mode=ee;case ee:if(H.extra){for($s=H.extra;he<$s;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.length+=me&(1<<H.extra)-1,me>>>=H.extra,he-=H.extra,H.back+=H.extra}H.was=H.length,H.mode=fe;case fe:for(;ht=H.distcode[me&(1<<H.distbits)-1],bt=ht>>>24,Rr=ht>>>16&255,Gr=ht&65535,!(bt<=he);){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if((Rr&240)===0){for(oo=bt,vf=Rr,nv=Gr;ht=H.distcode[nv+((me&(1<<oo+vf)-1)>>oo)],bt=ht>>>24,Rr=ht>>>16&255,Gr=ht&65535,!(oo+bt<=he);){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}me>>>=oo,he-=oo,H.back+=oo}if(me>>>=bt,he-=bt,H.back+=bt,Rr&64){ne.msg="invalid distance code",H.mode=le;break}H.offset=Gr,H.extra=Rr&15,H.mode=ve;case ve:if(H.extra){for($s=H.extra;he<$s;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}H.offset+=me&(1<<H.extra)-1,me>>>=H.extra,he-=H.extra,H.back+=H.extra}if(H.offset>H.dmax){ne.msg="invalid distance too far back",H.mode=le;break}H.mode=we;case we:if(pr===0)break e;if(He=Wt-pr,H.offset>He){if(He=H.offset-He,He>H.whave&&H.sane){ne.msg="invalid distance too far back",H.mode=le;break}He>H.wnext?(He-=H.wnext,Ce=H.wsize-He):Ce=H.wnext-He,He>H.length&&(He=H.length),it=H.window}else it=Bt,Ce=Ro-H.offset,He=H.length;He>pr&&(He=pr),pr-=He,H.length-=He;do Bt[Ro++]=it[Ce++];while(--He);H.length===0&&(H.mode=$);break;case oe:if(pr===0)break e;Bt[Ro++]=H.length,pr--,H.mode=$;break;case re:if(H.wrap){for(;he<32;){if(Ie===0)break e;Ie--,me|=Pe[Ee++]<<he,he+=8}if(Wt-=pr,ne.total_out+=Wt,H.total+=Wt,Wt&&(ne.adler=H.check=H.flags?c(H.check,Bt,Wt,Ro-Wt):l(H.check,Bt,Wt,Ro-Wt)),Wt=pr,(H.flags?me:ge(me))!==H.check){ne.msg="incorrect data check",H.mode=le;break}me=0,he=0}H.mode=ce;case ce:if(H.wrap&&H.flags){for(;he<32;){if(Ie===0)break e;Ie--,me+=Pe[Ee++]<<he,he+=8}if(me!==(H.total&4294967295)){ne.msg="incorrect length check",H.mode=le;break}me=0,he=0}H.mode=ie;case ie:fs=y;break e;case le:fs=x;break e;case Oe:return C;case ke:default:return S}return ne.next_out=Ro,ne.avail_out=pr,ne.next_in=Ee,ne.avail_in=Ie,H.hold=me,H.bits=he,(H.wsize||Wt!==ne.avail_out&&H.mode<le&&(H.mode<re||xe!==g))&&kr(ne,ne.output,ne.next_out,Wt-ne.avail_out)?(H.mode=Oe,C):(Js-=ne.avail_in,Wt-=ne.avail_out,ne.total_in+=Js,ne.total_out+=Wt,H.total+=Wt,H.wrap&&Wt&&(ne.adler=H.check=H.flags?c(H.check,Bt,Wt,ne.next_out-Wt):l(H.check,Bt,Wt,ne.next_out-Wt)),ne.data_type=H.bits+(H.last?64:0)+(H.mode===L?128:0)+(H.mode===pe||H.mode===Z?256:0),(Js===0&&Wt===0||xe===g)&&fs===_&&(fs=I),fs)}function sn(ne){if(!ne||!ne.state)return S;var xe=ne.state;return xe.window&&(xe.window=null),ne.state=null,_}function vt(ne,xe){var H;return!ne||!ne.state||(H=ne.state,(H.wrap&2)===0)?S:(H.head=xe,xe.done=!1,_)}function Ft(ne,xe){var H=xe.length,Pe,Bt,Ee;return!ne||!ne.state||(Pe=ne.state,Pe.wrap!==0&&Pe.mode!==O)?S:Pe.mode===O&&(Bt=1,Bt=l(Bt,xe,H,0),Bt!==Pe.check)?x:(Ee=kr(ne,xe,H,H),Ee?(Pe.mode=Oe,C):(Pe.havedict=1,_))}i.inflateReset=st,i.inflateReset2=St,i.inflateResetKeep=Ye,i.inflateInit=xt,i.inflateInit2=dt,i.inflate=Ai,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,I,k,R){var A=R.bits,P=0,T=0,M=0,B=0,F=0,V=0,z=0,D=0,O=0,L=0,W,q,Z,Q,ue,te=null,de=0,pe,$=new s.Buf16(l+1),ee=new s.Buf16(l+1),fe=null,ve=0,we,oe,re;for(P=0;P<=l;P++)$[P]=0;for(T=0;T<x;T++)$[w[S+T]]++;for(F=A,B=l;B>=1&&$[B]===0;B--);if(F>B&&(F=B),B===0)return C[I++]=1<<24|64<<16|0,C[I++]=1<<24|64<<16|0,R.bits=1,0;for(M=1;M<B&&$[M]===0;M++);for(F<M&&(F=M),D=1,P=1;P<=l;P++)if(D<<=1,D-=$[P],D<0)return-1;if(D>0&&(y===d||B!==1))return-1;for(ee[1]=0,P=1;P<l;P++)ee[P+1]=ee[P]+$[P];for(T=0;T<x;T++)w[S+T]!==0&&(k[ee[w[S+T]]++]=T);if(y===d?(te=fe=k,pe=19):y===f?(te=h,de-=257,fe=g,ve-=257,pe=256):(te=v,fe=b,pe=-1),L=0,T=0,P=M,ue=I,V=F,z=0,Z=-1,O=1<<F,Q=O-1,y===f&&O>c||y===m&&O>u)return 1;for(;;){we=P-z,k[T]<pe?(oe=0,re=k[T]):k[T]>pe?(oe=fe[ve+k[T]],re=te[de+k[T]]):(oe=96,re=0),W=1<<P-z,q=1<<V,M=q;do q-=W,C[ue+(L>>z)+q]=we<<24|oe<<16|re|0;while(q!==0);for(W=1<<P-1;L&W;)W>>=1;if(W!==0?(L&=W-1,L+=W):L=0,T++,--$[P]===0){if(P===B)break;P=w[S+k[T]]}if(P>F&&(L&Q)!==Z){for(z===0&&(z=F),ue+=M,V=P-z,D=1<<V;V+z<B&&(D-=$[V+z],!(D<=0));)V++,D<<=1;if(O+=1<<V,y===f&&O>c||y===m&&O>u)return 1;Z=L&Q,C[Z]=F<<24|V<<16|ue-I|0}}return L!==0&&(C[ue+L]=P-z<<24|64<<16|0),R.bits=F,0}},{"../utils/common":1}],10:[function(o,n,i){"use strict";n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(o,n,i){"use strict";function s(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}n.exports=s},{}],"/lib/inflate.js":[function(o,n,i){"use strict";var s=o("./zlib/inflate"),l=o("./utils/common"),c=o("./utils/strings"),u=o("./zlib/constants"),d=o("./zlib/messages"),f=o("./zlib/zstream"),m=o("./zlib/gzheader"),h=Object.prototype.toString;function g(_){if(!(this instanceof g))return new g(_);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},_||{});var y=this.options;y.raw&&y.windowBits>=0&&y.windowBits<16&&(y.windowBits=-y.windowBits,y.windowBits===0&&(y.windowBits=-15)),y.windowBits>=0&&y.windowBits<16&&!(_&&_.windowBits)&&(y.windowBits+=32),y.windowBits>15&&y.windowBits<48&&(y.windowBits&15)===0&&(y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var w=s.inflateInit2(this.strm,y.windowBits);if(w!==u.Z_OK)throw new Error(d[w]);if(this.header=new m,s.inflateGetHeader(this.strm,this.header),y.dictionary&&(typeof y.dictionary=="string"?y.dictionary=c.string2buf(y.dictionary):h.call(y.dictionary)==="[object ArrayBuffer]"&&(y.dictionary=new Uint8Array(y.dictionary)),y.raw&&(w=s.inflateSetDictionary(this.strm,y.dictionary),w!==u.Z_OK)))throw new Error(d[w])}g.prototype.push=function(_,y){var w=this.strm,S=this.options.chunkSize,x=this.options.dictionary,C,I,k,R,A,P=!1;if(this.ended)return!1;I=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&&(I===u.Z_FINISH||I===u.Z_SYNC_FLUSH))&&(this.options.to==="string"?(k=c.utf8border(w.output,w.next_out),R=w.next_out-k,A=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(A)):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&&(I=u.Z_FINISH),I===u.Z_FINISH?(C=s.inflateEnd(this.strm),this.onEnd(C),this.ended=!0,C===u.Z_OK):(I===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 LQt=globalThis.fetch,hM=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]`}},yZe=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)}},wZe=new Date("1904-01-01T00:00:00+0000").getTime();function _Ze(e){return Array.from(e).map(t=>String.fromCharCode(t)).join("")}var SZe=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 _Ze([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(wZe+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){let e=p.uint16,t=[0,1,-2,-1][e>>14],r=e&16383;return t+r/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,r=8,o=!1){if(e=e||this.length,e===0)return[];t&&(this.currentPosition=t);let n=`${o?"":"u"}int${r}`,i=[];for(;e--;)i.push(this[n]);return i}},To=class{constructor(e){Object.defineProperty(this,"parser",{enumerable:!1,get:()=>e});let r=e.currentPosition;Object.defineProperty(this,"start",{enumerable:!1,get:()=>r})}load(e){Object.keys(e).forEach(t=>{let r=Object.getOwnPropertyDescriptor(e,t);r.get?this[t]=r.get.bind(this):r.value!==void 0&&(this[t]=r.value)}),this.parser.length&&this.parser.verifyLength()}},yt=class extends To{constructor(e,t,r){let{parser:o,start:n}=super(new SZe(e,t,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>n})}};function ze(e,t,r){let o;Object.defineProperty(e,t,{get:()=>o||(o=r(),o),enumerable:!0})}var xZe=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 CZe(o)),this.tables={},this.directory.forEach(n=>{let i=()=>r(this.tables,{tag:n.tag,offset:n.offset,length:n.length},t);ze(this.tables,n.tag.trim(),i)})}},CZe=class{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}},sbe=ibe.inflate||void 0,abe=void 0,TZe=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 EZe(o)),PZe(this,t,r)}},EZe=class{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}};function PZe(e,t,r){e.tables={},e.directory.forEach(o=>{ze(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(sbe)l=sbe(new Uint8Array(s));else if(abe)l=abe(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 lbe=nbe,cbe=void 0,kZe=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 RZe(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(lbe)i=lbe(new Uint8Array(s));else if(cbe)i=new Uint8Array(cbe(s));else{let l="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(l),new Error(l)}AZe(this,i,r)}},RZe=class{constructor(e){this.flags=e.uint8;let t=this.tagNumber=this.flags&63;t===63?this.tag=e.tag:this.tag=IZe(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 AZe(e,t,r){e.tables={},e.directory.forEach(o=>{ze(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 IZe(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 gbe={},vbe=!1;Promise.all([Promise.resolve().then(function(){return iXe}),Promise.resolve().then(function(){return aXe}),Promise.resolve().then(function(){return cXe}),Promise.resolve().then(function(){return fXe}),Promise.resolve().then(function(){return mXe}),Promise.resolve().then(function(){return yXe}),Promise.resolve().then(function(){return _Xe}),Promise.resolve().then(function(){return xXe}),Promise.resolve().then(function(){return NXe}),Promise.resolve().then(function(){return WXe}),Promise.resolve().then(function(){return IQe}),Promise.resolve().then(function(){return NQe}),Promise.resolve().then(function(){return LQe}),Promise.resolve().then(function(){return zQe}),Promise.resolve().then(function(){return UQe}),Promise.resolve().then(function(){return GQe}),Promise.resolve().then(function(){return KQe}),Promise.resolve().then(function(){return XQe}),Promise.resolve().then(function(){return JQe}),Promise.resolve().then(function(){return eJe}),Promise.resolve().then(function(){return rJe}),Promise.resolve().then(function(){return nJe}),Promise.resolve().then(function(){return aJe}),Promise.resolve().then(function(){return uJe}),Promise.resolve().then(function(){return dJe}),Promise.resolve().then(function(){return pJe}),Promise.resolve().then(function(){return hJe}),Promise.resolve().then(function(){return vJe}),Promise.resolve().then(function(){return yJe}),Promise.resolve().then(function(){return SJe}),Promise.resolve().then(function(){return kJe}),Promise.resolve().then(function(){return OJe}),Promise.resolve().then(function(){return FJe}),Promise.resolve().then(function(){return VJe}),Promise.resolve().then(function(){return zJe}),Promise.resolve().then(function(){return UJe}),Promise.resolve().then(function(){return YJe}),Promise.resolve().then(function(){return KJe}),Promise.resolve().then(function(){return $Je}),Promise.resolve().then(function(){return t$e}),Promise.resolve().then(function(){return n$e})]).then(e=>{e.forEach(t=>{let r=Object.keys(t)[0];gbe[r]=t[r]}),vbe=!0});function OZe(e,t,r){let o=t.tag.replace(/[^\w\d]/g,""),n=gbe[o];return n?new n(t,r,e):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function NZe(){let e=0;function t(r,o){if(!vbe)return e>10?o(new Error("loading took too long")):(e++,setTimeout(()=>t(r),250));r(OZe)}return new Promise((r,o)=>t(r))}function MZe(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 FZe(e,t,r={}){if(!globalThis.document)return;let o=MZe(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=` |
| 58 |
@font-face { |
| 59 |
font-family: "${e}"; |
| 60 |
${i.join(` |
| 61 |
`)} |
| 62 |
src: url("${t}") format("${o}"); |
| 63 |
}`,globalThis.document.head.appendChild(n),n}var DZe=[0,1,0,0],LZe=[79,84,84,79],BZe=[119,79,70,70],VZe=[119,79,70,50];function gM(e,t){if(e.length===t.length){for(let r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function jZe(e){let t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];if(gM(t,DZe)||gM(t,LZe))return"SFNT";if(gM(t,BZe))return"WOFF";if(gM(t,VZe))return"WOFF2"}function zZe(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}var bM=class extends yZe{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 FZe(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>zZe(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new hM("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=jZe(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 hM("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return NZe().then(t=>(e==="SFNT"&&(this.opentype=new xZe(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new TZe(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new kZe(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 hM("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 hM("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=bM;var Sp=class extends To{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},HZe=class extends Sp{constructor(e,t,r){super(e,t,r),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map(o=>e.uint8)}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},UZe=class extends Sp{constructor(e,t,r){super(e,t,r),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map(s=>e.uint16);let o=Math.max(...this.subHeaderKeys),n=e.currentPosition;ze(this,"subHeaders",()=>(e.currentPosition=n,[...new Array(o)].map(s=>new WZe(e))));let i=n+o*8;ze(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}))}},WZe=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}},GZe=class extends Sp{constructor(e,t,r){super(e,t,r),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;let o=e.currentPosition;ze(this,"endCode",()=>e.readBytes(this.segCount,o,16));let n=o+2+this.segCountX2;ze(this,"startCode",()=>e.readBytes(this.segCount,n,16));let i=n+this.segCountX2;ze(this,"idDelta",()=>e.readBytes(this.segCount,i,16,!0));let s=i+this.segCountX2;ze(this,"idRangeOffset",()=>e.readBytes(this.segCount,s,16));let l=s+this.segCountX2,c=this.length-(l-this.tableStart);ze(this,"glyphIdArray",()=>e.readBytes(c,l,16)),ze(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}))}},YZe=class extends Sp{constructor(e,t,r){super(e,t,r),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1,ze(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}]}},qZe=class extends Sp{constructor(e,t,r){super(e,t,r),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map(n=>e.uint8),this.numGroups=e.uint32,ze(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new KZe(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}))}},KZe=class{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}},ZZe=class extends Sp{constructor(e,t,r){super(e,t,r),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars,ze(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}]}},XZe=class extends Sp{constructor(e,t,r){super(e,t,r),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32,ze(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new QZe(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}))}},QZe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}},JZe=class extends Sp{constructor(e,t,r){super(e,t,r),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;let o=[...new Array(this.numGroups)].map(n=>new $Ze(e));ze(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}))}},$Ze=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}},eXe=class extends Sp{constructor(e,t,r){super(e,t,r),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,ze(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new tXe(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)}},tXe=class{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}};function rXe(e,t,r){let o=e.uint16;return o===0?new HZe(e,t,r):o===2?new UZe(e,t,r):o===4?new GZe(e,t,r):o===6?new YZe(e,t,r):o===8?new qZe(e,t,r):o===10?new ZZe(e,t,r):o===12?new XZe(e,t,r):o===13?new JZe(e,t,r):o===14?new eXe(e,t,r):{}}var oXe=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 nXe(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})}},nXe=class{constructor(e,t){let r=this.platformID=e.uint16,o=this.encodingID=e.uint16,n=this.offset=e.Offset32;ze(this,"table",()=>(e.currentPosition=t+n,rXe(e,r,o)))}},iXe=Object.freeze({__proto__:null,cmap:oXe}),sXe=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})}},aXe=Object.freeze({__proto__:null,head:sXe}),lXe=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()}},cXe=Object.freeze({__proto__:null,hhea:lXe}),uXe=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(ze(this,"hMetrics",()=>(o.currentPosition=s,[...new Array(n)].map(l=>new dXe(o.uint16,o.int16)))),n<i){let l=s+n*4;ze(this,"leftSideBearings",()=>(o.currentPosition=l,[...new Array(i-n)].map(c=>o.int16)))}}},dXe=class{constructor(e,t){this.advanceWidth=e,this.lsb=t}},fXe=Object.freeze({__proto__:null,hmtx:uXe}),pXe=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()}},mXe=Object.freeze({__proto__:null,maxp:pXe}),hXe=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 vXe(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new gXe(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}},gXe=class{constructor(e,t){this.length=e,this.offset=t}},vXe=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,ze(this,"string",()=>(e.currentPosition=t.stringStart+this.offset,bXe(e,this)))}};function bXe(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 yXe=Object.freeze({__proto__:null,name:hXe}),wXe=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()}},_Xe=Object.freeze({__proto__:null,OS2:wXe}),SXe=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]<ube.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 ube[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(""))}},ube=[".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"],xXe=Object.freeze({__proto__:null,post:SXe}),CXe=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,ze(this,"horizAxis",()=>new GW({offset:e.offset+this.horizAxisOffset},t)),ze(this,"vertAxis",()=>new GW({offset:e.offset+this.vertAxisOffset},t)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,ze(this,"itemVarStore",()=>new GW({offset:e.offset+this.itemVarStoreOffset},t)))}},GW=class extends yt{constructor(e,t){let{p:r}=super(e,t,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,ze(this,"baseTagList",()=>new TXe({offset:e.offset+this.baseTagListOffset},t)),ze(this,"baseScriptList",()=>new EXe({offset:e.offset+this.baseScriptListOffset},t))}},TXe=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)}},EXe=class extends yt{constructor(e,t){let{p:r}=super(e,t,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;ze(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(n=>new PXe(this.start,r))))}},PXe=class{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,ze(this,"baseScriptTable",()=>(t.currentPosition=e+this.baseScriptOffset,new kXe(t)))}},kXe=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 RXe(this.start,e)),ze(this,"baseValues",()=>(e.currentPosition=this.start+this.baseValuesOffset,new AXe(e))),ze(this,"defaultMinMax",()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new bbe(e)))}},RXe=class{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,ze(this,"minMax",()=>(t.currentPosition=e+this.minMaxOffset,new bbe(t)))}},AXe=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 OXe(this.parser)}},bbe=class{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;let t=e.currentPosition;ze(this,"featMinMaxRecords",()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map(r=>new IXe(e))))}},IXe=class{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}},OXe=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)}},NXe=Object.freeze({__proto__:null,BASE:CXe}),dbe=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 MXe(e)))}},MXe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}},uE=class extends To{constructor(e){super(e),this.coverageFormat=e.uint16,this.coverageFormat===1&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.coverageFormat===2&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(t=>new FXe(e)))}},FXe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}},DXe=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)}},LXe=class extends yt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,ze(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new dbe(r)}),this.attachListOffset=r.Offset16,ze(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new BXe(r)}),this.ligCaretListOffset=r.Offset16,ze(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new jXe(r)}),this.markAttachClassDefOffset=r.Offset16,ze(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new dbe(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,ze(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new UXe(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,ze(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new DXe(r)}))}},BXe=class extends To{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16)}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new VXe(this.parser)}},VXe=class{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map(t=>e.uint16)}},jXe=class extends To{constructor(e){super(e),this.coverageOffset=e.Offset16,ze(this,"coverage",()=>(e.currentPosition=this.start+this.coverageOffset,new uE(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 zXe(this.parser)}},zXe=class extends To{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map(t=>e.Offset16)}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new HXe(this.parser)}},HXe=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)}},UXe=class extends To{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map(t=>e.Offset32)}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new uE(this.parser)}},WXe=Object.freeze({__proto__:null,GDEF:LXe}),fbe=class extends To{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(t=>new GXe(e))}},GXe=class{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}},YXe=class extends To{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(t=>new qXe(e))}},qXe=class{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}},pbe=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)}},mbe=class extends To{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map(t=>new KXe(e))}},KXe=class{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}},ZXe=class extends To{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map(t=>e.uint16)}getFeatureParams(){if(this.featureParams>0){let e=this.parser;e.currentPosition=this.start+this.featureParams;let t=this.featureTag;if(t==="size")return new QXe(e);if(t.startsWith("cc"))return new XXe(e);if(t.startsWith("ss"))return new JXe(e)}}},XXe=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)}},QXe=class{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}},JXe=class{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}};function ybe(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}var Xb=class extends To{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new uE(e)}},qW=class{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},$Xe=class extends Xb{constructor(e){super(e),this.deltaGlyphID=e.int16}},eQe=class extends Xb{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 tQe(t)}},tQe=class{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},rQe=class extends Xb{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 oQe(t)}},oQe=class{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},nQe=class extends Xb{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 iQe(t)}},iQe=class extends To{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map(t=>e.Offset16)}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new sQe(t)}},sQe=class{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(t=>e.uint16)}},aQe=class extends Xb{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&&(ybe(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 qW(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 lQe(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 cQe(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 uE(t)}},lQe=class extends To{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new wbe(t)}},wbe=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 qW(e))}},cQe=class extends To{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new uQe(t)}},uQe=class extends wbe{constructor(e){super(e)}},dQe=class extends Xb{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&&(ybe(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 _be(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 fQe(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 mQe(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 uE(t)}},fQe=class extends To{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new pQe(t)}},pQe=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 qW(e))}},mQe=class extends To{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new hQe(t)}},hQe=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 _be(e))}},_be=class extends To{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},gQe=class extends To{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}},vQe=class extends Xb{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)}},bQe={buildSubtable:function(e,t){let r=new[void 0,$Xe,eQe,rQe,nQe,aQe,dQe,gQe,vQe][e](t);return r.type=e,r}},xp=class extends To{constructor(e){super(e)}},yQe=class extends xp{constructor(e){super(e),console.log("lookup type 1")}},wQe=class extends xp{constructor(e){super(e),console.log("lookup type 2")}},_Qe=class extends xp{constructor(e){super(e),console.log("lookup type 3")}},SQe=class extends xp{constructor(e){super(e),console.log("lookup type 4")}},xQe=class extends xp{constructor(e){super(e),console.log("lookup type 5")}},CQe=class extends xp{constructor(e){super(e),console.log("lookup type 6")}},TQe=class extends xp{constructor(e){super(e),console.log("lookup type 7")}},EQe=class extends xp{constructor(e){super(e),console.log("lookup type 8")}},PQe=class extends xp{constructor(e){super(e),console.log("lookup type 9")}},kQe={buildSubtable:function(e,t){let r=new[void 0,yQe,wQe,_Qe,SQe,xQe,CQe,TQe,EQe,PQe][e](t);return r.type=e,r}},hbe=class extends To{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map(t=>e.Offset16)}},RQe=class extends To{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map(r=>e.Offset16),this.markFilteringSet=e.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(e){let t=this.ctType==="GSUB"?bQe:kQe;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}},Sbe=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);ze(this,"scriptList",()=>i?fbe.EMPTY:(o.currentPosition=n+this.scriptListOffset,new fbe(o))),ze(this,"featureList",()=>i?mbe.EMPTY:(o.currentPosition=n+this.featureListOffset,new mbe(o))),ze(this,"lookupList",()=>i?hbe.EMPTY:(o.currentPosition=n+this.lookupListOffset,new hbe(o))),this.featureVariationsOffset&&ze(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 YXe(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 pbe(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 pbe(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 ZXe(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 RQe(this.parser,t)}},AQe=class extends Sbe{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}},IQe=Object.freeze({__proto__:null,GSUB:AQe}),OQe=class extends Sbe{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}},NQe=Object.freeze({__proto__:null,GPOS:OQe}),MQe=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 FQe(r)}},FQe=class extends To{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map(t=>new DQe(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)}},DQe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}},LQe=Object.freeze({__proto__:null,SVG:MQe}),BQe=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;ze(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(i=>new VQe(r))));let n=o+this.axisCount*this.axisSize;ze(this,"instances",()=>{let i=[];for(let s=0;s<this.instanceCount;s++)r.currentPosition=n+s*this.instanceSize,i.push(new jQe(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)}},VQe=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}},jQe=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)}},zQe=Object.freeze({__proto__:null,fvar:BQe}),HQe=class extends yt{constructor(e,t){let{p:r}=super(e,t),o=e.length/2;ze(this,"items",()=>[...new Array(o)].map(n=>r.fword))}},UQe=Object.freeze({__proto__:null,cvt:HQe}),WQe=class extends yt{constructor(e,t){let{p:r}=super(e,t);ze(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},GQe=Object.freeze({__proto__:null,fpgm:WQe}),YQe=class extends yt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRanges=r.uint16,ze(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(n=>new qQe(r)))}},qQe=class{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}},KQe=Object.freeze({__proto__:null,gasp:YQe}),ZQe=class extends yt{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}},XQe=Object.freeze({__proto__:null,glyf:ZQe}),QQe=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,ze(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset16))):ze(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}}},JQe=Object.freeze({__proto__:null,loca:QQe}),$Qe=class extends yt{constructor(e,t){let{p:r}=super(e,t);ze(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},eJe=Object.freeze({__proto__:null,prep:$Qe}),tJe=class extends yt{constructor(e,t){let{p:r}=super(e,t);ze(this,"data",()=>r.readBytes())}},rJe=Object.freeze({__proto__:null,CFF:tJe}),oJe=class extends yt{constructor(e,t){let{p:r}=super(e,t);ze(this,"data",()=>r.readBytes())}},nJe=Object.freeze({__proto__:null,CFF2:oJe}),iJe=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,ze(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new sJe(r)))}},sJe=class{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}},aJe=Object.freeze({__proto__:null,VORG:iJe}),lJe=class{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new vM(e),this.vert=new vM(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}},cJe=class{constructor(e){this.hori=new vM(e),this.vert=new vM(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}},vM=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}},xbe=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,ze(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(n=>new lJe(o)))}},uJe=Object.freeze({__proto__:null,EBLC:xbe}),Cbe=class extends yt{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},dJe=Object.freeze({__proto__:null,EBDT:Cbe}),fJe=class extends yt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,ze(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new cJe(r)))}},pJe=Object.freeze({__proto__:null,EBSC:fJe}),mJe=class extends xbe{constructor(e,t){super(e,t,"CBLC")}},hJe=Object.freeze({__proto__:null,CBLC:mJe}),gJe=class extends Cbe{constructor(e,t){super(e,t,"CBDT")}},vJe=Object.freeze({__proto__:null,CBDT:gJe}),bJe=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,ze(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},yJe=Object.freeze({__proto__:null,sbix:bJe}),wJe=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 YW(this.parser),o=r.gID,n=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=n;let i=new YW(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 YW(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 _Je(p))}},YW=class{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}},_Je=class{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}},SJe=Object.freeze({__proto__:null,COLR:wJe}),xJe=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),ze(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(n=>new CJe(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,ze(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new TJe(r,o))),ze(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new EJe(r,o))),ze(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new PJe(r,o))))}},CJe=class{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}},TJe=class{constructor(e,t){this.paletteTypes=[...new Array(t)].map(r=>e.uint32)}},EJe=class{constructor(e,t){this.paletteLabels=[...new Array(t)].map(r=>e.uint16)}},PJe=class{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map(r=>e.uint16)}},kJe=Object.freeze({__proto__:null,CPAL:xJe}),RJe=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 AJe(r))}getData(e){let t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new IJe(this.parser)}},AJe=class{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}},IJe=class{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}},OJe=Object.freeze({__proto__:null,DSIG:RJe}),NJe=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 MJe(o,n))}},MJe=class{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}},FJe=Object.freeze({__proto__:null,hdmx:NJe}),DJe=class extends yt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.nTables=r.uint16,ze(this,"tables",()=>{let o=this.tableStart+4,n=[];for(let i=0;i<this.nTables;i++){r.currentPosition=o;let s=new LJe(r);n.push(s),o+=s}return n})}},LJe=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,ze(this,"pairs",()=>[...new Array(this.nPairs)].map(t=>new BJe(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]}},BJe=class{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}},VJe=Object.freeze({__proto__:null,kern:DJe}),jJe=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)}},zJe=Object.freeze({__proto__:null,LTSH:jJe}),HJe=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,ze(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.")}},UJe=Object.freeze({__proto__:null,MERG:HJe}),WJe=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 GJe(this.tableStart,r))}},GJe=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)}},YJe=Object.freeze({__proto__:null,meta:WJe}),qJe=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.")}},KJe=Object.freeze({__proto__:null,PCLT:qJe}),ZJe=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 XJe(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new QJe(r))}},XJe=class{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}},QJe=class{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map(t=>new JJe(e))}},JJe=class{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}},$Je=Object.freeze({__proto__:null,VDMX:ZJe}),e$e=class extends yt{constructor(e,t){let{p:r}=super(e,t);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},t$e=Object.freeze({__proto__:null,vhea:e$e}),r$e=class extends yt{constructor(e,t,r){super(e,t);let o=r.vhea.numOfLongVerMetrics,n=r.maxp.numGlyphs,i=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=i,[...new Array(o)].map(s=>new o$e(p.uint16,p.int16)))),o<n){let s=i+o*4;lazy(this,"topSideBearings",()=>(p.currentPosition=s,[...new Array(n-o)].map(l=>p.int16)))}}},o$e=class{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}},n$e=Object.freeze({__proto__:null,vmtx:r$e});var Tbe=a(G(),1);var{kebabCase:i$e}=Et(Tbe.privateApis);function Ebe(e){let t=e.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:i$e(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(t)}var Pa=a(E(),1);function s$e(){let{installFonts:e}=(0,dE.useContext)(yi),[t,r]=(0,dE.useState)(!1),[o,n]=(0,dE.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 zW.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,O_.__)("Sorry, you are not allowed to upload this file type."):(0,O_.__)("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 $h(b,b.file,"all"),b}));m(g)};async function u(h){let g=new bM("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 bM("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",I=!!_.opentype.tables.fvar&&_.opentype.tables.fvar.axes.find(({tag:R})=>R==="wght"),k=I?`${I.minValue} ${I.maxValue}`:null;return{file:h,fontFamily:w,fontStyle:S?"italic":"normal",fontWeight:k||x}},m=async h=>{let g=Ebe(h);try{await e(g),n({type:"success",message:(0,O_.__)("Fonts were installed successfully.")})}catch(v){let b=v;n({type:"error",message:b.message,errors:b?.installationErrors})}r(!1)};return(0,Pa.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,Pa.jsx)(rs.DropZone,{onFilesDrop:i}),(0,Pa.jsxs)(rs.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,Pa.jsxs)(rs.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>n(null),children:[o.message,o.errors&&(0,Pa.jsx)("ul",{children:o.errors.map((h,g)=>(0,Pa.jsx)("li",{children:h},g))})]}),t&&(0,Pa.jsx)(rs.FlexItem,{children:(0,Pa.jsx)("div",{className:"font-library__upload-area",children:(0,Pa.jsx)(rs.ProgressBar,{})})}),!t&&(0,Pa.jsx)(rs.FormFileUpload,{accept:zW.map(h=>`.${h}`).join(","),multiple:!0,onChange:s,render:({openFileDialog:h})=>(0,Pa.jsx)(rs.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,O_.__)("Upload font")})}),(0,Pa.jsx)(rs.__experimentalText,{className:"font-library__upload-area__text",children:(0,O_.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var yM=s$e;var $c=a(E(),1),{Tabs:wM}=Et(_M.privateApis),a$e={id:"installed-fonts",title:(0,N_._x)("Library","Font library")},l$e={id:"upload-fonts",title:(0,N_._x)("Upload","noun")},c$e=e=>e.map(({slug:t,name:r})=>({id:t,title:e.length===1&&t==="google-fonts"?(0,N_.__)("Install Fonts"):r}));function u$e({onRequestClose:e,defaultTabId:t="installed-fonts"}){let{records:r=[]}=(0,SM.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),o=(0,Pbe.useSelect)(i=>i(SM.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]),n=[a$e];return o&&(n.push(l$e),n.push(...c$e(r||[]))),(0,$c.jsx)(_M.Modal,{title:(0,N_.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,$c.jsxs)(wM,{defaultTabId:t,children:[(0,$c.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,$c.jsx)(wM.TabList,{children:n.map(({id:i,title:s})=>(0,$c.jsx)(wM.Tab,{tabId:i,children:s},i))})}),n.map(({id:i})=>{let s;switch(i){case"upload-fonts":s=(0,$c.jsx)(yM,{});break;case"installed-fonts":s=(0,$c.jsx)(uM,{});break;default:s=(0,$c.jsx)(fM,{slug:i})}return(0,$c.jsx)(wM.TabPanel,{tabId:i,focusable:!1,className:"font-library-modal__tab-panel",children:s},i)})]})})}var kbe=u$e;var xM=a(j(),1),Qb=a(G(),1),Rbe=a(U(),1);var M_=a(E(),1);function d$e({font:e}){let{handleSetLibraryFontSelected:t,setModalTabOpen:r}=(0,Rbe.useContext)(yi),o=e?.fontFace?.length||1,n=()=>{t?.(e),r?.("installed-fonts")},i=Hb(e);return(0,M_.jsx)(Qb.__experimentalItem,{onClick:n,children:(0,M_.jsxs)(Qb.__experimentalHStack,{justify:"space-between",children:[(0,M_.jsx)(Qb.FlexItem,{style:i,children:e.name}),(0,M_.jsx)(Qb.FlexItem,{className:"global-styles-ui-screen-typography__font-variants-count",children:(0,xM.sprintf)((0,xM._n)("%d variant","%d variants",o),o)})]})})}var Abe=d$e;var vn=a(E(),1);function Ibe(e,t){return e?e.map(r=>wp(r,{source:t})):[]}function f$e(){let{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:r}=(0,Obe.useContext)(yi),[o]=Le("typography.fontFamilies"),[n]=Le("typography.fontFamilies",void 0,"base"),i=Ibe(o?.theme,"theme"),s=Ibe(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)(kbe,{onRequestClose:()=>r?.(""),defaultTabId:t}),(0,vn.jsxs)(eu.__experimentalVStack,{spacing:2,children:[(0,vn.jsxs)(eu.__experimentalHStack,{justify:"space-between",children:[(0,vn.jsx)(Uo,{level:3,children:(0,Jb.__)("Fonts")}),(0,vn.jsx)(eu.Button,{onClick:()=>r?.("installed-fonts"),label:(0,Jb.__)("Manage fonts"),icon:e8,size:"small"})]}),l.length>0&&(0,vn.jsx)(vn.Fragment,{children:(0,vn.jsx)(eu.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:l.map(d=>(0,vn.jsx)(Abe,{font:d},d.slug))})}),!c&&(0,vn.jsxs)(vn.Fragment,{children:[(0,vn.jsx)(eu.__experimentalText,{as:"p",children:u?(0,Jb.__)("No fonts activated."):(0,Jb.__)("No fonts installed.")}),(0,vn.jsx)(eu.Button,{className:"global-styles-ui-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{r?.(u?"installed-fonts":"upload-fonts")},children:u?(0,Jb.__)("Manage fonts"):(0,Jb.__)("Add fonts")})]})]})]})}function Nbe({...e}){return(0,vn.jsx)(nM,{children:(0,vn.jsx)(f$e,{...e})})}var fE=a(j(),1),Cp=a(G(),1);var Fd=a(E(),1);function p$e(){return(0,Fd.jsxs)(Cp.__experimentalVStack,{spacing:2,children:[(0,Fd.jsx)(Cp.__experimentalHStack,{justify:"space-between",children:(0,Fd.jsx)(Uo,{level:3,children:(0,fE.__)("Font Sizes")})}),(0,Fd.jsx)(Cp.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,Fd.jsx)(xo,{path:"/typography/font-sizes",children:(0,Fd.jsxs)(Cp.__experimentalHStack,{direction:"row",children:[(0,Fd.jsx)(Cp.FlexItem,{children:(0,fE.__)("Font size presets")}),(0,Fd.jsx)(xn,{icon:(0,fE.isRTL)()?Ar:mr})]})})})]})}var Mbe=p$e;var Jl=a(E(),1);function m$e(){let{fontLibraryEnabled:e}=(0,Dbe.useContext)(rn);return(0,Jl.jsxs)(Jl.Fragment,{children:[(0,Jl.jsx)(nr,{title:(0,CM.__)("Typography"),description:(0,CM.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,Jl.jsx)(Xh,{children:(0,Jl.jsxs)(Fbe.__experimentalVStack,{spacing:7,children:[(0,Jl.jsx)(k_,{title:(0,CM.__)("Typesets")}),e&&(0,Jl.jsx)(Nbe,{}),(0,Jl.jsx)(Cve,{}),(0,Jl.jsx)(Mbe,{})]})})]})}var Lbe=m$e;var Or=a(j(),1),dl=a(G(),1),Wbe=a(U(),1);var Bbe=a(be(),1);var Vbe=a(E(),1),{useSettingsForBlockElement:h$e,TypographyPanel:g$e}=Et(Bbe.privateApis);function jbe({element:e,headingLevel:t}){let r=[];e==="heading"?r=r.concat(["elements",t]):e&&e!=="text"&&(r=r.concat(["elements",e]));let o=r.join("."),[n]=qe(o,"","user",!1),[i,s]=qe(o,"","merged",!1),[l]=Le(""),u=h$e(l,void 0,e==="heading"?t:e);return(0,Vbe.jsx)(g$e,{inheritedValue:i,value:n,onChange:s,settings:u,showInheritanceLabelIndicators:!1})}var zbe=a(E(),1);function Hbe({name:e,element:t,headingLevel:r}){let o="";t==="heading"?o=`elements.${r}.`:t&&t!=="text"&&(o=`elements.${t}.`);let[n]=qe(o+"typography.fontFamily",e),[i]=qe(o+"color.gradient",e),[s]=qe(o+"color.background",e),[l]=qe("color.background"),[c]=qe(o+"color.text",e),[u]=qe(o+"typography.fontSize",e),[d]=qe(o+"typography.fontStyle",e),[f]=qe(o+"typography.fontWeight",e),[m]=qe(o+"typography.letterSpacing",e);return(0,zbe.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontFamily:n??"serif",background:i??s??l,color:c,fontSize:u,fontStyle:d,fontWeight:f,letterSpacing:m,...t==="link"?{textDecoration:"underline"}:{}},children:"Aa"})}var ei=a(E(),1),Ube={text:{description:(0,Or.__)("Manage the fonts used on the site."),title:(0,Or.__)("Text")},link:{description:(0,Or.__)("Manage the fonts and typography used on the links."),title:(0,Or.__)("Links")},heading:{description:(0,Or.__)("Manage the fonts and typography used on headings."),title:(0,Or.__)("Headings")},caption:{description:(0,Or.__)("Manage the fonts and typography used on captions."),title:(0,Or.__)("Captions")},button:{description:(0,Or.__)("Manage the fonts and typography used on buttons."),title:(0,Or.__)("Buttons")}};function v$e({element:e}){let[t,r]=(0,Wbe.useState)("heading");return(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(nr,{title:Ube[e].title,description:Ube[e].description}),(0,ei.jsx)(dl.__experimentalSpacer,{marginX:4,children:(0,ei.jsx)(Hbe,{element:e,headingLevel:t})}),e==="heading"&&(0,ei.jsx)(dl.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,ei.jsxs)(dl.__experimentalToggleGroupControl,{label:(0,Or.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:o=>r(o),isBlock:!0,children:[(0,ei.jsx)(dl.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,Or.__)("All headings"),label:(0,Or._x)("All","heading levels")}),(0,ei.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,Or.__)("Heading 1"),label:(0,Or.__)("H1")}),(0,ei.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,Or.__)("Heading 2"),label:(0,Or.__)("H2")}),(0,ei.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,Or.__)("Heading 3"),label:(0,Or.__)("H3")}),(0,ei.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,Or.__)("Heading 4"),label:(0,Or.__)("H4")}),(0,ei.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,Or.__)("Heading 5"),label:(0,Or.__)("H5")}),(0,ei.jsx)(dl.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,Or.__)("Heading 6"),label:(0,Or.__)("H6")})]})}),(0,ei.jsx)(jbe,{element:e,headingLevel:t})]})}var F_=v$e;var KW=a(j(),1),Xbe=a(G(),1),Qbe=a(be(),1);var fl=a(G(),1),D_=a(j(),1);var Kbe=a(U(),1);var Gbe=a(G(),1),Ybe=a(E(),1);function b$e({className:e,children:t,...r}){return(0,Ybe.jsx)(Gbe.Flex,{className:J("global-styles-ui__color-indicator-wrapper",e),...r,children:t})}var qbe=b$e;var os=a(E(),1),TM=[];function y$e({name:e}){let[t]=Le("color.palette.custom"),[r]=Le("color.palette.theme"),[o]=Le("color.palette.default"),[n]=Le("color.defaultPalette",e),i=t||TM,s=r||TM,l=o||TM,c=n??!0,u=(0,Kbe.useMemo)(()=>[...i,...s,...l&&c?l:TM],[i,s,l,c]),d=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,os.jsxs)(fl.__experimentalVStack,{spacing:3,children:[(0,os.jsx)(Uo,{level:3,children:(0,D_.__)("Palette")}),(0,os.jsx)(fl.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,os.jsx)(xo,{path:d,children:(0,os.jsxs)(fl.__experimentalHStack,{direction:"row",children:[u.length>0?(0,os.jsxs)(os.Fragment,{children:[(0,os.jsx)(fl.__experimentalZStack,{isLayered:!1,offset:-8,children:u.slice(0,5).map(({color:f},m)=>(0,os.jsx)(qbe,{children:(0,os.jsx)(fl.ColorIndicator,{colorValue:f})},`${f}-${m}`))}),(0,os.jsx)(fl.FlexItem,{isBlock:!0,children:(0,D_.__)("Edit palette")})]}):(0,os.jsx)(fl.FlexItem,{children:(0,D_.__)("Add colors")}),(0,os.jsx)(xn,{icon:(0,D_.isRTL)()?Ar:mr})]})})})]})}var Zbe=y$e;var Dd=a(E(),1),{useSettingsForBlockElement:w$e,ColorPanel:_$e}=Et(Qbe.privateApis);function S$e(){let[e,t]=qe("",void 0,"user",!1),[r]=qe("",void 0,"merged",!1),[o]=Le(""),n=w$e(o);return(0,Dd.jsxs)(Dd.Fragment,{children:[(0,Dd.jsx)(nr,{title:(0,KW.__)("Colors"),description:(0,KW.__)("Palette colors and the application of those colors on site elements.")}),(0,Dd.jsx)(Xh,{children:(0,Dd.jsx)(Xbe.__experimentalVStack,{spacing:7,children:(0,Dd.jsx)(Zbe,{})})}),(0,Dd.jsx)(_$e,{inheritedValue:r,value:e,onChange:t,settings:n,showInheritanceLabelIndicators:!1})]})}var Jbe=S$e;var hE=a(j(),1);var oye=a(Te(),1),Ep=a(G(),1),B_=a(j(),1);var PM=a(G(),1);var EM=a(G(),1);var $be=a(E(),1);function eye(){let{paletteColors:e}=x_();return e.slice(0,4).map(({slug:t,color:r},o)=>(0,$be.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${t}-${o}`))}var pE=a(E(),1),x$e={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},C$e=({label:e,isFocused:t,withHoverView:r})=>(0,pE.jsx)(T_,{label:e,isFocused:t,withHoverView:r,children:({key:o})=>(0,pE.jsx)(EM.__unstableMotion.div,{variants:x$e,style:{height:"100%",overflow:"hidden"},children:(0,pE.jsx)(EM.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,pE.jsx)(eye,{})})},o)}),tye=C$e;var $b=a(E(),1),rye=["color"];function L_({title:e,gap:t=2}){let r=YN(rye);return r?.length<=1?null:(0,$b.jsxs)(PM.__experimentalVStack,{spacing:3,children:[e&&(0,$b.jsx)(Uo,{level:3,children:e}),(0,$b.jsx)(PM.__experimentalGrid,{gap:t,children:r.map((o,n)=>(0,$b.jsx)(P_,{variation:o,isPill:!0,properties:rye,showTooltip:!0,children:()=>(0,$b.jsx)(tye,{})},n))})]})}var Tp=a(E(),1),T$e={placement:"bottom-start",offset:8};function nye({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,oye.useViewportMatch)("small","<")?T$e:void 0,[m]=Hge(e);return(0,Tp.jsxs)(Ep.__experimentalVStack,{className:"global-styles-ui-color-palette-panel",spacing:8,children:[(0,Tp.jsxs)(Ep.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,Tp.jsx)(Ep.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,colors:t,onChange:r,paletteLabel:(0,B_.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:f}),window.__experimentalEnableColorRandomizer&&t?.length>0&&m&&(0,Tp.jsx)(Ep.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:o8,onClick:m,children:(0,B_.__)("Randomize colors")})]}),!!n&&!!n.length&&!!u&&(0,Tp.jsx)(Ep.__experimentalPaletteEdit,{canReset:n!==s,canOnlyChangeValues:!0,colors:n,onChange:i,paletteLabel:(0,B_.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:f}),(0,Tp.jsx)(Ep.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,B_.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:f}),(0,Tp.jsx)(L_,{title:(0,B_.__)("Palettes")})]})}var iye=a(Te(),1),Bd=a(G(),1),mE=a(j(),1);var Ld=a(E(),1),E$e={placement:"bottom-start",offset:8},P$e=()=>{};function sye({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,iye.useViewportMatch)("small","<")?E$e:void 0;return(0,Ld.jsxs)(Bd.__experimentalVStack,{className:"global-styles-ui-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,Ld.jsx)(Bd.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,gradients:t,onChange:r,paletteLabel:(0,mE.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:b}),!!n&&!!n.length&&!!u&&(0,Ld.jsx)(Bd.__experimentalPaletteEdit,{canReset:n!==s,canOnlyChangeValues:!0,gradients:n,onChange:i,paletteLabel:(0,mE.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:b}),(0,Ld.jsx)(Bd.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,mE.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:b}),!!g&&!!g.length&&(0,Ld.jsxs)("div",{children:[(0,Ld.jsx)(Uo,{level:3,children:(0,mE.__)("Duotone")}),(0,Ld.jsx)(Bd.__experimentalSpacer,{margin:3}),(0,Ld.jsx)(Bd.DuotonePicker,{duotonePalette:g,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:P$e,colorPalette:[]})]})]})}var Gs=a(E(),1);function k$e({name:e}){return(0,Gs.jsxs)(Gs.Fragment,{children:[(0,Gs.jsx)(nr,{title:(0,hE.__)("Edit palette"),description:(0,hE.__)("The combination of colors used across the site and in color pickers.")}),(0,Gs.jsxs)(Cn.Root,{defaultValue:"color",children:[(0,Gs.jsx)("div",{className:"global-styles-ui-color-palette__tablist-container",children:(0,Gs.jsxs)(Cn.List,{className:"global-styles-ui-color-palette__tablist",children:[(0,Gs.jsx)(Cn.Tab,{value:"color",children:(0,hE.__)("Color")}),(0,Gs.jsx)(Cn.Tab,{value:"gradient",children:(0,hE.__)("Gradient")})]})}),(0,Gs.jsx)(Cn.Panel,{value:"color",tabIndex:-1,children:(0,Gs.jsx)(nye,{name:e})}),(0,Gs.jsx)(Cn.Panel,{value:"gradient",tabIndex:-1,children:(0,Gs.jsx)(sye,{name:e})})]})]})}var aye=k$e;var ZW=a(j(),1),dye=a(be(),1),fye=a(G(),1);var lye=a(be(),1);var cye=a(E(),1),R$e={backgroundSize:"auto"},{BackgroundPanel:A$e}=Et(lye.privateApis);function uye(){let[e]=qe("",void 0,"user",!1),[t,r]=qe("",void 0,"merged",!1),[o]=Le("");return(0,cye.jsx)(A$e,{inheritedValue:t,value:e,onChange:r,settings:o,defaultValues:R$e,showInheritanceLabelIndicators:!1})}var rg=a(E(),1),{useHasBackgroundPanel:I$e}=Et(dye.privateApis);function O$e(){let[e]=Le(""),t=I$e(e);return(0,rg.jsxs)(rg.Fragment,{children:[(0,rg.jsx)(nr,{title:(0,ZW.__)("Background"),description:(0,rg.jsx)(fye.__experimentalText,{children:(0,ZW.__)("Set styles for the site's background.")})}),t&&(0,rg.jsx)(uye,{})]})}var pye=O$e;var is=a(G(),1),ns=a(j(),1);var bye=a(U(),1);var mye=a(G(),1),hye=a(j(),1),gye=a(E(),1);function N$e({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},s=()=>{o()};return(0,gye.jsx)(mye.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,hye.__)("Cancel"),confirmButtonText:t,onCancel:s,onConfirm:i,size:"medium",children:e})}var vye=N$e;var wr=a(E(),1),{Menu:gE}=Et(is.privateApis),QW="6px 6px 9px rgba(0, 0, 0, 0.2)";function yye(){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,bye.useState)(!1),u=()=>c(!l);return(0,wr.jsxs)(wr.Fragment,{children:[l&&(0,wr.jsx)(vye,{text:(0,ns.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,ns.__)("Remove"),isOpen:l,toggleOpen:u,onConfirm:s}),(0,wr.jsx)(nr,{title:(0,ns.__)("Shadows"),description:(0,ns.__)("Manage and create shadow styles for use across the site.")}),(0,wr.jsx)(Xh,{children:(0,wr.jsxs)(is.__experimentalVStack,{className:"global-styles-ui__shadows-panel",spacing:7,children:[t&&(0,wr.jsx)(XW,{label:(0,ns.__)("Default"),shadows:e||[],category:"default"}),r&&r.length>0&&(0,wr.jsx)(XW,{label:(0,ns.__)("Theme"),shadows:r||[],category:"theme"}),(0,wr.jsx)(XW,{label:(0,ns.__)("Custom"),shadows:o||[],category:"custom",canCreate:!0,onCreate:i,onReset:u})]})})]})}function XW({label:e,shadows:t,category:r,canCreate:o,onCreate:n,onReset:i}){let s=()=>{let l=GN(t,"shadow-");n?.({name:(0,ns.sprintf)((0,ns.__)("Shadow %d"),l),shadow:QW,slug:`shadow-${l}`})};return(0,wr.jsxs)(is.__experimentalVStack,{spacing:2,children:[(0,wr.jsxs)(is.__experimentalHStack,{justify:"space-between",children:[(0,wr.jsx)(Uo,{level:3,children:e}),(0,wr.jsxs)(is.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:[o&&(0,wr.jsx)(is.Button,{size:"small",icon:Tc,label:(0,ns.__)("Add shadow"),onClick:()=>{s()}}),!!t?.length&&r==="custom"&&(0,wr.jsxs)(gE,{children:[(0,wr.jsx)(gE.TriggerButton,{render:(0,wr.jsx)(is.Button,{size:"small",icon:yo,label:(0,ns.__)("Shadow options")})}),(0,wr.jsx)(gE.Popover,{children:(0,wr.jsx)(gE.Item,{onClick:i,children:(0,wr.jsx)(gE.ItemLabel,{children:(0,ns.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,wr.jsx)(is.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(l=>(0,wr.jsx)(M$e,{shadow:l,category:r},l.slug))})]})}function M$e({shadow:e,category:t}){return(0,wr.jsx)(xo,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,wr.jsxs)(is.__experimentalHStack,{children:[(0,wr.jsx)(is.FlexItem,{children:e.name}),(0,wr.jsx)(xn,{icon:(0,ns.isRTL)()?Ar:mr})]})})}var ot=a(G(),1),zr=a(j(),1);var pl=a(U(),1);function wye(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map(r=>r.trim())}function _ye(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 Sye(e){let t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}var We=a(E(),1),{Menu:vE}=Et(ot.privateApis),F$e=[{label:(0,zr.__)("Rename"),action:"rename"},{label:(0,zr.__)("Delete"),action:"delete"}],D$e=[{label:(0,zr.__)("Reset"),action:"reset"}];function xye(){let{goBack:e,params:t}=(0,ot.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,We.jsxs)(We.Fragment,{children:[(0,We.jsxs)(ot.__experimentalHStack,{justify:"space-between",children:[(0,We.jsx)(nr,{title:l.name}),(0,We.jsx)(ot.FlexItem,{children:(0,We.jsx)(ot.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,We.jsxs)(vE,{children:[(0,We.jsx)(vE.TriggerButton,{render:(0,We.jsx)(ot.Button,{size:"small",icon:yo,label:(0,zr.__)("Menu")})}),(0,We.jsx)(vE.Popover,{children:(r==="custom"?F$e:D$e).map(S=>(0,We.jsx)(vE.Item,{onClick:()=>_(S.action),disabled:S.action==="reset"&&l.shadow===u?.shadow,children:(0,We.jsx)(vE.ItemLabel,{children:S.label})},S.action))})]})})})]}),(0,We.jsxs)(Xh,{children:[(0,We.jsx)(L$e,{shadow:l.shadow}),(0,We.jsx)(B$e,{shadow:l.shadow,onChange:b})]}),d&&(0,We.jsx)(ot.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{y(),f(!1)},onCancel:()=>{f(!1)},confirmButtonText:(0,zr.__)("Delete"),size:"medium",children:(0,zr.sprintf)((0,zr.__)('Are you sure you want to delete "%s" shadow preset?'),l.name)}),m&&(0,We.jsx)(ot.Modal,{title:(0,zr.__)("Rename"),onRequestClose:()=>h(!1),size:"small",children:(0,We.jsxs)("form",{onSubmit:S=>{S.preventDefault(),w(g),h(!1)},children:[(0,We.jsx)(ot.__experimentalInputControl,{autoComplete:"off",label:(0,zr.__)("Name"),placeholder:(0,zr.__)("Shadow name"),value:g??"",onChange:v}),(0,We.jsx)(ot.__experimentalSpacer,{marginBottom:6}),(0,We.jsxs)(ot.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,We.jsx)(ot.FlexItem,{children:(0,We.jsx)(ot.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>h(!1),children:(0,zr.__)("Cancel")})}),(0,We.jsx)(ot.FlexItem,{children:(0,We.jsx)(ot.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,zr.__)("Save")})})]})]})})]}):(0,We.jsx)(nr,{title:""})}function L$e({shadow:e}){return(0,We.jsx)(ot.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,We.jsx)(ot.__experimentalHStack,{alignment:"center",justify:"center",className:"global-styles-ui__shadow-preview-panel",children:(0,We.jsx)("div",{className:"global-styles-ui__shadow-preview-block",style:{boxShadow:e}})})})}function B$e({shadow:e,onChange:t}){let r=(0,pl.useRef)(null),o=(0,pl.useMemo)(()=>wye(e),[e]),n=(l,c)=>{let u=[...o];u[l]=c,t(u.join(", "))},i=()=>{t([...o,QW].join(", "))},s=l=>{t(o.filter((c,u)=>u!==l).join(", ")),r.current?.focus()};return(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(ot.__experimentalVStack,{spacing:2,children:(0,We.jsxs)(ot.__experimentalHStack,{justify:"space-between",children:[(0,We.jsx)(Uo,{level:3,children:(0,zr.__)("Shadows")}),(0,We.jsx)(ot.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:(0,We.jsx)(ot.Button,{size:"small",icon:Tc,label:(0,zr.__)("Add shadow"),onClick:()=>{i()},ref:r})})]})}),(0,We.jsx)(ot.__experimentalSpacer,{}),(0,We.jsx)(ot.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:o.map((l,c)=>(0,We.jsx)(V$e,{shadow:l,onChange:u=>n(c,u),canRemove:o.length>1,onRemove:()=>s(c)},c))})]})}function V$e({shadow:e,onChange:t,canRemove:r,onRemove:o}){let n={placement:"left-start",offset:36,shift:!0},i=(0,pl.useMemo)(()=>_ye(e),[e]),s=l=>{t(Sye(l))};return(0,We.jsx)(ot.Dropdown,{popoverProps:n,className:"global-styles-ui__shadow-editor__dropdown",renderToggle:({onToggle:l,isOpen:c})=>{let u={onClick:l,className:J("global-styles-ui__shadow-editor__dropdown-toggle",{"is-open":c}),"aria-expanded":c},d={onClick:()=>{c&&l(),o()},className:J("global-styles-ui__shadow-editor__remove-button",{"is-open":c}),label:(0,zr.__)("Remove shadow")};return(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(ot.Button,{__next40pxDefaultSize:!0,icon:N1,...u,children:i.inset?(0,zr.__)("Inner shadow"):(0,zr.__)("Drop shadow")}),r&&(0,We.jsx)(ot.Button,{size:"small",icon:qV,...d})]})},renderContent:()=>(0,We.jsx)(ot.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"global-styles-ui__shadow-editor__dropdown-content",children:(0,We.jsx)(j$e,{shadowObj:i,onChange:s})})})}function j$e({shadowObj:e,onChange:t}){let n=(i,s)=>{let l={...e,[i]:s};t(l)};return(0,We.jsxs)(ot.__experimentalVStack,{spacing:4,className:"global-styles-ui__shadow-editor-panel",children:[(0,We.jsx)(ot.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:i=>n("color",i)}),(0,We.jsxs)(ot.__experimentalToggleGroupControl,{label:(0,zr.__)("Shadow Type"),value:e.inset?"inset":"outset",isBlock:!0,onChange:i=>n("inset",i==="inset"),hideLabelFromVision:!0,children:[(0,We.jsx)(ot.__experimentalToggleGroupControlOption,{value:"outset",label:(0,zr.__)("Outset")}),(0,We.jsx)(ot.__experimentalToggleGroupControlOption,{value:"inset",label:(0,zr.__)("Inset")})]}),(0,We.jsxs)(ot.__experimentalGrid,{columns:2,gap:4,children:[(0,We.jsx)(kM,{label:(0,zr.__)("X Position"),value:e.x,onChange:i=>n("x",i)}),(0,We.jsx)(kM,{label:(0,zr.__)("Y Position"),value:e.y,onChange:i=>n("y",i)}),(0,We.jsx)(kM,{label:(0,zr.__)("Blur"),value:e.blur,onChange:i=>n("blur",i)}),(0,We.jsx)(kM,{label:(0,zr.__)("Spread"),value:e.spread,onChange:i=>n("spread",i)})]})]})}function kM({label:e,value:t,onChange:r}){return(0,We.jsx)(ot.__experimentalUnitControl,{label:e,value:t,onChange:n=>{let s=n!==void 0&&!isNaN(parseFloat(n))?n:"0px";r(s)}})}var JW=a(E(),1);function Cye(){return(0,JW.jsx)(yye,{})}function Tye(){return(0,JW.jsx)(xye,{})}var Rye=a(j(),1),Aye=a(be(),1);var Eye=a(be(),1),$W=a(U(),1);var Pye=a(E(),1),{useSettingsForBlockElement:z$e,DimensionsPanel:H$e}=Et(Eye.privateApis),U$e={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,minWidth:!0,width:!0,childLayout:!1};function kye(){let[e]=qe("",void 0,"user",!1),[t,r]=qe("",void 0,"merged",!1),[o]=Le("",void 0,"user"),[n,i]=Le(""),s=z$e(n),l=(0,$W.useMemo)(()=>({...t,layout:s.layout}),[t,s.layout]),c=(0,$W.useMemo)(()=>({...e,layout:o.layout}),[e,o.layout]);return(0,Pye.jsx)(H$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:U$e,showInheritanceLabelIndicators:!1})}var ey=a(E(),1),{useHasDimensionsPanel:W$e,useSettingsForBlockElement:G$e}=Et(Aye.privateApis);function Y$e(){let[e]=Le(""),t=G$e(e),r=W$e(t);return(0,ey.jsxs)(ey.Fragment,{children:[(0,ey.jsx)(nr,{title:(0,Rye.__)("Layout")}),r&&(0,ey.jsx)(kye,{})]})}var Iye=Y$e;var OM=a(G(),1),tG=a(j(),1);var eG=a(j(),1),Dye=a(G(),1);var Oye=a(ae(),1),Nye=a(K(),1),AM=a(U(),1),Mye=a(G(),1),Fye=a(j(),1);var RM=a(E(),1);function q$e({gap:e=2}){let{user:t}=(0,AM.useContext)(rn),r=t?.styles,n=(0,Nye.useSelect)(s=>{let l=s(Oye.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(s=>!tE(s,["color"])&&!tE(s,["typography","spacing"])),i=(0,AM.useMemo)(()=>[...[{title:(0,Fye.__)("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,RM.jsx)(Mye.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:e,children:i.map((s,l)=>(0,RM.jsx)(P_,{variation:s,children:c=>(0,RM.jsx)(KN,{label:s?.title,withHoverView:!0,isFocused:c,variation:s})},l))})}var IM=q$e;var V_=a(E(),1);function Lye(){return(0,V_.jsxs)(Dye.__experimentalVStack,{spacing:10,className:"global-styles-ui-variation-container",children:[(0,V_.jsx)(IM,{gap:3}),(0,V_.jsx)(L_,{title:(0,eG.__)("Color Variations"),gap:3}),(0,V_.jsx)(k_,{title:(0,eG.__)("Typography"),gap:3})]})}var Pp=a(E(),1);function K$e(){return(0,Pp.jsxs)(Pp.Fragment,{children:[(0,Pp.jsx)(nr,{title:(0,tG.__)("Browse styles"),description:(0,tG.__)("Choose a variation to change the look of the site.")}),(0,Pp.jsx)(OM.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-style-variations",children:(0,Pp.jsx)(OM.CardBody,{children:(0,Pp.jsx)(Lye,{})})})]})}var Bye=K$e;var bE=a(j(),1),Vye=a(G(),1),jye=a(be(),1);var $l=a(E(),1),{AdvancedPanel:Z$e}=Et(jye.privateApis);function X$e(){let[e]=qe("",void 0,"user",!1),[t,r]=qe("",void 0,"merged",!1);return(0,$l.jsxs)($l.Fragment,{children:[(0,$l.jsx)(nr,{title:(0,bE.__)("Additional CSS"),description:(0,$l.jsxs)($l.Fragment,{children:[(0,bE.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,$l.jsx)("br",{}),(0,$l.jsx)(Vye.ExternalLink,{href:(0,bE.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"global-styles-ui-screen-css-help-link",children:(0,bE.__)("Learn more about CSS")})]})}),(0,$l.jsx)("div",{className:"global-styles-ui-screen-css",children:(0,$l.jsx)(Z$e,{value:e,onChange:r,inheritedValue:t})})]})}var zye=X$e;var kp=a(j(),1),j_=a(G(),1),oy=a(U(),1);var Hye=a(K(),1),Uye=a(ae(),1),yE=a(U(),1);var Q$e={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},J$e={per_page:100,page:1},NM=[];function ty({query:e}={}){let{user:t}=(0,yE.useContext)(rn),r=(0,yE.useMemo)(()=>({...J$e,...e}),[e]),{authors:o,currentUser:n,isDirty:i,revisions:s,isLoadingGlobalStylesRevisions:l,revisionsCount:c}=(0,Hye.useSelect)(u=>{let{__experimentalGetDirtyEntityRecords:d,getCurrentUser:f,getUsers:m,getRevisions:h,__experimentalGetCurrentGlobalStylesId:g,getEntityRecord:v,isResolving:b}=u(Uye.store),_=d()||[],y=f(),w=_.length>0,S=g(),C=(S?v("root","globalStyles",S):void 0)?._links?.["version-history"]?.[0]?.count??0,I=S&&h("root","globalStyles",S,r)||NM,k=m(Q$e)||NM,R=S?b("getRevisions",["root","globalStyles",S,r]):!1;return{authors:k,currentUser:y,isDirty:w,revisions:I,isLoadingGlobalStylesRevisions:R,revisionsCount:C}},[r]);return(0,yE.useMemo)(()=>{if(!o.length||l)return{revisions:NM,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(j(),1),ry=a(G(),1),Vd=a(an(),1),Wye=a(ae(),1),Gye=a(K(),1);var MM=a(Mo(),1);var ti=a(E(),1),{Badge:$$e}=Et(ry.privateApis),eet=3600*1e3*24;function tet({revision:e,previousRevision:t}){let r=I4(e,t,{maxResults:7});return r.length?(0,ti.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"global-styles-ui-screen-revisions__changes",children:r.map(o=>(0,ti.jsx)("li",{children:o},o))}):null}function ret(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 oet({userRevisions:e,selectedRevisionId:t,onChange:r,canApplyRevision:o,onApplyRevision:n}){let{currentThemeName:i,currentUser:s}=(0,Gye.useSelect)(u=>{let{getCurrentTheme:d,getCurrentUser:f}=u(Wye.store),m=d();return{currentThemeName:m?.name?.rendered||m?.stylesheet,currentUser:f()}},[]),l=(0,Vd.getDate)(null).getTime(),{datetimeAbbreviated:c}=(0,Vd.getSettings)().formats;return(0,ti.jsx)(ry.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,I=(0,Vd.getDate)(C??null),k=C&&l-I.getTime()>eet?(0,Vd.dateI18n)(c,I):(0,Vd.humanTimeDiff)(C??I,void 0),R=ret(f,b,(0,Vd.dateI18n)(c,I),S);return(0,ti.jsxs)(ry.Composite.Item,{className:"global-styles-ui-screen-revisions__revision-item","aria-current":w,role:"option",onKeyDown:A=>{let{keyCode:P}=A;(P===MM.ENTER||P===MM.SPACE)&&r(u)},onClick:A=>{A.preventDefault(),r(u)},"aria-selected":w,"aria-label":R,render:(0,ti.jsx)("div",{}),children:[(0,ti.jsx)("span",{className:"global-styles-ui-screen-revisions__revision-item-wrapper",children:x?(0,ti.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[(0,wi.__)("Default styles"),(0,ti.jsx)("span",{className:"global-styles-ui-screen-revisions__meta",children:i})]}):(0,ti.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[g?(0,ti.jsx)("span",{className:"global-styles-ui-screen-revisions__date",children:(0,wi.__)("(Unsaved)")}):(0,ti.jsx)("time",{className:"global-styles-ui-screen-revisions__date",dateTime:C,children:k}),(0,ti.jsxs)("span",{className:"global-styles-ui-screen-revisions__meta",children:[(0,ti.jsx)("img",{alt:b,src:_}),b]}),w&&(0,ti.jsx)(tet,{revision:u,previousRevision:d<e.length?e[d+1]:void 0})]})}),w&&(S?(0,ti.jsx)($$e,{className:"global-styles-ui-screen-revisions__active-badge",intent:"info",children:(0,wi.__)("Active")}):(0,ti.jsx)(ry.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 Yye=oet;var ec=a(G(),1),ri=a(j(),1);var tu=a(E(),1);function qye({currentPage:e,numPages:t,changePage:r,totalItems:o,className:n,disabled:i=!1,buttonVariant:s="tertiary",label:l=(0,ri.__)("Pagination")}){return(0,tu.jsxs)(ec.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:J("global-styles-ui-pagination",n),children:[(0,tu.jsx)(ec.__experimentalText,{variant:"muted",className:"global-styles-ui-pagination__total",children:(0,ri.sprintf)((0,ri._n)("%d item","%d items",o),o)}),(0,tu.jsxs)(ec.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,tu.jsx)(ec.Button,{variant:s,onClick:()=>r(1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,ri.__)("First page"),icon:(0,ri.isRTL)()?kl:Rl,size:"compact"}),(0,tu.jsx)(ec.Button,{variant:s,onClick:()=>r(e-1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,ri.__)("Previous page"),icon:(0,ri.isRTL)()?mr:Ar,size:"compact"})]}),(0,tu.jsx)(ec.__experimentalText,{variant:"muted",children:(0,ri.sprintf)((0,ri._x)("%1$d of %2$d","paging"),e,t)}),(0,tu.jsxs)(ec.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,tu.jsx)(ec.Button,{variant:s,onClick:()=>r(e+1),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,ri.__)("Next page"),icon:(0,ri.isRTL)()?Ar:mr,size:"compact"}),(0,tu.jsx)(ec.Button,{variant:s,onClick:()=>r(t),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,ri.__)("Last page"),icon:(0,ri.isRTL)()?Rl:kl,size:"compact"})]})]})}var ru=a(E(),1),Kye=10;function net({onClose:e}={}){let{user:t,onChange:r}=(0,oy.useContext)(rn),{params:o,goTo:n}=(0,j_.useNavigator)(),{revisionId:i}=o,[s,l]=(0,oy.useState)(1),{revisions:c,isLoading:u,hasUnsavedChanges:d,revisionsCount:f}=ty({query:{per_page:Kye,page:s}}),m=Math.ceil(f/Kye),[h,g]=(0,oy.useState)(!1),v=(0,oy.useMemo)(()=>i&&c.find(k=>String(k.id)===String(i))||t,[i,c,t]),b=lv(v,t),_=()=>{e&&e()},y=I=>{r(I),g(!1),_()},w=I=>{n(`/revisions/${I.id}`)},S=v?.id??c[0]?.id,x=!!S&&S!=="unsaved"&&!b,C=!!c.length;return(0,ru.jsxs)(ru.Fragment,{children:[(0,ru.jsx)(nr,{title:f?(0,kp.sprintf)((0,kp.__)("Revisions (%d)"),f):(0,kp.__)("Revisions"),description:(0,kp.__)(`Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you're ready, use the Save button to save your changes.`),onBack:_}),!C&&(0,ru.jsx)(j_.Spinner,{className:"global-styles-ui-screen-revisions__loading"}),(0,ru.jsx)(Yye,{onChange:w,selectedRevisionId:S,userRevisions:c,canApplyRevision:x,onApplyRevision:()=>d?g(!0):y(v)}),m>1&&(0,ru.jsx)("div",{className:"global-styles-ui-screen-revisions__footer",children:(0,ru.jsx)(qye,{className:"global-styles-ui-screen-revisions__pagination",currentPage:s,numPages:m,changePage:l,totalItems:f,disabled:u,label:(0,kp.__)("Global Styles pagination")})}),h&&(0,ru.jsx)(j_.__experimentalConfirmDialog,{isOpen:h,confirmButtonText:(0,kp.__)("Apply"),onConfirm:()=>y(v),onCancel:()=>g(!1),size:"medium",children:(0,kp.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})}var Zye=net;var On=a(j(),1),Wo=a(G(),1);var e0e=a(U(),1);var Xye=a(G(),1),Qye=a(j(),1),Jye=a(E(),1);function iet({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},s=()=>{o()};return(0,Jye.jsx)(Xye.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,Qye.__)("Cancel"),confirmButtonText:t,onCancel:s,onConfirm:i,size:"medium",children:e})}var $ye=iet;var ir=a(E(),1),{Menu:wE}=Et(Wo.privateApis);function rG({label:e,origin:t,sizes:r,handleAddFontSize:o,handleResetFontSizes:n}){let[i,s]=(0,e0e.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)($ye,{text:c,confirmButtonText:t==="custom"?(0,On.__)("Remove"):(0,On.__)("Reset"),isOpen:i,toggleOpen:l,onConfirm:n}),(0,ir.jsxs)(Wo.__experimentalVStack,{spacing:4,children:[(0,ir.jsxs)(Wo.__experimentalHStack,{children:[(0,ir.jsx)(Uo,{level:3,children:e}),(0,ir.jsxs)(Wo.FlexItem,{className:"global-styles-ui__typography-panel__options-container",children:[t==="custom"&&(0,ir.jsx)(Wo.Button,{label:(0,On.__)("Add font size"),icon:Tc,size:"small",onClick:o}),!!n&&(0,ir.jsxs)(wE,{children:[(0,ir.jsx)(wE.TriggerButton,{render:(0,ir.jsx)(Wo.Button,{size:"small",icon:yo,label:(0,On.__)("Font size presets options")})}),(0,ir.jsx)(wE.Popover,{children:(0,ir.jsx)(wE.Item,{onClick:l,children:(0,ir.jsx)(wE.ItemLabel,{children:t==="custom"?(0,On.__)("Remove font size presets"):(0,On.__)("Reset font size presets")})})})]})]})]}),!!r.length&&(0,ir.jsx)(Wo.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:r.map(u=>(0,ir.jsx)(xo,{path:`/typography/font-sizes/${t}/${u.slug}`,children:(0,ir.jsxs)(Wo.__experimentalHStack,{children:[(0,ir.jsx)(Wo.FlexItem,{className:"global-styles-ui-font-size__item",children:u.name}),(0,ir.jsx)(Wo.FlexItem,{display:"flex",children:(0,ir.jsx)(xn,{icon:(0,On.isRTL)()?Ar:mr})})]})},u.slug))})]})]})}function set(){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=GN(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)(Wo.__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)(Wo.__experimentalView,{children:(0,ir.jsx)(Wo.__experimentalSpacer,{paddingX:4,children:(0,ir.jsxs)(Wo.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,ir.jsx)(rG,{label:(0,On.__)("Theme"),origin:"theme",sizes:e,handleAddFontSize:u,handleResetFontSizes:d(e,r)?void 0:()=>t(r)}),c&&!!o?.length&&(0,ir.jsx)(rG,{label:(0,On.__)("Default"),origin:"default",sizes:o,handleAddFontSize:u,handleResetFontSizes:d(o,i)?void 0:()=>n(i)}),(0,ir.jsx)(rG,{label:(0,On.__)("Custom"),origin:"custom",sizes:s,handleAddFontSize:u,handleResetFontSizes:s.length>0?()=>l([]):void 0})]})})})]})}var t0e=set;var ka=a(j(),1),Go=a(G(),1);var _E=a(U(),1);var r0e=a(be(),1),o0e=a(j(),1);var n0e=a(E(),1);function aet({fontSize:e}){let[t]=qe("typography"),r=typeof e?.fluid=="object"&&e?.fluid?.min&&e?.fluid?.max?{minimumFontSize:e.fluid.min,maximumFontSize:e.fluid.max}:{fontSize:e.size},o=(0,r0e.getComputedFluidTypographyValue)(r);return(0,n0e.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontSize:o,fontFamily:t?.fontFamily??"serif"},children:(0,o0e.__)("Aa")})}var i0e=aet;var s0e=a(G(),1),z_=a(j(),1),a0e=a(E(),1);function cet({fontSize:e,isOpen:t,toggleOpen:r,handleRemoveFontSize:o}){let n=async()=>{r(),o(e)},i=()=>{r()};return(0,a0e.jsx)(s0e.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,z_.__)("Cancel"),confirmButtonText:(0,z_.__)("Delete"),onCancel:i,onConfirm:n,size:"medium",children:e&&(0,z_.sprintf)((0,z_.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})}var l0e=cet;var ou=a(G(),1),H_=a(j(),1),c0e=a(U(),1),Rp=a(E(),1);function uet({fontSize:e,toggleOpen:t,handleRename:r}){let[o,n]=(0,c0e.useState)(e.name),i=()=>{o&&o.trim()&&r(o),t()};return(0,Rp.jsx)(ou.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,H_.__)("Rename"),size:"small",children:(0,Rp.jsx)("form",{onSubmit:s=>{s.preventDefault(),i(),t()},children:(0,Rp.jsxs)(ou.__experimentalVStack,{spacing:"3",children:[(0,Rp.jsx)(ou.__experimentalInputControl,{autoComplete:"off",value:o,onChange:n,label:(0,H_.__)("Name"),placeholder:(0,H_.__)("Font size preset name")}),(0,Rp.jsxs)(ou.__experimentalHStack,{justify:"right",children:[(0,Rp.jsx)(ou.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,H_.__)("Cancel")}),(0,Rp.jsx)(ou.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,H_.__)("Save")})]})]})})})}var u0e=uet;var Nn=a(G(),1),Ap=a(E(),1),det=["px","em","rem","vw","vh"];function FM(e){let{baseControlProps:t}=(0,Nn.useBaseControlProps)(e),{value:r,onChange:o,fallbackValue:n,disabled:i,label:s}=e,l=(0,Nn.__experimentalUseCustomUnits)({availableUnits:det}),[c,u="px"]=(0,Nn.__experimentalParseQuantityAndUnitFromRawValue)(r,l),d=!!u&&["em","rem","vw","vh"].includes(u);return(0,Ap.jsx)(Nn.BaseControl,{...t,children:(0,Ap.jsxs)(Nn.Flex,{children:[(0,Ap.jsx)(Nn.FlexItem,{isBlock:!0,children:(0,Ap.jsx)(Nn.__experimentalUnitControl,{label:s,hideLabelFromVision:!0,value:r,onChange:h=>{o?.(h)},units:l,min:0,disabled:i})}),(0,Ap.jsx)(Nn.FlexItem,{isBlock:!0,children:(0,Ap.jsx)(Nn.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,Ap.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:ny}=Et(Go.privateApis);function fet(){let[e,t]=(0,_E.useState)(!1),[r,o]=(0,_E.useState)(!1),{params:{origin:n,slug:i},goBack:s}=(0,Go.useNavigator)(),[l,c]=Le("typography.fontSizes"),[u]=Le("typography.fluid"),d=l?.[n]??[],f=d.find(k=>k.slug===i);if((0,_E.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 A=d.map(P=>P.slug===i?{...P,[k]:R}:P);c({...l,[n]:A})},x=()=>{let k=d.filter(R=>R.slug!==i);c({...l,[n]:k})},C=()=>{t(!e)},I=()=>{o(!r)};return(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(l0e,{fontSize:f,isOpen:e,toggleOpen:C,handleRemoveFontSize:x}),r&&(0,er.jsx)(u0e,{fontSize:f,toggleOpen:I,handleRename:g}),(0,er.jsxs)(Go.__experimentalVStack,{spacing:4,children:[(0,er.jsxs)(Go.__experimentalHStack,{justify:"space-between",alignment:"flex-start",children:[(0,er.jsx)(nr,{title:f.name,description:(0,ka.sprintf)((0,ka.__)("Manage the font size %s."),f.name)}),n==="custom"&&(0,er.jsx)(Go.FlexItem,{children:(0,er.jsx)(Go.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,er.jsxs)(ny,{children:[(0,er.jsx)(ny.TriggerButton,{render:(0,er.jsx)(Go.Button,{size:"small",icon:yo,label:(0,ka.__)("Font size options")})}),(0,er.jsxs)(ny.Popover,{children:[(0,er.jsx)(ny.Item,{onClick:I,children:(0,er.jsx)(ny.ItemLabel,{children:(0,ka.__)("Rename")})}),(0,er.jsx)(ny.Item,{onClick:C,children:(0,er.jsx)(ny.ItemLabel,{children:(0,ka.__)("Delete")})})]})]})})})]}),(0,er.jsx)(Go.__experimentalView,{children:(0,er.jsx)(Go.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,er.jsxs)(Go.__experimentalVStack,{spacing:4,children:[(0,er.jsx)(Go.FlexItem,{children:(0,er.jsx)(i0e,{fontSize:f})}),(0,er.jsx)(FM,{label:(0,ka.__)("Size"),value:!h&&f.size?String(f.size):"",onChange:v,disabled:h}),(0,er.jsx)(Go.ToggleControl,{label:(0,ka.__)("Fluid typography"),help:(0,ka.__)("Scale the font size dynamically to fit the screen or viewport."),checked:m,onChange:b}),m&&(0,er.jsx)(Go.ToggleControl,{label:(0,ka.__)("Custom fluid values"),help:(0,ka.__)("Set custom min and max values for the fluid font size."),checked:h,onChange:_}),h&&(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(FM,{label:(0,ka.__)("Minimum"),value:typeof f?.fluid=="object"?f.fluid?.min:void 0,onChange:y}),(0,er.jsx)(FM,{label:(0,ka.__)("Maximum"),value:typeof f?.fluid=="object"?f.fluid?.max:void 0,onChange:w})]})]})})})]})]})}var d0e=fet;var Je=a(E(),1);function pet({parentMenu:e,blockStyles:t,blockName:r,selectedViewport:o,showResponsiveStateControls:n}){return(0,Je.jsx)(Je.Fragment,{children:t.map((i,s)=>(0,Je.jsx)(U_.Navigator.Screen,{path:e+"/variations/"+i.name,children:(0,Je.jsx)(VW,{name:r,variation:i.name,selectedViewport:o,showResponsiveStateControls:n})},s))})}function met({name:e,parentMenu:t="",selectedViewport:r,showResponsiveStateControls:o}){let n=(0,f0e.useSelect)(i=>{if(!e)return[];let{getBlockStyles:s}=i(DM.store);return s(e)},[e]);return n?.length?(0,Je.jsx)(pet,{parentMenu:t,blockStyles:n,blockName:e||"",selectedViewport:r,showResponsiveStateControls:o}):null}function nG({value:e,baseValue:t,onChange:r,path:o,onPathChange:n,fontLibraryEnabled:i=!1,serverCSS:s,serverSettings:l,selectedViewport:c,showResponsiveStateControls:u=!0}){let d=(0,DM.getBlockTypes)(),f=(0,og.useMemo)(()=>Oi(t,e),[t,e]),[m,h]=cv(f,[],{styleOptions:{variationStyles:!0}}),g=(0,og.useMemo)(()=>[...s??[],...m??[]],[s,m]),v=(0,og.useMemo)(()=>({...l,__experimentalFeatures:h,styles:g}),[h,l,g]);return(0,Je.jsx)($T,{value:e,baseValue:t,onChange:r,fontLibraryEnabled:i,children:(0,Je.jsx)(p0e.BlockEditorProvider,{settings:v,children:(0,Je.jsxs)(U_.Navigator,{className:"global-styles-ui-sidebar__navigator-provider",initialPath:o||"/",children:[(o||n)&&(0,Je.jsx)(het,{path:o,onPathChange:n}),(0,Je.jsx)(bn,{path:"/",children:(0,Je.jsx)(rve,{})}),(0,Je.jsx)(bn,{path:"/colors",children:(0,Je.jsx)(Jbe,{})}),(0,Je.jsx)(bn,{path:"/typography",children:(0,Je.jsx)(Lbe,{})}),(0,Je.jsx)(bn,{path:"/typography/font-sizes",children:(0,Je.jsx)(t0e,{})}),(0,Je.jsx)(bn,{path:"/typography/font-sizes/:origin/:slug",children:(0,Je.jsx)(d0e,{})}),(0,Je.jsx)(bn,{path:"/layout",children:(0,Je.jsx)(Iye,{})}),(0,Je.jsx)(bn,{path:"/colors/palette",children:(0,Je.jsx)(aye,{})}),(0,Je.jsx)(bn,{path:"/variations",children:(0,Je.jsx)(Bye,{})}),(0,Je.jsx)(bn,{path:"/css",children:(0,Je.jsx)(zye,{})}),(0,Je.jsx)(bn,{path:"/revisions/:revisionId?",children:(0,Je.jsx)(Zye,{})}),(0,Je.jsx)(bn,{path:"/shadows",children:(0,Je.jsx)(Cye,{})}),(0,Je.jsx)(bn,{path:"/shadows/edit/:category/:slug",children:(0,Je.jsx)(Tye,{})}),(0,Je.jsx)(bn,{path:"/background",children:(0,Je.jsx)(pye,{})}),(0,Je.jsx)(bn,{path:"/typography/text",children:(0,Je.jsx)(F_,{element:"text"})}),(0,Je.jsx)(bn,{path:"/typography/link",children:(0,Je.jsx)(F_,{element:"link"})}),(0,Je.jsx)(bn,{path:"/typography/heading",children:(0,Je.jsx)(F_,{element:"heading"})}),(0,Je.jsx)(bn,{path:"/typography/caption",children:(0,Je.jsx)(F_,{element:"caption"})}),(0,Je.jsx)(bn,{path:"/typography/button",children:(0,Je.jsx)(F_,{element:"button"})}),(0,Je.jsx)(bn,{path:"/blocks",children:(0,Je.jsx)(uve,{})}),d.map(b=>(0,Je.jsxs)(og.Fragment,{children:[(0,Je.jsx)(bn,{path:"/blocks/"+encodeURIComponent(b.name),children:(0,Je.jsx)(VW,{name:b.name,selectedViewport:c,showResponsiveStateControls:u})}),(0,Je.jsx)(met,{name:b.name,parentMenu:"/blocks/"+encodeURIComponent(b.name),selectedViewport:c,showResponsiveStateControls:u})]},b.name))]})})})}function bn({path:e,children:t}){return(0,Je.jsx)(U_.Navigator.Screen,{className:"global-styles-ui-sidebar__navigator-screen",path:e,children:t})}function het({path:e,onPathChange:t}){let r=(0,U_.useNavigator)(),{path:o}=r.location,n=(0,oG.usePrevious)(e),i=(0,oG.usePrevious)(o);return(0,og.useEffect)(()=>{e&&e!==o&&(e!==n?r.goTo(e):o!==i&&t&&t(o??"/"))},[t,e,i,n,o,r]),null}var iG=a(E(),1);function W_(e){return function({value:r,baseValue:o,onChange:n,...i}){return(0,iG.jsx)($T,{value:r,baseValue:o,onChange:n,children:(0,iG.jsx)(e,{...i})})}}var get=W_(IM);var vet=W_(L_);var bet=W_(k_);var yet=a(E(),1);var S0e=a(Mf(),1);var m0e=a(K(),1),h0e=a(U(),1),g0e=a(be(),1),v0e=a(Te(),1);function b0e({path:e,onPathChange:t}){let{selectedBlockName:r,selectedBlockClientId:o}=(0,m0e.useSelect)(s=>{let{getSelectedBlockClientId:l,getBlockName:c}=s(g0e.store),u=l();return{selectedBlockName:c(u),selectedBlockClientId:u}},[]),n=!0,i=(0,v0e.usePrevious)(o);return(0,h0e.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 iy=a(U(),1);var G_=a(ae(),1),Y_=a(K(),1),y0e=a(be(),1);var{cleanEmptyObject:sG}=Y(y0e.privateApis);function wet(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,Y_.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(G_.store),g=u(G_.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,Y_.useSelect)(G_.store),{editEntityRecord:s}=(0,Y_.useDispatch)(G_.store),l=(0,iy.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,iy.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:sG(h.styles)||{},settings:sG(h.settings)||{},_links:sG(h._links)||{}},d)},[e,s,i]);return[t,l,c]}function _et(){let e=(0,Y_.useSelect)(t=>t(G_.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function Hr(){let[e,t,r]=wet(),[o,n]=_et();return{merged:(0,iy.useMemo)(()=>!e||!o?{}:Oi(n||{},t),[e,o,n,t]),base:n||{},user:t,setUser:r,isReady:e&&o}}function ng(e,t){let{merged:r}=Hr();return(0,iy.useMemo)(()=>dm(r,e,t),[r,e,t])}function aG(e,t){let{merged:r}=Hr();return(0,iy.useMemo)(()=>iv(r,e,t),[r,e,t])}var sy=a(E(),1);function xet(e){let t=e?.styles,r=e?.__unstableResolvedAssets,o=e?.colors,n=e?.gradients,i=e?.__experimentalDiscussionSettings,s=e?.fontLibraryEnabled??!0,l=e?.responsiveEditingEnabled??!0,c=(0,_0e.useSelect)(f=>{let{canUser:m}=f(w0e.store);return m("create",{kind:"postType",name:"attachment"})?S0e.uploadMedia:void 0},[]),u=(0,lG.useMemo)(()=>t?t.filter(f=>!f.isGlobalStyles):[],[t]),d=(0,lG.useMemo)(()=>({__unstableResolvedAssets:r,settings:{color:{palette:{theme:o??[]},gradients:{theme:n??[]},duotone:{theme:[]}}},__experimentalDiscussionSettings:i,mediaUpload:c}),[r,o,n,i,c]);return{serverCSS:u,serverSettings:d,fontLibraryEnabled:s,responsiveEditingEnabled:l}}function LM({path:e,onPathChange:t,settings:r,selectedViewport:o,showResponsiveStateControls:n=!0}){let{user:i,base:s,setUser:l,isReady:c}=Hr(),{serverCSS:u,serverSettings:d,fontLibraryEnabled:f,responsiveEditingEnabled:m}=xet(r);return c?(0,sy.jsxs)(sy.Fragment,{children:[(0,sy.jsx)(nG,{value:i,baseValue:s||{},onChange:l,path:e,onPathChange:t,fontLibraryEnabled:f,serverCSS:u,serverSettings:d,selectedViewport:o,showResponsiveStateControls:n&&m}),(0,sy.jsx)(b0e,{path:e,onPathChange:t})]}):null}var{store:Cet}=Y(S_),x0e={};function Tet(e){let{RECEIVE_INTERMEDIATE_RESULTS:t}=Y(Ra.privateApis),{getEntityRecords:r}=e(Ra.store);return r("postType","wp_block",{per_page:-1,[t]:!0})}function Eet(e){return e(Ra.store).getUserPatternCategories()}var Pet=["__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:ket,globalStylesLinksDataKey:Ret,selectBlockPatternsKey:Aet,reusableBlocksSelectKey:Iet,userPatternCategoriesSelectKey:Oet,sectionRootClientIdKey:Net,mediaEditKey:Met,getMediaSelectKey:Fet,isIsolatedEditorKey:Det,deviceTypeKey:Let,isNavigationOverlayContextKey:Bet,isNavigationPostEditorKey:Vet,mediaUploadOnSuccessKey:jet,mediaSideloadFromUrlKey:zet,openMediaEditorModalKey:Het}=Y(BM.privateApis);function Uet(e,t,r,o){let n=(0,E0e.useViewportMatch)("medium"),{allImageSizes:i,bigImageSizeThreshold:s,imageStripMeta:l,imageMaxBitDepth:c,allowRightClickOverrides:u,blockTypes:d,focusMode:f,hasFixedToolbar:m,isDistractionFree:h,keepCaretInsideBlock:g,hasUploadPermissions:v,hiddenBlockTypes:b,canUseUnfilteredHTML:_,userCanCreatePages:y,pageOnFront:w,pageForPosts:S,restBlockPatternCategories:x,sectionRootClientId:C,deviceType:I,isNavigationOverlayContext:k,isRevisionsMode:R,viewablePostTypeLabel:A,currentPostId:P}=(0,ay.useSelect)(pe=>{let{canUser:$,getRawEntityRecord:ee,getEntityRecord:fe,getBlockPatternCategories:ve,getPostType:we}=pe(Ra.store),{get:oe}=pe(T0e.store),{getBlockTypes:re}=pe(P0e.store),{getCurrentPostId:ce,getCurrentPostType:ie}=pe(N),{getDeviceType:le,isRevisionsMode:Oe}=Y(pe(N)),{getBlocksByName:ke,getBlockAttributes:Me}=pe(BM.store),Ne=$("read",{kind:"root",name:"site"})?fe("root","site"):void 0,Fe=fe("root","__unstableBase"),X=ie(),ge=X?we(X):void 0;function Ue(){return o==="template-locked"?ke("core/post-content")?.[0]??"":ke("core/group").find(Ye=>Me(Ye)?.tagName==="main")??""}return{allImageSizes:Fe?.image_sizes,bigImageSizeThreshold:Fe?.image_size_threshold,imageStripMeta:Fe?.image_strip_meta,imageMaxBitDepth:Fe?.image_max_bit_depth,allowRightClickOverrides:oe("core","allowRightClickOverrides"),blockTypes:re(),canUseUnfilteredHTML:ee("postType",t,r)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:oe("core","focusMode"),hasFixedToolbar:oe("core","fixedToolbar")||!n,hiddenBlockTypes:oe("core","hiddenBlockTypes"),isDistractionFree:oe("core","distractionFree"),keepCaretInsideBlock:oe("core","keepCaretInsideBlock"),hasUploadPermissions:$("create",{kind:"postType",name:"attachment"})??!0,userCanCreatePages:$("create",{kind:"postType",name:"page"}),pageOnFront:Ne?.page_on_front,pageForPosts:Ne?.page_for_posts,viewablePostTypeLabel:ge?.viewable?ge?.labels?.singular_name:void 0,currentPostId:ce(),restBlockPatternCategories:ve(),sectionRootClientId:Ue(),deviceType:le(),isNavigationOverlayContext:t==="wp_template_part"&&r?fe("postType","wp_template_part",r)?.area==="navigation-overlay":!1,isRevisionsMode:Oe()}},[t,r,n,o]),{merged:T}=Hr(),M=T.styles??x0e,B=T._links??x0e,F=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,V=e.__experimentalAdditionalBlockPatternCategories??e.__experimentalBlockPatternCategories,z=(0,ig.useMemo)(()=>[...F||[]].filter(({postTypes:pe})=>!pe||Array.isArray(pe)&&pe.includes(t)),[F,t]),D=(0,ig.useMemo)(()=>[...V||[],...x||[]].filter((pe,$,ee)=>$===ee.findIndex(fe=>pe.name===fe.name)),[V,x]),{undo:O,setIsInserterOpened:L}=(0,ay.useDispatch)(N),{editMediaEntity:W}=Y((0,ay.useDispatch)(Ra.store)),{saveEntityRecord:q}=(0,ay.useDispatch)(Ra.store),{openMediaEditorModal:Z}=(0,ay.useDispatch)(Cet),Q=(0,ig.useCallback)(pe=>y?q("postType","page",pe):Promise.reject({message:(0,C0e.__)("You do not have permission to create Pages.")}),[q,y]),ue=(0,ig.useMemo)(()=>b&&b.length>0?(e.allowedBlockTypes===!0?d.map(({name:$})=>$):e.allowedBlockTypes||[]).filter($=>!b.includes($)):e.allowedBlockTypes,[e.allowedBlockTypes,b,d]),te=e.focusMode===!1,de=(0,ig.useMemo)(()=>oge(P,A),[P,A]);return(0,ig.useMemo)(()=>{let pe={...Object.fromEntries(Object.entries(e).filter(([$])=>Pet.includes($))),[ket]:M,[Ret]:B,allImageSizes:i,bigImageSizeThreshold:s,imageStripMeta:l,imageMaxBitDepth:c,allowedBlockTypes:ue,allowRightClickOverrides:u,focusMode:f&&!te,hasFixedToolbar:m,isDistractionFree:h,keepCaretInsideBlock:g,[Fet]:($,ee)=>$(Ra.store).getEntityRecord("postType","attachment",ee),[Met]:v?W:void 0,[Het]:({id:$,onUpdate:ee,onClose:fe})=>Z({id:$,onUpdate:ee,onClose:fe}),mediaUpload:v?HN:void 0,[jet]:v?vge:void 0,mediaSideload:v?yge:void 0,[zet]:v?xge:void 0,mediaFinalize:v?Ege:void 0,mediaDelete:v?kge:void 0,__experimentalBlockPatterns:z,[Aet]:$=>{let{hasFinishedResolution:ee,getBlockPatternsForPostType:fe}=Y($(Ra.store)),ve=fe(t);return ee("getBlockPatterns")?ve:void 0},[Iet]:Tet,[Oet]:Eet,__experimentalBlockPatternCategories:D,__experimentalFetchLinkSuggestions:($,ee)=>(0,Ra.__experimentalFetchLinkSuggestions)($,ee,e),inserterMediaCategories:de,__experimentalFetchRichUrlData:Ra.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:_,__experimentalUndo:O,outlineMode:!h&&t==="wp_template",__experimentalCreatePageEntity:Q,__experimentalUserCanCreatePages:y,pageOnFront:w,pageForPosts:S,__experimentalPreferPatternsOnRoot:t==="wp_template",templateLock:t==="wp_navigation"?"insert":e.templateLock,template:t==="wp_navigation"?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:L,[Net]:C,editorTool:o==="post-only"&&t!=="wp_template"?"edit":void 0,[Det]:["wp_template_part","wp_block","wp_navigation"].includes(t),[Vet]:t==="wp_navigation",disableContentOnlyForTemplateParts:o==="template-locked"||e.disableContentOnlyForTemplateParts,...I?{[Let]:I}:{},[Bet]:k};return R&&(pe.isPreviewMode=!0),pe},[R,ue,u,f,te,m,h,g,e,v,z,D,de,_,O,Q,y,w,S,t,L,C,M,B,o,W,Z,I,i,s,l,c,k])}var k0e=Uet;var SE=a(K(),1),q_=a(be(),1),jM=a(U(),1);var R0e=a(U(),1),A0e=a(Vn(),1),Wet=["core/post-title","core/post-featured-image","core/post-content"];function VM(){return(0,R0e.useMemo)(()=>[...(0,A0e.applyFilters)("editor.postContentBlockTypes",Wet)],[])}function I0e(){let e=VM(),{contentOnlyIds:t,templateParts:r}=(0,SE.useSelect)(i=>{let{getPostBlocksByName:s}=Y(i(N)),{getBlocksByName:l}=i(q_.store);return{contentOnlyIds:s(e),templateParts:l("core/template-part")}},[e]),o=(0,SE.useSelect)(i=>{let{getBlockOrder:s}=i(q_.store);return r.flatMap(l=>s(l))},[r]),n=(0,SE.useRegistry)();return(0,jM.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(q_.store);return l(),i("","disabled"),()=>{l(),s("")}},[n]),(0,jM.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(q_.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,jM.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(q_.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 O0e=a(U(),1),zM=a(K(),1),cG=a(be(),1);function N0e(){let e=(0,zM.useRegistry)(),t=(0,zM.useSelect)(r=>r(cG.store).getBlockOrder()?.[0],[]);(0,O0e.useEffect)(()=>{if(!t)return;let{setBlockEditingMode:r,unsetBlockEditingMode:o,__unstableMarkNextChangeAsNotPersistent:n}=e.dispatch(cG.store);return n(),r(t,"contentOnly"),()=>{n(),o(t)}},[e,t])}var F0e=a(U(),1),K_=a(Vn(),1),M0e=["wp_block","wp_template","wp_template_part"];function D0e(e,t){(0,F0e.useEffect)(()=>((0,K_.addFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter",(r,o)=>!M0e.includes(e)&&o.name==="core/template-part"&&t==="post-only"?!1:r),(0,K_.addFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter",(r,o,n,{getBlockParentsByBlockName:i})=>!M0e.includes(e)&&o.name==="core/post-content"?i(n,"core/query").length>0:r),()=>{(0,K_.removeFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter"),(0,K_.removeFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter")}),[e,t])}var J0e=a(K(),1),KM=a(U(),1),ZM=a(Pt(),1);var tc=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 I=S&&S.oldPos+1<c;if(!C&&!I){h[y]=void 0;continue}if(!I||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 uG=class extends tc{},Get=new uG;function dG(e,t,r){return Get.diff(e,t,r)}function fG(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 pG(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 HM(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 UM(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 Z_(e,t){return HM(e,t,"")}function xE(e,t){return UM(e,t,"")}function mG(e,t){return t.slice(0,Yet(e,t))}function Yet(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 hG(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 WM(e,t){if(t)return X_(e,t)[1];let r;for(r=e.length-1;r>=0&&e[r].match(/\s/);r--);return e.substring(r+1)}function ly(e,t){if(t)return X_(e,t)[0];let r=e.match(/^\s*/);return r?r[0]:""}function X_(e,t){if(!t)return[ly(e),WM(e)];if(t.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');let r=hG(e,t),o=r[0],n=r[r.length-1],i=/\s/.test(o)?o:"",s=/\s/.test(n)?n:"";return[i,s]}var GM="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}",qet=new RegExp(`[${GM}]+|\\s+|[^${GM}]`,"ug"),gG=class extends tc{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=hG(t,s)}else o=t.match(qet)||[];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)&&L0e(o,i,n,s,r.intlSegmenter),o=s,n=null,i=null)}),(n||i)&&L0e(o,i,n,null,r.intlSegmenter),t}},Ket=new gG;function L0e(e,t,r,o,n){if(t&&r){let[i,s]=X_(t.value,n),[l,c]=X_(r.value,n);if(e){let u=fG(i,l);e.value=UM(e.value,l,u),t.value=Z_(t.value,u),r.value=Z_(r.value,u)}if(o){let u=pG(s,c);o.value=HM(o.value,c,u),t.value=xE(t.value,u),r.value=xE(r.value,u)}}else if(r){if(e){let i=ly(r.value,n);r.value=r.value.substring(i.length)}if(o){let i=ly(o.value,n);o.value=o.value.substring(i.length)}}else if(e&&o){let i=ly(o.value,n),[s,l]=X_(t.value,n),c=fG(i,s);t.value=Z_(t.value,c);let u=pG(Z_(i,c),l);t.value=xE(t.value,u),o.value=HM(o.value,i,u),e.value=UM(e.value,i,i.slice(0,i.length-u.length))}else if(o){let i=ly(o.value,n),s=WM(t.value,n),l=mG(s,i);t.value=xE(t.value,l)}else if(e){let i=WM(e.value,n),s=ly(t.value,n),l=mG(i,s);t.value=Z_(t.value,l)}}var vG=class extends tc{tokenize(t){let r=new RegExp(`(\\r?\\n)|[${GM}]+|[^\\S\\n\\r]+|[^${GM}]`,"ug");return t.match(r)||[]}},B0e=new vG;function Q_(e,t,r){return B0e.diff(e,t,r)}var bG=class extends tc{constructor(){super(...arguments),this.tokenize=Xet}equals(t,r,o){return o.ignoreWhitespace?((!o.newlineIsToken||!t.includes(` |
| 64 |
`))&&(t=t.trim()),(!o.newlineIsToken||!r.includes(` |
| 65 |
`))&&(r=r.trim())):o.ignoreNewlineAtEof&&!o.newlineIsToken&&(t.endsWith(` |
| 66 |
`)&&(t=t.slice(0,-1)),r.endsWith(` |
| 67 |
`)&&(r=r.slice(0,-1))),super.equals(t,r,o)}},Zet=new bG;function V0e(e,t,r){return Zet.diff(e,t,r)}function Xet(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,` |
| 68 |
`));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 yG=class extends tc{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}},j0e=new yG;function CE(e,t,r){return j0e.diff(e,t,r)}var wG=a(H0e(),1),qM=a(Pt(),1),Mn=a(hd(),1),Aa=a(j(),1);var J_=a(j(),1),YM=a(hd(),1),rc={removed:"revision-diff-removed-desc",added:"revision-diff-added-desc",formatAdded:"revision-diff-format-added-desc",formatRemoved:"revision-diff-format-removed-desc",formatChanged:"revision-diff-format-changed-desc"},U0e=[{name:"revision/diff-removed",title:(0,J_.__)("Removed"),tagName:"del",className:"revision-diff-removed"},{name:"revision/diff-added",title:(0,J_.__)("Added"),tagName:"ins",className:"revision-diff-added"},{name:"revision/diff-format-added",title:(0,J_.__)("Format added"),tagName:"mark",className:"revision-diff-format-added"},{name:"revision/diff-format-removed",title:(0,J_.__)("Format removed"),tagName:"mark",className:"revision-diff-format-removed"},{name:"revision/diff-format-changed",title:(0,J_.__)("Format changed"),tagName:"mark",className:"revision-diff-format-changed"}];function W0e(){for(let e of U0e)(0,YM.registerFormatType)(e.name,{...e,attributes:{"aria-describedby":"aria-describedby"},edit:()=>null})}function G0e(){for(let e of U0e)(0,YM.unregisterFormatType)(e.name)}var{parseRawBlock:K0e}=Y(qM.privateApis);function Y0e(e){return e.blockName===null&&(!e.innerHTML||!e.innerHTML.trim())}function q0e(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function Qet(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 Jet(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 _=Qet(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 Z0e(e,t){e=e.filter(u=>!Y0e(u)),t=t.filter(u=>!Y0e(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=CE(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=Z0e(f.innerBlocks||[],m.innerBlocks||[]);s.push({...f,innerBlocks:h})}return Jet(s)}function $et(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 ett(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,Aa.sprintf)((0,Aa._n)("%d format added","%d formats added",s),s)};if(l>0&&s===0&&c===0)return{type:"removed",description:(0,Aa.sprintf)((0,Aa._n)("%d format removed","%d formats removed",l),l)};let u=[];return s>0&&u.push((0,Aa.sprintf)((0,Aa._n)("%d format added","%d formats added",s),s)),l>0&&u.push((0,Aa.sprintf)((0,Aa._n)("%d format removed","%d formats removed",l),l)),c>0&&u.push((0,Aa.sprintf)((0,Aa._n)("%d format changed","%d formats changed",c),c)),{type:"changed",description:u.join(", ")||(0,Aa.__)("Formatting changed")}}function ttt(e,t){let r=e.toPlainText(),o=t.toPlainText(),n=Q_(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:{"aria-describedby":rc.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:{"aria-describedby":rc.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=>$et(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}=ett(u,d,s+h,l+h),w={added:"revision/diff-format-added",removed:"revision/diff-format-removed",changed:"revision/diff-format-changed"}[y],S={added:rc.formatAdded,removed:rc.formatRemoved,changed:rc.formatChanged}[y],x=(0,Mn.applyFormat)(_,{type:w,attributes:{"aria-describedby":S}},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 rtt(e,t,r){let o=(0,qM.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]=ttt(l,c))}else{let l=q0e(e.attributes[i]),c=q0e(t.attributes[i]);l!==c&&(n[i]=Q_(c,l))}Object.keys(n).length>0&&(r.changedAttributes=n)}function X0e(e,t){if(t.__revisionDiffStatus){if(t.__revisionDiffStatus.status==="modified"&&t.__previousRawBlock){let r=K0e(t.__previousRawBlock);r&&rtt(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&&X0e(o,n)}}function Q0e(e,t){let r=(0,wG.parse)(e||""),o=(0,wG.parse)(t||"");return Z0e(r,o).map(i=>{let s=K0e(i);return s&&X0e(s,i),s}).filter(Boolean)}function _G(e,t){if(!t?.length||!e?.length)return e;let r=e.map(c=>c.name),o=t.map(c=>c.name),n=CE(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:_G(d.innerBlocks,f.innerBlocks)})}return l}function $0e(){let{isInRevisionsMode:e,showDiff:t,revision:r,previousRevision:o,postType:n}=(0,J0e.useSelect)(l=>{let{isRevisionsMode:c,isShowingRevisionDiff:u,getCurrentRevision:d,getPreviousRevision:f}=Y(l(N)),{getCurrentPostType:m}=l(N),h=c();return{isInRevisionsMode:h,showDiff:u(),revision:h?d():void 0,previousRevision:h?f():void 0,postType:m()}},[]),i=(0,KM.useRef)([]);return(0,KM.useMemo)(()=>{if(!e)return i.current=[],null;if(!r)return[];let l=r?.content?.raw??"",c;if(t){let d=o?.content?.raw||"";c=Q0e(l,d)}else c=(0,ZM.parse)(l);n==="wp_navigation"&&(c=[(0,ZM.createBlock)("core/navigation",{templateLock:!1},c)]);let u=_G(c,i.current);return i.current=u,u},[e,r,r?.content?.raw,o?.content?.raw,n,t])}var oi=a(K(),1),At=a(j(),1);var $_=a(SG(),1),TG=a(Dt(),1),cwe=a(It(),1),PE=a(be(),1),eS=a(ae(),1);var XM=a(Vt(),1);var TE=a(K(),1),twe=a(Al(),1),rwe=a(ae(),1);var owe=a(E(),1),{RenamePatternModal:ott}=Y(twe.privateApis),xG="editor/pattern-rename";function nwe(){let e=(0,TE.useSelect)(n=>n(je).isModalActive(xG)),{record:t,postType:r}=(0,TE.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:s}=n(N),{getEditedEntityRecord:l}=n(rwe.store),c=i();return{record:l("postType",c,s()),postType:c}},[e]),{closeModal:o}=(0,TE.useDispatch)(je);return!e||r!==Nu?null:(0,owe.jsx)(ott,{onClose:o,pattern:t})}var EE=a(K(),1),iwe=a(Al(),1),swe=a(ae(),1);var awe=a(E(),1),{DuplicatePatternModal:ntt}=Y(iwe.privateApis),CG="editor/pattern-duplicate";function lwe(){let e=(0,EE.useSelect)(n=>n(je).isModalActive(CG)),{record:t,postType:r}=(0,EE.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:s}=n(N),{getEditedEntityRecord:l}=n(swe.store),c=i();return{record:l("postType",c,s()),postType:c}},[e]),{closeModal:o}=(0,EE.useDispatch)(je);return!e||r!==Nu?null:(0,awe.jsx)(ntt,{onClose:o,onSuccess:()=>o(),pattern:t})}function uwe({disableContentOnlyForPatternsAndTemplateParts:e,stopEditingContentOnlySection:t,updateEditorSettings:r}){return{name:"core/toggle-pattern-editing",label:e?(0,At.__)("Disable editing all patterns"):(0,At.__)("Enable editing all patterns"),icon:w0,category:"command",callback:({close:o})=>{let n=!e;t(),r({disableContentOnlyForUnsyncedPatterns:n,disableContentOnlyForTemplateParts:n}),o()}}}function itt(e,t){return!!t?.metadata?.patternName||e==="core/template-part"}var stt=()=>function(){let{editorMode:t,isListViewOpen:r,showBlockBreadcrumbs:o,isDistractionFree:n,isFocusMode:i,isPreviewMode:s,isViewable:l,isCodeEditingEnabled:c,isRichEditingEnabled:u,isPublishSidebarEnabled:d,disableContentOnlyForUnsyncedPatterns:f,disableContentOnlyForTemplateParts:m}=(0,oi.useSelect)(F=>{let{get:V}=F(TG.store),{isListViewOpened:z,getCurrentPostType:D,getEditorSettings:O}=F(N),{getSettings:L}=F(PE.store),{getPostType:W}=F(eS.store);return{editorMode:V("core","editorMode")??"visual",isListViewOpen:z(),showBlockBreadcrumbs:V("core","showBlockBreadcrumbs"),isDistractionFree:V("core","distractionFree"),isFocusMode:V("core","focusMode"),isPreviewMode:L().isPreviewMode,isViewable:W(D())?.viewable??!1,isCodeEditingEnabled:O().codeEditingEnabled,isRichEditingEnabled:O().richEditingEnabled,isPublishSidebarEnabled:F(N).isPublishSidebarEnabled(),disableContentOnlyForUnsyncedPatterns:!!O().disableContentOnlyForUnsyncedPatterns,disableContentOnlyForTemplateParts:!!O().disableContentOnlyForTemplateParts}},[]),{getActiveComplementaryArea:h}=(0,oi.useSelect)(je),{toggle:g}=(0,oi.useDispatch)(TG.store),{createInfoNotice:v}=(0,oi.useDispatch)(cwe.store),{__unstableSaveForPreview:b,setIsListViewOpened:_,switchEditorMode:y,toggleDistractionFree:w,toggleSpotlightMode:S,toggleTopToolbar:x,updateEditorSettings:C}=(0,oi.useDispatch)(N),{stopEditingContentOnlySection:I}=Y((0,oi.useDispatch)(PE.store)),{openModal:k,enableComplementaryArea:R,disableComplementaryArea:A}=(0,oi.useDispatch)(je),{getCurrentPostId:P}=(0,oi.useSelect)(N),T=c&&u;if(s)return{commands:[],isLoading:!1};let M=[],B=f&&m;return M.push({name:"core/open-shortcut-help",label:(0,At.__)("Keyboard shortcuts"),icon:S1,category:"view",callback:({close:F})=>{F(),k("editor/keyboard-shortcut-help")}}),M.push({name:"core/toggle-distraction-free",label:n?(0,At.__)("Exit Distraction free"):(0,At.__)("Enter Distraction free"),category:"command",callback:({close:F})=>{w(),F()}}),M.push({name:"core/open-preferences",label:(0,At.__)("Editor preferences"),category:"view",callback:({close:F})=>{F(),k("editor/preferences")}}),M.push({name:"core/toggle-spotlight-mode",label:i?(0,At.__)("Exit Spotlight mode"):(0,At.__)("Enter Spotlight mode"),category:"command",callback:({close:F})=>{S(),F()}}),M.push({name:"core/toggle-list-view",label:r?(0,At.__)("Close List View"):(0,At.__)("Open List View"),icon:x1,category:"command",callback:({close:F})=>{_(!r),F(),v(r?(0,At.__)("List View off."):(0,At.__)("List View on."),{id:"core/editor/toggle-list-view/notice",type:"snackbar"})}}),M.push({name:"core/toggle-top-toolbar",label:(0,At.__)("Top toolbar"),category:"command",callback:({close:F})=>{x(),F()}}),M.push(uwe({disableContentOnlyForPatternsAndTemplateParts:B,stopEditingContentOnlySection:I,updateEditorSettings:C})),T&&M.push({name:"core/toggle-code-editor",label:t==="visual"?(0,At.__)("Open code editor"):(0,At.__)("Exit code editor"),icon:LB,category:"command",callback:({close:F})=>{y(t==="visual"?"text":"visual"),F()}}),M.push({name:"core/toggle-breadcrumbs",label:o?(0,At.__)("Hide block breadcrumbs"):(0,At.__)("Show block breadcrumbs"),category:"command",callback:({close:F})=>{g("core","showBlockBreadcrumbs"),F(),v(o?(0,At.__)("Breadcrumbs hidden."):(0,At.__)("Breadcrumbs visible."),{id:"core/editor/toggle-breadcrumbs/notice",type:"snackbar"})}}),M.push({name:"core/open-settings-sidebar",label:(0,At.__)("Show or hide the Settings panel"),icon:(0,At.isRTL)()?dv:Sf,category:"command",callback:({close:F})=>{let V=h("core");F(),V==="edit-post/document"?A("core"):R("core","edit-post/document")}}),M.push({name:"core/open-block-inspector",label:(0,At.__)("Show or hide the Block settings panel"),icon:vB,category:"command",callback:({close:F})=>{let V=h("core");F(),V==="edit-post/block"?A("core"):R("core","edit-post/block")}}),M.push({name:"core/toggle-publish-sidebar",label:d?(0,At.__)("Disable pre-publish checks"):(0,At.__)("Enable pre-publish checks"),icon:b1,category:"command",callback:({close:F})=>{F(),g("core","isPublishSidebarEnabled"),v(d?(0,At.__)("Pre-publish checks disabled."):(0,At.__)("Pre-publish checks enabled."),{id:"core/editor/publish-sidebar/notice",type:"snackbar"})}}),l&&M.push({name:"core/preview-link",label:(0,At.__)("Preview in a new tab"),icon:ms,category:"view",callback:async({close:F})=>{F();let V=P(),z=await b();window.open(z,`wp-preview-${V}`)}}),{commands:M,isLoading:!1}},att=()=>function({search:t}){let{disableContentOnlyForPatternsAndTemplateParts:r,hasPatternOrTemplatePartSelection:o,isPreviewMode:n}=(0,oi.useSelect)(l=>{let{getBlockAttributes:c,getBlockName:u,getBlockParents:d,getSelectedBlockClientId:f,getSelectedBlockClientIds:m,getSettings:h}=l(PE.store),{getEditorSettings:g}=l(N),v=g(),b=f(),_=m(),y=b&&_.length===1?[b,...d(b,!0)]:[];return{disableContentOnlyForPatternsAndTemplateParts:!!v.disableContentOnlyForUnsyncedPatterns&&!!v.disableContentOnlyForTemplateParts,hasPatternOrTemplatePartSelection:y.some(w=>itt(u(w),c(w))),isPreviewMode:h().isPreviewMode}},[]),{updateEditorSettings:i}=(0,oi.useDispatch)(N),{stopEditingContentOnlySection:s}=Y((0,oi.useDispatch)(PE.store));return t||!o&&!r||n?{isLoading:!1,commands:[]}:{isLoading:!1,commands:[uwe({disableContentOnlyForPatternsAndTemplateParts:r,stopEditingContentOnlySection:s,updateEditorSettings:i})]}},ltt=()=>function(){let{postType:t}=(0,oi.useSelect)(n=>{let{getCurrentPostType:i}=n(N);return{postType:i()}},[]),{openModal:r}=(0,oi.useDispatch)(je),o=[];return t===Nu&&(o.push({name:"core/rename-pattern",label:(0,At.__)("Rename pattern"),icon:P1,category:"edit",callback:({close:n})=>{r(xG),n()}}),o.push({name:"core/duplicate-pattern",label:(0,At.__)("Duplicate pattern"),icon:w0,category:"command",callback:({close:n})=>{r(CG),n()}})),{isLoading:!1,commands:o}},ctt=()=>function(){let{onNavigateToEntityRecord:t,goBack:r,templateId:o,isPreviewMode:n,canEditTemplate:i}=(0,oi.useSelect)(u=>{let{getRenderingMode:d,getEditorSettings:f,getCurrentTemplateId:m}=Y(u(N)),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(eS.store).canUser("update",{kind:"postType",name:"wp_template",id:g})}},[]),{editedRecord:s,hasResolved:l}=(0,eS.useEntityRecord)("postType","wp_template",o);if(n)return{isLoading:!1,commands:[]};let c=[];return o&&l&&i&&c.push({name:"core/switch-to-template-focus",label:(0,At.sprintf)((0,At.__)("Edit template: %s"),(0,XM.decodeEntities)(s.title)),icon:Cc,category:"edit",callback:({close:u})=>{t({postId:o,postType:"wp_template"}),u()}}),r&&c.push({name:"core/switch-to-previous-entity",label:(0,At.__)("Go back"),icon:vm,category:"view",callback:({close:u})=>{r(),u()}}),{isLoading:!1,commands:c}},utt=()=>function(){let{postType:t,postId:r}=(0,oi.useSelect)(l=>{let{getCurrentPostId:c,getCurrentPostType:u}=l(N);return{postType:u(),postId:c()}},[]),{editedRecord:o,hasResolved:n}=(0,eS.useEntityRecord)("postType",t,r),{revertTemplate:i}=Y((0,oi.useDispatch)(N));if(!n||![Ii,xr].includes(t))return{isLoading:!0,commands:[]};let s=[];if(Lk(o)){let l=o.type===xr?(0,At.sprintf)((0,At.__)("Reset template: %s"),(0,XM.decodeEntities)(o.title)):(0,At.sprintf)((0,At.__)("Reset template part: %s"),(0,XM.decodeEntities)(o.title));s.push({name:"core/reset-template",label:l,icon:(0,At.isRTL)()?A1:R1,category:"command",callback:({close:c})=>{i(o),c()}})}return{isLoading:!n,commands:s}};function dwe(){(0,$_.useCommandLoader)({name:"core/editor/edit-ui",hook:stt()}),(0,$_.useCommandLoader)({name:"core/editor/contextual-commands",hook:ltt(),context:"entity-edit"}),(0,$_.useCommandLoader)({name:"core/editor/pattern-editing-contextual-commands",hook:att(),context:"block-selection-edit"}),(0,$_.useCommandLoader)({name:"core/editor/page-content-focus",hook:ctt(),context:"entity-edit"}),(0,$_.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:utt()})}var JM=a(K(),1),pwe=a(U(),1),mwe=a(QM(),1);var tS="upload-in-progress";function hwe(){let e=(0,JM.useSelect)(i=>i(mwe.store).isUploading(),[]),{lockPostSaving:t,unlockPostSaving:r,lockPostAutosaving:o,unlockPostAutosaving:n}=(0,JM.useDispatch)(N);(0,pwe.useEffect)(()=>(e?(t(tS),o(tS)):(r(tS),n(tS)),()=>{r(tS),n(tS)}),[e,t,r,o,n])}var gwe=a(U(),1),vwe=a(K(),1),EG=a(QM(),1);function bwe(){let e=window.__clientSideMediaProcessing,t=(0,vwe.useRegistry)();(0,gwe.useEffect)(()=>{if(!e)return;let r=()=>{Y(t.dispatch(EG.store)).pauseQueue()},o=()=>{Y(t.dispatch(EG.store)).resumeQueue()};return window.addEventListener("offline",r),window.addEventListener("online",o),()=>{window.removeEventListener("offline",r),window.removeEventListener("online",o)}},[e,t])}var cy=a(j(),1),ywe=a(be(),1),wwe=a(K(),1),_we=a(U(),1);var Swe=a(E(),1),{BlockRemovalWarningModal:dtt}=Y(ywe.privateApis),ftt=["core/post-content","core/post-template","core/query"],ptt=[{postTypes:["wp_template","wp_template_part"],callback(e){if(e.filter(({name:o})=>o==="core/post-content").length)return{description:(0,cy.__)("This block displays the content of posts and pages using this template."),warning:(0,cy.__)("If you delete it, posts or pages using this template will not display any content."),subtext:(0,cy.__)("Visitors will see blank pages."),requireConfirmation:!0};if(e.filter(({name:o})=>ftt.includes(o)).length)return(0,cy._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,cy._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 xwe(){let e=(0,wwe.useSelect)(r=>r(N).getCurrentPostType(),[]),t=(0,_we.useMemo)(()=>ptt.filter(r=>r.postTypes.includes(e)),[e]);return t?(0,Swe.jsx)(dtt,{rules:t}):null}var sg=a(G(),1),PG=a(j(),1),uy=a(U(),1),$M=a(be(),1),zd=a(K(),1),kG=a(ae(),1),Cwe=a(Pt(),1),RG=a(Dt(),1);var jd=a(E(),1);function mtt(){let{blockPatternsWithPostContentBlockType:e,postType:t}=(0,zd.useSelect)(r=>{let{getPatternsByBlockTypes:o,getBlocksByName:n}=r($M.store),{getCurrentPostType:i,getRenderingMode:s}=r(N),l=s()==="post-only"?"":n("core/post-content")?.[0];return{blockPatternsWithPostContentBlockType:o("core/post-content",l),postType:i()}},[]);return(0,uy.useMemo)(()=>e?.length?e.filter(r=>t==="page"&&!r.postTypes||Array.isArray(r.postTypes)&&r.postTypes.includes(t)):[],[t,e])}function htt({blockPatterns:e,onChoosePattern:t}){let{editEntityRecord:r}=(0,zd.useDispatch)(kG.store),{postType:o,postId:n}=(0,zd.useSelect)(i=>{let{getCurrentPostType:s,getCurrentPostId:l}=i(N);return{postType:s(),postId:l()}},[]);return(0,jd.jsx)($M.__experimentalBlockPatternsList,{blockPatterns:e,onClickPattern:(i,s)=>{r("postType",o,n,{blocks:s,content:({blocks:l=[]})=>(0,Cwe.__unstableSerializeAndClean)(l)}),t()}})}function gtt({onClose:e}){let[t,r]=(0,uy.useState)(!0),{set:o}=(0,zd.useDispatch)(RG.store),n=mtt();if(!(n.length>0))return null;function s(){e(),o("core","enableChoosePatternModal",t)}return(0,jd.jsxs)(sg.Modal,{className:"editor-start-page-options__modal",title:(0,PG.__)("Choose a pattern"),isFullScreen:!0,onRequestClose:s,children:[(0,jd.jsx)("div",{className:"editor-start-page-options__modal-content",children:(0,jd.jsx)(htt,{blockPatterns:n,onChoosePattern:s})}),(0,jd.jsx)(sg.Flex,{className:"editor-start-page-options__modal__actions",justify:"flex-start",expanded:!1,children:(0,jd.jsx)(sg.FlexItem,{children:(0,jd.jsx)(sg.CheckboxControl,{checked:t,label:(0,PG.__)("Always show starter patterns for new pages"),onChange:l=>{r(l)}})})})]})}function Twe(){let[e,t]=(0,uy.useState)(!1),{isEditedPostEmpty:r}=(0,zd.useSelect)(N),{getEntityRecordNonTransientEdits:o}=(0,zd.useSelect)(kG.store),{isModalActive:n}=(0,zd.useSelect)(je),{enabled:i,postType:s,postId:l}=(0,zd.useSelect)(c=>{let{getCurrentPostId:u,getCurrentPostType:d}=c(N),f=c(RG.store).get("core","enableChoosePatternModal"),m=d();return{postType:m,postId:u(),enabled:f&&El!==m&&xr!==m&&Ii!==m}},[]);return(0,uy.useEffect)(()=>{let u=!(Object.keys(o("postType",s,l)??{}).length>0)&&r(),d=n("editor/preferences");!i||!u||d||t(!0)},[i,s,l,o,r,n]),e?(0,jd.jsx)(gtt,{onClose:()=>t(!1)}):null}var Mwe=a(G(),1),Hd=a(j(),1),o3=a(_a(),1),kE=a(K(),1);var oc=a(j(),1),Ewe=[{keyCombination:{modifier:"primary",character:"b"},description:(0,oc.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,oc.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,oc.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,oc.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,oc.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,oc.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,oc.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,oc.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,oc.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,oc.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,oc.__)("Add non breaking space.")}];var kwe=a(U(),1),e3=a(Mo(),1),nc=a(E(),1);function Pwe({keyCombination:e,forceAriaLabel:t}){let r=e.modifier?e3.displayShortcutList[e.modifier](e.character):e.character,o=e.modifier?e3.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,nc.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,nc.jsx)(kwe.Fragment,{children:n},i):(0,nc.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key",children:n},i))})}function vtt({description:e,keyCombination:t,aliases:r=[],ariaLabel:o}){return(0,nc.jsxs)(nc.Fragment,{children:[(0,nc.jsx)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-description",children:e}),(0,nc.jsxs)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-term",children:[(0,nc.jsx)(Pwe,{keyCombination:t,forceAriaLabel:o}),r.map((n,i)=>(0,nc.jsx)(Pwe,{keyCombination:n,forceAriaLabel:o},i))]})]})}var t3=vtt;var Rwe=a(K(),1),Awe=a(_a(),1);var Iwe=a(E(),1);function btt({name:e}){let{keyCombination:t,description:r,aliases:o}=(0,Rwe.useSelect)(n=>{let{getShortcutKeyCombination:i,getShortcutDescription:s,getShortcutAliases:l}=n(Awe.store);return{keyCombination:i(e),aliases:l(e),description:s(e)}},[e]);return t?(0,Iwe.jsx)(t3,{keyCombination:t,description:r,aliases:o}):null}var Owe=btt;var _i=a(E(),1),Nwe="editor/keyboard-shortcut-help",ytt=({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)(Owe,{name:t}):(0,_i.jsx)(t3,{...t})},r))}),AG=({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)(ytt,{shortcuts:t})]}),r3=({title:e,categoryName:t,additionalShortcuts:r=[]})=>{let o=(0,kE.useSelect)(n=>n(o3.store).getCategoryShortcuts(t),[t]);return(0,_i.jsx)(AG,{title:e,shortcuts:o.concat(r)})};function wtt(){let e=(0,kE.useSelect)(n=>n(je).isModalActive(Nwe),[]),{openModal:t,closeModal:r}=(0,kE.useDispatch)(je),o=()=>{e?r():t(Nwe)};return(0,o3.useShortcut)("core/editor/keyboard-shortcuts",o),e?(0,_i.jsxs)(Mwe.Modal,{className:"editor-keyboard-shortcut-help-modal",title:(0,Hd.__)("Keyboard shortcuts"),closeButtonLabel:(0,Hd.__)("Close"),onRequestClose:o,children:[(0,_i.jsx)(AG,{className:"editor-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/editor/keyboard-shortcuts"]}),(0,_i.jsx)(r3,{title:(0,Hd.__)("Global shortcuts"),categoryName:"global"}),(0,_i.jsx)(r3,{title:(0,Hd.__)("Selection shortcuts"),categoryName:"selection"}),(0,_i.jsx)(r3,{title:(0,Hd.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,Hd.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,Hd.__)("Forward-slash")}]}),(0,_i.jsx)(AG,{title:(0,Hd.__)("Text formatting"),shortcuts:Ewe}),(0,_i.jsx)(r3,{title:(0,Hd.__)("List View shortcuts"),categoryName:"list-view"})]}):null}var Fwe=wtt;var ag=a(G(),1),RE=a(j(),1),rS=a(U(),1),Dwe=a(be(),1),AE=a(K(),1),IG=a(Pt(),1),dy=a(ae(),1);var Ud=a(E(),1);function _tt(e,t=!1){return(0,AE.useSelect)(r=>{let{getEntityRecord:o,getDefaultTemplateId:n}=r(dy.store),i=n({slug:e,is_custom:t,ignore_empty:!0});return i?o("postType",xr,i)?.content?.raw:void 0},[e,t])}function Stt(e){let{slug:t,patterns:r}=(0,AE.useSelect)(i=>{let{getCurrentPostType:s,getCurrentPostId:l}=i(N),{getEntityRecord:c,getBlockPatterns:u}=i(dy.store),d=l(),f=s();return{slug:c("postType",f,d).slug,patterns:u()}},[]),o=(0,AE.useSelect)(i=>i(dy.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,rS.useMemo)(()=>[{name:"fallback",blocks:(0,IG.parse)(e),title:(0,RE.__)("Fallback content")},...r.filter(i=>Array.isArray(i.templateTypes)&&i.templateTypes.some(s=>t.startsWith(s))).map(i=>({...i,blocks:(0,IG.parse)(i.content).map(s=>n(s))}))],[e,t,r])}function xtt({fallbackContent:e,onChoosePattern:t,postType:r}){let[,,o]=(0,dy.useEntityBlockEditor)("postType",r),n=Stt(e);return(0,Ud.jsx)(Dwe.__experimentalBlockPatternsList,{blockPatterns:n,onClickPattern:(i,s)=>{o(s,{selection:void 0}),t()}})}function Ctt({slug:e,isCustom:t,onClose:r,postType:o}){let n=_tt(e,t);return n?(0,Ud.jsxs)(ag.Modal,{className:"editor-start-template-options__modal",title:(0,RE.__)("Choose a pattern"),closeLabel:(0,RE.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:r,isFullScreen:!0,children:[(0,Ud.jsx)("div",{className:"editor-start-template-options__modal-content",children:(0,Ud.jsx)(xtt,{fallbackContent:n,slug:e,isCustom:t,postType:o,onChoosePattern:()=>{r()}})}),(0,Ud.jsx)(ag.Flex,{className:"editor-start-template-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,Ud.jsx)(ag.FlexItem,{children:(0,Ud.jsx)(ag.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,RE.__)("Skip")})})})]}):null}function Lwe(){let[e,t]=(0,rS.useState)(!1),{shouldOpenModal:r,slug:o,isCustom:n,postType:i,postId:s}=(0,AE.useSelect)(l=>{let{getCurrentPostType:c,getCurrentPostId:u}=l(N),d=c(),f=u(),{getEditedEntityRecord:m,getEntityRecordNonTransientEdits:h}=l(dy.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,rS.useEffect)(()=>{t(!1)},[i,s]),!r||e?null:(0,Ud.jsx)(Ctt,{slug:o,isCustom:n,postType:i,onClose:()=>t(!0)})}var lg=a(_a(),1),cg=a(K(),1);var n3=a(be(),1);var{usesNativeUndo:Bwe}=Y(n3.privateApis);function oS(){let e=(0,cg.useSelect)(b=>{let{richEditingEnabled:_,codeEditingEnabled:y}=b(N).getEditorSettings();return!_||!y},[]),{getBlockSelectionStart:t}=(0,cg.useSelect)(n3.store),{getActiveComplementaryArea:r}=(0,cg.useSelect)(je),{enableComplementaryArea:o,disableComplementaryArea:n}=(0,cg.useDispatch)(je),{redo:i,undo:s,savePost:l,setIsListViewOpened:c,switchEditorMode:u,toggleDistractionFree:d}=(0,cg.useDispatch)(N),{isEditedPostDirty:f,isPostSavingLocked:m,isListViewOpened:h,getEditorMode:g,isSavingNonPostEntityChanges:v}=(0,cg.useSelect)(N);return(0,lg.useShortcut)("core/editor/toggle-mode",()=>{u(g()==="visual"?"text":"visual")},{isDisabled:e}),(0,lg.useShortcut)("core/editor/toggle-distraction-free",()=>{d()}),(0,lg.useShortcut)("core/editor/undo",b=>{Bwe(b)||(s(),b.preventDefault())}),(0,lg.useShortcut)("core/editor/redo",b=>{Bwe(b)||(i(),b.preventDefault())}),(0,lg.useShortcut)("core/editor/save",b=>{b.preventDefault(),!(m()||v())&&f()&&l()}),(0,lg.useShortcut)("core/editor/toggle-list-view",b=>{h()||(b.preventDefault(),c(!0))}),(0,lg.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 Zwe=a(K(),1),a3=a(be(),1);var IE=a(K(),1),i3=a(be(),1),Vwe=a(ae(),1),s3=a(G(),1),Wd=a(j(),1),jwe=a(Vt(),1),zwe=a(U(),1),fy=a(E(),1);function Hwe({clientId:e,onClose:t}){let[r,o]=(0,zwe.useState)(!1),{getBlocks:n}=(0,IE.useSelect)(i3.store),{replaceBlocks:i}=(0,IE.useDispatch)(i3.store),{canRemove:s,templatePartTitle:l}=(0,IE.useSelect)(d=>{let{canRemoveBlock:f,getBlock:m}=d(i3.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,jwe.decodeEntities)(S.title.rendered):null}},[e]);if(!s)return null;let c=l?(0,Wd.sprintf)((0,Wd.__)("Detach %s?"),l):(0,Wd.__)("Detach template part?"),u=l?(0,Wd.sprintf)((0,Wd.__)("The blocks will be separated from the original template part and will be fully editable. Future changes to the %s template part will not apply here."),l):(0,Wd.__)("The blocks will be separated from the original template part and will be fully editable. Future changes to the template part will not apply here.");return(0,fy.jsxs)(fy.Fragment,{children:[(0,fy.jsx)(s3.MenuItem,{onClick:()=>o(!0),children:(0,Wd.__)("Detach")}),(0,fy.jsx)(s3.__experimentalConfirmDialog,{isOpen:r,onConfirm:()=>{i(e,n(e)),t()},onCancel:()=>o(!1),confirmButtonText:(0,Wd.__)("Detach"),size:"medium",title:c,__experimentalHideHeader:!1,children:u})]})}var OE=a(K(),1),OG=a(be(),1),Uwe=a(G(),1),Wwe=a(Pt(),1),NG=a(j(),1),Gwe=a(U(),1),Ywe=a(It(),1);var qwe=a(ae(),1);var py=a(E(),1);function Kwe({clientIds:e,blocks:t}){let[r,o]=(0,Gwe.useState)(!1),{replaceBlocks:n}=(0,OE.useDispatch)(OG.store),{createSuccessNotice:i}=(0,OE.useDispatch)(Ywe.store),{isBlockBasedTheme:s,canCreate:l}=(0,OE.useSelect)(u=>({isBlockBasedTheme:u(qwe.store).getCurrentTheme()?.is_block_theme,canCreate:u(OG.store).canInsertBlockType("core/template-part")}),[]);if(!s||!l)return null;let c=async u=>{n(e,(0,Wwe.createBlock)("core/template-part",{slug:u.slug,theme:u.theme})),i((0,NG.__)("Template part created."),{type:"snackbar"})};return(0,py.jsxs)(py.Fragment,{children:[(0,py.jsx)(Uwe.MenuItem,{icon:M1,onClick:()=>{o(!0)},"aria-expanded":r,"aria-haspopup":"dialog",children:(0,NG.__)("Create template part")}),r&&(0,py.jsx)(Cw,{closeModal:()=>{o(!1)},blocks:t,onCreate:c})]})}var NE=a(E(),1);function Xwe(){return(0,NE.jsx)(a3.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>(0,NE.jsx)(Ttt,{clientIds:e,onClose:t})})}function Ttt({clientIds:e,onClose:t}){let{blocks:r}=(0,Zwe.useSelect)(o=>{let{getBlocksByClientId:n}=o(a3.store);return{blocks:n(e)}},[e]);return r.length===1&&r[0]?.name==="core/template-part"?(0,NE.jsx)(Hwe,{clientId:e[0],onClose:t}):(0,NE.jsx)(Kwe,{clientIds:e,blocks:r})}var Jwe=a(be(),1),$we=a(K(),1),e_e=a(U(),1);var Qwe=a(U(),1),l3=a(K(),1);function Ett({postType:e}){let{registerPostTypeSchema:t}=Y((0,l3.useDispatch)(N));(0,Qwe.useEffect)(()=>{t(e)},[t,e]);let{fields:r}=(0,l3.useSelect)(o=>{let{getEntityFields:n}=Y(o(N));return{fields:n("postType",e)}},[e]);return r}var nS=Ett;var MG=a(E(),1),{MediaEditorModal:Ptt,store:ktt}=Y(S_);function Rtt(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 Att({name:e,ratio:t}={}){let r=Rtt(t);return!e||!Number.isFinite(r)||r<=0?null:{label:e,value:r}}function t_e(){return(0,$we.useSelect)(t=>t(ktt).isOpen(),[])?(0,MG.jsx)(Itt,{}):null}function Itt(){let e=nS({postType:"attachment"}),[t,r,o]=(0,Jwe.useSettings)("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),n=(0,e_e.useMemo)(()=>{if(!(Array.isArray(t)||Array.isArray(r)||typeof o=="boolean"))return;let l=[...o&&Array.isArray(t)?t:[],...Array.isArray(r)?r:[]].map(Att).filter(Boolean);if(l.length||o===!1)return l},[t,r,o]);return(0,MG.jsx)(Ptt,{fields:e,aspectRatioPresets:n})}var Yo=a(E(),1),{ExperimentalBlockEditorProvider:Ott}=Y(iS.privateApis),{PatternsMenuItems:Ntt}=Y(o_e.privateApis),ME=()=>{},Mtt=["wp_block","wp_navigation","wp_template_part"];function Ftt(e,t,r){let o=$0e(),n=r==="template-locked"?"template":"post",[i,s,l]=(0,Ip.useEntityBlockEditor)("postType",e.type,{id:e.id}),[c,u,d]=(0,Ip.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),f=(0,ml.useMemo)(()=>{if(e.type==="wp_navigation")return[(0,n_e.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,ME,ME]:!!t&&r==="template-locked"||e.type==="wp_navigation"?[m,ME,ME]:[m,n==="post"?s:u,n==="post"?l:d]}var DG=Kse(({post:e,settings:t,recovery:r,initialEdits:o,children:n,BlockEditorProviderComponent:i=Ott,__unstableTemplate:s})=>{let l=!!s,{editorSettings:c,selection:u,isReady:d,mode:f,defaultMode:m,postTypeEntities:h,isInRevisionsMode:g,currentRevisionId:v}=(0,ug.useSelect)(W=>{let{getEditorSettings:q,getRenderingMode:Z,__unstableIsEditorReady:Q,getDefaultRenderingMode:ue,isRevisionsMode:te,getCurrentRevisionId:de}=Y(W(N)),{getEntitiesConfig:pe,getEntityRecordEdits:$}=W(Ip.store),ee=Z(),fe=ue(e.type),ve=fe==="template-locked"?l:fe!==void 0,we=fe!==void 0,oe=$("postType",e.type,e.id);return{editorSettings:q(),isReady:Q(),mode:we?ee:void 0,defaultMode:ve?fe:void 0,selection:oe?.selection,postTypeEntities:e.type==="wp_template"?pe("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(!Mtt.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=k0e(c,S,w,f),[C,I,k]=Ftt(e,s,f),{updatePostLock:R,setupEditor:A,updateEditorSettings:P,setCurrentTemplateId:T,setEditedPost:M,setRenderingMode:B,setCurrentRevisionId:F}=Y((0,ug.useDispatch)(N)),{editEntityRecord:V}=(0,ug.useDispatch)(Ip.store),z=(0,ug.useRegistry)(),D=(0,ml.useCallback)(W=>{V("postType",e.type,e.id,{selection:W},{undoIgnore:!0})},[V,e.type,e.id]),{createWarningNotice:O,removeNotice:L}=(0,ug.useDispatch)(r_e.store);return(0,ml.useLayoutEffect)(()=>{if(!r&&(R(t.postLock),z.select(N).__unstableIsEditorReady()||A(e,o,t.template),t.autosave)){let W=Number((0,i_e.getQueryArg)(t.autosave.editLink,"revision"));O((0,FG.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,FG.__)("View the autosave"),...W?{onClick:()=>{let{disableVisualRevisions:q}=z.select(N).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&&L("template-activate-notice"),()=>M(null,null)),[e.type,e.id,M,L]),(0,ml.useLayoutEffect)(()=>{P(t)},[t,P]),(0,ml.useEffect)(()=>{T(s?.id)},[s?.id,T]),(0,ml.useEffect)(()=>{m&&B(m)},[m,B]),D0e(e.type,f),dwe(),hwe(),bwe(),!d||!f?null:(0,Yo.jsx)(Ip.EntityProvider,{kind:"root",type:"site",children:(0,Yo.jsx)(Ip.EntityProvider,{kind:"postType",type:e.type,id:e.id,revisionId:v??void 0,children:(0,Yo.jsx)(iS.BlockContextProvider,{value:y,children:(0,Yo.jsxs)(i,{value:C,onChange:k,onInput:I,selection:g?void 0:u,onChangeSelection:g?ME:D,settings:x,useSubRegistry:!1,children:[n,!t.isPreviewMode&&(0,Yo.jsxs)(Yo.Fragment,{children:[(0,Yo.jsx)(Ntt,{}),(0,Yo.jsx)(Xwe,{}),f==="template-locked"&&(0,Yo.jsx)(I0e,{}),S==="wp_navigation"&&(0,Yo.jsx)(N0e,{}),(0,Yo.jsx)(oS,{}),(0,Yo.jsx)(Fwe,{}),(0,Yo.jsx)(xwe,{}),(0,Yo.jsx)(Twe,{}),(0,Yo.jsx)(Lwe,{}),(0,Yo.jsx)(nwe,{}),(0,Yo.jsx)(lwe,{}),(0,Yo.jsx)(t_e,{})]})]})})})})});function LG(e){return(0,Yo.jsx)(DG,{...e,BlockEditorProviderComponent:iS.BlockEditorProvider,children:e.children})}var s_e=LG;var dg=a(E(),1);function Dtt({template:e,post:t}){let[r="white"]=ng("color.background"),[o]=(0,FE.useEntityBlockEditor)("postType",t.type,{id:t.id}),[n]=(0,FE.useEntityBlockEditor)("postType",e?.type,{id:e?.id}),i=e&&n?n:o,s=!i?.length;return(0,dg.jsxs)("div",{className:"editor-fields-content-preview",style:{backgroundColor:r},children:[s&&(0,dg.jsx)("span",{className:"editor-fields-content-preview__empty",children:(0,a_e.__)("Empty content")}),!s&&(0,dg.jsx)(BG.BlockPreview.Async,{children:(0,dg.jsx)(BG.BlockPreview,{blocks:i})})]})}function c_e({item:e}){let{settings:t,template:r}=(0,l_e.useSelect)(o=>{let{canUser:n,getPostType:i,getTemplateId:s,getEntityRecord:l}=Y(o(FE.store)),c=n("read",{kind:"postType",name:"wp_template"}),u=o(N).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,dg.jsx)(LG,{post:e,settings:t,__unstableTemplate:r,children:(0,dg.jsx)(Dtt,{template:r,post:e})})}var Ltt={type:"media",id:"content-preview",label:(0,u_e.__)("Content preview"),render:c_e,enableSorting:!1},d_e=Ltt;function Btt(e){let t=e?.editor;return Array.isArray(t)?!!t[0]?.notes:!1}function Vtt(e,t,r){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:r}}function jtt(e,t,r){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:r}}function ztt(e,t,r){return{type:"REGISTER_ENTITY_FIELD",kind:e,name:t,config:r}}function Htt(e,t,r){return{type:"UNREGISTER_ENTITY_FIELD",kind:e,name:t,fieldId:r}}function Utt(e,t){return{type:"SET_IS_READY",kind:e,name:t}}var Wtt=[wH,bH,xH,EH,CH,TH,vH,I2,pH,yH,SH],Gtt=e=>async({registry:t})=>{if(Y(t.select(N)).isEntityReady("postType",e))return;Y(t.dispatch(N)).setIsReady("postType",e);let o=await t.resolveSelect(c3.store).getPostType(e),n=await t.resolveSelect(c3.store).canUser("create",{kind:"postType",name:e}),i=await t.resolveSelect(c3.store).getCurrentTheme(),{disablePostFormats:s}=t.select(N).getEditorSettings(),l=!["wp_block","wp_template_part"].includes(o.slug)&&n&&qz;o.slug==="wp_template"&&!window?.__experimentalTemplateActivate&&(l=void 0);let c=[o.viewable?Hz:void 0,o.supports?.revisions?rH:void 0,l,o.slug==="wp_template_part"&&n&&i?.is_block_theme?fH:void 0,n&&o.slug==="wp_block"?Qz:void 0,o.supports?.title?Zz:void 0,o.supports?.["page-attributes"]?Wz:void 0,o.slug==="wp_block"?tH:void 0,iH,Xz,uH,aH,nH].filter(Boolean),u;if(e===El)u=Wtt;else{let d=o.slug,f=cm.includes(d),m=d==="wp_block";if(u=[o.supports?.thumbnail&&i?.theme_supports?.["post-thumbnails"]&&oz,!f&&o.supports?.author&&GC,d==="wp_template"&&Cz,d==="wp_template_part"&&Tz,!f&&mz,!f&&yz,!f&&wz,_z,!f&&O8,!f&&o.supports?.excerpt&&Rz,m&&o.supports?.excerpt&&mj,o.supports?.["page-attributes"]&&fz,o.supports?.comments&&hz,o.supports?.trackbacks&&vz,(o.supports?.comments||o.supports?.trackbacks)&&bz,!f&&lz,o.supports?.["post-formats"]&&!s&&Nz,(!f||m)&&o.supports?.editor&&Mz,!f&&pz,d==="post"&&Dz,d==="wp_template"&&Oz,d==="wp_template"&&Iz,d==="wp_template"&&zz,d==="wp_template"&&Bz,d==="wp_template"&&Vz,o.supports?.editor&&o.viewable&&d_e,Btt(o.supports)&&Ez,m&&hj].filter(Boolean),o.supports?.title){let h;e==="page"?h=L8:e==="wp_template"?h=B1:["wp_block","wp_template_part"].includes(e)?h=wC:h=I2,u.push(h)}}t.batch(()=>{c.forEach(d=>{Y(t.dispatch(N)).registerEntityAction("postType",e,d)}),u.forEach(d=>{Y(t.dispatch(N)).registerEntityField("postType",e,d)})}),(0,f_e.doAction)("core.registerPostTypeSchema",e)};function Ytt(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}var qtt=e=>async({select:t,dispatch:r,registry:o})=>{let n=await o.dispatch(Ia.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(Ia.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(ic.store).createSuccessNotice((0,cr.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,cr.__)("Go back"),onClick:()=>r.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},Ktt=e=>({registry:t})=>{let o=(t.select(my.store).get("core","hiddenBlockTypes")??[]).filter(n=>!(Array.isArray(e)?e:[e]).includes(n));t.dispatch(my.store).set("core","hiddenBlockTypes",o)},Ztt=e=>({registry:t})=>{let r=t.select(my.store).get("core","hiddenBlockTypes")??[],o=new Set([...r,...Array.isArray(e)?e:[e]]);t.dispatch(my.store).set("core","hiddenBlockTypes",[...o])},Xtt=(e,{allowUndo:t=!0}={})=>async({registry:r})=>{let o="edit-site-template-reverted";if(r.dispatch(ic.store).removeNotice(o),!Lk(e)){r.dispatch(ic.store).createErrorNotice((0,cr.__)("This template is not revertable."),{type:"snackbar"});return}try{let n=r.select(Ia.store).getEntityConfig("postType",e.type);if(!n){r.dispatch(ic.store).createErrorNotice((0,cr.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let i=(0,p_e.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),s=await(0,m_e.default)({path:i});if(!s){r.dispatch(ic.store).createErrorNotice((0,cr.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let l=({blocks:d=[]})=>(0,u3.__unstableSerializeAndClean)(d),c=r.select(Ia.store).getEditedEntityRecord("postType",e.type,e.id);r.dispatch(Ia.store).editEntityRecord("postType",e.type,e.id,{content:l,blocks:c.blocks,source:"custom"},{undoIgnore:!0});let u=(0,u3.parse)(s?.content?.raw);if(r.dispatch(Ia.store).editEntityRecord("postType",e.type,s.id,{content:l,blocks:u,source:"theme"}),t){let d=()=>{r.dispatch(Ia.store).editEntityRecord("postType",e.type,c.id,{content:l,blocks:c.blocks,source:"custom"})};r.dispatch(ic.store).createSuccessNotice((0,cr.__)("Template reset."),{type:"snackbar",id:o,actions:[{label:(0,cr.__)("Undo"),onClick:d}]})}}catch(n){let i=n.message&&n.code!=="unknown_error"?n.message:(0,cr.__)("Template revert failed. Please reload.");r.dispatch(ic.store).createErrorNotice(i,{type:"snackbar"})}},Qtt=e=>async({registry:t})=>{let r=e.every(n=>n?.has_theme_file),o=await Promise.allSettled(e.map(n=>t.dispatch(Ia.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,cr.sprintf)((0,cr.__)('"%s" reset.'),(0,jG.decodeEntities)(i)):(0,cr.sprintf)((0,cr._x)('"%s" deleted.',"template part"),(0,jG.decodeEntities)(i))}else n=r?(0,cr.__)("Items reset."):(0,cr.__)("Items deleted.");t.dispatch(ic.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,cr.__)("An error occurred while reverting the item."):(0,cr.__)("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,cr.__)("An error occurred while deleting the items."):i.size===1?n=r?(0,cr.sprintf)((0,cr.__)("An error occurred while reverting the items: %s"),[...i][0]):(0,cr.sprintf)((0,cr.__)("An error occurred while deleting the items: %s"),[...i][0]):n=r?(0,cr.sprintf)((0,cr.__)("Some errors occurred while reverting the items: %s"),[...i].join(",")):(0,cr.sprintf)((0,cr.__)("Some errors occurred while deleting the items: %s"),[...i].join(","))}t.dispatch(ic.store).createErrorNotice(n,{type:"snackbar"})}},Jtt=e=>({select:t,registry:r})=>{let o=t.getCurrentPostType(),n=r.select(Ia.store).getCurrentTheme()?.stylesheet,i=r.select(my.store).get("core","renderingModes")?.[n]??{};if(i[o]===e)return;let s={[n]:{...i,[o]:e}};r.dispatch(my.store).set("core","renderingModes",s)};function $tt(e){return{type:"SET_STYLES_PATH",path:e}}function ert(e){return{type:"SET_SHOW_STYLEBOOK",show:e}}function trt(){return{type:"RESET_STYLES_NAVIGATION"}}function zG(e){return({dispatch:t,registry:r})=>{t({type:"SET_CANVAS_WIDTH",width:e});let o=Y(r.select(VG.store));if(o.isResponsiveEditing()){let n=o.getSettings().__experimentalFeatures?.viewport,i=h0(e,n);Y(r.dispatch(VG.store)).setStyleStateViewport(Ok[i]??"default")}}}function rrt(e){return{type:"SET_CURRENT_REVISION_ID",revisionId:e}}var ort=e=>async({dispatch:t,select:r,registry:o})=>{let n=r.getCurrentPostType(),i=r.getCurrentPostId(),l=o.select(Ia.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Ia.store).getRevisions("postType",n,i,vv(l,e));o.batch(()=>{t({type:"SET_REVISION_PAGE",page:e}),c?.length&&t.setCurrentRevisionId(c[0][l])})};function nrt(e){return{type:"SET_SHOW_REVISION_DIFF",showDiff:e}}var irt=e=>async({select:t,dispatch:r,registry:o})=>{let n=t.getCurrentPostType(),i=t.getCurrentPostId(),l=o.select(Ia.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Ia.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(ic.store).removeNotice("autosave-exists"),o.dispatch(ic.store).createSuccessNotice((0,cr.sprintf)((0,cr.__)("Restored to revision from %s."),(0,d3.dateI18n)((0,d3.getSettings)().formats.datetime,c.date)),{type:"snackbar",id:"editor-revision-restored"}))};function srt(e,t={focus:!1}){return{type:"SELECT_NOTE",noteId:e,options:t}}var art=(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,sS.parse)(i);s=(0,sS.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 lrt(){return(0,fg.default)("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function crt(){return(0,fg.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 urt(){return(0,fg.default)("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function drt(e){return(0,fg.default)("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),g_e(e.type,e.id)}function g_e(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}var frt=(e,t)=>({select:r,registry:o})=>{let{id:n,type:i}=r.getCurrentPost();o.dispatch(Ys.store).editEntityRecord("postType",i,n,e,t)},prt=(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(Ys.store).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:n};r({type:"REQUEST_POST_UPDATE_START",options:e});let l=!1;try{s=await(0,aS.applyFiltersAsync)("editor.preSavePost",s,e)}catch(c){l=c}if(!l)try{await o.dispatch(Ys.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(Ys.store).getLastEntitySaveError("postType",i.type,i.id)),!l)try{await(0,aS.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(c){l=c}if(!l)try{await(0,aS.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))&&mrt({select:t,dispatch:r,registry:o}),l){let c=kX({post:i,edits:s,error:l});c.length&&o.dispatch(nu.store).createErrorNotice(...c)}else{let c=t.getCurrentPost(),u=PX({previousPost:i,post:c,postType:await o.resolveSelect(Ys.store).getPostType(c.type),options:e});u.length&&o.dispatch(nu.store).createSuccessNotice(...u),e.isAutosave||o.dispatch(Op.store).__unstableMarkLastChangeAsPersistent()}};async function mrt({select:e,registry:t}){if(e.getEditorSettings().onNavigateToPreviousEntityRecord)return;let{id:o,slug:n}=e.getCurrentPost();if((await t.select(Ys.store).getEntityRecord("root","site")).active_templates[n]===o)return;let l=(await t.resolveSelect(Ys.store).getCurrentTheme())?.default_template_types.find(c=>c.slug===n);await t.dispatch(nu.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(nu.store).createNotice("info",(0,yn.__)("Activating template\u2026"),{id:"template-activate-notice"});try{let c=await t.select(Ys.store).getEntityRecord("root","site");await t.dispatch(Ys.store).saveEntityRecord("root","site",{active_templates:{...c.active_templates,[n]:o}},{throwOnError:!0}),await t.dispatch(nu.store).createSuccessNotice((0,yn.__)("Template activated."),{id:"template-activate-notice"})}catch(c){throw await t.dispatch(nu.store).createErrorNotice((0,yn.__)("Template activation failed."),{id:"template-activate-notice"}),c}}}]})}function hrt(){return(0,fg.default)("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}var grt=()=>async({select:e,dispatch:t,registry:r})=>{let o=e.getCurrentPostType(),n=await r.resolveSelect(Ys.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,h_e.default)({path:`/${s}/${i}/${l.id}`,method:"DELETE"}),await t.savePost()}catch(l){r.dispatch(nu.store).createErrorNotice(...RX({error:l}))}t({type:"REQUEST_POST_DELETE_FINISH"})},vrt=({local:e=!1,...t}={})=>async({select:r,dispatch:o})=>{let n=r.getCurrentPost();if(e){let i=r.isEditedPostNew(),s=r.getEditedPostAttribute("title"),l=r.getEditedPostAttribute("content"),c=r.getEditedPostAttribute("excerpt");EX(n.id,i,s,l,c)}else await o.savePost({isAutosave:!0,...t})},brt=({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()),yrt=()=>({registry:e})=>{e.dispatch(Ys.store).redo()},wrt=()=>({registry:e})=>{e.dispatch(Ys.store).undo()};function _rt(){return(0,fg.default)("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Srt(e){return{type:"UPDATE_POST_LOCK",lock:e}}var xrt=()=>({registry:e})=>{e.dispatch(nn.store).set("core","isPublishSidebarEnabled",!0)},Crt=()=>({registry:e})=>{e.dispatch(nn.store).set("core","isPublishSidebarEnabled",!1)};function Trt(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Ert(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Prt(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function krt(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}var Rrt=(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(Ys.store).getEditedEntityRecord("postType",u,c).blocks===l.blocks){n.dispatch(Ys.store).__unstableCreateUndoLevel("postType",u,c);return}l.content=({blocks:f=[]})=>(0,sS.__unstableSerializeAndClean)(f)}o.editPost(l)};function Art(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var Irt=e=>({dispatch:t,registry:r,select:o})=>{o.__unstableIsEditorReady()&&!o.getEditorSettings().isPreviewMode&&r.dispatch(Op.store).clearSelectedBlock(),t({type:"SET_RENDERING_MODE",mode:e})};function Ort(e){return({dispatch:t,registry:r})=>{let o=Y(r.select(Op.store)).getSettings().__experimentalFeatures?.viewport,n=m0(e,o);t(zG(n))}}var Nrt=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)},Mrt=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 Frt(e){return{type:"REMOVE_PANEL",panelName:e}}var Drt=e=>({dispatch:t,registry:r})=>{typeof e=="object"&&e.hasOwnProperty("rootClientId")&&e.hasOwnProperty("insertionIndex")&&Y(r.dispatch(Op.store)).setInsertionPoint({rootClientId:e.rootClientId,index:e.insertionIndex}),t({type:"SET_IS_INSERTER_OPENED",value:e})};function Lrt(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}var Brt=({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),Y(r.dispatch(Op.store)).resetZoomLevel()}),r.batch(()=>{r.dispatch(nn.store).set("core","distractionFree",!o),e&&r.dispatch(nu.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")})}}]})})},Vrt=()=>({registry:e})=>{e.dispatch(nn.store).toggle("core","focusMode");let t=e.select(nn.store).get("core","focusMode");e.dispatch(nu.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")}}]})},jrt=()=>({registry:e})=>{e.dispatch(nn.store).toggle("core","fixedToolbar");let t=e.select(nn.store).get("core","fixedToolbar");e.dispatch(nu.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")}}]})},zrt=e=>({dispatch:t,registry:r})=>{r.dispatch(nn.store).set("core","editorMode",e),e!=="visual"&&(r.dispatch(Op.store).clearSelectedBlock(),Y(r.dispatch(Op.store)).resetZoomLevel()),e==="visual"?(0,UG.speak)((0,yn.__)("Visual editor selected"),"assertive"):e==="text"&&(r.select(nn.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,UG.speak)((0,yn.__)("Code editor selected"),"assertive"))};function Hrt(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function Urt(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function Wrt(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}var sr=e=>(...t)=>({registry:r})=>{(0,fg.default)("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),r.dispatch(Op.store)[e](...t)},Grt=sr("resetBlocks"),Yrt=sr("receiveBlocks"),qrt=sr("updateBlock"),Krt=sr("updateBlockAttributes"),Zrt=sr("selectBlock"),Xrt=sr("startMultiSelect"),Qrt=sr("stopMultiSelect"),Jrt=sr("multiSelect"),$rt=sr("clearSelectedBlock"),eot=sr("toggleSelection"),tot=sr("replaceBlocks"),rot=sr("replaceBlock"),oot=sr("moveBlocksDown"),not=sr("moveBlocksUp"),iot=sr("moveBlockToPosition"),sot=sr("insertBlock"),aot=sr("insertBlocks"),lot=sr("showInsertionPoint"),cot=sr("hideInsertionPoint"),uot=sr("setTemplateValidity"),dot=sr("synchronizeTemplate"),fot=sr("mergeBlocks"),pot=sr("removeBlocks"),mot=sr("removeBlock"),hot=sr("toggleBlockMode"),got=sr("startTyping"),vot=sr("stopTyping"),bot=sr("enterFormattedText"),yot=sr("exitFormattedText"),wot=sr("insertDefaultBlock"),_ot=sr("updateBlockListSettings");var ZC={reducer:tZ,selectors:Z4,actions:WG},N=(0,f3.createReduxStore)(lZ,{...ZC});(0,f3.register)(N);Y(N).registerPrivateActions(HG);Y(N).registerPrivateSelectors(I8);var S_e=a(E(),1),Sot=e=>(0,w_e.createHigherOrderComponent)(t=>({attributes:r,setAttributes:o,...n})=>{let i=(0,v_e.useSelect)(u=>u(N).getCurrentPostType(),[]),[s,l]=(0,b_e.useEntityProp)("postType",i,"meta"),c=(0,y_e.useMemo)(()=>({...r,...Object.fromEntries(Object.entries(e).map(([u,d])=>[u,s[d]]))}),[r,s]);return(0,S_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 xot(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=Sot(t)(e.edit)),e}(0,__e.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",xot);var kPe=a(Vn(),1);var PPe=a(ae(),1);var x_e=a(Bu(),1),C_e=a(bo(),1);var T_e=a(Vt(),1),hy=a(E(),1),Cot=10,p3={name:"links",className:"editor-autocompleters__link",triggerPrefix:"[[",isDebounced:!0,async options(e){return(await(0,x_e.default)({path:(0,C_e.addQueryArgs)("/wp/v2/search",{per_page:Cot,search:e,type:"post"})})).filter(r=>r.title!=="")},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,hy.jsxs)(hy.Fragment,{children:[(0,hy.jsx)(xn,{icon:e.subtype==="page"?vm:HV}),(0,T_e.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,hy.jsx)("a",{href:e.url,children:e.title})}};var E_e=a(U(),1),P_e=a(K(),1),k_e=a(ae(),1),Np=a(E(),1);function GG(e){let t=e.avatar_urls&&e.avatar_urls[24]?(0,Np.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,Np.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,Np.jsxs)(Np.Fragment,{children:[t,(0,Np.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,Np.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}var m3={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){let t=(0,P_e.useSelect)(o=>{let{getUsers:n}=o(k_e.store);return n({context:"view",search:e})},[e]);return[(0,E_e.useMemo)(()=>t?t.map(o=>({key:`user-${o.slug}`,value:o,label:GG(o)})):[],[t])]},getOptionCompletion(e){return`@${e.slug}`}};var cS=a(U(),1),lS=a(K(),1),R_e=a(ae(),1);function Tot(e,t){let r=(0,cS.useRef)(e);(0,cS.useEffect)(()=>{r.current=e},[e]),(0,cS.useEffect)(()=>{if(!t)return;let o=setInterval(()=>r.current(),t*1e3);return()=>clearInterval(o)},[t])}function h3({interval:e,autosave:t}){let{autosave:r}=(0,lS.useDispatch)(N),o=t??r,{getReferenceByDistinctEdits:n}=(0,lS.useSelect)(R_e.store),{isEditedPostDirty:i,isEditedPostAutosaveable:s,isAutosavingPost:l}=(0,lS.useSelect)(N),c=(0,lS.useSelect)(d=>e!==void 0?e:d(N).getEditorSettings().autosaveInterval,[e]),u=(0,cS.useRef)();return Tot(()=>{if(!s())return;let d=n();d!==u.current&&i()&&!l()&&(u.current=d,o())},c),null}var vg=a(j(),1),jE=a(K(),1),au=a(G(),1),zE=a(be(),1);var R3=a(ae(),1),pSe=a(SG(),1),A3=a(U(),1),mSe=a(Te(),1),hSe=a(Vt(),1),gSe=a(Mp(),1);var YG=a(j(),1),I_e=a(K(),1),O_e=a(ae(),1);function g3(e){let{isFrontPage:t,isPostsPage:r}=(0,I_e.useSelect)(o=>{let{canUser:n,getEditedEntityRecord:i}=o(O_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,YG.__)("Homepage"):r?(0,YG.__)("Posts Page"):!1}var sSe=a(G(),1),aSe=a(Mo(),1),P3=a(j(),1),VE=a(K(),1);var k3=a(Te(),1),lSe=a(Dt(),1);var LE=a(U(),1);var vy=a(G(),1),iu=a(j(),1),Fn=a(be(),1),by=a(K(),1);var Wr=a(U(),1),x3=a(Mo(),1),H_e=a(Mf(),1),U_e=a(ae(),1);var Ur=a(j(),1),uS=[{slug:"theme-colors",title:(0,Ur.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,Ur.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,Ur.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,Ur.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,Ur.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,Ur.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,Ur.__)("Default Gradients"),origin:"default",type:"gradients"}],v3=[{slug:"site-identity",title:(0,Ur.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,Ur.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,Ur.__)("Posts"),blocks:["core/post-title","core/post-excerpt","core/post-author","core/post-author-name","core/post-author-biography","core/post-date","core/post-terms","core/term-description","core/query-title","core/query-no-results","core/query-pagination","core/query-numbers"]},{slug:"comments",title:(0,Ur.__)("Comments"),blocks:["core/comments-title","core/comments-pagination","core/comments-pagination-numbers","core/comments","core/comments-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link","core/comment-template","core/post-comments-count","core/post-comments-link"]}],qG=[{slug:"overview",title:(0,Ur.__)("Overview"),blocks:[]},{slug:"text",title:(0,Ur.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Ur.__)("Colors"),blocks:[]},{slug:"theme",title:(0,Ur.__)("Theme"),subcategories:v3},{slug:"media",title:(0,Ur.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Ur.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Ur.__)("Embeds"),include:[]}],Eot=[...v3,{slug:"media",title:(0,Ur.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Ur.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Ur.__)("Embeds"),include:[]}],N_e=[{slug:"overview",title:(0,Ur.__)("Overview"),blocks:[]},{slug:"text",title:(0,Ur.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Ur.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,Ur.__)("All Blocks"),blocks:[],subcategories:Eot}],Pot=` |
| 69 |
.is-root-container { |
| 70 |
display: flow-root; |
| 71 |
} |
| 72 |
`,M_e=` |
| 73 |
body { |
| 74 |
position: relative; |
| 75 |
padding: 32px !important; |
| 76 |
} |
| 77 |
|
| 78 |
${Pot} |
| 79 |
|
| 80 |
.editor-style-book__examples { |
| 81 |
max-width: 1200px; |
| 82 |
margin: 0 auto; |
| 83 |
} |
| 84 |
|
| 85 |
.editor-style-book__example { |
| 86 |
max-width: 900px; |
| 87 |
border-radius: 2px; |
| 88 |
cursor: var(--wpds-cursor-control, pointer); |
| 89 |
display: flex; |
| 90 |
flex-direction: column; |
| 91 |
gap: 40px; |
| 92 |
padding: 16px; |
| 93 |
width: 100%; |
| 94 |
box-sizing: border-box; |
| 95 |
scroll-margin-top: 32px; |
| 96 |
scroll-margin-bottom: 32px; |
| 97 |
margin: 0 auto 40px auto; |
| 98 |
} |
| 99 |
|
| 100 |
.editor-style-book__example.is-selected { |
| 101 |
box-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba)); |
| 102 |
} |
| 103 |
|
| 104 |
.editor-style-book__example.is-disabled-example { |
| 105 |
pointer-events: none; |
| 106 |
} |
| 107 |
|
| 108 |
.editor-style-book__example:focus:not(:disabled) { |
| 109 |
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba)); |
| 110 |
outline: 3px solid transparent; |
| 111 |
} |
| 112 |
|
| 113 |
.editor-style-book__duotone-example > div:first-child { |
| 114 |
display: flex; |
| 115 |
aspect-ratio: 16 / 9; |
| 116 |
grid-row: span 1; |
| 117 |
grid-column: span 2; |
| 118 |
} |
| 119 |
.editor-style-book__duotone-example img { |
| 120 |
width: 100%; |
| 121 |
height: 100%; |
| 122 |
object-fit: cover; |
| 123 |
} |
| 124 |
.editor-style-book__duotone-example > div:not(:first-child) { |
| 125 |
height: 20px; |
| 126 |
border: 1px solid color-mix( in srgb, currentColor 10%, transparent ); |
| 127 |
} |
| 128 |
|
| 129 |
.editor-style-book__color-example { |
| 130 |
border: 1px solid color-mix( in srgb, currentColor 10%, transparent ); |
| 131 |
} |
| 132 |
|
| 133 |
.editor-style-book__subcategory-title, |
| 134 |
.editor-style-book__example-title { |
| 135 |
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; |
| 136 |
font-size: 13px; |
| 137 |
font-weight: normal; |
| 138 |
line-height: normal; |
| 139 |
margin: 0; |
| 140 |
text-align: left; |
| 141 |
padding-top: 8px; |
| 142 |
border-top: 1px solid color-mix( in srgb, currentColor 10%, transparent ); |
| 143 |
color: color-mix( in srgb, currentColor 60%, transparent ); |
| 144 |
} |
| 145 |
|
| 146 |
.editor-style-book__subcategory-title { |
| 147 |
font-size: 16px; |
| 148 |
margin-bottom: 40px; |
| 149 |
padding-bottom: 8px; |
| 150 |
} |
| 151 |
|
| 152 |
.editor-style-book__example-preview { |
| 153 |
width: 100%; |
| 154 |
} |
| 155 |
|
| 156 |
.editor-style-book__example-preview .block-editor-block-list__insertion-point, |
| 157 |
.editor-style-book__example-preview .block-list-appender { |
| 158 |
display: none; |
| 159 |
} |
| 160 |
:where(.is-root-container > .wp-block:first-child) { |
| 161 |
margin-top: 0; |
| 162 |
} |
| 163 |
:where(.is-root-container > .wp-block:last-child) { |
| 164 |
margin-bottom: 0; |
| 165 |
} |
| 166 |
`;var F_e=a(Pt(),1);function DE(e,t){if(!e?.slug||!t?.length)return;let r=e?.subcategories??[];if(r.length)return r.reduce((s,l)=>{let c=DE(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 KG(){let e=[...v3,...qG].map(({slug:o})=>o),r=(0,F_e.getCategories)().filter(({slug:o})=>!e.includes(o));return[...qG,...r]}var Gd=a(j(),1),Si=a(Pt(),1);var D_e=a(G(),1),b3=a(be(),1),ZG=a(E(),1),kot=({colors:e,type:t,templateColumns:r="1fr 1fr",itemHeight:o="52px"})=>e?(0,ZG.jsx)(D_e.__experimentalGrid,{templateColumns:r,rowGap:8,columnGap:16,children:e.map(n=>{let i=t==="gradients"?(0,b3.__experimentalGetGradientClass)(n.slug):(0,b3.getColorClassName)("background-color",n.slug),s=J("editor-style-book__color-example",i);return(0,ZG.jsx)("div",{className:s,style:{height:o}},n.slug)})}):null,XG=kot;var QG=a(G(),1),gy=a(E(),1),Rot=({duotones:e})=>e?(0,gy.jsx)(QG.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map(t=>(0,gy.jsxs)(QG.__experimentalGrid,{className:"editor-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,gy.jsx)("div",{children:(0,gy.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,gy.jsx)("div",{className:"editor-style-book__color-example",style:{backgroundColor:r}},r))]},t.slug))}):null,L_e=Rot;var y3=a(E(),1);function Aot(e){if(!e)return[];let t=[];return uS.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,y3.jsx)(L_e,{duotones:n[r.type]}),t.push(i)):(i.content=(0,y3.jsx)(XG,{colors:n[r.type],type:r.type}),t.push(i))}}),t}function Iot(e){let t=[],r=Array.isArray(e?.colors)?e.colors.find(i=>i.slug==="theme"):void 0;if(r){let i={name:"theme-colors",title:(0,Gd.__)("Colors"),category:"overview",content:(0,y3.jsx)(XG,{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,Gd.__)("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,Gd.__)("A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.")}),s=(0,Si.createBlock)("core/paragraph",{content:(0,Gd.__)("Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.")});if((0,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,Gd.__)("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 JG(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,Gd.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map(s=>(0,Si.createBlock)("core/heading",{content:(0,Gd.sprintf)((0,Gd.__)("Heading %d"),s),level:s}))},n=Aot(e),i=Iot(e);return[o,...n,...t,...i]}var z_e=a(U(),1),_3=a(K(),1);var w3=a(Pt(),1),B_e=a(K(),1),V_e=a(U(),1);function dS(e={},t=!1){let o=aG("spacing.blockGap")!==null,n=!o,{disableLayoutStyles:i,getBlockStyles:s}=(0,B_e.useSelect)(l=>{let{getEditorSettings:c}=l(N),{getBlockStyles:u}=l(w3.store);return{disableLayoutStyles:!!c()?.disableLayoutStyles,getBlockStyles:u}},[]);return(0,V_e.useMemo)(()=>{if(!e?.styles||!e?.settings)return[[],{}];let l=(0,w3.getBlockTypes)();return cv(e,l,{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i,disableRootPadding:t,getBlockStyles:s})},[o,n,e,i,t,s])}function j_e(e=!1){let{merged:t}=Hr();return dS(t,e)}function Oot(e){let[t,r]=j_e(e),{getEditorSettings:o}=(0,_3.useSelect)(N),{updateEditorSettings:n}=(0,_3.useDispatch)(N);(0,z_e.useEffect)(()=>{if(!t||!r)return;let i=o(),s=Object.values(i.styles??[]).filter(l=>!l.isGlobalStyles);n({...i,styles:[...s,...t],__experimentalFeatures:r})},[t,r,n,o])}function S3({disableRootPadding:e}){return Oot(e),null}var Ut=a(E(),1),{ExperimentalBlockEditorProvider:Not}=Y(Fn.privateApis);function pg(e){return!e||Object.keys(e).length===0}var Mot=(e,t)=>{if(!e||!t||!t?.contentDocument)return;let r=e==="top"?t.contentDocument.body:t.contentDocument.getElementById(e);r&&r.scrollIntoView({behavior:"smooth"})},W_e=e=>e&&typeof e=="string"&&(e==="/"||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function G_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,Wr.useMemo)(()=>{let l={colors:e,gradients:t,duotones:[]};return n&&n.length&&l.duotones.push({name:(0,iu._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:n}),r&&i&&i.length&&l.duotones.push({name:(0,iu._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:i}),o&&o.length&&l.duotones.push({name:(0,iu._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:o}),l},[e,t,o,n,i,r])}function Y_e(e){let t=[],r=DE({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 Fot(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 Dot({isSelected:e,onClick:t,onSelect:r,showTabs:o=!0,userConfig:n={},path:i=""},s){let l=ng("color.text"),c=ng("color.background"),u=G_e(),d=(0,Wr.useMemo)(()=>JG(u),[u]),f=(0,Wr.useMemo)(()=>KG().filter(w=>d.some(S=>S.category===w.slug)),[d]),m=Y_e(d),{base:h}=Hr(),g=W_e(i),v=(0,Wr.useMemo)(()=>!pg(n)&&!pg(h)?Oi(h,n):{},[h,n]),b=(0,by.useSelect)(w=>w(Fn.store).getSettings(),[]),[_]=dS(v),y=(0,Wr.useMemo)(()=>({...b,styles:!pg(_)&&!pg(n)?_:b.styles,isPreviewMode:!0}),[_,b,n]);return(0,Ut.jsx)("div",{ref:s,className:J("editor-style-book",{"is-button":!!t}),style:{color:l,background:c},children:o?(0,Ut.jsxs)(Cn.Root,{className:"editor-style-book__tabs",defaultValue:f[0]?.slug,children:[(0,Ut.jsx)("div",{className:"editor-style-book__tablist-container",children:(0,Ut.jsx)(Cn.List,{children:f.map(w=>(0,Ut.jsx)(Cn.Tab,{value:w.slug,children:w.title},w.slug))})}),f.map(w=>{let S=w.slug?KG().find(C=>C.slug===w.slug):null,x=S?DE(S,d):{examples:d};return(0,Ut.jsx)(Cn.Panel,{value:w.slug,tabIndex:-1,className:"editor-style-book__tabpanel",children:(0,Ut.jsx)($G,{category:w.slug,examples:x,isSelected:e,onSelect:r,settings:y,title:w.title,goTo:g})},w.slug)})]}):(0,Ut.jsx)($G,{examples:{examples:m},isSelected:e,onClick:t,onSelect:r,settings:y,goTo:g})})}var q_e=({userConfig:e={},isStatic:t=!1,path:r,onPathChange:o,settings:n})=>{let i=(0,by.useSelect)(A=>n??A(N).getEditorSettings(),[n]),s=(0,by.useSelect)(A=>A(U_e.store).canUser("create",{kind:"postType",name:"attachment"}),[]);(0,Wr.useEffect)(()=>{(0,by.dispatch)(Fn.store).updateSettings({...i,mediaUpload:s?H_e.uploadMedia:void 0})},[i,s]);let[l,c]=(0,Wr.useState)("/"),u=r??l,d=o??c,f=A=>u===`/blocks/${encodeURIComponent(A)}`||u.startsWith(`/blocks/${encodeURIComponent(A)}/`),m=(A,P=!1)=>{if(uS.find(T=>T.slug===A)){d("/colors/palette");return}if(A==="typography"){d("/typography");return}P||d(`/blocks/${encodeURIComponent(A)}`)},h=G_e(),g=JG(h),v=Y_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 A=decodeURIComponent(u).split("/blocks/")[1];A?.includes("/variations")&&([A,_]=A.split("/variations/")),A&&g.find(P=>P.name===A)&&(b=A)}else t||(b="overview");let y=N_e.find(A=>A.slug===b),w=(0,Wr.useMemo)(()=>y?DE(y,g):{examples:[g.find(A=>A.name===b)]},[y,g,b]),S=(0,Wr.useMemo)(()=>b?_&&w?.examples?.length?{examples:Fot(w.examples,_)}:w:{examples:v},[b,v,_,w]),{base:x}=Hr(),C=W_e(u),I=(0,Wr.useMemo)(()=>!pg(e)&&!pg(x)?Oi(x,e):{},[x,e]),[k]=dS(I),R=(0,Wr.useMemo)(()=>({...i,styles:!pg(k)&&!pg(e)?k:i.styles,isPreviewMode:!0}),[k,i,e]);return(0,Ut.jsx)("div",{className:"editor-style-book",children:(0,Ut.jsxs)(Fn.BlockEditorProvider,{settings:R,children:[(0,Ut.jsx)(S3,{disableRootPadding:!0}),(0,Ut.jsx)($G,{examples:S,settings:R,goTo:C,isSelected:t?null:f,onSelect:t?null:m})]})})},$G=({examples:e,isSelected:t,onClick:r,onSelect:o,settings:n,title:i,goTo:s})=>{let[l,c]=(0,Wr.useState)(!1),[u,d]=(0,Wr.useState)(!1),f=(0,Wr.useRef)(null),m={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:g=>{if(g.defaultPrevented)return;let{keyCode:v}=g;r&&(v===x3.ENTER||v===x3.SPACE)&&(g.preventDefault(),r(g))},onClick:g=>{g.defaultPrevented||r&&(g.preventDefault(),r(g))},readonly:!0},h=()=>d(!0);return(0,Wr.useLayoutEffect)(()=>{u&&f.current&&s?.top&&Mot("top",f.current)},[s?.top,u]),(0,Ut.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,Ut.jsx)(Fn.__unstableEditorStyles,{styles:n.styles}),(0,Ut.jsxs)("style",{children:[M_e,!!r&&"body { cursor: var(--wpds-cursor-control, pointer); } body * { pointer-events: none; }"]}),(0,Ut.jsx)(Lot,{className:"editor-style-book__examples",filteredExamples:e,label:i?(0,iu.sprintf)((0,iu.__)("Examples of blocks in the %s category"),i):(0,iu.__)("Examples of blocks"),isSelected:t,onSelect:o},i)]})},Lot=(0,Wr.memo)(({className:e,filteredExamples:t,label:r,isSelected:o,onSelect:n})=>(0,Ut.jsxs)(vy.Composite,{orientation:"vertical",className:e,"aria-label":r,role:"grid",children:[!!t?.examples?.length&&t.examples.map(i=>(0,Ut.jsx)(K_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,Ut.jsxs)(vy.Composite.Group,{className:"editor-style-book__subcategory",children:[(0,Ut.jsx)(vy.Composite.GroupLabel,{children:(0,Ut.jsx)("h2",{className:"editor-style-book__subcategory-title",children:i.title})}),(0,Ut.jsx)(Bot,{examples:i.examples,isSelected:o,onSelect:n})]},`subcategory-${i.slug}`))]})),Bot=({examples:e,isSelected:t,onSelect:r})=>!!e?.length&&e.map(o=>(0,Ut.jsx)(K_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)),Vot=["example-duotones"],K_e=({id:e,title:t,blocks:r,isSelected:o,onClick:n,content:i})=>{let s=(0,by.useSelect)(d=>d(Fn.store).getSettings(),[]),l=(0,Wr.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,Wr.useMemo)(()=>Array.isArray(r)?r:[r],[r]),u=Vot.includes(e)||!n?{disabled:!0,accessibleWhenDisabled:!!n}:{};return(0,Ut.jsx)("div",{role:"row",children:(0,Ut.jsx)("div",{role:"gridcell",children:(0,Ut.jsxs)(vy.Composite.Item,{className:J("editor-style-book__example",{"is-selected":o,"is-disabled-example":!!u?.disabled}),id:e,"aria-label":n?(0,iu.sprintf)((0,iu.__)("Open %s styles in Styles panel"),t):void 0,render:(0,Ut.jsx)("div",{}),role:n?"button":null,onClick:n,...u,children:[(0,Ut.jsx)("span",{className:"editor-style-book__example-title",children:t}),(0,Ut.jsx)("div",{className:"editor-style-book__example-preview","aria-hidden":!0,children:(0,Ut.jsx)(vy.Disabled,{className:"editor-style-book__example-preview__content",children:i||(0,Ut.jsxs)(Not,{value:c,settings:l,children:[(0,Ut.jsx)(Fn.__unstableEditorStyles,{}),(0,Ut.jsx)(Fn.BlockList,{renderAppender:!1})]})})})]})})})},Z_e=(0,Wr.forwardRef)(Dot);var BE=a(E(),1);function X_e({path:e,onPathChange:t,userConfig:r,forwardedRef:o}){return(0,BE.jsx)(Z_e,{ref:o,path:e,userConfig:r,isSelected:n=>e===`/blocks/${encodeURIComponent(n)}`||e?.startsWith(`/blocks/${encodeURIComponent(n)}/`),onSelect:n=>{if(uS.find(i=>i.slug===n)){t?.("/colors/palette");return}if(n==="typography"){t?.("/typography");return}t?.("/blocks/"+encodeURIComponent(n))}})}function jot({path:e,onPathChange:t,forwardedRef:r}){let{user:o}=Hr(),{revisions:n,isLoading:i}=ty(),s=(0,LE.useMemo)(()=>{let c=e?.match(/^\/revisions\/(.+)$/);return c?c[1]:null},[e]),l=(0,LE.useMemo)(()=>!s||!n.length?null:n.find(c=>String(c.id)===String(s)),[s,n]);return i?null:(0,BE.jsx)(X_e,{forwardedRef:r,path:e,onPathChange:t,userConfig:l||o})}function zot({path:e,onPathChange:t},r){return e?.startsWith("/revisions")?(0,BE.jsx)(jot,{forwardedRef:r,path:e,onPathChange:t}):(0,BE.jsx)(X_e,{forwardedRef:r,path:e,onPathChange:t})}var Q_e=(0,LE.forwardRef)(zot);var J_e=a(G(),1),su=a(be(),1),eY=a(K(),1),mg=a(U(),1);var Fp=a(E(),1),{ExperimentalBlockEditorProvider:Hot,BlockStyleVariationOverridesWithConfig:Uot}=Y(su.privateApis);function C3(e){return!e||Object.keys(e).length===0}function Wot({path:e},t){let r=(0,eY.useSelect)(b=>b(su.store).getBlocks(),[]),{user:o,base:n}=Hr(),{revisions:i,isLoading:s}=ty(),l=(0,mg.useMemo)(()=>{let b=e?.match(/^\/revisions\/(.+)$/);return b?b[1]:null},[e]),u=(0,mg.useMemo)(()=>!l||!i.length?null:i.find(b=>String(b.id)===String(l)),[l,i])||o,d=(0,mg.useMemo)(()=>!C3(u)&&!C3(n)?Oi(n,u):{},[n,u]),f=(0,mg.useMemo)(()=>Array.isArray(r)?r:[r],[r]),m=(0,eY.useSelect)(b=>b(su.store).getSettings(),[]),h=(0,mg.useMemo)(()=>({...m,isPreviewMode:!0}),[m]),[g]=dS(d),v=!C3(g)&&!C3(u)?g:h.styles;return s?null:(0,Fp.jsxs)(su.__unstableIframe,{ref:t,className:"editor-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,Fp.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,Fp.jsx)(J_e.Disabled,{className:"editor-revisions__example-preview__content",children:(0,Fp.jsxs)(Hot,{value:f,settings:h,children:[(0,Fp.jsx)(su.BlockList,{renderAppender:!1}),(0,Fp.jsx)(su.__unstableEditorStyles,{styles:v}),(0,Fp.jsx)(Uot,{config:d})]})})]})}var $_e=(0,mg.forwardRef)(Wot);var nSe=a(K(),1),yy=a(U(),1),iSe=a(G(),1);var T3=a(j(),1),hg=a(Mo(),1),tSe=a(G(),1);var Yd=a(E(),1),eSe=20;function tY({direction:e,resizeWidthBy:t}){function r(i){let{keyCode:s}=i;s!==hg.LEFT&&s!==hg.RIGHT||(i.preventDefault(),e==="left"&&s===hg.LEFT||e==="right"&&s===hg.RIGHT?t(eSe):(e==="left"&&s===hg.RIGHT||e==="right"&&s===hg.LEFT)&&t(-eSe))}let o={active:{opacity:1,scaleY:1.3}},n=`resizable-editor__resize-help-${e}`;return(0,Yd.jsxs)(Yd.Fragment,{children:[(0,Yd.jsxs)(Ze.Root,{children:[(0,Yd.jsx)(Ze.Trigger,{render:(0,Yd.jsx)(tSe.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,"aria-label":(0,T3.__)("Drag to resize"),"aria-describedby":n,onKeyDown:r,variants:o,whileFocus:"active",whileHover:"active",whileTap:"active",role:"separator","aria-orientation":"vertical"},"handle")}),(0,Yd.jsx)(Ze.Popup,{children:(0,T3.__)("Drag to resize")})]}),(0,Yd.jsx)(Gt,{id:n,children:(0,T3.__)("Use left and right arrow keys to resize the canvas.")})]})}var E3=a(E(),1),rSe={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 oSe(e,t,r=0){return t>0&&e>=t-r}function Got({className:e,enableResizing:t,width:r="100%",height:o="100%",onResizeStart:n,onResizeStop:i,children:s}){let[l,c]=(0,yy.useState)(!1),{setCanvasWidth:u}=Y((0,nSe.useDispatch)(N)),d=(0,yy.useRef)(),f=(0,yy.useCallback)(h=>{if(d.current){let g=oSe(d.current.offsetWidth+h,d.current.parentElement?.offsetWidth??0,80);u(g?void 0:d.current.offsetWidth+h)}},[u]),m=(0,yy.useCallback)(h=>{let g=h.offsetWidth,v=h.parentElement?.offsetWidth??0;u(oSe(g,v,80)?void 0:g)},[u]);return(0,E3.jsx)(iSe.ResizableBox,{className:J("editor-resizable-editor",e,{"is-resizable":t,"is-resizing":l}),ref:h=>{d.current=h?.resizable},size:{width:r,height:o},onResizeStart:()=>{c(!0),n?.()},onResize:(h,g,v)=>{m(v)},onResizeStop:(h,g,v)=>{m(v),c(!1),i?.()},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,E3.jsx)(tY,{direction:"left",resizeWidthBy:f}),right:(0,E3.jsx)(tY,{direction:"right",resizeWidthBy:f})},handleClasses:void 0,handleStyles:{left:rSe,right:rSe},children:s})}var fS=Got;var gg=a(E(),1);function rY(e,t){return t?(0,P3.__)("Style Book"):e?.startsWith("/revisions")?(0,P3.__)("Style Revisions"):""}function cSe(){let{stylesPath:e,showStylebook:t,showListViewByDefault:r}=(0,VE.useSelect)(m=>{let{getStylesPath:h,getShowStylebook:g}=Y(m(N)),v=m(lSe.store).get("core","showListViewByDefault");return{stylesPath:h(),showStylebook:g(),showListViewByDefault:v}},[]),{resetStylesNavigation:o,setStylesPath:n}=Y((0,VE.useDispatch)(N)),{setIsListViewOpened:i}=(0,VE.useDispatch)(N),s=(0,k3.useFocusOnMount)("firstElement"),l=(0,k3.useFocusReturn)(),c=null;t?c=(0,gg.jsx)(Q_e,{path:e,onPathChange:n,ref:l}):e?.startsWith("/revisions")&&(c=(0,gg.jsx)($_e,{path:e,ref:l}));let u=rY(e,t),d=()=>{i(r),o()};return(0,gg.jsx)("div",{className:"editor-styles-canvas",children:(0,gg.jsx)(fS,{enableResizing:!1,children:(0,gg.jsxs)("section",{className:"editor-styles-canvas__section",ref:s,onKeyDown:m=>{m.keyCode===aSe.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),d())},"aria-label":u,children:[(0,gg.jsx)(sSe.Button,{size:"compact",className:"editor-styles-canvas__close-button",icon:Mi,label:(0,P3.__)("Close"),onClick:d}),c]})})})}var uSe=a(K(),1),oY=a(Vt(),1),nY=a(be(),1),dSe=a(ae(),1);function fSe(){return(0,uSe.useSelect)(e=>{let{getBlockAttributes:t,getBlockName:r,__experimentalGetParsedPattern:o}=e(nY.store),{getEditedEntityRecord:n,getCurrentTheme:i}=e(dSe.store),{getEditedContentOnlySection:s}=Y(e(nY.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,oY.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,oY.decodeEntities)(h.title),type:"template-part"}}}return null},[])}var qs=a(E(),1),{getTemplateInfo:Yot}=Y(R3.privateApis),qot=au.__unstableMotion.create(au.Button);function I3(e){let{stopEditingContentOnlySection:t}=Y((0,jE.useDispatch)(zE.store)),r=fSe(),{postId:o,postType:n,postTypeLabel:i,documentTitle:s,isNotFound:l,templateTitle:c,onNavigateToPreviousEntityRecord:u,isTemplatePreview:d,stylesCanvasTitle:f}=(0,jE.useSelect)(C=>{let{getCurrentPostType:I,getCurrentPostId:k,getEditorSettings:R,getRenderingMode:A}=C(N),{getEditedEntityRecord:P,getPostType:T,getCurrentTheme:M,isResolving:B}=C(R3.store),F=I(),V=k(),z=P("postType",F,V),{default_template_types:D=[]}=M()??{},O=Yot({templateTypes:D,template:z}),L=T(F)?.labels?.singular_name,{getStylesPath:W,getShowStylebook:q}=Y(C(N)),Z=W(),Q=q(),ue=rY(Z,Q);return{postId:V,postType:F,postTypeLabel:L,documentTitle:z.title,isNotFound:!z&&!B("getEditedEntityRecord","postType",F,V),templateTitle:O.title,onNavigateToPreviousEntityRecord:R().onNavigateToPreviousEntityRecord,isTemplatePreview:A()==="template-locked",stylesCanvasTitle:ue}},[]),{open:m}=(0,jE.useDispatch)(pSe.store),h=(0,mSe.useReducedMotion)(),g=T4.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=g3(o),x=(0,A3.useRef)(!1);return(0,A3.useEffect)(()=>{x.current=!0},[]),(0,qs.jsxs)("div",{className:J("editor-document-bar",{"has-back-button":v}),children:[(0,qs.jsx)(au.__unstableAnimatePresence,{children:v&&(0,qs.jsx)(qot,{className:"editor-document-bar__back",icon:(0,vg.isRTL)()?EB:xB,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,vg.__)("Back")})}),!g&&d&&!v&&(0,qs.jsx)(zE.BlockIcon,{icon:Cc,className:"editor-document-bar__icon-layout"}),l?(0,qs.jsx)(au.__experimentalText,{children:(0,vg.__)("Document not found")}):(0,qs.jsx)(au.Button,{className:"editor-document-bar__command",onClick:()=>m(),size:"compact",children:(0,qs.jsxs)(au.__unstableMotion.div,{className:"editor-document-bar__title",initial:x.current?{opacity:0,transform:v?"translateX(15%)":"translateX(-15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},transition:h?{duration:0}:void 0,children:[y&&(0,qs.jsx)(zE.BlockIcon,{icon:y}),(0,qs.jsxs)(au.__experimentalText,{size:"body",as:"h1",children:[(0,qs.jsx)("span",{className:"editor-document-bar__post-title",children:_?(0,gSe.__unstableStripHTML)(_):(0,vg.__)("No title")}),r&&(0,qs.jsx)("span",{className:"editor-document-bar__post-type-label",children:r.type==="template-part"?`\xB7 ${(0,vg.__)("Template Part")}`:`\xB7 ${(0,vg.__)("Pattern")}`}),!r&&S&&(0,qs.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${S}`}),!r&&i&&!e.title&&!S&&(0,qs.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${(0,hSe.decodeEntities)(i)}`})]})]},v)})]})}var _y=a(j(),1),pS=a(K(),1),N3=a(U(),1),M3=a(hd(),1),O3=a(be(),1),vSe=a(ae(),1),ni=a(G(),1);var wy=a(E(),1),Kot=({children:e,isValid:t,isDisabled:r,level:o,href:n,onSelect:i})=>{function s(l){if(r){l.preventDefault();return}i()}return(0,wy.jsx)("li",{className:J("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!t,"is-disabled":r}),children:(0,wy.jsxs)("a",{href:n,className:"document-outline__button","aria-disabled":r,onClick:s,children:[(0,wy.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,wy.jsx)("strong",{className:"document-outline__level",children:o}),(0,wy.jsx)("span",{className:"document-outline__item-content",children:e})]})})},iY=Kot;var ur=a(E(),1),Zot=(0,ur.jsx)("em",{children:(0,_y.__)("(Empty heading)")}),Xot=[(0,ur.jsx)("br",{},"incorrect-break"),(0,ur.jsx)("em",{children:(0,_y.__)("(Incorrect heading level)")},"incorrect-message")],Qot=[(0,ur.jsx)("br",{},"incorrect-break-h1"),(0,ur.jsx)("em",{children:(0,_y.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],Jot=[(0,ur.jsx)("br",{},"incorrect-break-multiple-h1"),(0,ur.jsx)("em",{children:(0,_y.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function $ot(){return(0,ur.jsxs)(ni.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ur.jsx)(ni.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,ur.jsx)(ni.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,ur.jsx)(ni.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,ur.jsx)(ni.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)(ni.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,ur.jsx)(ni.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,ur.jsx)(ni.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)(ni.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,ur.jsx)(ni.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,ur.jsx)(ni.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)(ni.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,ur.jsx)(ni.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,ur.jsx)(ni.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 ent=(e=[])=>e.filter(t=>t.name==="core/heading").map(t=>({...t,level:t.attributes.level,isEmpty:tnt(t)})),tnt=e=>!e.attributes.content||e.attributes.content.trim().length===0;function mS({onSelect:e,hasOutlineItemsDisabled:t}){let{selectBlock:r}=(0,pS.useDispatch)(O3.store),{title:o,isTitleSupported:n}=(0,pS.useSelect)(g=>{let{getEditedPostAttribute:v}=g(N),{getPostType:b}=g(vSe.store),_=b(v("type"));return{title:v("title"),isTitleSupported:_?.supports?.title??!1}}),i=(0,pS.useSelect)(g=>{let{getClientIdsWithDescendants:v,getBlock:b}=g(O3.store);return v().map(y=>b(y))}),s=(0,pS.useSelect)(g=>{if(g(N).getRenderingMode()==="post-only")return;let{getBlocksByName:v,getClientIdsOfDescendants:b}=g(O3.store),[_]=v("core/post-content");if(_)return b(_)},[]),l=(0,N3.useRef)(1),c=(0,N3.useMemo)(()=>ent(i),[i]);if(c.length<1)return(0,ur.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,ur.jsx)($ot,{}),(0,ur.jsx)("p",{children:(0,_y.__)("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)(iY,{level:(0,_y.__)("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)(iY,{level:`H${g.level}`,isValid:b,isDisabled:t||!h(g.clientId),href:`#block-${g.clientId}`,onSelect:()=>{r(g.clientId),e?.()},children:[g.isEmpty?Zot:(0,M3.getTextContent)((0,M3.create)({html:g.attributes.content})),v&&Xot,g.level===1&&m&&Jot,d&&g.level===1&&!m&&Qot]},g.clientId)})]})})}var bSe=a(K(),1),ySe=a(be(),1);function wSe({children:e}){return(0,bSe.useSelect)(r=>{let{getGlobalBlockCount:o}=r(ySe.store);return o("core/heading")>0})?e:null}var _Se=a(U(),1),SSe=a(K(),1),sc=a(j(),1),xSe=a(be(),1),CSe=a(_a(),1),TSe=a(Mo(),1),ESe=a(E(),1);function rnt(){let{registerShortcut:e}=(0,SSe.useDispatch)(CSe.store);return(0,_Se.useEffect)(()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,sc.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,sc.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,sc.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,sc.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,TSe.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,sc.__)("Show or hide the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,sc.__)("Enter or exit distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,sc.__)("Show or hide the Settings panel."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,sc.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/new-note",category:"block",description:(0,sc.__)("Add a new note."),keyCombination:{modifier:"primaryAlt",character:"m"}}),e({name:"core/editor/next-region",category:"global",description:(0,sc.__)("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,sc.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})},[e]),(0,ESe.jsx)(xSe.BlockEditorKeyboardShortcuts.Register,{})}var PSe=rnt;var F3=a(j(),1),kSe=a(G(),1),D3=a(K(),1),HE=a(Mo(),1);var RSe=a(U(),1);var ASe=a(E(),1);function ont(e,t){let r=(0,HE.isAppleOS)()?HE.displayShortcut.primaryShift("z"):HE.displayShortcut.primary("y"),o=(0,D3.useSelect)(i=>i(N).hasEditorRedo(),[]),{redo:n}=(0,D3.useDispatch)(N);return(0,ASe.jsx)(kSe.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,F3.isRTL)()?hv:pv,label:(0,F3.__)("Redo"),shortcut:r,"aria-disabled":!o,onClick:o?n:void 0,className:"editor-history__redo"})}var L3=(0,RSe.forwardRef)(ont);var B3=a(j(),1),ISe=a(G(),1),V3=a(K(),1),OSe=a(Mo(),1);var NSe=a(U(),1);var MSe=a(E(),1);function nnt(e,t){let r=(0,V3.useSelect)(n=>n(N).hasEditorUndo(),[]),{undo:o}=(0,V3.useDispatch)(N);return(0,MSe.jsx)(ISe.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,B3.isRTL)()?pv:hv,label:(0,B3.__)("Undo"),shortcut:OSe.displayShortcut.primary("z"),"aria-disabled":!r,onClick:r?o:void 0,className:"editor-history__undo"})}var j3=(0,NSe.forwardRef)(nnt);var DSe=a(Ya(),1),LSe=a(K(),1),BSe=a(be(),1),VSe=a(It(),1);var z3=a(G(),1),hS=a(j(),1),H3=a(K(),1),FSe=a(U(),1),sY=a(be(),1),Sy=a(E(),1);function U3(){let[e,t]=(0,FSe.useState)(!1),r=(0,H3.useSelect)(i=>i(sY.store).isValidTemplate(),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,H3.useDispatch)(sY.store);return r?null:(0,Sy.jsxs)(Sy.Fragment,{children:[(0,Sy.jsx)(z3.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,hS.__)("Keep it as is"),onClick:()=>o(!0)},{label:(0,hS.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,hS.__)("The content of your post doesn\u2019t match the template assigned to your post type.")}),(0,Sy.jsx)(z3.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,hS.__)("Reset"),onConfirm:()=>{t(!1),n()},onCancel:()=>t(!1),size:"medium",children:(0,hS.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}var aY=a(E(),1);function int(){(0,DSe.default)("wp.editor.EditorNotices",{since:"7.0",version:"7.2",alternative:"wp.notices.InlineNotices"});let e=(0,LSe.useSelect)(t=>t(BSe.store).isValidTemplate(),[]);return(0,aY.jsx)(VSe.InlineNotices,{pinnedNoticesClassName:"components-editor-notices__pinned",dismissibleNoticesClassName:"components-editor-notices__dismissible",children:!e&&(0,aY.jsx)(U3,{})})}var jSe=int;var zSe=a(Ya(),1),HSe=a(It(),1),USe=a(E(),1);function WSe(){return(0,zSe.default)("wp.editor.EditorSnackbars",{since:"7.0",version:"7.2",alternative:"wp.notices.SnackbarNotices"}),(0,USe.jsx)(HSe.SnackbarNotices,{className:"components-editor-notices__snackbar"})}var YSe=a(U(),1),W3=a(j(),1),xy=a(G(),1),qSe=a(K(),1),KSe=a(Te(),1),ZSe=a(Vn(),1);var bg=a(E(),1);function snt(){try{return(0,qSe.select)(N).getEditedPostContent()}catch{}}function GSe({text:e,children:t,variant:r="secondary"}){let o=(0,KSe.useCopyToClipboard)(e);return(0,bg.jsx)(xy.Button,{__next40pxDefaultSize:!0,variant:r,ref:o,children:t})}var ant=class extends YSe.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,ZSe.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,bg.jsxs)(xy.__experimentalHStack,{className:"editor-error-boundary",alignment:"baseline",spacing:4,justify:"space-between",expanded:!1,wrap:!0,children:[(0,bg.jsx)(xy.__experimentalText,{as:"p",children:(0,W3.__)("The editor has encountered an unexpected error.")}),(0,bg.jsxs)(xy.__experimentalHStack,{expanded:!1,children:[t&&(0,bg.jsx)(GSe,{text:snt,children:(0,W3.__)("Copy contents")}),(0,bg.jsx)(GSe,{variant:"primary",text:e?.stack,children:(0,W3.__)("Copy error")})]})]}):this.props.children}},XSe=ant;var Dp=a(U(),1),WE=a(Te(),1),yg=a(K(),1),lY=a(j(),1),QSe=a(Pt(),1),JSe=a(It(),1);var $Se=a(E(),1),lnt=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,UE,cnt=()=>{if(UE!==void 0)return UE;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),UE=!0}catch{UE=!1}return UE};function unt(){let e=(0,yg.useRegistry)(),{postId:t,isEditedPostNew:r}=(0,yg.useSelect)(o=>({postId:o(N).getCurrentPostId(),isEditedPostNew:o(N).isEditedPostNew()}),[]);(0,Dp.useEffect)(()=>{let o=TX(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(N);if(!Object.keys(l).some(_=>l[_]!==c(_))){Dk(t,r);return}if(!!u().autosave)return;let{createWarningNotice:m,removeNotice:h}=e.dispatch(JSe.store),{editPost:g,resetEditorBlocks:v}=e.dispatch(N),b="wpEditorAutosaveRestore";m((0,lY.__)("The backup of this post in your browser is different from the version below."),{id:b,actions:[{label:(0,lY.__)("Restore the backup"),onClick(){let{content:_,...y}=l;g(y),v((0,QSe.parse)(l.content)),h(b)}}]})},[e,t,r])}function dnt(){let{postId:e,isEditedPostNew:t,isDirty:r,isAutosaving:o,didError:n}=(0,yg.useSelect)(u=>({postId:u(N).getCurrentPostId(),isEditedPostNew:u(N).isEditedPostNew(),isDirty:u(N).isEditedPostDirty(),isAutosaving:u(N).isAutosavingPost(),didError:u(N).didPostSaveRequestFail()}),[]),i=(0,Dp.useRef)(r),s=(0,Dp.useRef)(o);(0,Dp.useEffect)(()=>{!n&&(s.current&&!o||i.current&&!r)&&Dk(e,t),i.current=r,s.current=o},[r,o,n]);let l=(0,WE.usePrevious)(t),c=(0,WE.usePrevious)(e);(0,Dp.useEffect)(()=>{c===e&&l&&!t&&Dk(e,!0)},[t,e])}function fnt(){let{autosave:e}=(0,yg.useDispatch)(N),t=(0,Dp.useCallback)(()=>{lnt(()=>e({local:!0}))},[]);unt(),dnt();let r=(0,yg.useSelect)(o=>o(N).getEditorSettings().localAutosaveInterval,[]);return(0,$Se.jsx)(h3,{interval:r,autosave:t})}var exe=(0,WE.ifCondition)(cnt)(fnt);var txe=a(K(),1),rxe=a(ae(),1);function pnt({children:e}){return(0,txe.useSelect)(r=>{let{getEditedPostAttribute:o}=r(N),{getPostType:n}=r(rxe.store);return!!n(o("type"))?.supports?.["page-attributes"]},[])?e:null}var gS=pnt;var cY=a(j(),1),bS=a(G(),1),G3=a(K(),1),ixe=a(U(),1);var oxe=a(K(),1),nxe=a(ae(),1);function mnt(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 hnt({children:e,supportKeys:t}){let r=(0,oxe.useSelect)(n=>{let{getEditedPostAttribute:i}=n(N),{getPostType:s}=n(nxe.store);return s(i("type"))},[]),o=!!r;return r&&(o=(Array.isArray(t)?t:[t]).some(n=>mnt(r.supports,n))),o?e:null}var fo=hnt;var vS=a(E(),1);function gnt(){let e=(0,G3.useSelect)(s=>s(N).getEditedPostAttribute("menu_order")??0,[]),{editPost:t}=(0,G3.useDispatch)(N),[r,o]=(0,ixe.useState)(null),n=s=>{o(s);let l=Number(s);Number.isInteger(l)&&s.trim?.()!==""&&t({menu_order:l})},i=r??e;return(0,vS.jsx)(bS.Flex,{children:(0,vS.jsx)(bS.FlexBlock,{children:(0,vS.jsx)(bS.__experimentalNumberControl,{label:(0,cY.__)("Order"),help:(0,cY.__)("Set the page order."),value:i,onChange:n,hideLabelFromVision:!0,onBlur:()=>{o(null)}})})})}function sxe(){return(0,vS.jsx)(fo,{supportKeys:"page-attributes",children:(0,vS.jsx)(gnt,{})})}var bxe=a(K(),1),yxe=a(ae(),1);var dY=a(dw(),1),Na=a(j(),1),wg=a(G(),1),fxe=a(Te(),1),qd=a(U(),1),wS=a(K(),1),pY=a(Vt(),1),q3=a(ae(),1),pxe=a(be(),1),mxe=a(bo(),1);var axe=a(G(),1),lxe=a(U(),1),GE=a(E(),1),vnt=(0,lxe.forwardRef)(({className:e,label:t,children:r},o)=>(0,GE.jsxs)(axe.__experimentalHStack,{className:J("editor-post-panel__row",e),ref:o,children:[t&&(0,GE.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,GE.jsx)("div",{className:"editor-post-panel__row-control",children:r})]})),dr=vnt;var cxe=a(Vt(),1);function Y3(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 yS=e=>(0,cxe.decodeEntities)(e),uY=e=>({...e,name:yS(e.name)}),uxe=e=>(e??[]).map(uY);var Oa=a(E(),1);function fY(e){return e?.title?.rendered?(0,pY.decodeEntities)(e.title.rendered):`#${e.id} (${(0,Na.__)("no title")})`}var dxe=(e,t)=>{let r=(0,dY.default)(e||"").toLowerCase(),o=(0,dY.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function hxe(){let{editPost:e}=(0,wS.useDispatch)(N),[t,r]=(0,qd.useState)(""),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:s,isLoading:l}=(0,wS.useSelect)(f=>{let{getPostType:m,getEntityRecords:h,getEntityRecord:g,isResolving:v}=f(q3.store),{getCurrentPostId:b,getEditedPostAttribute:_}=f(N),y=_("type"),w=_("parent"),S=m(y),x=b(),C=S?.hierarchical??!1,I={per_page:100,exclude:x,parent_exclude:x,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(I.search=t,I.orderby="relevance",I.search_columns=["post_title"]);let k=w?g("postType",y,w):null;return{isHierarchical:C,parentPostId:w,parentPostTitle:k?fY(k):"",pageItems:C?h("postType",y,I):null,isLoading:C?v("getEntityRecords",["postType",y,I]):!1}},[t]),c=(0,qd.useMemo)(()=>{let f=(v,b=0)=>v.map(w=>[{value:w.id,label:"\u2014 ".repeat(b)+(0,pY.decodeEntities)(w.name),rawName:w.name},...f(w.children||[],b+1)]).sort(([w],[S])=>{let x=dxe(w.rawName,t),C=dxe(S.rawName,t);return x>=C?1:-1}).flat();if(!s)return[];let m=s.map(v=>({id:v.id,parent:v.parent,name:fY(v)}));t||(m=Y3(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,Oa.jsx)(wg.ComboboxControl,{className:"editor-page-attributes__parent",label:(0,Na.__)("Parent"),help:(0,Na.__)("Choose a parent page."),value:n,options:c,onFilterValueChange:(0,fxe.debounce)(u,300),onChange:d,hideLabelFromVision:!0,isLoading:l})}function bnt({isOpen:e,onClick:t}){let r=(0,wS.useSelect)(n=>{let{getEditedPostAttribute:i}=n(N),s=i("parent");if(!s)return null;let{getEntityRecord:l}=n(q3.store),c=i("type");return l("postType",c,s)},[]),o=(0,qd.useMemo)(()=>r?fY(r):(0,Na.__)("None"),[r]);return(0,Oa.jsx)(wg.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,Na.sprintf)((0,Na.__)("Change parent: %s"),o),onClick:t,children:o})}function gxe(){let e=(0,wS.useSelect)(n=>n(q3.store).getEntityRecord("root","__unstableBase")?.home,[]),[t,r]=(0,qd.useState)(null),o=(0,qd.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return(0,Oa.jsx)(dr,{label:(0,Na.__)("Parent"),ref:r,children:(0,Oa.jsx)(wg.Dropdown,{popoverProps:o,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,Oa.jsx)(bnt,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,Oa.jsxs)("div",{className:"editor-post-parent",children:[(0,Oa.jsx)(pxe.__experimentalInspectorPopoverHeader,{title:(0,Na.__)("Parent"),onClose:n}),(0,Oa.jsxs)("div",{children:[(0,qd.createInterpolateElement)((0,Na.sprintf)((0,Na.__)('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,mxe.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,Oa.jsx)("wbr",{})}),(0,Oa.jsx)("p",{children:(0,qd.createInterpolateElement)((0,Na.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,Oa.jsx)(wg.ExternalLink,{href:(0,Na.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,Oa.jsx)(hxe,{})]})})})}var vxe=hxe;var K3=a(E(),1),ynt="page-attributes";function wnt(){let{isEnabled:e,postType:t}=(0,bxe.useSelect)(r=>{let{getEditedPostAttribute:o,isEditorPanelEnabled:n}=r(N),{getPostType:i}=r(yxe.store);return{isEnabled:n(ynt),postType:i(o("type"))}},[]);return!e||!t?null:(0,K3.jsx)(gxe,{})}function Z3(){return(0,K3.jsx)(gS,{children:(0,K3.jsx)(wnt,{})})}var ac=a(j(),1),Bp=a(G(),1),SS=a(K(),1),vY=a(ae(),1),Sxe=a(be(),1),xS=a(U(),1);var xxe=a(It(),1);var X3=a(K(),1),hY=a(U(),1),lu=a(Pt(),1),cu=a(G(),1),Cy=a(j(),1);var Lp=a(E(),1),mY=(0,Cy.__)("Custom Template");function _g({onClose:e}){let{defaultBlockTemplate:t,onNavigateToEntityRecord:r}=(0,X3.useSelect)(d=>{let{getEditorSettings:f,getCurrentTemplateId:m}=d(N);return{defaultBlockTemplate:f().defaultBlockTemplate,onNavigateToEntityRecord:f().onNavigateToEntityRecord,getTemplateId:m}}),{createTemplate:o}=Y((0,X3.useDispatch)(N)),[n,i]=(0,hY.useState)(""),[s,l]=(0,hY.useState)(!1),c=()=>{i(""),e()},u=async d=>{if(d.preventDefault(),s)return;l(!0);let f=t??(0,lu.serialize)([(0,lu.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,lu.createBlock)("core/site-title"),(0,lu.createBlock)("core/site-tagline")]),(0,lu.createBlock)("core/separator"),(0,lu.createBlock)("core/group",{tagName:"main"},[(0,lu.createBlock)("core/group",{layout:{inherit:!0}},[(0,lu.createBlock)("core/post-title")]),(0,lu.createBlock)("core/post-content",{layout:{inherit:!0}})])]),m=await o({slug:Kv(n||mY)||"wp-custom-template",content:f,title:n||mY,status:"publish"});l(!1),r({postId:m.id,postType:"wp_template"}),c()};return(0,Lp.jsx)(cu.Modal,{title:(0,Cy.__)("Create custom template"),onRequestClose:c,focusOnMount:"firstContentElement",size:"small",overlayClassName:"editor-post-template__create-template-modal",children:(0,Lp.jsx)("form",{onSubmit:u,children:(0,Lp.jsxs)(cu.__experimentalVStack,{spacing:"3",children:[(0,Lp.jsx)(cu.TextControl,{label:(0,Cy.__)("Name"),value:n,onChange:i,placeholder:mY,disabled:s,help:(0,Cy.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,Lp.jsxs)(cu.__experimentalHStack,{justify:"right",children:[(0,Lp.jsx)(cu.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,Cy.__)("Cancel")}),(0,Lp.jsx)(cu.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:s,"aria-disabled":s,children:(0,Cy.__)("Create")})]})]})})})}var Ty=a(K(),1),wxe=a(U(),1),Sg=a(ae(),1),Q3=a(j(),1);function Ey(){return(0,Ty.useSelect)(e=>{let{getCurrentPostId:t,getCurrentPostType:r}=e(N);return{postId:t(),postType:r()}},[])}function Py(){let{postType:e,postId:t}=Ey();return(0,Ty.useSelect)(r=>{let{canUser:o,getEntityRecord:n,getEntityRecords:i}=r(Sg.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 _xe(e){return(0,Ty.useSelect)(t=>t(Sg.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e}),[e])}function YE(){let{postType:e,postId:t}=Ey(),[r]=(0,Sg.useEntityProp)("postType",e,"slug",t),o=gY(),n=Py(),i=_xe(e),s=(0,Ty.useSelect)(l=>{if(!window?.__experimentalDataFormInspector||!o)return null;let{getDefaultTemplateId:c,getEntityRecord:u}=l(Sg.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,wxe.useMemo)(()=>n&&[...(i||[]).filter(l=>l.is_custom&&l.slug!==o&&!!l.content.raw),s&&{...s,title:{rendered:(0,Q3.sprintf)((0,Q3.__)("%s (default)"),s.title.rendered)},isDefault:!0}].filter(Boolean),[i,s,o,n])}function _S(){return(0,Ty.useSelect)(e=>{let{getEditorSettings:t,getCurrentTemplateId:r,getCurrentPostType:o}=e(N),{getPostType:n,canUser:i}=e(Sg.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 gY(){let{postType:e,postId:t}=Ey(),r=_xe(e),o=(0,Ty.useSelect)(n=>n(Sg.store).getEditedEntityRecord("postType",e,t)?.template,[e,t]);if(o)return r?.find(n=>n.slug===o)?.slug}var Ma=a(E(),1);function _nt({isOpen:e,onClick:t}){let r=(0,SS.useSelect)(o=>{let n=o(N).getEditedPostAttribute("template"),{supportsTemplateMode:i,availableTemplates:s}=o(N).getEditorSettings();if(!i&&s[n])return s[n];let l=o(vY.store).canUser("create",{kind:"postType",name:"wp_template"})&&o(N).getCurrentTemplateId();return l?.title||l?.slug||s?.[n]},[]);return(0,Ma.jsx)(Bp.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,ac.__)("Template options"),onClick:t,children:r??(0,ac.__)("Default template")})}function Snt({onClose:e}){let t=Py(),{availableTemplates:r,fetchedTemplates:o,selectedTemplateSlug:n,canCreate:i,canEdit:s,currentTemplateId:l,onNavigateToEntityRecord:c,getEditorSettings:u}=(0,SS.useSelect)(b=>{let{canUser:_,getEntityRecords:y}=b(vY.store),w=b(N).getEditorSettings(),S=_("create",{kind:"postType",name:"wp_template"}),x=b(N).getCurrentTemplateId();return{availableTemplates:w.availableTemplates,fetchedTemplates:S?y("postType","wp_template",{post_type:b(N).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:b(N).getEditedPostAttribute("template"),canCreate:t&&S&&w.supportsTemplateMode,canEdit:t&&S&&w.supportsTemplateMode&&!!x,currentTemplateId:x,onNavigateToEntityRecord:w.onNavigateToEntityRecord,getEditorSettings:b(N).getEditorSettings}},[t]),d=(0,xS.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,SS.useDispatch)(N),{createSuccessNotice:h}=(0,SS.useDispatch)(xxe.store),[g,v]=(0,xS.useState)(!1);return(0,Ma.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,Ma.jsx)(Sxe.__experimentalInspectorPopoverHeader,{title:(0,ac.__)("Template"),help:(0,ac.__)("Templates define the way content is displayed when viewing your site."),actions:i?[{icon:J4,label:(0,ac.__)("Add template"),onClick:()=>v(!0)}]:[],onClose:e}),t?(0,Ma.jsx)(Bp.SelectControl,{hideLabelFromVision:!0,label:(0,ac.__)("Template"),value:f?.value??"",options:d,onChange:b=>m({template:b||""})}):(0,Ma.jsx)(Bp.Notice,{status:"warning",isDismissible:!1,children:(0,ac.__)("The posts page template cannot be changed.")}),s&&c&&(0,Ma.jsx)("p",{children:(0,Ma.jsx)(Bp.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>{c({postId:l,postType:"wp_template"}),e(),h((0,ac.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,ac.__)("Go back"),onClick:()=>u().onNavigateToPreviousEntityRecord()}]})},children:(0,ac.__)("Edit template")})}),g&&(0,Ma.jsx)(_g,{onClose:()=>v(!1)})]})}function xnt(){let[e,t]=(0,xS.useState)(null),r=(0,xS.useMemo)(()=>({anchor:e,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[e]);return(0,Ma.jsx)(dr,{label:(0,ac.__)("Template"),ref:t,children:(0,Ma.jsx)(Bp.Dropdown,{popoverProps:r,focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Ma.jsx)(_nt,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Ma.jsx)(Snt,{onClose:o})})})}var J3=xnt;var t6=a(G(),1),kxe=a(Dh(),1),r6=a(K(),1),Rxe=a(IU(),1);var Exe=a(G(),1);var $3=a(K(),1),Cxe=a(Dt(),1);var Txe=a(E(),1),{PreferenceBaseOption:Cnt}=Y(Cxe.privateApis);function xg(e){let{toggleEditorPanelEnabled:t}=(0,$3.useDispatch)(N),{isChecked:r,isRemoved:o}=(0,$3.useSelect)(n=>{let{isEditorPanelEnabled:i,isEditorPanelRemoved:s}=n(N);return{isChecked:i(e.panelName),isRemoved:s(e.panelName)}},[e.panelName]);return o?null:(0,Txe.jsx)(Cnt,{isChecked:r,onChange:()=>t(e.panelName),...e})}var bY=a(E(),1),{Fill:Tnt,Slot:Ent}=(0,Exe.createSlotFill)("EnablePluginDocumentSettingPanelOption"),Pxe=({label:e,panelName:t})=>(0,bY.jsx)(Tnt,{children:(0,bY.jsx)(xg,{label:e,panelName:t})});Pxe.Slot=Ent;var e6=Pxe;var Cg=a(E(),1),{Fill:Pnt,Slot:knt}=(0,t6.createSlotFill)("PluginDocumentSettingPanel"),Axe=({name:e,className:t,title:r,icon:o,children:n})=>{let{name:i}=(0,kxe.usePluginContext)(),s=`${i}/${e}`,{opened:l,isEnabled:c}=(0,r6.useSelect)(d=>{let{isEditorPanelOpened:f,isEditorPanelEnabled:m}=d(N);return{opened:f(s),isEnabled:m(s)}},[s]),{toggleEditorPanelOpened:u}=(0,r6.useDispatch)(N);return e===void 0&&(0,Rxe.default)("PluginDocumentSettingPanel requires a name property."),(0,Cg.jsxs)(Cg.Fragment,{children:[(0,Cg.jsx)(e6,{label:r,panelName:s}),(0,Cg.jsx)(Pnt,{children:c&&(0,Cg.jsx)(t6.PanelBody,{className:t,title:r,icon:o,opened:l,onToggle:()=>u(s),children:n})})]})};Axe.Slot=knt;var o6=Axe;var Ixe=a(be(),1),Oxe=a(G(),1),Nxe=a(Te(),1),yY=a(E(),1),Rnt=(e,t)=>e.filter(r=>!t.includes(r)).length===0,Ant=(e,t)=>!Array.isArray(t)||Rnt(e,t),Int=({allowedBlocks:e,icon:t,label:r,onClick:o,small:n,role:i})=>(0,yY.jsx)(Ixe.BlockSettingsMenuControls,{children:({selectedBlocks:s,onClose:l})=>Ant(s,e)?(0,yY.jsx)(Oxe.MenuItem,{onClick:(0,Nxe.compose)(o,l),icon:t,label:n?r:void 0,role:i,children:!n&&r}):null}),Mxe=Int;var Fxe=a(G(),1),Dxe=a(Dh(),1);var Lxe=a(E(),1);function Bxe(e){let t=(0,Dxe.usePluginContext)();return(0,Lxe.jsx)(Wl,{name:"core/plugin-more-menu",as:e.as??Fxe.MenuItem,icon:e.icon||t.icon,...e})}var Vxe=a(Dh(),1),n6=a(G(),1),wY=a(E(),1),{Fill:Ont,Slot:Nnt}=(0,n6.createSlotFill)("PluginPostPublishPanel"),jxe=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,Vxe.usePluginContext)();return(0,wY.jsx)(Ont,{children:(0,wY.jsx)(n6.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};jxe.Slot=Nnt;var i6=jxe;var s6=a(G(),1),_Y=a(E(),1),{Fill:Mnt,Slot:Fnt}=(0,s6.createSlotFill)("PluginPostStatusInfo"),zxe=({children:e,className:t})=>(0,_Y.jsx)(Mnt,{children:(0,_Y.jsx)(s6.PanelRow,{className:t,children:e})});zxe.Slot=Fnt;var CS=zxe;var a6=a(G(),1),Hxe=a(Dh(),1),SY=a(E(),1),{Fill:Dnt,Slot:Lnt}=(0,a6.createSlotFill)("PluginPrePublishPanel"),Uxe=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,Hxe.usePluginContext)();return(0,SY.jsx)(Dnt,{children:(0,SY.jsx)(a6.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};Uxe.Slot=Lnt;var l6=Uxe;var Wxe=a(G(),1),Gxe=a(Dh(),1);var Yxe=a(E(),1);function qxe(e){let t=(0,Gxe.usePluginContext)();return(0,Yxe.jsx)(Wl,{name:"core/plugin-preview-menu",as:e.as??Wxe.MenuItem,icon:e.icon||t.icon,...e})}var Kxe=a(E(),1);function ky({className:e,...t}){return(0,Kxe.jsx)(Yl,{panelClassName:e,className:"editor-sidebar",scope:"core",...t})}var Zxe=a(E(),1);function Xxe(e){return(0,Zxe.jsx)(Bh,{__unstableExplicitMenuItem:!0,scope:"core",...e})}var Vp=a(K(),1),b1e=a(Vt(),1),Tg=a(G(),1),c6=a(U(),1),Ay=a(j(),1),kS=a(ae(),1);var y1e=a(It(),1),w1e=a(Dt(),1);var ES=a(U(),1),e1e=a(Vt(),1),t1e=a(be(),1),PS=a(G(),1),TS=a(j(),1),r1e=a(K(),1),o1e=a(ae(),1),n1e=a(Pt(),1);var Jxe=a(dw(),1);function Qxe(e=""){return e=(0,Jxe.default)(e),e=e.trim().toLowerCase(),e}function Bnt(e,t){let r=Qxe(t),o=Qxe(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 $xe(e=[],t=""){if(!t)return e;let r=e.map(o=>[o,Bnt(o,t)]).filter(([,o])=>o>0);return r.sort(([,o],[,n])=>n-o),r.map(([o])=>o)}var Fa=a(E(),1);function xY({onRequestClose:e,onSelect:t}){let{postType:r,postId:o}=Ey(),{editEntityRecord:n}=(0,r1e.useDispatch)(o1e.store),i=async s=>{n("postType",r,o,{template:s.isDefault?"":s.name},{undoIgnore:!0}),e(),t?.()};return(0,Fa.jsx)(PS.Modal,{title:(0,TS.__)("Choose a template"),onRequestClose:e,overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,Fa.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,Fa.jsx)(Vnt,{onSelect:i})})})}function i1e({onClick:e}){let[t,r]=(0,ES.useState)(!1),o=YE();return(0,Fa.jsxs)(Fa.Fragment,{children:[(0,Fa.jsx)(PS.MenuItem,{disabled:!o?.length,accessibleWhenDisabled:!0,onClick:()=>r(!0),children:(0,TS.__)("Change template")}),t&&(0,Fa.jsx)(xY,{onRequestClose:()=>r(!1),onSelect:e})]})}function Vnt({onSelect:e}){let[t,r]=(0,ES.useState)(""),o=YE(),n=(0,ES.useMemo)(()=>o.map(s=>({name:s.slug,blocks:(0,n1e.parse)(s.content.raw),title:(0,e1e.decodeEntities)(s.title.rendered),id:s.id,isDefault:s.isDefault})),[o]),i=(0,ES.useMemo)(()=>$xe(n,t),[n,t]);return(0,Fa.jsxs)(Fa.Fragment,{children:[(0,Fa.jsx)(PS.SearchControl,{onChange:r,value:t,label:(0,TS.__)("Search"),placeholder:(0,TS.__)("Search"),className:"editor-post-template__swap-template-search"}),(0,Fa.jsx)(t1e.__experimentalBlockPatternsList,{label:(0,TS.__)("Templates"),blockPatterns:i,onClickPattern:e})]})}var s1e=a(G(),1),a1e=a(j(),1),l1e=a(K(),1),c1e=a(ae(),1);var u1e=a(E(),1);function d1e({onClick:e}){let t=gY(),r=Py(),{postType:o,postId:n}=Ey(),{editEntityRecord:i}=(0,l1e.useDispatch)(c1e.store);return!t||!r?null:(0,u1e.jsx)(s1e.MenuItem,{onClick:()=>{i("postType",o,n,{template:""},{undoIgnore:!0}),e()},children:(0,a1e.__)("Use default template")})}var f1e=a(G(),1),p1e=a(j(),1),m1e=a(K(),1),h1e=a(ae(),1),g1e=a(U(),1);var Ry=a(E(),1);function v1e(){let{canCreateTemplates:e}=(0,m1e.useSelect)(n=>{let{canUser:i}=n(h1e.store);return{canCreateTemplates:i("create",{kind:"postType",name:"wp_template"})}},[]),[t,r]=(0,g1e.useState)(!1),o=Py();return!e||!o?null:(0,Ry.jsxs)(Ry.Fragment,{children:[(0,Ry.jsx)(f1e.MenuItem,{onClick:()=>{r(!0)},children:(0,p1e.__)("Create new template")}),t&&(0,Ry.jsx)(_g,{onClose:()=>{r(!1)}})]})}var Da=a(E(),1);function _1e(){let{isTemplateHidden:e,onNavigateToEntityRecord:t,getEditorSettings:r,hasGoBack:o,hasSpecificTemplate:n,id:i}=(0,Vp.useSelect)(S=>{let{getRenderingMode:x,getEditorSettings:C,getCurrentPost:I,getCurrentTemplateId:k}=Y(S(N)),R=C(),A=I();return{isTemplateHidden:x()==="post-only",onNavigateToEntityRecord:R.onNavigateToEntityRecord,getEditorSettings:C,hasGoBack:R.hasOwnProperty("onNavigateToPreviousEntityRecord"),hasSpecificTemplate:!!A.template,id:k()}},[]),{get:s}=(0,Vp.useSelect)(w1e.store),{editedRecord:l,hasResolved:c}=(0,kS.useEntityRecord)("postType","wp_template",i),{getEntityRecord:u}=(0,Vp.useSelect)(kS.store),{editEntityRecord:d}=(0,Vp.useDispatch)(kS.store),{createSuccessNotice:f}=(0,Vp.useDispatch)(y1e.store),{setRenderingMode:m,setDefaultRenderingMode:h}=Y((0,Vp.useDispatch)(N)),g=(0,Vp.useSelect)(S=>!!S(kS.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[v,b]=(0,c6.useState)(null),_=(0,c6.useMemo)(()=>({anchor:v,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[v]);if(!c)return null;let y=o?[{label:(0,Ay.__)("Go back"),onClick:()=>r().onNavigateToPreviousEntityRecord()}]:void 0,w=()=>{s("core/edit-site","welcomeGuideTemplate")||f((0,Ay.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:y})};return(0,Da.jsx)(dr,{label:(0,Ay.__)("Template"),ref:b,children:(0,Da.jsx)(Tg.DropdownMenu,{popoverProps:_,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,Ay.__)("Template options"),text:(0,b1e.decodeEntities)(l.title),icon:null,children:({onClose:S})=>(0,Da.jsxs)(Da.Fragment,{children:[(0,Da.jsxs)(Tg.MenuGroup,{children:[g&&(0,Da.jsx)(Tg.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,Ay.__)("Edit template")}),(0,Da.jsx)(i1e,{onClick:S}),(0,Da.jsx)(d1e,{onClick:S}),g&&(0,Da.jsx)(v1e,{})]}),(0,Da.jsx)(Tg.MenuGroup,{children:(0,Da.jsx)(Tg.MenuItem,{icon:e?void 0:Oo,isSelected:!e,role:"menuitemcheckbox",onClick:()=>{let x=e?"template-locked":"post-only";m(x),h(x)},children:(0,Ay.__)("Show template")})})]})})})}var CY=a(E(),1);function u6(){let e=_S();return e==="classic"?(0,CY.jsx)(J3,{}):e==="block-theme"?(0,CY.jsx)(_1e,{}):null}var B1e=a(K(),1),V1e=a(ae(),1);var E1e=a(Te(),1),P1e=a(U(),1),k1e=a(K(),1),R1e=a(j(),1),A1e=a(G(),1);var S1e=a(j(),1),x1e=a(U(),1),C1e=a(K(),1),TY=a(Vt(),1),T1e=a(ae(),1);var qE={_fields:"id,name",context:"view"},d6={who:"authors",per_page:100,...qE};function f6(e){let{authorId:t,authors:r,postAuthor:o,isLoading:n}=(0,C1e.useSelect)(s=>{let{getUser:l,getUsers:c,isResolving:u}=s(T1e.store),{getEditedPostAttribute:d}=s(N),f=d("author"),m={...d6};return e&&(m.search=e,m.search_columns=["name"]),{authorId:f,authors:c(m),postAuthor:l(f,qE),isLoading:u("getUsers",[m])}},[e]),i=(0,x1e.useMemo)(()=>{let s=(r??[]).map(u=>({value:u.id,label:(0,TY.decodeEntities)(u.name)})),l=s.findIndex(({value:u})=>o?.id===u),c=[];return l<0&&o?c=[{value:o.id,label:(0,TY.decodeEntities)(o.name)}]:l<0&&!o&&(c=[{value:0,label:(0,S1e.__)("(No author)")}]),[...c,...s]},[r,o]);return{authorId:t,authorOptions:i,postAuthor:o,isLoading:n}}var I1e=a(E(),1);function O1e(){let[e,t]=(0,P1e.useState)(),{editPost:r}=(0,k1e.useDispatch)(N),{authorId:o,authorOptions:n,isLoading:i}=f6(e),s=l=>{l&&r({author:l})};return(0,I1e.jsx)(A1e.ComboboxControl,{label:(0,R1e.__)("Author"),options:n,value:o,onFilterValueChange:(0,E1e.debounce)(t,300),onChange:s,allowReset:!1,hideLabelFromVision:!0,isLoading:i})}var N1e=a(j(),1),M1e=a(K(),1),F1e=a(G(),1);var D1e=a(E(),1);function L1e(){let{editPost:e}=(0,M1e.useDispatch)(N),{authorId:t,authorOptions:r}=f6(),o=n=>{let i=Number(n);e({author:i})};return(0,D1e.jsx)(F1e.SelectControl,{className:"post-author-selector",label:(0,N1e.__)("Author"),options:r,onChange:o,value:t,hideLabelFromVision:!0})}var EY=a(E(),1),jnt=25;function znt(){return(0,B1e.useSelect)(t=>t(V1e.store).getUsers(d6)?.length>=jnt,[])?(0,EY.jsx)(O1e,{}):(0,EY.jsx)(L1e,{})}var p6=znt;var j1e=a(K(),1);var z1e=a(E(),1);function m6({children:e}){let{hasAssignAuthorAction:t}=(0,j1e.useSelect)(r=>({hasAssignAuthorAction:!!r(N).getCurrentPost()?._links?.["wp:action-assign-author"]}),[]);return t?(0,z1e.jsx)(fo,{supportKeys:"author",children:e}):null}var Iy=a(j(),1),h6=a(G(),1),g6=a(U(),1),H1e=a(Vt(),1),U1e=a(be(),1),W1e=a(K(),1),G1e=a(ae(),1);var Kd=a(E(),1);function Hnt({isOpen:e,onClick:t}){let{postAuthor:r}=(0,W1e.useSelect)(n=>{let i=n(N).getEditedPostAttribute("author");return{postAuthor:n(G1e.store).getUser(i,qE)}},[]),o=(0,H1e.decodeEntities)(r?.name)||(0,Iy.__)("(No author)");return(0,Kd.jsx)(h6.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,Iy.sprintf)((0,Iy.__)("Change author: %s"),o),onClick:t,children:o})}function Unt(){let[e,t]=(0,g6.useState)(null),r=(0,g6.useMemo)(()=>({anchor:e,placement:"left-start",offset:36,shift:!0}),[e]);return(0,Kd.jsx)(m6,{children:(0,Kd.jsx)(dr,{label:(0,Iy.__)("Author"),ref:t,children:(0,Kd.jsx)(h6.Dropdown,{popoverProps:r,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Kd.jsx)(Hnt,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Kd.jsxs)("div",{className:"editor-post-author",children:[(0,Kd.jsx)(U1e.__experimentalInspectorPopoverHeader,{title:(0,Iy.__)("Author"),onClose:o}),(0,Kd.jsx)(p6,{onClose:o})]})})})})}var v6=Unt;var Eg=a(j(),1),y6=a(G(),1),w6=a(K(),1);var b6=a(E(),1),Wnt=[{label:(0,Eg._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,Eg.__)("Visitors can add new comments and replies.")},{label:(0,Eg.__)("Closed"),value:"closed",description:[(0,Eg.__)("Visitors cannot add new comments or replies."),(0,Eg.__)("Existing comments remain visible.")].join(" ")}];function Gnt(){let e=(0,w6.useSelect)(o=>o(N).getEditedPostAttribute("comment_status")??"open",[]),{editPost:t}=(0,w6.useDispatch)(N),r=o=>t({comment_status:o});return(0,b6.jsx)("form",{children:(0,b6.jsx)(y6.__experimentalVStack,{spacing:4,children:(0,b6.jsx)(y6.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,Eg.__)("Comment status"),options:Wnt,onChange:r,selected:e})})})}var _6=Gnt;var uu=a(j(),1),RS=a(G(),1),kY=a(K(),1),E6=a(U(),1),Y1e=a(be(),1),q1e=a(ae(),1);var S6=a(j(),1),x6=a(G(),1),C6=a(K(),1);var PY=a(E(),1);function Ynt(){let e=(0,C6.useSelect)(o=>o(N).getEditedPostAttribute("ping_status")??"open",[]),{editPost:t}=(0,C6.useDispatch)(N),r=()=>t({ping_status:e==="open"?"closed":"open"});return(0,PY.jsx)(x6.CheckboxControl,{label:(0,S6.__)("Enable pingbacks & trackbacks"),checked:e==="open",onChange:r,help:(0,PY.jsx)(x6.ExternalLink,{href:(0,S6.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,S6.__)("Learn more about pingbacks & trackbacks")})})}var T6=Ynt;var Ks=a(E(),1),qnt="discussion-panel";function Knt({onClose:e}){return(0,Ks.jsxs)("div",{className:"editor-post-discussion",children:[(0,Ks.jsx)(Y1e.__experimentalInspectorPopoverHeader,{title:(0,uu.__)("Discussion"),onClose:e}),(0,Ks.jsxs)(RS.__experimentalVStack,{spacing:4,children:[(0,Ks.jsx)(fo,{supportKeys:"comments",children:(0,Ks.jsx)(_6,{})}),(0,Ks.jsx)(fo,{supportKeys:"trackbacks",children:(0,Ks.jsx)(T6,{})})]})]})}function Znt({isOpen:e,onClick:t}){let{commentStatus:r,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,kY.useSelect)(l=>{let{getEditedPostAttribute:c}=l(N),{getPostType:u}=l(q1e.store),d=u(c("type"));return{commentStatus:c("comment_status")??"open",pingStatus:c("ping_status")??"open",commentsSupported:!!d.supports.comments,trackbacksSupported:!!d.supports.trackbacks}},[]),s;return r==="open"?o==="open"?s=(0,uu._x)("Open",'Adjective: e.g. "Comments are open"'):s=i?(0,uu.__)("Comments only"):(0,uu._x)("Open",'Adjective: e.g. "Comments are open"'):o==="open"?s=n?(0,uu.__)("Pings only"):(0,uu.__)("Pings enabled"):s=(0,uu.__)("Closed"),(0,Ks.jsx)(RS.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,uu.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:s})}function P6(){let{isEnabled:e}=(0,kY.useSelect)(n=>{let{isEditorPanelEnabled:i}=n(N);return{isEnabled:i(qnt)}},[]),[t,r]=(0,E6.useState)(null),o=(0,E6.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return e?(0,Ks.jsx)(fo,{supportKeys:["comments","trackbacks"],children:(0,Ks.jsx)(dr,{label:(0,uu.__)("Discussion"),ref:r,children:(0,Ks.jsx)(RS.Dropdown,{popoverProps:o,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,Ks.jsx)(Znt,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,Ks.jsx)(Knt,{onClose:n})})})}):null}var AS=a(j(),1),R6=a(G(),1),A6=a(K(),1),K1e=a(U(),1),Z1e=a(Vt(),1);var k6=a(E(),1);function KE({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){let{excerpt:r,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,A6.useSelect)(d=>{let{getCurrentPostType:f,getEditedPostAttribute:m}=d(N),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,A6.useDispatch)(N),[s,l]=(0,K1e.useState)((0,Z1e.decodeEntities)(r)),c=d=>{i({[n]:d})},u=o?(0,AS.__)("Write a description (optional)"):(0,AS.__)("Write an excerpt (optional)");return(0,k6.jsx)("div",{className:"editor-post-excerpt",children:(0,k6.jsx)(R6.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,AS.__)("Write a description"):(0,k6.jsx)(R6.ExternalLink,{href:(0,AS.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,AS.__)("Learn more about manual excerpts")})})})}var X1e=a(E(),1);function Xnt({children:e}){return(0,X1e.jsx)(fo,{supportKeys:"excerpt",children:e})}var Oy=Xnt;var jp=a(j(),1),du=a(G(),1),QE=a(K(),1),N6=a(U(),1),J1e=a(be(),1),XE=a(ae(),1),$1e=a(Vt(),1);var I6=a(G(),1),RY=a(E(),1),{Fill:Qnt,Slot:Jnt}=(0,I6.createSlotFill)("PluginPostExcerpt"),Q1e=({children:e,className:t})=>(0,RY.jsx)(Qnt,{children:(0,RY.jsx)(I6.PanelRow,{className:t,children:e})});Q1e.Slot=Jnt;var ZE=Q1e;var po=a(E(),1),{getTemplateInfo:$nt}=Y(XE.privateApis),O6="post-excerpt";function eit(){let{isOpened:e,isEnabled:t,postType:r}=(0,QE.useSelect)(s=>{let{isEditorPanelOpened:l,isEditorPanelEnabled:c,getCurrentPostType:u}=s(N);return{isOpened:l(O6),isEnabled:c(O6),postType:u()}},[]),{toggleEditorPanelOpened:o}=(0,QE.useDispatch)(N),n=()=>o(O6);if(!t)return null;let i=["wp_template","wp_template_part","wp_block"].includes(r);return(0,po.jsx)(du.PanelBody,{title:i?(0,jp.__)("Description"):(0,jp.__)("Excerpt"),opened:e,onToggle:n,children:(0,po.jsx)(ZE.Slot,{children:s=>(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(KE,{}),s]})})})}function eCe(){return(0,po.jsx)(Oy,{children:(0,po.jsx)(eit,{})})}function tCe(){return(0,po.jsx)(Oy,{children:(0,po.jsx)(tit,{})})}function tit(){let{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:r,allowEditing:o}=(0,QE.useSelect)(f=>{let{getCurrentPostType:m,getCurrentPostId:h,getEditedPostAttribute:g,isEditorPanelEnabled:v}=f(N),b=m(),_=["wp_template","wp_template_part"].includes(b),y=b==="wp_block",w=_||y,x=g(_?"description":"excerpt"),C=_&&f(XE.store).getEntityRecord("postType",b,h()),I=!x&&_?$nt({template:C,templateTypes:f(XE.store).getCurrentTheme()?.default_template_types})?.description:void 0,k=v(O6)||w;return{excerpt:x??I,shouldRender:k,shouldBeUsedAsDescription:w,allowEditing:k&&(!w||y||C&&C.source===vk.custom&&!C.has_theme_file&&C.is_custom)}},[]),[n,i]=(0,N6.useState)(null),s=r?(0,jp.__)("Description"):(0,jp.__)("Excerpt"),l=(0,N6.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,po.jsx)(du.__experimentalText,{align:"left",numberOfLines:4,truncate:o,children:(0,$1e.decodeEntities)(t)});if(!o)return c;let u=r?(0,jp.__)("Add a description\u2026"):(0,jp.__)("Add an excerpt\u2026"),d=r?(0,jp.__)("Edit description"):(0,jp.__)("Edit excerpt");return(0,po.jsxs)(du.__experimentalVStack,{children:[c,(0,po.jsx)(du.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:l,focusOnMount:!0,ref:i,renderToggle:({onToggle:f})=>(0,po.jsx)(du.Button,{__next40pxDefaultSize:!0,onClick:f,variant:"link",children:c?d:u}),renderContent:({onClose:f})=>(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(J1e.__experimentalInspectorPopoverHeader,{title:s,onClose:f}),(0,po.jsx)(du.__experimentalVStack,{spacing:4,children:(0,po.jsx)(ZE.Slot,{children:m=>(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(KE,{hideLabelFromVision:!0,updateOnBlur:!0}),m]})})})]})})]})}var hl=a(j(),1),IY=a(Vn(),1),ss=a(G(),1),iCe=a(KA(),1),F6=a(U(),1),sCe=a(Te(),1),IS=a(K(),1),Ny=a(be(),1),aCe=a(ae(),1);var rCe=a(K(),1),oCe=a(ae(),1);function M6({children:e,supportKeys:t}){let{postType:r,themeSupports:o}=(0,rCe.useSelect)(i=>({postType:i(N).getEditedPostAttribute("type"),themeSupports:i(oCe.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 AY=a(E(),1);function rit({children:e}){return(0,AY.jsx)(M6,{supportKeys:"post-thumbnails",children:(0,AY.jsx)(fo,{supportKeys:"thumbnail",children:e})})}var zp=rit;var xi=a(E(),1),nCe=["image"],oit=(0,hl.__)("Featured image"),nit=(0,hl.__)("Add a featured image"),iit=(0,xi.jsx)("p",{children:(0,hl.__)("To edit the featured image, you need permission to upload media.")});function sit(e,t){if(!e)return{};let r=(0,IY.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,IY.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return o in(e?.media_details?.sizes??{})?{mediaWidth:e.media_details.sizes[o].width,mediaHeight:e.media_details.sizes[o].height,mediaSourceUrl:e.media_details.sizes[o].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}function ait({currentPostId:e,featuredImageId:t,onUpdateImage:r,onRemoveImage:o,media:n,postType:i,noticeUI:s,noticeOperations:l,isRequestingFeaturedImageMedia:c}){let u=(0,F6.useRef)(!1),[d,f]=(0,F6.useState)(!1),{getSettings:m}=(0,IS.useSelect)(Ny.store),{mediaSourceUrl:h}=sit(n,e);function g(y){m().mediaUpload({allowedTypes:nCe,filesList:y,onFileChange([w]){if((0,iCe.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)(zp,{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)(Ny.MediaUploadCheck,{fallback:iit,children:(0,xi.jsx)(Ny.MediaUpload,{title:i?.labels?.featured_image||oit,onSelect:r,unstableFeaturedImageFlow:!0,allowedTypes:nCe,modalClass:"editor-post-featured-image__media-modal",render:({open:y})=>(0,xi.jsxs)("div",{className:"editor-post-featured-image__container",children:[_?(0,xi.jsx)(ss.Notice,{status:"warning",isDismissible:!1,children:(0,hl.__)("Could not retrieve the featured image data.")}):(0,xi.jsxs)(ss.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)(ss.Spinner,{}),!t&&!d&&(i?.labels?.set_featured_image||nit)]}),!!t&&(0,xi.jsxs)(ss.__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)(ss.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)(ss.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)(ss.DropZone,{onFilesDrop:g})]}),value:t})})]})]})}var lit=(0,IS.withSelect)(e=>{let{getEntityRecord:t,getPostType:r,hasFinishedResolution:o}=e(aCe.store),{getCurrentPostId:n,getEditedPostAttribute:i}=e(N),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"}])}}),cit=(0,IS.withDispatch)((e,{noticeOperations:t},{select:r})=>{let{editPost:o}=e(N);return{onUpdateImage(n){o({featured_media:n.id})},onDropImage(n){r(Ny.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})}}}),JE=(0,sCe.compose)(ss.withNotices,lit,cit,(0,ss.withFilters)("editor.PostFeaturedImage"))(ait);var lCe=a(j(),1),cCe=a(G(),1),D6=a(K(),1),uCe=a(ae(),1);var OS=a(E(),1),OY="featured-image";function L6({withPanelBody:e=!0}){let{postType:t,isEnabled:r,isOpened:o}=(0,D6.useSelect)(i=>{let{getEditedPostAttribute:s,isEditorPanelEnabled:l,isEditorPanelOpened:c}=i(N),{getPostType:u}=i(uCe.store);return{postType:u(s("type")),isEnabled:l(OY),isOpened:c(OY)}},[]),{toggleEditorPanelOpened:n}=(0,D6.useDispatch)(N);return r?e?(0,OS.jsx)(zp,{children:(0,OS.jsx)(cCe.PanelBody,{title:t?.labels?.featured_image??(0,lCe.__)("Featured image"),opened:o,onToggle:()=>n(OY),children:(0,OS.jsx)(JE,{})})}):(0,OS.jsx)(zp,{children:(0,OS.jsx)(JE,{})}):null}var Zs=a(j(),1),B6=a(G(),1),V6=a(K(),1),pCe=a(Te(),1),mCe=a(ae(),1);var dCe=a(K(),1);var fCe=a(E(),1);function NS({children:e}){return(0,dCe.useSelect)(r=>r(N).getEditorSettings().disablePostFormats,[])?null:(0,fCe.jsx)(fo,{supportKeys:"post-formats",children:e})}var My=a(E(),1),$E=[{id:"aside",caption:(0,Zs.__)("Aside")},{id:"audio",caption:(0,Zs.__)("Audio")},{id:"chat",caption:(0,Zs.__)("Chat")},{id:"gallery",caption:(0,Zs.__)("Gallery")},{id:"image",caption:(0,Zs.__)("Image")},{id:"link",caption:(0,Zs.__)("Link")},{id:"quote",caption:(0,Zs.__)("Quote")},{id:"standard",caption:(0,Zs.__)("Standard")},{id:"status",caption:(0,Zs.__)("Status")},{id:"video",caption:(0,Zs.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0});function eP(){let t=`post-format-selector-${(0,pCe.useInstanceId)(eP)}`,{postFormat:r,suggestedFormat:o,supportedFormats:n}=(0,V6.useSelect)(u=>{let{getEditedPostAttribute:d,getSuggestedPostFormat:f}=u(N),m=d("format"),h=u(mCe.store).getThemeSupports();return{postFormat:m??"standard",suggestedFormat:f(),supportedFormats:h.formats}},[]),i=$E.filter(u=>n?.includes(u.id)||r===u.id),s=i.find(u=>u.id===o),{editPost:l}=(0,V6.useDispatch)(N),c=u=>l({format:u});return(0,My.jsx)(NS,{children:(0,My.jsxs)("div",{className:"editor-post-format",children:[(0,My.jsx)(B6.RadioControl,{className:"editor-post-format__options",label:(0,Zs.__)("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,My.jsx)("p",{className:"editor-post-format__suggestion",children:(0,My.jsx)(B6.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>c(s.id),children:(0,Zs.sprintf)((0,Zs.__)("Apply suggested format: %s"),s.caption)})})]})})}var Pg=a(j(),1),NY=a(G(),1),tP=a(K(),1);var MY=a(bo(),1);var hCe=a(K(),1);var gCe=a(E(),1);function uit({children:e}){let{lastRevisionId:t,revisionsCount:r}=(0,hCe.useSelect)(o=>{let{getCurrentPostLastRevisionId:n,getCurrentPostRevisionsCount:i}=o(N);return{lastRevisionId:n(),revisionsCount:i()}},[]);return!t||r<2?null:(0,gCe.jsx)(fo,{supportKeys:"revisions",children:e})}var Fy=uit;var MS=a(E(),1);function vCe(){return(0,tP.useSelect)(e=>{let{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:r,getEditorSettings:o}=e(N);return{lastRevisionId:t(),revisionsCount:r(),disableVisualRevisions:!!o().disableVisualRevisions}},[])}function dit(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=vCe(),{setCurrentRevisionId:o}=Y((0,tP.useDispatch)(N)),n=r?{href:(0,MY.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,MS.jsx)(Fy,{children:(0,MS.jsx)(NY.Button,{__next40pxDefaultSize:!0,...n,className:"editor-post-last-revision__title",icon:_f,iconPosition:"right",text:(0,Pg.sprintf)((0,Pg.__)("Revisions (%s)"),t)})})}function bCe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=vCe(),{setCurrentRevisionId:o}=Y((0,tP.useDispatch)(N)),n=r?{href:(0,MY.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,MS.jsx)(Fy,{children:(0,MS.jsx)(dr,{label:(0,Pg.__)("Revisions"),children:(0,MS.jsx)(NY.Button,{...n,className:"editor-private-post-last-revision__button",text:t,"aria-label":(0,Pg.sprintf)((0,Pg._n)("Open revisions screen: %d revision","Open revisions screen: %d revisions",t),t),variant:"tertiary",size:"compact"})})})}var j6=dit;var yCe=a(G(),1);var z6=a(E(),1);function fit(){return(0,z6.jsx)(Fy,{children:(0,z6.jsx)(yCe.PanelBody,{className:"editor-post-last-revision__panel",children:(0,z6.jsx)(j6,{})})})}var wCe=fit;var ii=a(j(),1),gl=a(G(),1),oP=a(K(),1),LY=a(bo(),1),rP=a(U(),1),FS=a(Vn(),1),TCe=a(Te(),1),BY=a(ae(),1);var fu=a(j(),1),pit="authentication-failed",mit="connection-expired",hit="connection-limit-exceeded",_Ce="document-size-limit-exceeded",DY="protocol-mismatch",SCe="unknown-error",FY={[pit]:{title:(0,fu.__)("Unable to connect"),description:(0,fu.__)("Real-time collaboration couldn't verify your permissions. Check that you have access to edit this post or contact your site administrator.")},[mit]:{title:(0,fu.__)("Connection expired"),description:(0,fu.__)("Your connection to real-time collaboration has timed out. Editing is paused to prevent conflicts with other editors.")},[hit]:{title:(0,fu.__)("Too many editors connected"),description:(0,fu.__)("Real-time collaboration has reached its connection limit. Try again later or contact your site administrator.")},[DY]:{title:(0,fu.__)("Protocol update"),description:(0,fu.__)("Real-time collaboration has been updated. Please refresh the page to continue editing.")},[SCe]:{title:(0,fu.__)("Connection lost"),description:(0,fu.__)("The connection to real-time collaboration was interrupted. Editing is paused to prevent conflicts with other editors.")}};function xCe(e){return e?.code&&FY[e?.code]?FY[e.code]:FY[SCe]}var $r=a(E(),1);function CCe(){let{isCollaborationSupported:e,syncConnectionStatus:t}=(0,oP.useSelect)(r=>{let{isCollaborationSupported:o,getSyncConnectionStatus:n}=Y(r(BY.store));return{isCollaborationSupported:o(),syncConnectionStatus:n()}},[]);return e?null:_Ce===t?.error?.code?(0,$r.jsx)("p",{children:(0,ii.__)("Because this post is too large for real-time collaboration, only one person can edit at a time.")}):(0,$r.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 ECe(){let t="core/editor/post-locked-modal-"+(0,TCe.useInstanceId)(ECe),{autosave:r,updatePostLock:o}=(0,oP.useDispatch)(N),{isCollaborationEnabled:n,isLocked:i,isTakeover:s,user:l,postId:c,postLockUtils:u,activePostLock:d,postType:f,previewLink:m}=(0,oP.useSelect)(y=>{let{isPostLocked:w,isPostLockTakeover:S,getPostLockUser:x,getCurrentPostId:C,getActivePostLock:I,getEditedPostAttribute:k,getEditedPostPreviewLink:R,getEditorSettings:A,isCollaborationEnabledForCurrentPost:P}=Y(y(N)),{getPostType:T}=y(BY.store);return{isCollaborationEnabled:P(),isLocked:w(),isTakeover:S(),user:x(),postId:C(),postLockUtils:A().postLockUtils,activePostLock:I(),postType:T(k("type")),previewLink:R()}},[]);if((0,rP.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,FS.addAction)("heartbeat.send",t,y),(0,FS.addAction)("heartbeat.tick",t,w),window.addEventListener("beforeunload",S),()=>{(0,FS.removeAction)("heartbeat.send",t),(0,FS.removeAction)("heartbeat.tick",t),window.removeEventListener("beforeunload",S)}},[t,i,d,c,u,r,o]),!i||n)return null;let h=l.name,g=l.avatar,v=(0,LY.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:c,action:"edit",_wpnonce:u.nonce}),b=(0,LY.addQueryArgs)("edit.php",{post_type:f?.slug}),_=(0,ii.__)("Exit editor");return(0,$r.jsx)(gl.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,$r.jsxs)(gl.__experimentalHStack,{alignment:"top",spacing:6,children:[!!g&&(0,$r.jsx)("img",{src:g,alt:(0,ii.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,$r.jsxs)("div",{children:[!!s&&(0,$r.jsxs)($r.Fragment,{children:[(0,$r.jsx)("p",{children:(0,rP.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,$r.jsx)("strong",{}),PreviewLink:(0,$r.jsx)(gl.ExternalLink,{href:m,children:(0,ii.__)("preview")})})}),(0,$r.jsx)(CCe,{})]}),!s&&(0,$r.jsxs)($r.Fragment,{children:[(0,$r.jsx)("p",{children:(0,rP.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,$r.jsx)("strong",{}),PreviewLink:(0,$r.jsx)(gl.ExternalLink,{href:m,children:(0,ii.__)("preview")})})}),(0,$r.jsx)(CCe,{}),(0,$r.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,$r.jsxs)(gl.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!s&&(0,$r.jsx)(gl.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:v,children:(0,ii.__)("Take over")}),(0,$r.jsx)(gl.Button,{__next40pxDefaultSize:!0,variant:"primary",href:b,children:_})]})]})]})})}var PCe=(0,gl.withFilters)("editor.PostLockedModal")(ECe);var RCe=a(j(),1),ACe=a(G(),1),U6=a(K(),1);var kCe=a(K(),1);function git({children:e}){let{hasPublishAction:t,isPublished:r}=(0,kCe.useSelect)(o=>{let{isCurrentPostPublished:n,getCurrentPost:i}=o(N);return{hasPublishAction:i()._links?.["wp:action-publish"]??!1,isPublished:n()}},[]);return r||!t?null:e}var H6=git;var VY=a(E(),1);function vit(){let e=(0,U6.useSelect)(o=>o(N).getEditedPostAttribute("status"),[]),{editPost:t}=(0,U6.useDispatch)(N),r=()=>{t({status:e==="pending"?"draft":"pending"})};return(0,VY.jsx)(H6,{children:(0,VY.jsx)(ACe.CheckboxControl,{label:(0,RCe.__)("Pending review"),checked:e==="pending",onChange:r})})}var ICe=vit;var OCe=a(U(),1),Hp=a(G(),1),Dy=a(j(),1),W6=a(K(),1),NCe=a(Vn(),1),MCe=a(ae(),1);var La=a(E(),1);function bit(){let e=(0,OCe.renderToString)((0,La.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,La.jsxs)(Hp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,La.jsx)(Hp.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,La.jsx)(Hp.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,La.jsx)("p",{children:(0,Dy.__)("Generating preview\u2026")})]}));return e+=` |
| 167 |
<style> |
| 168 |
body { |
| 169 |
margin: 0; |
| 170 |
} |
| 171 |
.editor-post-preview-button__interstitial-message { |
| 172 |
display: flex; |
| 173 |
flex-direction: column; |
| 174 |
align-items: center; |
| 175 |
justify-content: center; |
| 176 |
height: 100vh; |
| 177 |
width: 100vw; |
| 178 |
} |
| 179 |
@-webkit-keyframes paint { |
| 180 |
0% { |
| 181 |
stroke-dashoffset: 0; |
| 182 |
} |
| 183 |
} |
| 184 |
@-moz-keyframes paint { |
| 185 |
0% { |
| 186 |
stroke-dashoffset: 0; |
| 187 |
} |
| 188 |
} |
| 189 |
@-o-keyframes paint { |
| 190 |
0% { |
| 191 |
stroke-dashoffset: 0; |
| 192 |
} |
| 193 |
} |
| 194 |
@keyframes paint { |
| 195 |
0% { |
| 196 |
stroke-dashoffset: 0; |
| 197 |
} |
| 198 |
} |
| 199 |
.editor-post-preview-button__interstitial-message svg { |
| 200 |
width: 192px; |
| 201 |
height: 192px; |
| 202 |
stroke: #555d66; |
| 203 |
stroke-width: 0.75; |
| 204 |
} |
| 205 |
.editor-post-preview-button__interstitial-message svg .outer, |
| 206 |
.editor-post-preview-button__interstitial-message svg .inner { |
| 207 |
stroke-dasharray: 280; |
| 208 |
stroke-dashoffset: 280; |
| 209 |
-webkit-animation: paint 1.5s ease infinite alternate; |
| 210 |
-moz-animation: paint 1.5s ease infinite alternate; |
| 211 |
-o-animation: paint 1.5s ease infinite alternate; |
| 212 |
animation: paint 1.5s ease infinite alternate; |
| 213 |
} |
| 214 |
p { |
| 215 |
text-align: center; |
| 216 |
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; |
| 217 |
} |
| 218 |
</style> |
| 219 |
`,e=(0,NCe.applyFilters)("editor.PostPreview.interstitialMarkup",e),e}function yit(e,t){e.write(t),e.title=(0,Dy.__)("Generating preview\u2026"),e.close()}async function wit(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 _it(e){let t=await wit(e);t&&yit(t,bit())}function FCe({forceIsAutosaveable:e,onPreview:t}){let{postId:r,currentPostLink:o,previewLink:n,isSaveable:i,isViewable:s}=(0,W6.useSelect)(f=>{let m=f(N),v=f(MCe.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,W6.useDispatch)(N);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 _it(m);let h=await l({forceIsAutosaveable:e});m.location=h,t?.()}}}function DCe({forceIsAutosaveable:e,onPreview:t}){let r=FCe({forceIsAutosaveable:e,onPreview:t});return r?(0,La.jsx)(Hp.MenuItem,{icon:ms,...r,children:(0,Dy.__)("Preview in new tab")}):null}function DS({className:e,textContent:t,forceIsAutosaveable:r,role:o,onPreview:n}){let i=FCe({forceIsAutosaveable:r,onPreview:n});return i?(0,La.jsx)(Hp.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",role:o,size:"compact",accessibleWhenDisabled:!0,...i,children:t||(0,La.jsxs)(La.Fragment,{children:[(0,Dy._x)("Preview","imperative verb"),(0,La.jsx)(Gt,{render:(0,La.jsx)("span",{}),children:(0,Dy.__)("(opens in a new tab)")})]})}):null}var jCe=a(G(),1),Y6=a(K(),1);var kg=a(j(),1),LCe=a(K(),1),BCe=a(Te(),1);function G6(){let e=(0,BCe.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:r,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:s,hasNonPostEntityChanges:l,postStatusHasChanged:c,postStatus:u,isPostSavingLocked:d}=(0,LCe.useSelect)(f=>{let{isCurrentPostPublished:m,isEditedPostBeingScheduled:h,isSavingPost:g,isPublishingPost:v,getCurrentPost:b,isAutosavingPost:_,getPostEdits:y,getEditedPostAttribute:w}=f(N);return{isPublished:m(),isBeingScheduled:h(),isSaving:g(),isPublishing:v(),hasPublishAction:b()._links?.["wp:action-publish"]??!1,isAutosaving:_(),hasNonPostEntityChanges:f(N).hasNonPostEntityChanges(),isPostSavingLocked:f(N).isPostSavingLocked(),postStatusHasChanged:!!y()?.status,postStatus:w("status")}},[]);return n?(0,kg.__)("Publishing\u2026"):(t||r)&&o&&!s?(0,kg.__)("Saving\u2026"):i?l&&!d||t||c&&!["future","publish"].includes(u)||!c&&u==="future"?(0,kg.__)("Save"):r?(0,kg.__)("Schedule"):(0,kg.__)("Publish"):e?(0,kg.__)("Publish"):(0,kg.__)("Submit for Review")}var jY=a(E(),1),VCe=()=>{};function Sit({forceIsDirty:e,isOpen:t,isToggle:r,onSubmit:o=VCe,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,Y6.useSelect)(z=>{let D=z(N);return{isSaving:D.isSavingPost(),isAutoSaving:D.isAutosavingPost(),isBeingScheduled:D.isEditedPostBeingScheduled(),visibility:D.getEditedPostVisibility(),isSaveable:D.isEditedPostSaveable(),isPostSavingLocked:D.isPostSavingLocked(),isPublishable:D.isEditedPostPublishable(),isPublished:D.isCurrentPostPublished(),hasPublishAction:!!D.getCurrentPost()?._links?.["wp:action-publish"],postType:D.getCurrentPostType(),postId:D.getCurrentPostId(),postStatus:D.getEditedPostAttribute("status"),postStatusHasChanged:D.getPostEdits()?.status,hasNonPostEntityChanges:D.hasNonPostEntityChanges(),isSavingNonPostEntityChanges:D.isSavingNonPostEntityChanges()}},[]),{editPost:x,savePost:C}=(0,Y6.useDispatch)(N),I=z=>{x({status:z},{undoIgnore:!0}),C()},k=z=>(...D)=>{if(v&&i){let O=L=>{L&&L.some(W=>W.kind==="postType"&&W.name===w&&W.key===S)&&z(...D)};return i(()=>O),VCe}return z(...D)},R=c||b||(m||!f||!u&&!e)&&!v,A=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(),I(P))},M=()=>{A||n()},B={"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":A,"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},V=r?F:B;return(0,jY.jsx)(jCe.Button,{...V,className:`${V.className} editor-post-publish-button__button`,size:"compact",children:(0,jY.jsx)(G6,{})})}var LS=Sit;var dF=a(j(),1),GS=a(U(),1),qy=a(G(),1),fF=a(K(),1),Og=a(Te(),1);var VTe=a(ae(),1);var pu=a(j(),1),uP=a(G(),1),PTe=a(K(),1);var kTe=a(bo(),1),RTe=a(ae(),1),ATe=a(Vt(),1);var BS=a(j(),1),zCe=a(U(),1),VS=a(G(),1),HCe=a(Te(),1),K6=a(K(),1),UCe=a(be(),1);var Ly=a(j(),1),q6=[{label:(0,Ly.__)("Public"),value:"public",description:(0,Ly.__)("Visible to everyone.")},{label:(0,Ly.__)("Private"),value:"private",description:(0,Ly.__)("Only visible to site admins and editors.")},{label:(0,Ly.__)("Password protected"),value:"password",description:(0,Ly.__)("Only visible to those who know the password.")}];var By=a(E(),1);function nP({onClose:e}){let t=(0,HCe.useInstanceId)(nP),{status:r,visibility:o,password:n}=(0,K6.useSelect)(d=>({status:d(N).getEditedPostAttribute("status"),visibility:d(N).getEditedPostVisibility(),password:d(N).getEditedPostAttribute("password")})),{editPost:i}=(0,K6.useDispatch)(N),[s,l]=(0,zCe.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,By.jsxs)("div",{className:"editor-post-visibility",children:[(0,By.jsx)(UCe.__experimentalInspectorPopoverHeader,{title:(0,BS.__)("Visibility"),help:(0,BS.__)("Control how this post is viewed."),onClose:e}),(0,By.jsxs)(VS.__experimentalVStack,{spacing:4,children:[(0,By.jsx)(VS.RadioControl,{label:(0,BS.__)("Visibility"),hideLabelFromVision:!0,options:q6,selected:s?"password":o,onChange:c}),s&&(0,By.jsx)(VS.TextControl,{label:(0,BS.__)("Password"),onChange:u,value:n,placeholder:(0,BS.__)("Use a secure password"),type:"text",id:`editor-post-visibility__password-input-${t}`,maxLength:255})]})]})}var WCe=a(K(),1);function Z6(){return zY()}function zY(){let e=(0,WCe.useSelect)(t=>t(N).getEditedPostVisibility(),[]);return q6.find(t=>t.value===e)?.label}var xit=Math.pow(10,8)*24*60*60*1e3,cpr=-xit;var HY=6e4,UY=36e5;var Cit=3600;var GCe=Cit*24,upr=GCe*7,Tit=GCe*365.2425,Eit=Tit/12,dpr=Eit*3,WY=Symbol.for("constructDateFrom");function X6(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&WY in e?e[WY](t):e instanceof Date?new e.constructor(t):new Date(t)}function Vy(e,t){return X6(t||e,e)}function YCe(e,t){let r=Vy(e,t?.in),o=r.getMonth();return r.setFullYear(r.getFullYear(),o+1,0),r.setHours(23,59,59,999),r}function GY(e,t){let r=Vy(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function qCe(e,t){let r=()=>X6(t?.in,NaN),o=t?.additionalDigits??2,n=Ait(e),i;if(n.date){let u=Iit(n.date,o);i=Oit(u.restDateString,u.year)}if(!i||isNaN(+i))return r();let s=+i,l=0,c;if(n.time&&(l=Nit(n.time),isNaN(l)))return r();if(n.timezone){if(c=Mit(n.timezone),isNaN(c))return r()}else{let u=new Date(s+l),d=Vy(0,t?.in);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return Vy(s+l+c,t?.in)}var Q6={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Pit=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,kit=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Rit=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Ait(e){let t={},r=e.split(Q6.dateTimeDelimiter),o;if(r.length>2)return t;if(/:/.test(r[0])?o=r[0]:(t.date=r[0],o=r[1],Q6.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Q6.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length))),o){let n=Q6.timezone.exec(o);n?(t.time=o.replace(n[1],""),t.timezone=n[1]):t.time=o}return t}function Iit(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 Oit(e,t){if(t===null)return new Date(NaN);let r=e.match(Pit);if(!r)return new Date(NaN);let o=!!r[4],n=iP(r[1]),i=iP(r[2])-1,s=iP(r[3]),l=iP(r[4]),c=iP(r[5])-1;if(o)return Vit(t,l,c)?Fit(t,l,c):new Date(NaN);{let u=new Date(0);return!Lit(t,i,s)||!Bit(t,n)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(n,s)),u)}}function iP(e){return e?parseInt(e):1}function Nit(e){let t=e.match(kit);if(!t)return NaN;let r=YY(t[1]),o=YY(t[2]),n=YY(t[3]);return jit(r,o,n)?r*UY+o*HY+n*1e3:NaN}function YY(e){return e&&parseFloat(e.replace(",","."))||0}function Mit(e){if(e==="Z")return 0;let t=e.match(Rit);if(!t)return 0;let r=t[1]==="+"?-1:1,o=parseInt(t[2]),n=t[3]&&parseInt(t[3])||0;return zit(o,n)?r*(o*UY+n*HY):NaN}function Fit(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 Dit=[31,null,31,30,31,30,31,31,30,31,30,31];function KCe(e){return e%400===0||e%4===0&&e%100!==0}function Lit(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(Dit[t]||(KCe(e)?29:28))}function Bit(e,t){return t>=1&&t<=(KCe(e)?366:365)}function Vit(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function jit(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function zit(e,t){return t>=0&&t<=59}var ZCe=a(an(),1),XCe=a(j(),1),sP=a(K(),1),QCe=a(be(),1),J6=a(U(),1),JCe=a(ae(),1);var qY=a(E(),1),{PrivatePublishDateTimePicker:Hit}=Y(QCe.privateApis);function jS(e){return(0,qY.jsx)(KY,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function KY({onClose:e,showPopoverHeaderActions:t,isCompact:r}){let{postDate:o,postType:n}=(0,sP.useSelect)(h=>({postDate:h(N).getEditedPostAttribute("date"),postType:h(N).getCurrentPostType()}),[]),{editPost:i}=(0,sP.useDispatch)(N),s=h=>i({date:h}),[l,c]=(0,J6.useState)(GY(new Date(o))),u=(0,sP.useSelect)(h=>h(JCe.store).getEntityRecords("postType",n,{status:"publish,future",after:GY(l).toISOString(),before:YCe(l).toISOString(),exclude:[h(N).getCurrentPostId()],per_page:100,_fields:"id,date"}),[l,n]),d=(0,J6.useMemo)(()=>(u||[]).map(({date:h})=>({date:new Date(h)})),[u]),f=(0,ZCe.getSettings)(),m=/a(?!\\)/i.test(f.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,qY.jsx)(Hit,{currentDate:o,onChange:s,is12Hour:m,dateOrder:(0,XCe._x)("dmy","date order"),events:d,onMonthPreviewed:h=>c(qCe(h)),onClose:e,isCompact:r,showPopoverHeaderActions:t})}var Xs=a(j(),1),lc=a(an(),1),eTe=a(K(),1);function zS(e){return HS(e)}function HS({full:e=!1}={}){let{date:t,isFloating:r}=(0,eTe.useSelect)(o=>({date:o(N).getEditedPostAttribute("date"),isFloating:o(N).isEditedPostDateFloating()}),[]);return e?tTe(t):Uit(t,{isFloating:r})}function tTe(e){let t=(0,lc.getDate)(e),r=Wit(),o=(0,lc.dateI18n)((0,Xs._x)("F j, Y g:i\xA0a","post schedule full date format"),t);return(0,Xs.isRTL)()?`${r} ${o}`:`${o} ${r}`}function Uit(e,{isFloating:t=!1,now:r=new Date}={}){if(!e||t)return(0,Xs.__)("Immediately");if(!Git(r))return tTe(e);let o=(0,lc.getDate)(e);if($Ce(o,r))return(0,Xs.sprintf)((0,Xs.__)("Today at %s"),(0,lc.dateI18n)((0,Xs._x)("g:i\xA0a","post schedule time format"),o));let n=new Date(r);return n.setDate(n.getDate()+1),$Ce(o,n)?(0,Xs.sprintf)((0,Xs.__)("Tomorrow at %s"),(0,lc.dateI18n)((0,Xs._x)("g:i\xA0a","post schedule time format"),o)):o.getFullYear()===r.getFullYear()?(0,lc.dateI18n)((0,Xs._x)("F j g:i\xA0a","post schedule date format without year"),o):(0,lc.dateI18n)((0,Xs._x)("F j, Y g:i\xA0a","post schedule full date format"),o)}function Wit(){let{timezone:e}=(0,lc.getSettings)();return e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${e.offset<0?"":"+"}${e.offsetFormatted}`}function Git(e){let{timezone:t}=(0,lc.getSettings)(),r=Number(t.offset),o=-1*(e.getTimezoneOffset()/60);return r===o}function $Ce(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}var Uy=a(j(),1),dTe=a(U(),1),JY=a(K(),1),fTe=a(G(),1),oF=a(ae(),1);var Ci=a(j(),1),Hy=a(U(),1),tF=a(G(),1);var zy=a(K(),1),eF=a(ae(),1),sTe=a(Te(),1),aTe=a(na(),1),lTe=a(It(),1);var $6=a(G(),1),rTe=a(K(),1),oTe=a(ae(),1);var jy=a(E(),1),Yit=3,qit={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function nTe({onSelect:e,taxonomy:t}){let{_terms:r,showTerms:o}=(0,rTe.useSelect)(i=>{let s=i(oTe.store).getEntityRecords("taxonomy",t.slug,qit);return{_terms:s,showTerms:s?.length>=Yit}},[t.slug]);if(!o)return null;let n=uxe(r);return(0,jy.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,jy.jsx)($6.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,jy.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:n.map(i=>(0,jy.jsx)("li",{children:(0,jy.jsx)($6.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(i),children:i.name})},i.id))})]})}var aP=a(E(),1),ZY=[],cTe=100,iTe={per_page:cTe,_fields:"id,name",context:"view"},uTe=(e,t)=>yS(e).toLowerCase()===yS(t).toLowerCase(),XY=(e,t)=>e.map(r=>t.find(o=>uTe(o.name,r))?.id).filter(r=>r!==void 0);function QY({slug:e}){let[t,r]=(0,Hy.useState)([]),[o,n]=(0,Hy.useState)(""),i=(0,sTe.useDebounce)(n,500),{terms:s,termIds:l,taxonomy:c,hasAssignAction:u,hasCreateAction:d,hasResolvedTerms:f}=(0,zy.useSelect)(A=>{let{getCurrentPost:P,getEditedPostAttribute:T}=A(N),{getEntityRecords:M,getEntityRecord:B,hasFinishedResolution:F}=A(eF.store),V=P(),z=B("root","taxonomy",e),D=z?T(z.rest_base):ZY,O={...iTe,include:D?.length?[...D].sort((L,W)=>L-W).join(","):void 0,per_page:-1};return{hasCreateAction:z?V._links?.["wp:action-create-"+z.rest_base]??!1:!1,hasAssignAction:z?V._links?.["wp:action-assign-"+z.rest_base]??!1:!1,taxonomy:z,termIds:D,terms:D?.length?M("taxonomy",e,O):ZY,hasResolvedTerms:F("getEntityRecords",["taxonomy",e,O])}},[e]),{searchResults:m}=(0,zy.useSelect)(A=>{let{getEntityRecords:P}=A(eF.store);return{searchResults:o?P("taxonomy",e,{...iTe,search:o}):ZY}},[o,e]);(0,Hy.useEffect)(()=>{if(f){let A=(s??[]).map(P=>yS(P.name));r(A)}},[s,f]);let h=(0,Hy.useMemo)(()=>(m??[]).map(A=>yS(A.name)),[m]),{editPost:g}=(0,zy.useDispatch)(N),{saveEntityRecord:v}=(0,zy.useDispatch)(eF.store),{createErrorNotice:b}=(0,zy.useDispatch)(lTe.store);if(!u)return null;async function _(A){try{let P=await v("taxonomy",e,A,{throwOnError:!0});return uY(P)}catch(P){if(P.code!=="term_exists")throw P;return{id:P.data.term_id,name:A.name}}}function y(A){g({[c.rest_base]:A})}function w(A){let P=[...s??[],...m??[]],T=A.reduce((B,F)=>(B.some(V=>V.toLowerCase()===F.toLowerCase())||B.push(F),B),[]),M=T.filter(B=>!P.find(F=>uTe(F.name,B)));if(r(T),n(""),M.length===0){y(XY(T,P));return}d&&Promise.all(M.map(B=>_({name:B}))).then(B=>{let F=P.concat(B);y(XY(T,F))}).catch(B=>{b(B.message,{type:"snackbar"}),y(XY(T,P))})}function S(A){if(l.includes(A.id))return;let P=[...l,A.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,aTe.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")),I=(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,aP.jsxs)(se,{direction:"column",gap:"lg",children:[(0,aP.jsx)(tF.FormTokenField,{value:t,suggestions:h,onChange:w,onInputChange:i,maxSuggestions:cTe,label:x,messages:{added:I,removed:k,remove:R}}),(0,aP.jsx)(nTe,{taxonomy:c,onSelect:S})]})}var rF=(0,tF.withFilters)("editor.PostTaxonomyType")(QY);var Wy=a(E(),1),Kit=()=>{let e=(0,JY.useSelect)(n=>n(oF.store).getTaxonomy("post_tag")?.labels,[]),t=e?.add_new_item??(0,Uy.__)("Add tag"),r=e?.name??(0,Uy.__)("Tags"),o=[(0,Uy.__)("Suggestion:"),(0,Wy.jsx)("span",{className:"editor-post-publish-panel__link",children:t},"label")];return(0,Wy.jsxs)(fTe.PanelBody,{initialOpen:!1,title:o,children:[(0,Wy.jsx)("p",{children:(0,Uy.sprintf)((0,Uy.__)("%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."),r)}),(0,Wy.jsx)(rF,{slug:"post_tag"})]})},Zit=()=>{let{postHasTags:e,siteHasTags:t,isPostTypeSupported:r}=(0,JY.useSelect)(n=>{let i=n(N).getCurrentPostType(),s=n(oF.store).getEntityRecord("root","taxonomy","post_tag"),l=s?.types?.includes(i),c=s!==void 0,u=s&&n(N).getEditedPostAttribute(s.rest_base),d=l?!!n(oF.store).getEntityRecords("taxonomy","post_tag",{per_page:1})?.length:!1;return{postHasTags:!!u?.length,siteHasTags:d,isPostTypeSupported:c&&l}},[]),[o]=(0,dTe.useState)(e);return!r||!t||o?null:(0,Wy.jsx)(Kit,{})},pTe=Zit;var nF=a(G(),1),iF=a(K(),1),Gy=a(j(),1),mTe=a(ae(),1);var Rg=a(E(),1),Xit=(e,t)=>$E.filter(o=>e?.includes(o.id)).find(o=>o.id===t),Qit=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:r})=>(0,Rg.jsx)(nF.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(e),children:t});function hTe(){let{currentPostFormat:e,suggestion:t}=(0,iF.useSelect)(i=>{let{getEditedPostAttribute:s,getSuggestedPostFormat:l}=i(N),c=i(mTe.store).getThemeSupports().formats??[];return{currentPostFormat:s("format"),suggestion:Xit(c,l())}},[]),{editPost:r}=(0,iF.useDispatch)(N),o=i=>r({format:i}),n=[(0,Gy.__)("Suggestion:"),(0,Rg.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Gy.__)("Use a post format")},"label")];return!t||t.id===e?null:(0,Rg.jsxs)(nF.PanelBody,{initialOpen:!1,title:n,children:[(0,Rg.jsx)("p",{children:(0,Gy.__)("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,Rg.jsx)("p",{children:(0,Rg.jsx)(Qit,{onUpdatePostFormat:o,suggestedPostFormat:t.id,suggestionText:(0,Gy.sprintf)((0,Gy.__)('Apply the "%1$s" format.'),t.caption)})})]})}var aF=a(j(),1),STe=a(K(),1),xTe=a(G(),1),tq=a(ae(),1),lF=a(U(),1);var ai=a(j(),1),Up=a(U(),1),yTe=a(It(),1),mo=a(G(),1),US=a(K(),1),wTe=a(Te(),1),lP=a(ae(),1),$Y=a(na(),1),_Te=a(Vt(),1);var si=a(E(),1),{normalizeTextString:gTe}=Y(mo.privateApis),{RECEIVE_INTERMEDIATE_RESULTS:Jit}=Y(lP.privateApis),vTe={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view",[Jit]:!0},$it=8,bTe=[];function est(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 tst(e,t,r){return e.find(o=>(!o.parent&&!t||parseInt(o.parent)===parseInt(t))&&o.name.toLowerCase()===r.toLowerCase())}function rst(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)),gTe(o.name).indexOf(gTe(e))!==-1||o.children.length>0?o:!1};return t}function eq({slug:e}){let[t,r]=(0,Up.useState)(!1),[o,n]=(0,Up.useState)(""),[i,s]=(0,Up.useState)(""),[l,c]=(0,Up.useState)(!1),[u,d]=(0,Up.useState)(""),[f,m]=(0,Up.useState)([]),h=(0,wTe.useDebounce)($Y.speak,500),{hasCreateAction:g,hasAssignAction:v,terms:b,loading:_,availableTerms:y,taxonomy:w}=(0,US.useSelect)(te=>{let{getCurrentPost:de,getEditedPostAttribute:pe}=te(N),{getEntityRecord:$,getEntityRecords:ee,isResolving:fe}=te(lP.store),ve=$("root","taxonomy",e),we=de();return{hasCreateAction:ve?!!we._links?.["wp:action-create-"+ve.rest_base]:!1,hasAssignAction:ve?!!we._links?.["wp:action-assign-"+ve.rest_base]:!1,terms:ve?pe(ve.rest_base):bTe,loading:fe("getEntityRecords",["taxonomy",e,vTe]),availableTerms:ee("taxonomy",e,vTe)||bTe,taxonomy:ve}},[e]),{editPost:S}=(0,US.useDispatch)(N),{saveEntityRecord:x}=(0,US.useDispatch)(lP.store),C=(0,Up.useMemo)(()=>est(Y3(y),b),[y]),{createErrorNotice:I}=(0,US.useDispatch)(yTe.store);if(!v)return null;let k=te=>x("taxonomy",e,te,{throwOnError:!0}),R=te=>{S({[w.rest_base]:te})},A=te=>{let pe=b.includes(te)?b.filter($=>$!==te):[...b,te];R(pe)},P=te=>{n(te)},T=te=>{s(te)},M=()=>{c(!l)},B=async te=>{if(te.preventDefault(),o===""||t)return;let de=tst(y,i,o);if(de){b.some(fe=>fe===de.id)||R([...b,de.id]),n(""),s("");return}r(!0);let pe;try{pe=await k({name:o,parent:i||void 0})}catch(fe){I(fe.message,{type:"snackbar"});return}let $=e==="category"?(0,ai.__)("Category"):(0,ai.__)("Term"),ee=(0,ai.sprintf)((0,ai._x)("%s added","term"),w?.labels?.singular_name??$);(0,$Y.speak)(ee,"assertive"),r(!1),n(""),s(""),R([...b,pe.id])},F=te=>{let de=C.map(rst(te)).filter(fe=>fe),pe=fe=>{let ve=0;for(let we=0;we<fe.length;we++)ve++,fe[we].children!==void 0&&(ve+=pe(fe[we].children));return ve};d(te),m(de);let $=pe(de),ee=(0,ai.sprintf)((0,ai._n)("%d result found.","%d results found.",$),$);h(ee,"assertive")},V=te=>te.map(de=>(0,si.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,si.jsx)(mo.CheckboxControl,{checked:b.indexOf(de.id)!==-1,onChange:()=>{let pe=parseInt(de.id,10);A(pe)},label:(0,_Te.decodeEntities)(de.name)}),!!de.children.length&&(0,si.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:V(de.children)})]},de.id)),z=(te,de,pe)=>w?.labels?.[te]??(e==="category"?de:pe),D=z("add_new_item",(0,ai.__)("Add Category"),(0,ai.__)("Add Term")),O=z("new_item_name",(0,ai.__)("Add Category"),(0,ai.__)("Add Term")),L=z("parent_item",(0,ai.__)("Parent Category"),(0,ai.__)("Parent Term")),W=`\u2014 ${L} \u2014`,q=D,Z=w?.labels?.search_items??(0,ai.__)("Search Terms"),Q=w?.name??(0,ai.__)("Terms"),ue=y.length>=$it;return(0,si.jsxs)(mo.Flex,{direction:"column",gap:"4",children:[ue&&!_&&(0,si.jsx)(mo.SearchControl,{label:Z,placeholder:Z,value:u,onChange:F}),_&&(0,si.jsx)(mo.Flex,{justify:"center",style:{height:"40px"},children:(0,si.jsx)(mo.Spinner,{})}),(0,si.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":Q,children:V(u!==""?f:C)}),!_&&g&&(0,si.jsx)(mo.FlexItem,{children:(0,si.jsx)(mo.Button,{__next40pxDefaultSize:!0,onClick:M,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":l,variant:"link",children:D})}),l&&(0,si.jsx)("form",{onSubmit:B,children:(0,si.jsxs)(mo.Flex,{direction:"column",gap:"4",children:[(0,si.jsx)(mo.TextControl,{className:"editor-post-taxonomies__hierarchical-terms-input",label:O,value:o,onChange:P,required:!0}),!!y.length&&(0,si.jsx)(mo.TreeSelect,{label:L,noOptionLabel:W,onChange:T,selectedId:i,tree:C}),(0,si.jsx)(mo.FlexItem,{children:(0,si.jsx)(mo.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:q})})]})})]})}var sF=(0,mo.withFilters)("editor.PostTaxonomyType")(eq);var WS=a(E(),1);function ost(){let{hasNoCategory:e,hasSiteCategories:t}=(0,STe.useSelect)(i=>{let s=i(N).getCurrentPostType(),{canUser:l,getEntityRecord:c}=i(tq.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(N).getEditedPostAttribute(u.rest_base),g=m?!!i(tq.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,lF.useState)(!1);if((0,lF.useEffect)(()=>{e&&o(!0)},[e]),!r||!t)return null;let n=[(0,aF.__)("Suggestion:"),(0,WS.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,aF.__)("Assign a category")},"label")];return(0,WS.jsxs)(xTe.PanelBody,{initialOpen:!1,title:n,children:[(0,WS.jsx)("p",{children:(0,aF.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,WS.jsx)(sF,{slug:"category"})]})}var CTe=ost;var Zd=a(G(),1),cP=a(K(),1),Ag=a(j(),1),Yy=a(be(),1),cF=a(U(),1);var cc=a(E(),1),{mediaSideloadFromUrlKey:nst}=Y(Yy.privateApis);function TTe(e){let t=[];return e.forEach(r=>{t.push(r),t.push(...TTe(r.innerBlocks))}),t}function ist(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 rq(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 sst({clientId:e,alt:t,url:r}){let{selectBlock:o}=(0,cP.useDispatch)(Yy.store);return(0,cc.jsx)(Zd.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,Ag.__)("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 ETe(){let[e,t]=(0,cF.useState)(!1),[r,o]=(0,cF.useState)(!1),[n,i]=(0,cF.useState)(!1),{editorBlocks:s,mediaSideloadFromUrl:l}=(0,cP.useSelect)(h=>({editorBlocks:h(Yy.store).getBlocks(),mediaSideloadFromUrl:h(Yy.store).getSettings()[nst]}),[]),c=TTe(s).filter(h=>ist(h)),{updateBlockAttributes:u}=(0,cP.useDispatch)(Yy.store);if(!l||!c.length)return null;let d=[(0,Ag.__)("Suggestion:"),(0,cc.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Ag.__)("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}=rq(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}=rq(v);return g[b].then(_=>f(v,_)).then(()=>o(!0)).catch(()=>i(!0))})).finally(()=>{t(!1)})}return(0,cc.jsxs)(Zd.PanelBody,{initialOpen:!0,title:d,children:[(0,cc.jsx)("p",{children:(0,Ag.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,cc.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,cc.jsx)(Zd.__unstableAnimatePresence,{onExitComplete:()=>o(!1),children:c.map(h=>{let{url:g,alt:v}=rq(h);return(0,cc.jsx)(sst,{clientId:h.clientId,url:g,alt:v},h.clientId)})}),e||r?(0,cc.jsx)(Zd.Spinner,{}):(0,cc.jsx)(Zd.Button,{size:"compact",variant:"primary",onClick:m,children:(0,Ag._x)("Upload","verb")})]}),n&&(0,cc.jsx)("p",{children:(0,Ag.__)("Upload failed, try again.")})]})}var Nr=a(E(),1);function ast({children:e}){let{isBeingScheduled:t,isRequestingSiteIcon:r,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:s}=(0,PTe.useSelect)(d=>{let{getCurrentPost:f,isEditedPostBeingScheduled:m}=d(N),{getEntityRecord:h,isResolving:g}=d(RTe.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,kTe.filterURLForDisplay)(v.home)}},[]),l=(0,Nr.jsx)(uP.Icon,{className:"components-site-icon",size:"36px",icon:P8});n&&(l=(0,Nr.jsx)("img",{alt:(0,pu.__)("Site Icon"),className:"components-site-icon",src:n})),r&&(l=null);let c,u;return o?t?(c=(0,pu.__)("Are you ready to schedule?"),u=(0,pu.__)("Your work will be published at the specified date and time.")):(c=(0,pu.__)("Are you ready to publish?"),u=(0,pu.__)("Double-check your settings before publishing.")):(c=(0,pu.__)("Are you ready to submit for review?"),u=(0,pu.__)("Your work will be reviewed and then approved.")),(0,Nr.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,Nr.jsx)("div",{children:(0,Nr.jsx)("strong",{children:c})}),(0,Nr.jsx)("p",{children:u}),(0,Nr.jsxs)("div",{className:"components-site-card",children:[l,(0,Nr.jsxs)("div",{className:"components-site-info",children:[(0,Nr.jsx)("span",{className:"components-site-name",children:(0,ATe.decodeEntities)(i)||(0,pu.__)("(Untitled)")}),(0,Nr.jsx)("span",{className:"components-site-home",children:s})]})]}),(0,Nr.jsx)(ETe,{}),o&&(0,Nr.jsxs)(Nr.Fragment,{children:[(0,Nr.jsx)(uP.PanelBody,{initialOpen:!1,title:[(0,pu.__)("Visibility:"),(0,Nr.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Nr.jsx)(Z6,{})},"label")],children:(0,Nr.jsx)(nP,{})}),(0,Nr.jsx)(uP.PanelBody,{initialOpen:!1,title:[(0,pu.__)("Publish:"),(0,Nr.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Nr.jsx)(zS,{})},"label")],children:(0,Nr.jsx)(jS,{})})]}),(0,Nr.jsx)(hTe,{}),(0,Nr.jsx)(pTe,{}),(0,Nr.jsx)(CTe,{}),e]})}var ITe=ast;var hu=a(G(),1),mu=a(j(),1),Ig=a(U(),1),MTe=a(K(),1),uF=a(bo(),1),FTe=a(Vt(),1),DTe=a(Te(),1),LTe=a(ae(),1);var qo=a(E(),1),OTe="%postname%",NTe="%pagename%",lst=e=>{let{slug:t}=e;return e.permalink_template.includes(OTe)?e.permalink_template.replace(OTe,t):e.permalink_template.includes(NTe)?e.permalink_template.replace(NTe,t):e.permalink_template};function cst({text:e}){let[t,r]=(0,Ig.useState)(!1),o=(0,Ig.useRef)(),n=(0,DTe.useCopyToClipboard)(e,()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(!1)},4e3)});return(0,Ig.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,qo.jsx)(hu.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:n,children:t?(0,mu.__)("Copied!"):(0,mu.__)("Copy")})}function BTe({focusOnMount:e,children:t}){let{post:r,postType:o,isScheduled:n}=(0,MTe.useSelect)(m=>{let{getEditedPostAttribute:h,getCurrentPost:g,isCurrentPostScheduled:v}=m(N),{getPostType:b}=m(LTe.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"?lst(r):r.link,u=(0,uF.addQueryArgs)("post-new.php",{post_type:r.type}),d=(0,Ig.useCallback)(m=>{e&&m&&m.focus()},[e]),f=n?(0,qo.jsxs)(qo.Fragment,{children:[(0,mu.__)("is now scheduled. It will go live on")," ",(0,qo.jsx)(zS,{}),"."]}):(0,mu.__)("is now live.");return(0,qo.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,qo.jsxs)(hu.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,qo.jsx)(hu.ExternalLink,{ref:d,href:c,children:(0,FTe.decodeEntities)(r.title)||(0,mu.__)("(no title)")})," ",f]}),(0,qo.jsxs)(hu.PanelBody,{children:[(0,qo.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,qo.jsx)("strong",{children:(0,mu.__)("What\u2019s next?")})}),(0,qo.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,qo.jsx)(hu.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,mu.sprintf)((0,mu.__)("%s address"),i),value:(0,uF.safeDecodeURIComponent)(c),onFocus:m=>m.target.select()}),(0,qo.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,qo.jsx)(cst,{text:c})})]}),(0,qo.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!n&&(0,qo.jsxs)(hu.Button,{variant:"primary",href:c,__next40pxDefaultSize:!0,icon:ms,iconPosition:"right",target:"_blank",children:[s,(0,qo.jsx)(Gt,{render:(0,qo.jsx)("span",{}),children:(0,mu.__)("(opens in a new tab)")})]}),(0,qo.jsx)(hu.Button,{variant:n?"primary":"secondary",__next40pxDefaultSize:!0,href:u,children:l})]})]}),t]})}var wn=a(E(),1);function pF({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,fF.useSelect)(A=>{let{getPostType:P}=A(VTe.store),{getCurrentPost:T,getCurrentPostId:M,getEditedPostAttribute:B,isCurrentPostPublished:F,isCurrentPostScheduled:V,isEditedPostBeingScheduled:z,isEditedPostDirty:D,isAutosavingPost:O,isSavingPost:L,isSavingNonPostEntityChanges:W,isPublishSidebarEnabled:q}=A(N),Z=P(B("type"));return{hasPublishAction:T()._links?.["wp:action-publish"]??!1,isPostTypeViewable:Z?.viewable,isBeingScheduled:z(),isDirty:D(),isPublished:F(),isPublishSidebarEnabled:q(),isSaving:L()&&!O(),isSavingNonPostEntityChanges:W(),isScheduled:V(),currentPostId:M()}},[]),{disablePublishSidebar:v,enablePublishSidebar:b}=(0,fF.useDispatch)(N),_=(0,GS.useRef)(null),y=(0,Og.useMergeRefs)([(0,Og.useFocusReturn)(),(0,Og.useConstrainedTabbing)()]);(0,GS.useEffect)(()=>{_.current?.focus()},[]);let w=(0,GS.useRef)(g),S=(0,Og.useEvent)(t);(0,GS.useEffect)(()=>{let A=g!==w.current;w.current=g,(A||u&&!f&&c)&&S()},[u,f,c,g,S]);function x(){d?v():b()}function C(){(!i||!s)&&t()}let I=u||h&&l,k=!I&&!f,R=I&&!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)(qy.Button,{size:"compact",onClick:t,icon:Mi,label:(0,dF.__)("Close panel")}):(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,wn.jsx)(qy.Button,{ref:_,accessibleWhenDisabled:!0,disabled:m,onClick:t,variant:"secondary",size:"compact",children:(0,dF.__)("Cancel")})}),(0,wn.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,wn.jsx)(LS,{onSubmit:C,forceIsDirty:e})})]})}),(0,wn.jsxs)("div",{className:"editor-post-publish-panel__content",children:[k&&(0,wn.jsx)(ITe,{children:o&&(0,wn.jsx)(o,{})}),R&&(0,wn.jsx)(BTe,{focusOnMount:!0,children:r&&(0,wn.jsx)(r,{})}),f&&(0,wn.jsx)(qy.Spinner,{})]}),(0,wn.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,wn.jsx)(qy.CheckboxControl,{label:(0,dF.__)("Always show pre-publish checks."),checked:d,onChange:x})})]})}var yF=a(G(),1),wF=a(Te(),1),_F=a(K(),1),SF=a(U(),1),Ky=a(j(),1);var GTe=a(Mo(),1),YTe=a(Dt(),1);var vl=a(G(),1),_r=a(j(),1),bF=a(K(),1),dP=a(U(),1),HTe=a(ae(),1),UTe=a(be(),1),WTe=a(Te(),1);var oq=a(j(),1),zTe=a(G(),1),hF=a(K(),1);var jTe=a(K(),1);function mF({children:e}){let{hasStickyAction:t,postType:r}=(0,jTe.useSelect)(o=>({hasStickyAction:o(N).getCurrentPost()._links?.["wp:action-sticky"]??!1,postType:o(N).getCurrentPostType()}),[]);return r!=="post"||!t?null:e}var nq=a(E(),1);function gF(){let e=(0,hF.useSelect)(r=>r(N).getEditedPostAttribute("sticky")??!1,[]),{editPost:t}=(0,hF.useDispatch)(N);return(0,nq.jsx)(mF,{children:(0,nq.jsx)(zTe.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,oq.__)("Sticky"),help:(0,oq.__)("Pin this post to the top of the blog."),checked:e,onChange:()=>t({sticky:!e})})})}var _n=a(E(),1),vF={"auto-draft":{label:(0,_r.__)("Draft"),icon:b0},draft:{label:(0,_r.__)("Draft"),icon:b0},pending:{label:(0,_r.__)("Pending"),icon:k1},private:{label:(0,_r.__)("Private"),icon:C1},future:{label:(0,_r.__)("Scheduled"),icon:bm},publish:{label:(0,_r.__)("Published"),icon:fv}},iq=[{label:(0,_r.__)("Draft"),value:"draft",description:(0,_r.__)("Not ready to publish.")},{label:(0,_r.__)("Pending"),value:"pending",description:(0,_r.__)("Waiting for review before publishing.")},{label:(0,_r.__)("Private"),value:"private",description:(0,_r.__)("Only visible to site admins and editors.")},{label:(0,_r.__)("Scheduled"),value:"future",description:(0,_r.__)("Publish automatically on a chosen date.")},{label:(0,_r.__)("Published"),value:"publish",description:(0,_r.__)("Visible to everyone.")}];function sq(){let{status:e,date:t,password:r,postId:o,postType:n,canEdit:i}=(0,bF.useSelect)(b=>{let{getEditedPostAttribute:_,getCurrentPostId:y,getCurrentPostType:w,getCurrentPost:S}=b(N);return{status:_("status"),date:_("date"),password:_("password"),postId:y(),postType:w(),canEdit:S()._links?.["wp:action-publish"]??!1}},[]),[s,l]=(0,dP.useState)(!!r),c=(0,WTe.useInstanceId)(sq,"editor-change-status__password-input"),{editEntityRecord:u}=(0,bF.useDispatch)(HTe.store),[d,f]=(0,dP.useState)(null),m=(0,dP.useMemo)(()=>({anchor:d,"aria-label":(0,_r.__)("Status & visibility"),headerTitle:(0,_r.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0}),[d]);if(cm.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,_r.__)("Status"),ref:f,children:i?(0,_n.jsx)(vl.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:m,focusOnMount:!0,renderToggle:({onToggle:b,isOpen:_})=>(0,_n.jsx)(vl.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:b,icon:vF[e]?.icon,"aria-label":(0,_r.sprintf)((0,_r.__)("Change status: %s"),vF[e]?.label),"aria-expanded":_,children:vF[e]?.label}),renderContent:({onClose:b})=>(0,_n.jsxs)(_n.Fragment,{children:[(0,_n.jsx)(UTe.__experimentalInspectorPopoverHeader,{title:(0,_r.__)("Status & visibility"),onClose:b}),(0,_n.jsx)("form",{onSubmit:_=>{_.preventDefault(),b()},children:(0,_n.jsxs)(vl.__experimentalVStack,{spacing:4,children:[(0,_n.jsx)(vl.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,_r.__)("Status"),options:iq,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)(KY,{showPopoverHeaderActions:!1,isCompact:!0})}),e!=="private"&&(0,_n.jsxs)(vl.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,_n.jsx)(vl.CheckboxControl,{label:(0,_r.__)("Password protected"),help:(0,_r.__)("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)(vl.TextControl,{label:(0,_r.__)("Password"),onChange:_=>h({password:_}),value:r,placeholder:(0,_r.__)("Use a secure password"),type:"text",id:c,maxLength:255})})]}),(0,_n.jsx)(gF,{})]})})]})}):(0,_n.jsx)("div",{className:"editor-post-status is-read-only",children:vF[e]?.label})})}var xF=a(E(),1);function CF({forceIsDirty:e}){let[t,r]=(0,SF.useState)(!1),o=(0,wF.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,_F.useSelect)(T=>{let M=T(N),{get:B}=T(YTe.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:B("core","showIconLabels"),postStatus:M.getEditedPostAttribute("status"),postStatusHasChanged:!!M.getPostEdits()?.status,postType:M.getCurrentPostType()}},[e]),y=v==="pending",{savePost:w}=(0,_F.useDispatch)(N),S=(0,wF.usePrevious)(u);if((0,SF.useEffect)(()=>{let T;return S&&!u&&(r(!0),T=setTimeout(()=>{r(!1)},1e3)),()=>clearTimeout(T)},[u]),_===El||!h&&y)return null;let x=!["pending","draft","auto-draft"].includes(v)&&iq.map(({value:T})=>T).includes(v);if(l||m||x||b&&["pending","draft"].includes(v))return null;let C=y?(0,Ky.__)("Save as pending"):(0,Ky.__)("Save draft"),I=(0,Ky.__)("Save"),k=t||!s&&!i,R=u||k,A=u||k||!c||d||f,P;return u?P=n?(0,Ky.__)("Autosaving"):(0,Ky.__)("Saving"):k?P=(0,Ky.__)("Saved"):o?P=C:g&&(P=I),(0,xF.jsxs)(yF.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,yF.__unstableGetAnimateClassName)({type:"loading"})]:u}):void 0,onClick:A?void 0:()=>w(),shortcut:A?void 0:GTe.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:NB,label:P||C,"aria-disabled":A,children:[R&&(0,xF.jsx)(xn,{icon:k?Oo:FB}),P]})}var qTe=a(K(),1);function TF({children:e}){return(0,qTe.useSelect)(r=>r(N).getCurrentPost()._links?.["wp:action-publish"]??!1,[])?e:null}var EF=a(G(),1),qS=a(j(),1),PF=a(U(),1),KTe=a(K(),1);var YS=a(E(),1);function kF(){let[e,t]=(0,PF.useState)(null),r=(0,KTe.useSelect)(s=>s(N).getCurrentPostType(),[]),o=(0,PF.useMemo)(()=>({anchor:e,"aria-label":(0,qS.__)("Change publish date"),placement:"left-start",offset:36,shift:!0}),[e]),n=HS(),i=HS({full:!0});return cm.includes(r)?null:(0,YS.jsx)(TF,{children:(0,YS.jsx)(dr,{label:(0,qS.__)("Publish"),ref:t,children:(0,YS.jsx)(EF.Dropdown,{popoverProps:o,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:s,isOpen:l})=>(0,YS.jsx)(EF.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:s,"aria-label":(0,qS.sprintf)((0,qS.__)("Change date: %s"),n),label:i,showTooltip:n!==i,"aria-expanded":l,children:n}),renderContent:({onClose:s})=>(0,YS.jsx)(jS,{onClose:s})})})})}var RF=a(G(),1),KS=a(j(),1),AF=a(K(),1),ZTe=a(U(),1),XTe=a(Ya(),1);var Zy=a(E(),1);function QTe(){(0,XTe.default)("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});let[e,t]=(0,ZTe.useState)(!1),{editPost:r,savePost:o}=(0,AF.useDispatch)(N),{isSaving:n,isPublished:i,isScheduled:s}=(0,AF.useSelect)(f=>{let{isSavingPost:m,isCurrentPostPublished:h,isCurrentPostScheduled:g}=f(N);return{isSaving:m(),isPublished:h(),isScheduled:g()}},[]),l=n||!i&&!s,c,u;i?(c=(0,KS.__)("Are you sure you want to unpublish this post?"),u=(0,KS.__)("Unpublish")):s&&(c=(0,KS.__)("Are you sure you want to unschedule this post?"),u=(0,KS.__)("Unschedule"));let d=()=>{t(!1),r({status:"draft"}),o()};return(0,Zy.jsxs)(Zy.Fragment,{children:[(0,Zy.jsx)(RF.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,KS.__)("Switch to draft")}),(0,Zy.jsx)(RF.__experimentalConfirmDialog,{isOpen:e,onConfirm:d,onCancel:()=>t(!1),confirmButtonText:u,children:c})]})}var JTe=a(K(),1),fP=a(j(),1);var aq=a(E(),1);function IF(){let{syncStatus:e,postType:t}=(0,JTe.useSelect)(r=>{let{getEditedPostAttribute:o}=r(N);return{syncStatus:o("meta")?.wp_pattern_sync_status==="unsynced"?"unsynced":o("wp_pattern_sync_status"),postType:o("type")}});return t!=="wp_block"?null:(0,aq.jsx)(dr,{label:(0,fP.__)("Sync status"),children:(0,aq.jsx)("div",{className:"editor-post-sync-status__value",children:e==="unsynced"?(0,fP._x)("Not synced","pattern (singular)"):(0,fP._x)("Synced","pattern (singular)")})})}var $Te=a(U(),1),eEe=a(K(),1),tEe=a(ae(),1);var lq=a(E(),1),ust=e=>e;function dst({taxonomyWrapper:e=ust}){let{postType:t,taxonomies:r}=(0,eEe.useSelect)(n=>({postType:n(N).getCurrentPostType(),taxonomies:n(tEe.store).getEntityRecords("root","taxonomy")}),[]);return(r??[]).filter(n=>n.types.includes(t)&&n.visibility?.show_ui).map(n=>{let i=n.hierarchical?sF:rF;return(0,lq.jsx)($Te.Fragment,{children:e((0,lq.jsx)(i,{slug:n.slug}),n)},`taxonomy-${n.slug}`)})}var ZS=dst;var rEe=a(K(),1),oEe=a(ae(),1);function OF({children:e}){return(0,rEe.useSelect)(r=>{let o=r(N).getCurrentPostType();return r(oEe.store).getEntityRecords("root","taxonomy")?.some(i=>i.types.includes(o))},[])?e:null}var nEe=a(G(),1),NF=a(K(),1);var pP=a(E(),1);function fst({taxonomy:e,children:t}){let r=e?.slug,o=r?`taxonomy-panel-${r}`:"",{isEnabled:n,isOpened:i}=(0,NF.useSelect)(c=>{let{isEditorPanelEnabled:u,isEditorPanelOpened:d}=c(N);return{isEnabled:r?u(o):!1,isOpened:r?d(o):!1}},[o,r]),{toggleEditorPanelOpened:s}=(0,NF.useDispatch)(N);if(!n)return null;let l=e?.labels?.menu_name;return l?(0,pP.jsx)(nEe.PanelBody,{title:l,opened:i,onToggle:()=>s(o),children:t}):null}function MF(){return(0,pP.jsx)(OF,{children:(0,pP.jsx)(ZS,{taxonomyWrapper:(e,t)=>(0,pP.jsx)(fst,{taxonomy:t,children:e})})})}var TEe=a(SEe(),1),XS=a(U(),1),fq=a(j(),1),EEe=a(ae(),1),BF=a(K(),1),PEe=a(Te(),1);var xEe=1e3;function CEe(e,t){if(Math.max(e.length,t.length)<=xEe)return dG(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<=xEe?d=dG(l,c):d=V0e(l,c),o>0&&d.unshift({value:e.slice(0,o)}),i<e.length&&d.push({value:e.slice(i)}),d}function xst(e,t){return Math.max(0,Math.min(t.length,e))}function Cst(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 dq(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=Cst(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 xst(s,o)}var Ng=a(E(),1);function hP(){let e=(0,PEe.useInstanceId)(hP),t=(0,XS.useRef)(),r=(0,XS.useRef)(),o=(0,XS.useRef)(),{value:n,type:i,id:s}=(0,BF.useSelect)(u=>{let{getCurrentPostType:d,getCurrentPostId:f,getEditedPostContent:m}=u(N);return{value:m(),type:d(),id:f()}},[]),{editEntityRecord:l}=(0,BF.useDispatch)(EEe.store);(0,XS.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=CEe(d,n),v=dq(f,g,d,n),b=dq(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,Ng.jsxs)(Ng.Fragment,{children:[(0,Ng.jsx)(Gt,{render:(0,Ng.jsx)("label",{htmlFor:`post-content-${e}`}),children:(0,fq.__)("Type text or HTML")}),(0,Ng.jsx)(TEe.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,fq.__)("Start writing with text or HTML")})]})}var REe=a(j(),1),JS=a(U(),1),AEe=a(Vt(),1),GF=a(K(),1),pq=a(be(),1),IEe=a(Mo(),1),OEe=a(Pt(),1),$S=a(hd(),1),NEe=a(Te(),1),mq=a(Mp(),1);var VF="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",jF=/[\r\n]+/g;var QS=a(U(),1),kEe=a(K(),1);function zF(e){let t=(0,QS.useRef)(),{isCleanNewPost:r}=(0,kEe.useSelect)(o=>{let{isCleanNewPost:n}=o(N);return{isCleanNewPost:n()}},[]);return(0,QS.useImperativeHandle)(e,()=>({focus:()=>{t?.current?.focus()}})),(0,QS.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 HF=a(K(),1);function UF(){let{editPost:e}=(0,HF.useDispatch)(N),{title:t}=(0,HF.useSelect)(o=>{let{getEditedPostAttribute:n}=o(N);return{title:n("title")}},[]);function r(o){e({title:o})}return{title:t,setTitle:r}}var WF=a(E(),1),{useRichText:Tst}=Y($S.privateApis),Est=(0,JS.forwardRef)((e,t)=>{let{placeholder:r,isEditingContentOnlySection:o,isPreview:n}=(0,GF.useSelect)(P=>{let{getSettings:T,getEditedContentOnlySection:M}=Y(P(pq.store)),{titlePlaceholder:B,isPreviewMode:F}=T();return{placeholder:B,isEditingContentOnlySection:!!M(),isPreview:F}},[]),[i,s]=(0,JS.useState)(!1),{ref:l}=zF(t),{title:c,setTitle:u}=UF(),[d,f]=(0,JS.useState)({}),{clearSelectedBlock:m,insertBlocks:h,insertDefaultBlock:g}=(0,GF.useDispatch)(pq.store),v=(0,AEe.decodeEntities)(r)||(0,REe.__)("Add title"),{value:b,onChange:_,ref:y}=Tst({value:c,onChange(P){u(P.replace(jF," "))},placeholder:v,selectionStart:d.start,selectionEnd:d.end,onSelectionChange(P,T){f(M=>{let{start:B,end:F}=M;return B===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 I(P){P.keyCode===IEe.ENTER&&(P.preventDefault(),C())}function k(P){let T=P.clipboardData,M="",B="";try{M=T.getData("text/plain"),B=T.getData("text/html")}catch{return}let F=(0,OEe.pasteHandler)({HTML:B,plainText:M});if(P.preventDefault(),!!F.length)if(typeof F!="string"){let[V]=F;if(!c&&(V.name==="core/heading"||V.name==="core/paragraph")){let z=(0,mq.__unstableStripHTML)(V.attributes.content);u(z),w(F.slice(1))}else w(F)}else{let V=(0,mq.__unstableStripHTML)(F);_((0,$S.insert)(b,(0,$S.create)({html:V})))}}let R=J(VF,{"is-selected":i}),A=o?{opacity:.2}:void 0;return(0,WF.jsx)("h1",{ref:(0,NEe.useMergeRefs)([y,l]),contentEditable:!o&&!n,className:R,"aria-label":v,role:"textbox","aria-multiline":"true",onFocus:S,onBlur:x,onKeyDown:I,onPaste:k,style:A})}),YF=(0,JS.forwardRef)((e,t)=>(0,WF.jsx)(fo,{supportKeys:"title",children:(0,WF.jsx)(Est,{ref:t})}));var MEe=a(G(),1),FEe=a(j(),1),DEe=a(Vt(),1),LEe=a(K(),1),BEe=a(be(),1),qF=a(U(),1);var VEe=a(E(),1);function Pst(e,t){let{placeholder:r}=(0,LEe.useSelect)(h=>{let{getSettings:g}=h(BEe.store),{titlePlaceholder:v}=g();return{placeholder:v}},[]),[o,n]=(0,qF.useState)(!1),{title:i,setTitle:s}=UF(),{ref:l}=zF(t);function c(h){s(h.replace(jF," "))}function u(){n(!0)}function d(){n(!1)}let f=J(VF,{"is-selected":o,"is-raw-text":!0}),m=(0,DEe.decodeEntities)(r)||(0,FEe.__)("Add title");return(0,VEe.jsx)(MEe.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 KF=(0,qF.forwardRef)(Pst);var ex=a(j(),1),XF=a(G(),1),tx=a(K(),1),HEe=a(U(),1);var jEe=a(K(),1),zEe=a(ae(),1);function ZF({children:e}){let{canTrashPost:t}=(0,jEe.useSelect)(r=>{let{isEditedPostNew:o,getCurrentPostId:n,getCurrentPostType:i}=r(N),{canUser:s}=r(zEe.store),l=i(),c=n(),u=o(),d=c?s("delete",{kind:"postType",name:l,id:c}):!1;return{canTrashPost:(!u||c)&&d&&!uZ.includes(l)}},[]);return t?e:null}var gP=a(E(),1);function rx({onActionPerformed:e}){let t=(0,tx.useRegistry)(),{isNew:r,isDeleting:o,postId:n,title:i}=(0,tx.useSelect)(d=>{let f=d(N);return{isNew:f.isEditedPostNew(),isDeleting:f.isDeletingPost(),postId:f.getCurrentPostId(),title:f.getCurrentPostAttribute("title")}},[]),{trashPost:s}=(0,tx.useDispatch)(N),[l,c]=(0,HEe.useState)(!1);if(r||!n)return null;let u=async()=>{c(!1),await s();let d=await t.resolveSelect(N).getCurrentPost();e?.("move-to-trash",[d])};return(0,gP.jsxs)(ZF,{children:[(0,gP.jsx)(XF.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:o,"aria-disabled":o,onClick:o?void 0:()=>c(!0),children:(0,ex.__)("Move to trash")}),(0,gP.jsx)(XF.__experimentalConfirmDialog,{isOpen:l,onConfirm:u,onCancel:()=>c(!1),confirmButtonText:(0,ex.__)("Move to trash"),size:"small",children:(0,ex.sprintf)((0,ex.__)('Are you sure you want to move "%s" to the trash?'),i)})]})}var vP=a(K(),1),bP=a(bo(),1),QF=a(U(),1),UEe=a(be(),1),Xy=a(j(),1),Ba=a(G(),1),WEe=a(It(),1);var GEe=a(ae(),1),JF=a(Te(),1);var Eo=a(E(),1);function yP({onClose:e}){let{isEditable:t,postSlug:r,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:s}=(0,vP.useSelect)(h=>{let g=h(N).getCurrentPost(),v=h(N).getCurrentPostType(),b=h(GEe.store).getPostType(v),_=h(N).getPermalinkParts(),y=g?._links?.["wp:action-publish"]??!1;return{isEditable:h(N).isPermalinkEditable()&&y,postSlug:(0,bP.safeDecodeURIComponent)(h(N).getEditedPostSlug()),viewPostLabel:b?.labels?.view_item,postLink:g.link,permalinkPrefix:_?.prefix,permalinkSuffix:_?.suffix,permalink:(0,bP.safeDecodeURIComponent)(h(N).getPermalink())}},[]),{editPost:l}=(0,vP.useDispatch)(N),{createNotice:c}=(0,vP.useDispatch)(WEe.store),[u,d]=(0,QF.useState)(!1),f=(0,JF.useCopyToClipboard)(s,()=>{c("info",(0,Xy.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),m="editor-post-url__slug-description-"+(0,JF.useInstanceId)(yP);return(0,Eo.jsxs)("div",{className:"editor-post-url",children:[(0,Eo.jsx)(UEe.__experimentalInspectorPopoverHeader,{title:(0,Xy.__)("Slug"),onClose:e}),(0,Eo.jsxs)(Ba.__experimentalVStack,{spacing:3,children:[t&&(0,Eo.jsx)("p",{className:"editor-post-url__intro",children:(0,QF.createInterpolateElement)((0,Xy.__)("<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>"),{span:(0,Eo.jsx)("span",{id:m}),a:(0,Eo.jsx)(Ba.ExternalLink,{href:(0,Xy.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,Eo.jsxs)("div",{children:[t&&(0,Eo.jsxs)(Eo.Fragment,{children:[(0,Eo.jsx)(Ba.__experimentalInputControl,{prefix:(0,Eo.jsx)(Ba.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,Eo.jsx)(Ba.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Eo.jsx)(Ba.Button,{icon:v1,ref:f,size:"small",label:"Copy"})}),label:(0,Xy.__)("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,bP.cleanForSlug)(h.target.value)}),u&&d(!1)},"aria-describedby":m}),(0,Eo.jsxs)("p",{className:"editor-post-url__permalink",children:[(0,Eo.jsx)("span",{className:"editor-post-url__permalink-visual-label",children:(0,Xy.__)("Permalink:")}),(0,Eo.jsxs)(Ba.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:[(0,Eo.jsx)("span",{className:"editor-post-url__link-prefix",children:n}),(0,Eo.jsx)("span",{className:"editor-post-url__link-slug",children:r}),(0,Eo.jsx)("span",{className:"editor-post-url__link-suffix",children:i})]})]})]}),!t&&(0,Eo.jsx)(Ba.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:o})]})]})]})}var YEe=a(K(),1),qEe=a(ae(),1);function $F({children:e}){return(0,YEe.useSelect)(r=>{let o=r(N).getCurrentPostType();return!(!r(qEe.store).getPostType(o)?.viewable||!r(N).getCurrentPost().link||!r(N).getPermalinkParts())},[])?e:null}var KEe=a(K(),1),eD=a(bo(),1);function ZEe(){return hq()}function hq(){let e=(0,KEe.useSelect)(t=>t(N).getPermalink(),[]);return(0,eD.filterURLForDisplay)((0,eD.safeDecodeURIComponent)(e))}var tD=a(U(),1),rD=a(K(),1),nx=a(G(),1),ox=a(j(),1),XEe=a(bo(),1),QEe=a(ae(),1);var bl=a(E(),1);function oD(){let{isFrontPage:e}=(0,rD.useSelect)(i=>{let{getCurrentPostId:s}=i(N),{getEditedEntityRecord:l,canUser:c}=i(QEe.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,tD.useState)(null),o=(0,tD.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]),n=e?(0,ox.__)("Link"):(0,ox.__)("Slug");return(0,bl.jsx)($F,{children:(0,bl.jsxs)(dr,{label:n,ref:r,children:[!e&&(0,bl.jsx)(nx.Dropdown,{popoverProps:o,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:s})=>(0,bl.jsx)(kst,{isOpen:i,onClick:s}),renderContent:({onClose:i})=>(0,bl.jsx)(yP,{onClose:i})}),e&&(0,bl.jsx)(Rst,{})]})})}function kst({isOpen:e,onClick:t}){let{slug:r}=(0,rD.useSelect)(n=>({slug:n(N).getEditedPostSlug()}),[]),o=(0,XEe.safeDecodeURIComponent)(r);return(0,bl.jsx)(nx.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,ox.sprintf)((0,ox.__)("Change link: %s"),o),onClick:t,children:(0,bl.jsx)(bl.Fragment,{children:o})})}function Rst(){let{postLink:e}=(0,rD.useSelect)(t=>{let{getCurrentPost:r}=t(N);return{postLink:r()?.link}},[]);return(0,bl.jsx)(nx.ExternalLink,{className:"editor-post-url__front-page-link",href:e,target:"_blank",children:e})}var JEe=a(K(),1);function $Ee({render:e}){let t=(0,JEe.useSelect)(r=>r(N).getCurrentPost()._links?.["wp:action-publish"]??!1);return e({canEdit:t})}var dPe=a(j(),1),sD=a(G(),1),fPe=a(K(),1);var pPe=a(U(),1),mPe=a(be(),1);var Gp=a(j(),1),lPe=a(K(),1),cPe=a(be(),1);var ePe=a(K(),1),tPe=a(j(),1),rPe=a(yw(),1);var oPe=a(E(),1);function ix(){let e=(0,ePe.useSelect)(r=>r(N).getEditedPostAttribute("content"),[]),t=(0,tPe._x)("words","Word count type. Do not translate!");return(0,oPe.jsx)("span",{className:"word-count",children:(0,rPe.count)(e,t)})}var nPe=a(K(),1),Mg=a(j(),1),iPe=a(yw(),1),gq=a(U(),1);var nD=a(E(),1),Ast=189;function sx(){let e=(0,nPe.useSelect)(n=>n(N).getEditedPostAttribute("content"),[]),t=(0,Mg._x)("words","Word count type. Do not translate!"),r=Math.round((0,iPe.count)(e,t)/Ast),o=r===0?(0,gq.createInterpolateElement)((0,Mg.__)("<span>< 1</span> minute"),{span:(0,nD.jsx)("span",{})}):(0,gq.createInterpolateElement)((0,Mg.sprintf)((0,Mg._n)("<span>%s</span> minute","<span>%s</span> minutes",r),r),{span:(0,nD.jsx)("span",{})});return(0,nD.jsx)("span",{className:"time-to-read",children:o})}var sPe=a(K(),1),aPe=a(yw(),1);function ax(){let e=(0,sPe.useSelect)(t=>t(N).getEditedPostAttribute("content"),[]);return(0,aPe.count)(e,"characters_including_spaces")}var eo=a(E(),1);function Ist({hasOutlineItemsDisabled:e,onRequestClose:t}){let{headingCount:r,paragraphCount:o,numberOfBlocks:n}=(0,lPe.useSelect)(i=>{let{getGlobalBlockCount:s}=i(cPe.store);return{headingCount:s("core/heading"),paragraphCount:s("core/paragraph"),numberOfBlocks:s()}},[]);return(0,eo.jsxs)(eo.Fragment,{children:[(0,eo.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,Gp.__)("Document Statistics"),tabIndex:"0",children:(0,eo.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,eo.jsxs)("li",{className:"table-of-contents__count",children:[(0,Gp.__)("Words"),(0,eo.jsx)(ix,{})]}),(0,eo.jsxs)("li",{className:"table-of-contents__count",children:[(0,Gp.__)("Characters"),(0,eo.jsx)("span",{className:"table-of-contents__number",children:(0,eo.jsx)(ax,{})})]}),(0,eo.jsxs)("li",{className:"table-of-contents__count",children:[(0,Gp.__)("Time to read"),(0,eo.jsx)(sx,{})]}),(0,eo.jsxs)("li",{className:"table-of-contents__count",children:[(0,Gp.__)("Headings"),(0,eo.jsx)("span",{className:"table-of-contents__number",children:r})]}),(0,eo.jsxs)("li",{className:"table-of-contents__count",children:[(0,Gp.__)("Paragraphs"),(0,eo.jsx)("span",{className:"table-of-contents__number",children:o})]}),(0,eo.jsxs)("li",{className:"table-of-contents__count",children:[(0,Gp.__)("Blocks"),(0,eo.jsx)("span",{className:"table-of-contents__number",children:n})]})]})}),r>0&&(0,eo.jsxs)(eo.Fragment,{children:[(0,eo.jsx)("hr",{}),(0,eo.jsx)("h2",{className:"table-of-contents__title",children:(0,Gp.__)("Document Outline")}),(0,eo.jsx)(mS,{onSelect:t,hasOutlineItemsDisabled:e})]})]})}var uPe=Ist;var iD=a(E(),1);function Ost({hasOutlineItemsDisabled:e,repositionDropdown:t,...r},o){let n=(0,fPe.useSelect)(i=>!!i(mPe.store).getBlockCount(),[]);return(0,iD.jsx)(sD.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:i,onToggle:s})=>(0,iD.jsx)(sD.Button,{__next40pxDefaultSize:!0,...r,ref:o,onClick:n?s:void 0,icon:yV,"aria-expanded":i,"aria-haspopup":"true",label:(0,dPe.__)("Details"),tooltipPosition:"bottom","aria-disabled":!n}),renderContent:({onClose:i})=>(0,iD.jsx)(uPe,{onRequestClose:i,hasOutlineItemsDisabled:e})})}var hPe=(0,pPe.forwardRef)(Ost);var gPe=a(j(),1),vPe=a(U(),1),bPe=a(K(),1),yPe=a(ae(),1);function wPe(){let{__experimentalGetDirtyEntityRecords:e}=(0,bPe.useSelect)(yPe.store);return(0,vPe.useEffect)(()=>{let t=r=>{if(e().length>0)return r.returnValue=(0,gPe.__)("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 vq=a(Ya(),1),xPe=a(U(),1),ye=a(be(),1),CPe=a(SPe(),1),TPe=a(E(),1);function wt(e,t,r=[]){let o=(0,xPe.forwardRef)((n,i)=>((0,vq.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,TPe.jsx)(t,{ref:i,...n})));return r.forEach(n=>{o[n]=wt(e+"."+n,t[n])}),o}function Xd(e,t){return(...r)=>((0,vq.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...r))}var EPe=wt("RichText",ye.RichText,["Content"]);EPe.isEmpty=Xd("RichText.isEmpty",ye.RichText.isEmpty);var Nst=wt("Autocomplete",ye.Autocomplete),Mst=wt("AlignmentToolbar",ye.AlignmentToolbar),Fst=wt("BlockAlignmentToolbar",ye.BlockAlignmentToolbar),Dst=wt("BlockControls",ye.BlockControls,["Slot"]),Lst=wt("BlockEdit",ye.BlockEdit),Bst=wt("BlockEditorKeyboardShortcuts",ye.BlockEditorKeyboardShortcuts),Vst=wt("BlockFormatControls",ye.BlockFormatControls,["Slot"]),jst=wt("BlockIcon",ye.BlockIcon),zst=wt("BlockInspector",ye.BlockInspector),Hst=wt("BlockList",ye.BlockList),Ust=wt("BlockMover",ye.BlockMover),Wst=wt("BlockNavigationDropdown",ye.BlockNavigationDropdown),Gst=wt("BlockSelectionClearer",ye.BlockSelectionClearer),Yst=wt("BlockSettingsMenu",ye.BlockSettingsMenu),qst=wt("BlockTitle",ye.BlockTitle),Kst=wt("BlockToolbar",ye.BlockToolbar),Zst=wt("ColorPalette",ye.ColorPalette),Xst=wt("ContrastChecker",ye.ContrastChecker),Qst=wt("CopyHandler",ye.CopyHandler),Jst=wt("DefaultBlockAppender",ye.DefaultBlockAppender),$st=wt("FontSizePicker",ye.FontSizePicker),eat=wt("Inserter",ye.Inserter),tat=wt("InnerBlocks",ye.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),rat=wt("InspectorAdvancedControls",ye.InspectorAdvancedControls,["Slot"]),oat=wt("InspectorControls",ye.InspectorControls,["Slot"]),nat=wt("PanelColorSettings",ye.PanelColorSettings),iat=wt("PlainText",ye.PlainText),sat=wt("RichTextShortcut",ye.RichTextShortcut),aat=wt("RichTextToolbarButton",ye.RichTextToolbarButton),lat=wt("__unstableRichTextInputEvent",ye.__unstableRichTextInputEvent),cat=wt("MediaPlaceholder",ye.MediaPlaceholder),uat=wt("MediaUpload",ye.MediaUpload),dat=wt("MediaUploadCheck",ye.MediaUploadCheck),fat=wt("MultiSelectScrollIntoView",ye.MultiSelectScrollIntoView),pat=wt("NavigableToolbar",ye.NavigableToolbar),mat=wt("ObserveTyping",ye.ObserveTyping),hat=wt("SkipToSelectedBlock",ye.SkipToSelectedBlock),gat=wt("URLInput",ye.URLInput),vat=wt("URLInputButton",ye.URLInputButton),bat=wt("URLPopover",ye.URLPopover),yat=wt("Warning",ye.Warning),wat=wt("WritingFlow",ye.WritingFlow),_at=Xd("createCustomColorsHOC",ye.createCustomColorsHOC),Sat=Xd("getColorClassName",ye.getColorClassName),xat=Xd("getColorObjectByAttributeValues",ye.getColorObjectByAttributeValues),Cat=Xd("getColorObjectByColorValue",ye.getColorObjectByColorValue),Tat=Xd("getFontSize",ye.getFontSize),Eat=Xd("getFontSizeClass",ye.getFontSizeClass),Pat=Xd("withColorContext",ye.withColorContext),kat=Xd("withColors",ye.withColors),Rat=Xd("withFontSizes",ye.withFontSizes);var Aat=oS,Iat=oS,{EntitiesSavedStates:Oat,useEntitiesSavedStatesIsDirty:Nat}=Y(PPe.privateApis);function Mat(e=[]){return e.push({...p3},{...m3}),e}(0,kPe.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",Mat);var RPe=a(U(),1),bq=a(Vn(),1),APe=a(Ya(),1),aD=a(Mf(),1);var lx=a(E(),1),{MediaUploadModal:Fat}=Y(aD.privateApis),Dat=class extends RPe.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,lx.jsxs)(lx.Fragment,{children:[s({open:this.openModal}),(0,lx.jsx)(Fat,{allowedTypes:e,multiple:t,value:r,onSelect:c=>{o(c),this.closeModal()},onClose:this.closeModal,title:n,isOpen:l,modalClass:i})]})}};window.__experimentalDataViewsMediaModal?(0,bq.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>((0,APe.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."}),Dat)):(0,bq.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>aD.MediaUpload);var OPe=a(Vn(),1),NPe=a(Al(),1),MPe=a(Te(),1),lD=a(be(),1),yq=a(K(),1),FPe=a(Pt(),1);var gu=a(E(),1),{PatternOverridesControls:Lat,ResetOverridesControl:Bat,PATTERN_TYPES:Vat,PATTERN_SYNC_TYPES:IPe}=Y(NPe.privateApis),jat=(0,MPe.createHigherOrderComponent)(e=>t=>{let r=(0,yq.useSelect)(o=>{let{__experimentalBlockBindingsSupportedAttributes:n}=o(lD.store).getSettings();return!!n?.[t.name]},[t.name]);return(0,gu.jsxs)(gu.Fragment,{children:[(0,gu.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,gu.jsx)(zat,{...t})]})},"withPatternOverrideControls");function zat(e){let t=(0,lD.useBlockEditingMode)(),{hasPatternOverridesSource:r,isEditingSyncedPattern:o}=(0,yq.useSelect)(c=>{let{getCurrentPostType:u,getEditedPostAttribute:d}=c(N);return{hasPatternOverridesSource:!!(0,FPe.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:u()===Vat.user&&d("meta")?.wp_pattern_sync_status!==IPe.unsynced&&d("wp_pattern_sync_status")!==IPe.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,gu.jsxs)(gu.Fragment,{children:[s&&(0,gu.jsx)(Lat,{...e}),l&&(0,gu.jsx)(Bat,{...e})]}):null}(0,OPe.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",jat);var DPe=a(Vn(),1),LPe=a(Te(),1),BPe=a(U(),1),wq=a(j(),1),cx=a(be(),1),cD=a(G(),1),VPe=a(K(),1),Qd=a(E(),1),Hat=["core/navigation-link","core/navigation-submenu"];function Uat({attributes:e}){let{kind:t,id:r,type:o}=e,n=(0,cx.useBlockEditingMode)(),i=(0,VPe.useSelect)(l=>l(cx.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,Qd.jsx)(cx.__unstableBlockToolbarLastItem,{children:(0,Qd.jsx)(cD.ToolbarGroup,{children:(0,Qd.jsx)(cD.ToolbarButton,{name:"view",title:(0,wq.__)("View"),onClick:s,children:(0,wq.__)("View")})})})}var Wat=(0,LPe.createHigherOrderComponent)(e=>t=>{let r=Hat.includes(t.name);return(0,Qd.jsxs)(Qd.Fragment,{children:[(0,Qd.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Qd.jsx)(Uat,{...t})]})},"withNavigationViewButton");(0,DPe.addFilter)("editor.BlockEdit","core/editor/with-navigation-view-button",Wat);var jPe=a(Vn(),1),zPe=a(Te(),1),HPe=a(U(),1),_q=a(j(),1),ux=a(be(),1),uD=a(G(),1),Fg=a(K(),1);var Jd=a(E(),1),Gat="core/navigation",Yat="core/template-part",qat="edit-post/block";function Kat({clientId:e}){let t=(0,Fg.useRegistry)(),{selectBlock:r,flashBlock:o}=(0,Fg.useDispatch)(ux.store),{requestInspectorTab:n}=Y((0,Fg.useDispatch)(ux.store)),{enableComplementaryArea:i}=(0,Fg.useDispatch)(je),{hasNavigationBlocks:s,firstNavigationBlockId:l,isNavigationEditable:c}=(0,Fg.useSelect)(d=>{let{getClientIdsOfDescendants:f,getBlockName:m,getBlockEditingMode:h}=d(ux.store),v=f(e).filter(y=>m(y)===Gat),b=v.length>0,_=b?v[0]:null;return{hasNavigationBlocks:b,firstNavigationBlockId:_,isNavigationEditable:h(_)!=="disabled"}},[e]),u=(0,HPe.useCallback)(()=>{l&&t.batch(()=>{r(l),o(l,500),i("core",qat),n("list",{openPanel:l})})},[l,t,r,o,i,n]);return!s||!c?null:(0,Jd.jsx)(ux.__unstableBlockToolbarLastItem,{children:(0,Jd.jsx)(uD.ToolbarGroup,{children:(0,Jd.jsx)(uD.ToolbarButton,{label:(0,_q.__)("Edit navigation"),onClick:u,children:(0,_q.__)("Edit navigation")})})})}var Zat=(0,zPe.createHigherOrderComponent)(e=>t=>{let r=t.name===Yat;return(0,Jd.jsxs)(Jd.Fragment,{children:[(0,Jd.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Jd.jsx)(Kat,{clientId:t.clientId})]})},"withTemplatePartNavigationEditButton");(0,jPe.addFilter)("editor.BlockEdit","core/editor/with-template-part-navigation-edit-button",Zat);var oke=a(Vn(),1),nke=a(Te(),1),Dg=a(be(),1),wP=a(G(),1),qp=a(j(),1),Kp=a(Pt(),1),px=a(U(),1),fx=a(K(),1),ike=a(It(),1),ske=a(ae(),1);function Sq(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 JPe=a(G(),1);var vu=a(j(),1),$Pe=a(Pt(),1),dx=a(U(),1);var XPe=a(U(),1);var Sr=a(j(),1),UPe={"typography.fontFamily":(0,Sr.__)("Font family"),"typography.fontSize":(0,Sr.__)("Font size"),"typography.fontStyle":(0,Sr.__)("Font style"),"typography.fontWeight":(0,Sr.__)("Font weight"),"typography.lineHeight":(0,Sr.__)("Line height"),"typography.letterSpacing":(0,Sr.__)("Letter spacing"),"typography.textDecoration":(0,Sr.__)("Text decoration"),"typography.textTransform":(0,Sr.__)("Letter case"),"typography.textColumns":(0,Sr.__)("Text columns"),"typography.writingMode":(0,Sr.__)("Orientation"),"color.text":(0,Sr.__)("Text color"),"color.background":(0,Sr.__)("Background color"),"color.gradient":(0,Sr.__)("Gradient"),"elements.link.color.text":(0,Sr.__)("Link color"),"spacing.padding":(0,Sr.__)("Padding"),"spacing.margin":(0,Sr.__)("Margin"),"spacing.blockGap":(0,Sr.__)("Block spacing"),border:(0,Sr.__)("Border"),"border.top":(0,Sr.__)("Border top"),"border.right":(0,Sr.__)("Border right"),"border.bottom":(0,Sr.__)("Border bottom"),"border.left":(0,Sr.__)("Border left"),"border.color":(0,Sr.__)("Border color"),"border.width":(0,Sr.__)("Border width"),"border.style":(0,Sr.__)("Border style"),"border.radius":(0,Sr.__)("Border radius"),"dimensions.minHeight":(0,Sr.__)("Minimum height"),"dimensions.aspectRatio":(0,Sr.__)("Aspect ratio")};function WPe(e){let t=e.join(".");return UPe[t]?UPe[t]:MI(e[e.length-1]??"")}var $d="\u2014",Xat="var:preset|",Qat=/^var\(\s*--wp--preset--[a-z0-9-]+?\s*(?:,[^)]*)?\)$/i;function Jat(e){if(e.startsWith(Xat))return e.split("|").pop();if(Qat.test(e))return e.replace(/^var\(\s*/,"").replace(/\s*(?:,[^)]*)?\)$/,"").split("--").pop()}var Dn=e=>e!=null&&e!=="",$at=["top","right","bottom","left"];function elt(e){if(Dn(e.width)||Dn(e.style)||Dn(e.color))return e;let t=$at.filter(o=>e[o]);if(!t.length)return e;let r=o=>{let n=t.map(i=>e[i]?.[o]);return n.every(i=>i===n[0])?n[0]:void 0};return{width:r("width"),style:r("style"),color:r("color")}}function Qy(e){if(!Dn(e))return $d;if(typeof e=="string"){let t=Jat(e);return t?MI(t):e}if(typeof e=="number")return String(e);if(typeof e=="object")try{let t=JSON.stringify(e);return t&&t!=="{}"&&t!=="[]"?t:$d}catch{return $d}return String(e)}function GPe(e){if(!e||typeof e!="object")return Qy(e);let{width:t,style:r,color:o}=elt(e),n=[t,r,o].filter(Dn).map(i=>Qy(i));return n.length?n.join(" "):$d}var tlt=["topLeft","topRight","bottomRight","bottomLeft"];function YPe(e){if(e&&typeof e=="object"){let t=tlt.map(r=>e[r]).filter(Dn);return t.length?t.join(" "):$d}return Qy(e)}function qPe(e,t=r=>r){let r=l=>Qy(t(l));if(!e||typeof e!="object")return r(e);let{top:o,right:n,bottom:i,left:s}=e;return Dn(o)&&Dn(n)&&Dn(i)&&Dn(s)?o===n&&n===i&&i===s?r(o):o===i&&s===n?`${r(o)} ${r(s)}`:[o,n,i,s].map(r).join(" "):!Dn(o)&&!Dn(n)&&!Dn(i)&&!Dn(s)?$d:[o,n,i,s].map(l=>Dn(l)?r(l):$d).join(" ")}function KPe(e,t=r=>r){let r=l=>Qy(t(l));if(!e||typeof e!="object")return r(e);let{top:o,left:n}=e;if(!Dn(o)&&!Dn(n))return $d;if(o===n)return r(o);let i=Dn(o)?r(o):$d,s=Dn(n)?r(n):$d;return`${i} - ${s}`}function ZPe(e,t,r){return e==="border"?GPe(t):e==="borderRadius"?YPe(t):e==="spacing"?qPe(t,r):e==="blockGap"?KPe(t,r):Qy(t)}function QPe(e,t,r){return(0,XPe.useMemo)(()=>{let o=n=>sv(t,r,n);return e.map(n=>{let i=dm(t,n.primaryPath.join("."),r,!1);return{...n,label:WPe(n.primaryPath),currentValue:i,formattedCurrentValue:ZPe(n.format,i,o),formattedNewValue:ZPe(n.format,n.newValue,o)}})},[e,t,r])}var Yp=a(E(),1),rlt={pickerTable:{}},olt=e=>e.id;function eke({name:e,rows:t,onApply:r,onRequestClose:o}){let{merged:n}=Hr(),i=QPe(t,n,e),[s,l]=(0,dx.useState)(()=>i.map(h=>h.id)),[c,u]=(0,dx.useState)(()=>({type:"pickerTable",titleField:"label",fields:["current","new"],page:1,perPage:i.length,layout:{enableMoving:!1}})),d=(0,dx.useMemo)(()=>[{id:"label",label:(0,vu.__)("Style"),enableSorting:!1,enableHiding:!1,filterBy:!1,getValue:({item:h})=>h.label,render:({item:h})=>h.label},{id:"current",label:(0,vu.__)("Current"),enableSorting:!1,enableHiding:!1,filterBy:!1,getValue:({item:h})=>h.formattedCurrentValue,render:({item:h})=>(0,Yp.jsx)("span",{className:"editor-push-changes-to-global-styles-modal__value",children:h.formattedCurrentValue})},{id:"new",label:(0,vu.__)("New"),enableSorting:!1,enableHiding:!1,filterBy:!1,getValue:({item:h})=>h.formattedNewValue,render:({item:h})=>(0,Yp.jsx)("span",{className:"editor-push-changes-to-global-styles-modal__value",children:h.formattedNewValue})}],[]),f=(0,dx.useMemo)(()=>[{id:"apply",label:(0,vu.__)("Apply"),isPrimary:!0,supportsBulk:!0,callback(h){r(h),o()}}],[r,o]),m=(0,$Pe.getBlockType)(e)?.title;return(0,Yp.jsxs)(JPe.Modal,{title:(0,vu.sprintf)((0,vu.__)("Apply %s styles globally"),m),onRequestClose:o,size:"large",className:"editor-push-changes-to-global-styles-modal",children:[(0,Yp.jsx)("p",{children:(0,vu.sprintf)((0,vu.__)("Choose which styles to make default for all %s blocks."),m)}),(0,Yp.jsxs)(lp,{data:i,fields:d,view:c,onChangeView:u,actions:f,selection:s,onChangeSelection:l,getItemId:olt,paginationInfo:{totalItems:i.length,totalPages:1},defaultLayouts:rlt,search:!1,itemListLabel:(0,vu.__)("Styles to apply"),children:[(0,Yp.jsx)(lp.Layout,{}),(0,Yp.jsx)(lp.Footer,{})]})]})}var yl=a(E(),1),{cleanEmptyObject:nlt}=Y(Dg.privateApis),xq={...Kp.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},ilt={"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"},slt={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},alt=["border","color","spacing","typography"],tke=(e,t)=>{let r=e;return t.forEach(o=>{r=r?.[o]}),r},ake=["top","right","bottom","left"];function llt(e,t,r){let o=[],n=t.style?.border,i=r?.border,s=e.includes("borderColor"),l=e.includes("borderWidth"),c=e.includes("borderStyle"),u=t.borderColor,d=u?`var:preset|color|${u}`:n?.color,f=rke({id:"border",primaryPath:["border"],side:null,color:s?d:void 0,width:l?n?.width:void 0,style:c?n?.style:void 0,userBorder:i,presetAttributes:u?["borderColor"]:[]});return f&&o.push(f),ake.forEach(m=>{let h=n?.[m],g=rke({id:`border.${m}`,primaryPath:["border",m],side:m,color:s?h?.color:void 0,width:l?h?.width:void 0,style:c?h?.style:void 0,userBorder:i,presetAttributes:[]});g&&o.push(g)}),e.includes("borderRadius")&&n?.radius!==void 0&&n?.radius!==""&&o.push({id:"border.radius",primaryPath:["border","radius"],paths:[{path:["border","radius"],value:n.radius}],presetAttributes:[],newValue:n.radius,format:"borderRadius"}),o}function rke({id:e,primaryPath:t,side:r,color:o,width:n,style:i,userBorder:s,presetAttributes:l}){if(!o&&!n&&!i)return null;let c=[],u=r?[r]:ake,d=(m,h)=>{h!==void 0&&(r||c.push({path:["border",m],value:h}),u.forEach(g=>{c.push({path:["border",g,m],value:h})}))};d("color",o),d("width",n),d("style",i);let f=i;if(!i&&(o||n)){let m=u.map(g=>s?.[g]?.style);u.forEach((g,v)=>{m[v]||c.push({path:["border",g,"style"],value:"solid"})}),f=(m.every(g=>g===m[0])?m[0]:void 0)||"solid"}return{id:e,primaryPath:t,paths:c,presetAttributes:l,newValue:{color:o,width:n,style:f},format:"border"}}function clt(e,t,r){let o=[];return e.forEach(n=>{if(!xq[n]||n.startsWith("border")||xq[n].rootOnly)return;let{value:i}=xq[n],s=i.join("."),l=slt[s],c=l?t[l]:void 0,u=c?`var:preset|${ilt[s]}|${c}`:tke(t.style,i),d=c?[l]:[];if(n==="linkColor"){let f=u?[{path:i,value:u}]:[],m=["elements","link",":hover","color","text"],h=tke(t.style,m);if(h&&f.push({path:m,value:h}),f.length===0)return;o.push({id:s,primaryPath:i,paths:f,presetAttributes:d,newValue:u??h});return}if(u){let f;n==="padding"||n==="margin"?f="spacing":n==="blockGap"&&(f="blockGap"),o.push({id:s,primaryPath:i,paths:[{path:i,value:u}],presetAttributes:d,newValue:u,format:f})}}),o.push(...llt(e,t,r)),o}function ult(e,t,r){let o=(0,fx.useSelect)(i=>Y(i(Kp.store)).getSupportedStyles(e),[e]),n=r?.styles?.blocks?.[e];return(0,px.useMemo)(()=>clt(o,t,n),[o,t,n])}function dlt({rowsToPush:e,attributes:t,userConfig:r,name:o}){if(!e||e.length===0)return null;let n=e.flatMap(u=>u.paths);if(n.length===0)return null;let{style:i}=t,s=structuredClone(i),l=structuredClone(r);for(let{path:u,value:d}of n)Sq(s,u,void 0),Sq(l,["styles","blocks",o,...u],d);let c={style:nlt(s)};for(let u of e.flatMap(d=>d.presetAttributes))c[u]=void 0;return{newBlockAttributes:c,newUserConfig:l}}function flt({name:e,attributes:t,setAttributes:r}){let{user:o,setUser:n}=Hr(),i=ult(e,t,o),[s,l]=(0,px.useState)(!1),{__unstableMarkNextChangeAsNotPersistent:c}=(0,fx.useDispatch)(Dg.store),{createSuccessNotice:u}=(0,fx.useDispatch)(ike.store),d=(0,px.useCallback)(f=>{let m=dlt({rowsToPush:f,attributes:t,userConfig:o,name:e});if(!m)return;let{newBlockAttributes:h,newUserConfig:g}=m;c(),r(h),n(g,{undoIgnore:!0}),u((0,qp.sprintf)((0,qp.__)("%s styles applied."),(0,Kp.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,qp.__)("Undo"),onClick(){c(),r(t),n(o,{undoIgnore:!0})}}]})},[c,t,u,e,r,n,o]);return(0,yl.jsxs)(wP.BaseControl,{className:"editor-push-changes-to-global-styles-control",help:(0,qp.sprintf)((0,qp.__)("Review and apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks."),(0,Kp.getBlockType)(e).title),children:[(0,yl.jsx)(wP.BaseControl.VisualLabel,{children:(0,qp.__)("Styles")}),(0,yl.jsx)(wP.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:i.length===0,onClick:()=>l(!0),children:(0,qp.__)("Apply globally")}),s&&(0,yl.jsx)(eke,{name:e,rows:i,onApply:d,onRequestClose:()=>l(!1)})]})}function plt(e){let t=(0,Dg.useBlockEditingMode)(),r=(0,fx.useSelect)(i=>i(ske.store).getCurrentTheme()?.is_block_theme,[]),o=alt.some(i=>(0,Kp.hasBlockSupport)(e.name,i));return t==="default"&&o&&r?(0,yl.jsx)(Dg.InspectorAdvancedControls,{children:(0,yl.jsx)(flt,{...e})}):null}var mlt=(0,nke.createHigherOrderComponent)(e=>t=>(0,yl.jsxs)(yl.Fragment,{children:[(0,yl.jsx)(e,{...t},"edit"),t.isSelected&&(0,yl.jsx)(plt,{...t})]}));(0,oke.addFilter)("editor.BlockEdit","core/editor/push-changes-to-global-styles",mlt);var dke=a(hd(),1);var lke=a(j(),1),cke=a(U(),1),SP=a(K(),1);var mx="edit-post/collab-history-sidebar",Lg="edit-post/collab-sidebar",_P=[mx,Lg];var dD="core/note",uke={title:(0,lke.__)("Note"),tagName:"mark",className:"wp-note",attributes:{"data-id":"data-id"},edit:hlt};function hlt({isActive:e,activeAttributes:t}){let{getActiveComplementaryArea:r}=(0,SP.useSelect)(je),{getSelectedNote:o}=Y((0,SP.useSelect)(N)),{selectNote:n}=Y((0,SP.useDispatch)(N)),i=t?.["data-id"];return(0,cke.useEffect)(()=>{!e||!i||_P.includes(r("core"))&&String(o())!==String(i)&&n(Number(i))},[e,i,r,o,n]),null}(0,dke.registerFormatType)(dD,uke);var xP=a(G(),1),fke=a(E(),1),Cq="__experimentalMainDashboardButton",pke=()=>{let e=(0,xP.__experimentalUseSlotFills)(Cq);return!!(e&&e.length)},{Fill:glt,Slot:vlt}=(0,xP.createSlotFill)(Cq),mke=glt,blt=()=>{let e=(0,xP.__experimentalUseSlotFills)(Cq);return(0,fke.jsx)(vlt,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};mke.Slot=blt;var fD=mke;var m5e=a(K(),1),h5e=a(ae(),1),g5e=a(G(),1),v5e=a(j(),1);var zP=a(K(),1),qg=a(j(),1),$2e=a(Dt(),1),Cx=a(be(),1),eAe=a(Te(),1),hL=a(U(),1),tAe=a(Vt(),1),rAe=a(It(),1),oAe=a(B9(),1);var YRe=a(be(),1),qRe=a(K(),1),OP=a(Te(),1),KRe=a(Dt(),1),ZRe=a(U(),1);var hx=a(be(),1),hke=a(U(),1),pD=a(G(),1),Tq=a(j(),1);var gke=a(K(),1);var Zp=a(E(),1),{useHasBlockToolbar:ylt}=Y(hx.privateApis);function vke({isCollapsed:e,onToggle:t}){let{blockSelectionStart:r}=(0,gke.useSelect)(i=>({blockSelectionStart:i(hx.store).getBlockSelectionStart()}),[]),o=ylt(),n=!!r;return(0,hke.useEffect)(()=>{r&&t(!1)},[r,t]),o?(0,Zp.jsxs)(Zp.Fragment,{children:[(0,Zp.jsx)("div",{className:J("editor-collapsible-block-toolbar",{"is-collapsed":e||!n}),children:(0,Zp.jsx)(hx.BlockToolbar,{hideDragHandle:!0})}),(0,Zp.jsx)(pD.Popover.Slot,{name:"block-toolbar"}),(0,Zp.jsx)(pD.Button,{className:"editor-collapsible-block-toolbar__toggle",icon:e?kl:Rl,onClick:()=>{t(!e)},label:e?(0,Tq.__)("Show block tools"):(0,Tq.__)("Hide block tools"),size:"compact"})]}):null}var bke=a(Te(),1),mD=a(K(),1),Jy=a(j(),1),yke=a(be(),1),gx=a(G(),1);var Eq=a(U(),1),wke=a(_a(),1),_ke=a(Dt(),1);var bu=a(E(),1);function wlt({className:e,disableBlockTools:t=!1}){let{setIsInserterOpened:r,setIsListViewOpened:o}=(0,mD.useDispatch)(N),{isDistractionFree:n,isInserterOpened:i,isListViewOpen:s,listViewShortcut:l,inserterSidebarToggleRef:c,listViewToggleRef:u,showIconLabels:d}=(0,mD.useSelect)(y=>{let{get:w}=y(_ke.store),{isListViewOpened:S,getEditorMode:x,getInserterSidebarToggleRef:C,getListViewToggleRef:I}=Y(y(N)),{getShortcutRepresentation:k}=y(wke.store);return{isInserterOpened:y(N).isInserterOpened(),isListViewOpen:S(),listViewShortcut:k("core/editor/toggle-list-view"),inserterSidebarToggleRef:C(),listViewToggleRef:I(),showIconLabels:w("core","showIconLabels"),isDistractionFree:w("core","distractionFree"),isVisualMode:x()==="visual"}},[]),f=y=>{i&&y.preventDefault()},m=(0,bke.useViewportMatch)("wide"),h=(0,Jy.__)("Document tools"),g=(0,Eq.useCallback)(()=>o(!s),[o,s]),v=(0,Eq.useCallback)(()=>r(!i),[i,r]),b=(0,Jy._x)("Block Inserter","Generic label for block inserter button"),_=i?(0,Jy.__)("Close"):(0,Jy.__)("Add");return(0,bu.jsx)(yke.NavigableToolbar,{className:J("editor-document-tools","edit-post-header-toolbar",e),"aria-label":h,variant:"unstyled",children:(0,bu.jsxs)("div",{className:"editor-document-tools__left",children:[!n&&(0,bu.jsx)(gx.ToolbarButton,{ref:c,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:i,onMouseDown:f,onClick:v,disabled:t,icon:Tc,label:d?_:b,showTooltip:!d,"aria-expanded":i}),(m||!d)&&(0,bu.jsxs)(bu.Fragment,{children:[(0,bu.jsx)(gx.ToolbarItem,{as:j3,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),(0,bu.jsx)(gx.ToolbarItem,{as:L3,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),!n&&(0,bu.jsx)(gx.ToolbarButton,{className:"editor-document-tools__document-overview-toggle",icon:x1,disabled:t,isPressed:s,label:(0,Jy.__)("Document Overview"),onClick:g,shortcut:l,showTooltip:!d,variant:d?"tertiary":void 0,"aria-expanded":s,ref:u})]})]})})}var Ske=wlt;var CP=a(G(),1);var Bg=a(E(),1),Pq={distractionFreeDisabled:{y:"-50px"},distractionFreeHover:{y:0},distractionFreeHidden:{y:"-50px"},visible:{y:0},hidden:{y:0}},_lt={distractionFreeDisabled:{x:"-100%"},distractionFreeHover:{x:0},distractionFreeHidden:{x:"-100%"},visible:{x:0},hidden:{x:0}};function hD({className:e,toolbar:t,center:r,settings:o}){let n=pke();return(0,Bg.jsxs)("div",{className:J("editor-header edit-post-header",e),children:[n&&(0,Bg.jsx)(CP.__unstableMotion.div,{className:"editor-header__back-button",variants:_lt,transition:{type:"tween"},children:(0,Bg.jsx)(fD.Slot,{})}),(0,Bg.jsx)(CP.__unstableMotion.div,{variants:Pq,className:"editor-header__toolbar",transition:{type:"tween"},children:t}),r&&(0,Bg.jsx)(CP.__unstableMotion.div,{variants:Pq,className:"editor-header__center",transition:{type:"tween"},children:r}),(0,Bg.jsx)(CP.__unstableMotion.div,{variants:Pq,transition:{type:"tween"},className:"editor-header__settings",children:o})]})}var Po=a(j(),1),vx=a(K(),1),Aq=a(Mo(),1);var ef=a(G(),1),$y=a(Dt(),1);var xke=a(G(),1),gD=a(K(),1),kq=a(j(),1),Cke=a(Te(),1),Tke=a(It(),1);var Eke=a(E(),1);function Pke(){let{createNotice:e}=(0,gD.useDispatch)(Tke.store),{getEditedPostContent:t}=(0,gD.useSelect)(N);function r(){return t()}function o(){e("info",(0,kq.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}let n=(0,Cke.useCopyToClipboard)(r,o);return(0,Eke.jsx)(xke.MenuItem,{ref:n,children:(0,kq.__)("Copy all blocks")})}var TP=a(j(),1),vD=a(G(),1),bD=a(K(),1),kke=a(_a(),1);var Rq=a(E(),1),Slt=[{value:"visual",label:(0,TP.__)("Visual editor")},{value:"text",label:(0,TP.__)("Code editor")}];function xlt(){let{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:r,mode:o}=(0,bD.useSelect)(l=>({shortcut:l(kke.store).getShortcutRepresentation("core/editor/toggle-mode"),isRichEditingEnabled:l(N).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:l(N).getEditorSettings().codeEditingEnabled,mode:l(N).getEditorMode()}),[]),{switchEditorMode:n}=(0,bD.useDispatch)(N),i=o;!t&&o==="visual"&&(i="text"),!r&&o==="text"&&(i="visual");let s=Slt.map(l=>(!r&&l.value==="text"&&(l={...l,disabled:!0}),!t&&l.value==="visual"&&(l={...l,disabled:!0,info:(0,TP.__)("You can enable the visual editor in your profile settings.")}),l.value!==i&&!l.disabled?{...l,shortcut:e}:l));return(0,Rq.jsx)(vD.MenuGroup,{label:(0,TP.__)("Editor"),children:(0,Rq.jsx)(vD.MenuItemsChoice,{choices:s,value:i,onSelect:n})})}var Rke=xlt;var Ake=a(G(),1),Ike=a(E(),1),{Fill:Oke,Slot:Clt}=(0,Ake.createSlotFill)("ToolsMoreMenuGroup");Oke.Slot=({fillProps:e})=>(0,Ike.jsx)(Clt,{fillProps:e});var yD=Oke;var Nke=a(G(),1),Mke=a(E(),1),{Fill:Fke,Slot:Tlt}=(0,Nke.createSlotFill)(Symbol("ViewMoreMenuGroup"));Fke.Slot=({fillProps:e})=>(0,Mke.jsx)(Tlt,{fillProps:e});var wD=Fke;var ho=a(E(),1);function _D({disabled:e=!1}){let{openModal:t}=(0,vx.useDispatch)(je),{set:r}=(0,vx.useDispatch)($y.store),{toggleDistractionFree:o}=(0,vx.useDispatch)(N),n=(0,vx.useSelect)(s=>s($y.store).get("core","showIconLabels"),[]),i=()=>{r("core","distractionFree",!1)};return(0,ho.jsx)(ho.Fragment,{children:(0,ho.jsx)(ef.DropdownMenu,{icon:yo,label:(0,Po.__)("Options"),popoverProps:{placement:"bottom-end",className:"more-menu-dropdown__content"},toggleProps:{showTooltip:!n,...n&&{variant:"tertiary"},tooltipPosition:"bottom",size:"compact",disabled:e},children:({onClose:s})=>(0,ho.jsxs)(ho.Fragment,{children:[(0,ho.jsxs)(ef.MenuGroup,{label:(0,Po._x)("View","noun"),children:[(0,ho.jsx)($y.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:i,label:(0,Po.__)("Top toolbar"),info:(0,Po.__)("Access all block and document tools in a single place"),messageActivated:(0,Po.__)("Top toolbar activated."),messageDeactivated:(0,Po.__)("Top toolbar deactivated.")}),(0,ho.jsx)($y.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,Po.__)("Distraction free"),info:(0,Po.__)("Write with calmness"),handleToggling:!1,onToggle:()=>o({createNotice:!1}),messageActivated:(0,Po.__)("Distraction free mode activated."),messageDeactivated:(0,Po.__)("Distraction free mode deactivated."),shortcut:Aq.displayShortcut.primaryShift("\\")}),(0,ho.jsx)($y.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,Po.__)("Spotlight mode"),info:(0,Po.__)("Focus on one block at a time"),messageActivated:(0,Po.__)("Spotlight mode activated."),messageDeactivated:(0,Po.__)("Spotlight mode deactivated.")}),(0,ho.jsx)(wD.Slot,{fillProps:{onClose:s}})]}),(0,ho.jsx)(Rke,{}),(0,ho.jsx)(Wl.Slot,{name:"core/plugin-more-menu",label:(0,Po.__)("Panels"),fillProps:{onClick:s}}),(0,ho.jsxs)(ef.MenuGroup,{label:(0,Po.__)("Tools"),children:[(0,ho.jsx)(ef.MenuItem,{onClick:()=>t("editor/keyboard-shortcut-help"),shortcut:Aq.displayShortcut.access("h"),children:(0,Po.__)("Keyboard shortcuts")}),(0,ho.jsx)(Pke,{}),(0,ho.jsxs)(ef.MenuItem,{icon:ms,href:(0,Po.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),target:"_blank",rel:"noopener",children:[(0,Po.__)("Help"),(0,ho.jsx)(Gt,{render:(0,ho.jsx)("span",{}),children:(0,Po.__)("(opens in a new tab)")})]}),(0,ho.jsx)(yD.Slot,{fillProps:{onClose:s}})]}),(0,ho.jsx)(ef.MenuGroup,{children:(0,ho.jsx)(ef.MenuItem,{onClick:()=>t("editor/preferences"),children:(0,Po.__)("Preferences")})})]})})})}var Lke=a(Te(),1),SD=a(K(),1);var Bke=a(E(),1),Dke="toggle",Iq="button";function Vke({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let r,o=(0,Lke.useViewportMatch)("medium","<"),{togglePublishSidebar:n}=(0,SD.useDispatch)(N),{hasPublishAction:i,isBeingScheduled:s,isPending:l,isPublished:c,isPublishSidebarEnabled:u,isPublishSidebarOpened:d,isScheduled:f,postStatus:m,postStatusHasChanged:h,postType:g}=(0,SD.useSelect)(v=>({hasPublishAction:!!v(N).getCurrentPost()?._links?.["wp:action-publish"],isBeingScheduled:v(N).isEditedPostBeingScheduled(),isPending:v(N).isCurrentPostPending(),isPublished:v(N).isCurrentPostPublished(),isPublishSidebarEnabled:v(N).isPublishSidebarEnabled(),isPublishSidebarOpened:v(N).isPublishSidebarOpened(),isScheduled:v(N).isCurrentPostScheduled(),postStatus:v(N).getEditedPostAttribute("status"),postStatusHasChanged:v(N).getPostEdits()?.status,postType:v(N).getCurrentPostType()}),[]);return g===El||c||h&&!["future","publish"].includes(m)||f&&s||l&&!i&&!o?r=Iq:o||u?r=Dke:r=Iq,(0,Bke.jsx)(LS,{forceIsDirty:e,isOpen:d,isToggle:r===Dke,onToggle:n,setEntitiesSavedStatesCallback:t})}var jke=a(j(),1),zke=a(G(),1);var Hke=a(ae(),1),Uke=a(K(),1),Wke=a(Dt(),1);var Gke=a(E(),1);function Yke(){let{hasLoaded:e,permalink:t,isPublished:r,label:o,showIconLabels:n}=(0,Uke.useSelect)(i=>{let s=i(N).getCurrentPostType(),l=i(Hke.store).getPostType(s),{get:c}=i(Wke.store);return{permalink:i(N).getPermalink(),isPublished:i(N).isCurrentPostPublished(),label:l?.labels?.view_item,hasLoaded:!!l,showIconLabels:c("core","showIconLabels")}},[]);return!r||!t||!e?null:(0,Gke.jsx)(zke.Button,{icon:ms,label:o||(0,jke.__)("View post"),href:t,target:"_blank",showTooltip:!n,size:"compact"})}var qke=a(Te(),1),Va=a(G(),1),Ti=a(j(),1);var bx=a(K(),1),Kke=a(ae(),1),Zke=a(Dt(),1);var Oq=a(be(),1);var as={document:"edit-post/document",block:"edit-post/block"};var Ln=a(E(),1),{getViewportBreakpoints:Elt}=Y(Du);function Xke({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,isResponsiveEditingEnabled:m,hasBlockSelection:h,activeComplementaryArea:g}=(0,bx.useSelect)(B=>{let{getCurrentPostType:F,getCurrentTemplateId:V,getRenderingMode:z,getDeviceType:D,getEditorSettings:O}=Y(B(N)),{isResponsiveEditing:L,getBlockSelectionStart:W,getSettings:q}=Y(B(Oq.store)),{getEntityRecord:Z,getPostType:Q}=B(Kke.store),{get:ue}=B(Zke.store),te=F(),de=Elt(q().__experimentalFeatures?.viewport);return{deviceType:D(),homeUrl:Z("root","__unstableBase")?.home,hasMobileViewport:de.mobile!==void 0,hasTabletViewport:de.tablet!==void 0,isTemplate:te==="wp_template",isViewable:Q(te)?.viewable??!1,showIconLabels:ue("core","showIconLabels"),isTemplateHidden:z()==="post-only",templateId:V(),isResponsiveEditing:L(),isResponsiveEditingEnabled:O().responsiveEditingEnabled,hasBlockSelection:!!W(),activeComplementaryArea:B(je).getActiveComplementaryArea("core")}},[]),{setDeviceType:v,setRenderingMode:b,setDefaultRenderingMode:_}=Y((0,bx.useDispatch)(N)),{resetZoomLevel:y,setStyleStateViewport:w,setResponsiveEditing:S}=Y((0,bx.useDispatch)(Oq.store)),{enableComplementaryArea:x}=(0,bx.useDispatch)(je),C=B=>{v(B),y()},I=()=>{let B=!f;S(B),w(B?Ok[r]??"default":"default"),B&&h&&!g&&x("core",as.block)};if((0,qke.useViewportMatch)("medium","<"))return null;let R={placement:"bottom-end"},A={className:"editor-preview-dropdown__toggle",iconPosition:"right",size:"compact",showTooltip:!c,disabled:t,accessibleWhenDisabled:t},P={"aria-label":(0,Ti.__)("View options")},T={desktop:bR,mobile:y0,tablet:v2},M=[{value:"Desktop",label:(0,Ti.__)("Desktop"),icon:bR,info:f?(0,Ti.__)("Style all viewports."):(0,Ti.__)("Preview desktop viewport.")},...i?[{value:"Tablet",label:(0,Ti.__)("Tablet"),icon:v2,info:f?(0,Ti.__)("Style tablet only."):(0,Ti.__)("Preview tablet viewport.")}]:[],...n?[{value:"Mobile",label:(0,Ti.__)("Mobile"),icon:y0,info:f?(0,Ti.__)("Style mobile only."):(0,Ti.__)("Preview mobile viewport.")}]:[]];return(0,Ln.jsx)(Va.DropdownMenu,{className:J("editor-preview-dropdown",`editor-preview-dropdown--${r.toLowerCase()}`,{"is-responsive-editing":f}),popoverProps:R,toggleProps:A,menuProps:P,icon:T[r.toLowerCase()],label:(0,Ti.__)("View"),disableOpenOnArrowDown:t,children:({onClose:B})=>(0,Ln.jsxs)(Ln.Fragment,{children:[(0,Ln.jsx)(Va.MenuGroup,{children:(0,Ln.jsx)(Va.MenuItemsChoice,{choices:M,value:r,onSelect:C})}),m&&(0,Ln.jsx)(Va.MenuGroup,{children:(0,Ln.jsx)(Va.MenuItem,{icon:f?Oo:void 0,isSelected:f,role:"menuitemcheckbox",onClick:I,info:(0,Ti.__)("Style changes apply only to the selected viewport."),children:(0,Ti.__)("Responsive styles")})}),s&&(0,Ln.jsx)(Va.MenuGroup,{children:(0,Ln.jsxs)(Va.MenuItem,{href:o,target:"_blank",icon:ms,onClick:B,children:[(0,Ti.__)("View site"),(0,Ln.jsx)(Gt,{render:(0,Ln.jsx)("span",{}),children:(0,Ti.__)("(opens in a new tab)")})]})}),!s&&!!d&&(0,Ln.jsx)(Va.MenuGroup,{children:(0,Ln.jsx)(Va.MenuItem,{icon:u?void 0:Oo,isSelected:!u,role:"menuitemcheckbox",onClick:()=>{let F=u?"template-locked":"post-only";b(F),_(F),y()},children:(0,Ti.__)("Show template")})}),l&&(0,Ln.jsx)(Va.MenuGroup,{children:(0,Ln.jsx)(DCe,{forceIsAutosaveable:e,onPreview:B})}),(0,Ln.jsx)(Wl.Slot,{name:"core/plugin-preview-menu",fillProps:{onClick:B}})]})})}var Qke=a(G(),1),Nq=a(j(),1),Jke=a(U(),1),EP=a(K(),1),Mq=a(be(),1);var Fq=a(Dt(),1),xD=a(_a(),1),$ke=a(Mo(),1);var eRe=a(E(),1),Plt=({disabled:e})=>{let{isZoomOut:t,showIconLabels:r,isDistractionFree:o}=(0,EP.useSelect)(u=>({isZoomOut:Y(u(Mq.store)).isZoomOut(),showIconLabels:u(Fq.store).get("core","showIconLabels"),isDistractionFree:u(Fq.store).get("core","distractionFree")})),{resetZoomLevel:n,setZoomLevel:i}=Y((0,EP.useDispatch)(Mq.store)),{registerShortcut:s,unregisterShortcut:l}=(0,EP.useDispatch)(xD.store);return(0,Jke.useEffect)(()=>(s({name:"core/editor/zoom",category:"global",description:(0,Nq.__)("Enter or exit zoom out."),keyCombination:{modifier:(0,$ke.isAppleOS)()?"primaryShift":"secondary",character:"0"}}),()=>{l("core/editor/zoom")}),[s,l]),(0,xD.useShortcut)("core/editor/zoom",()=>{t?n():i("auto-scaled")},{isDisabled:o}),(0,eRe.jsx)(Qke.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=>{t?n():i("auto-scaled")},icon:a8,label:(0,Nq.__)("Zoom Out"),isPressed:t,size:"compact",showTooltip:!r,className:"editor-zoom-out-toggle"})},tRe=Plt;var WRe=a(G(),1),Sx=a(U(),1),GRe=a(ae(),1),jD=a(j(),1);var nRe=a(G(),1),iRe=a(U(),1);var yx=a(U(),1);function rRe(e){let[t,r]=(0,yx.useState)(e),[o,n]=(0,yx.useState)(e?"loading":"idle");t!==e&&(r(e),n(e?"loading":"idle"));let i=(0,yx.useCallback)(()=>n("loaded"),[]),s=(0,yx.useCallback)(()=>n("error"),[]);return{status:o,handleLoad:i,handleError:s}}var yu=a(E(),1);Tk([UN]);var oRe="#1e1e1e",klt="#fff";function Rlt({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}=rRe(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,iRe.useMemo)(()=>s&&Io(s).isReadable(oRe,{level:"AA",size:"normal"})?oRe:klt,[s]),y={...u,...s?{"--editor-avatar-outline-color":s,"--editor-avatar-name-color":_}:{}},w=(0,yu.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,yu.jsxs)("span",{className:"editor-avatar__image",children:[t&&(0,yu.jsx)("img",{src:t,alt:"",crossOrigin:"anonymous",className:"editor-avatar__img",onLoad:m,onError:h}),!g&&b]}),l&&!!c&&(0,yu.jsx)("span",{className:"editor-avatar__status-indicator",children:(0,yu.jsx)(nRe.Icon,{icon:c})}),v&&(0,yu.jsx)("span",{className:"editor-avatar__name",children:o||r})]});return r&&(!v||o)?(0,yu.jsxs)(Ze.Root,{children:[(0,yu.jsx)(Ze.Trigger,{render:w}),(0,yu.jsx)(Ze.Popup,{children:r})]}):w}var Xp=Rlt;var sRe=a(U(),1),CD=a(j(),1),TD=a(E(),1);function Alt({className:e,max:t=3,children:r,...o}){let n=sRe.Children.toArray(r),i=n.slice(0,t),s=n.length-t;return(0,TD.jsxs)("div",{role:"group",className:J("editor-avatar-group",e),...o,children:[i,s>0&&(0,TD.jsx)("span",{className:"editor-avatar-group__overflow","aria-label":(0,CD.sprintf)((0,CD._n)("%d more collaborator","%d more collaborators",s),s),children:`+${s}`})]})}var Dq=Alt;var AP=a(j(),1),kD=a(G(),1);var _Re=a(na(),1);function Qp(e){return e?.["48"]||e?.["96"]||e?.["24"]}var cRe=a(j(),1),Vg=a(hd(),1),uRe=a(Mp(),1);function dRe(e){return e.trim()}var PP=-16,Ilt=16,aRe=20,lRe=["#6F42C1","#D94145","#FBBF24","#FF35EE","#879F11","#0F766E","#00CFFF"];function ja(e){return lRe[e%lRe.length]}function fRe(e,t=10){if(!e)return"";let r=(0,cRe._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 jg(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 pRe(e,t){let r=new Set(jg(e)),o=Number(t);return r.has(o)?e:(r.add(o),{...e,noteId:[...r]})}var kP="core/note";function Olt(e,t){if(t==null)return null;let r=null;if(e instanceof Vg.RichTextData?r=e.toHTMLString():typeof e=="string"&&(r=e),!r||r.indexOf("wp-note")===-1)return null;let o=String(t),i=(0,Vg.create)({html:r}).formats,s=-1;for(let l=0;l<i.length;l++)if(i[l]?.find(d=>d.type===kP&&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 ED(e,t){if(!e)return null;for(let r of Object.keys(e)){let o=Olt(e[r],t);if(o)return{attributeKey:r,start:o.start,end:o.end}}return null}function PD(e){return`mark.wp-note[data-id="${String(e).replace(/["\\\n\r\f]/g,r=>r==='"'||r==="\\"?`\\${r}`:`\\${r.codePointAt(0).toString(16)} `)}"]`}function mRe(e){let t=e.ownerDocument.defaultView?.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return null;let r=t.getRangeAt(0);if(r.collapsed||!e.contains(r.commonAncestorContainer))return null;let o=(0,uRe.getRectangleFromRange)(r);return!o||o.width===0&&o.height===0?null:o}var Nlt=-1;function hRe(e,t){let r=ED(t,e?.id);return r?r.start:Nlt}function gRe(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!==kP)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===kP);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!==kP);n[l]=[...u,...d]}return{...e,formats:n}}function Lq(e,t){if(!(e instanceof Vg.RichTextData))return null;let r=String(t),o=(0,Vg.create)({html:e.toHTMLString()}),n=!1,i=o.formats.map(s=>{if(!s)return s;let l=s.filter(c=>!(c.type===kP&&c.attributes?.["data-id"]===r));return l.length===s.length?s:(n=!0,l.length?l:void 0)});return n?Vg.RichTextData.fromHTMLString(new Vg.RichTextData({...o,formats:i}).toHTMLString()):null}function RP(e){return e.find(t=>t.status==="hold")??e[0]??null}function vRe(e,t){let r=new Set(jg(e));return r.delete(Number(t)),{...e,noteId:r.size>0?[...r]:void 0}}function bRe({threads:e,selectedNoteId:t,blockRects:r,heights:o,scrollTop:n=0}){let i={},s=[...e].sort((b,_)=>(r[b.id]?.top??Number.MAX_VALUE)-(r[_.id]?.top??Number.MAX_VALUE)),l=Math.max(0,s.findIndex(b=>b.id===t)),c=s[l];if(!c||!r[c.id])return{positions:{}};let d=r[c.id].top||0,f=o[c.id]||0;i[c.id]=PP;let m=d+PP,h=f;for(let b=l+1;b<s.length;b++){let _=s[b],y=r[_.id];if(!y)continue;let w=y.top||0,S=o[_.id]||0,x=PP,C=m+h;w<C+Ilt&&(x=C-w+aRe),i[_.id]=x,m=w+x,h=S}let g=d+PP;for(let b=l-1;b>=0;b--){let _=s[b],y=r[_.id];if(!y)continue;let w=y.top||0,S=o[_.id]||0,x=PP;w+S>g&&(x=g-w-S-aRe),i[_.id]=x,g=w+x}let v={};for(let b of s){let _=r[b.id];_&&i[b.id]!==void 0&&(v[b.id]=_.top+n+i[b.id])}return{positions:v}}function yRe(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 ls(e,t,r){return yRe(e,t,r).then(o=>{o&&(o.focus(),o.scrollIntoView({block:"nearest"}))})}function wRe(e,t){return yRe(e,t).then(r=>{r?.scrollIntoView({block:"nearest"})})}var za=a(E(),1);function SRe({activeCollaborators:e,popoverAnchor:t,setIsPopoverVisible:r,cursorRegistry:o}){let n=i=>{o.scrollToCursor(i,{behavior:"smooth",block:"center",highlightDuration:2e3})&&((0,_Re.speak)((0,AP.__)("Scrolled to cursor"),"polite"),r(!1))};return(0,za.jsx)(kD.Popover,{anchor:t,placement:"bottom",offset:8,className:"editor-collaborators-presence__list",onClose:()=>r(!1),children:(0,za.jsxs)("div",{className:"editor-collaborators-presence__list-content",children:[(0,za.jsxs)("div",{className:"editor-collaborators-presence__list-header",children:[(0,za.jsxs)("div",{className:"editor-collaborators-presence__list-header-title",children:[(0,AP.__)("Collaborators"),(0,za.jsx)("span",{children:e.length})]}),(0,za.jsx)("div",{className:"editor-collaborators-presence__list-header-action",children:(0,za.jsx)(kD.Button,{__next40pxDefaultSize:!0,icon:Mi,iconSize:24,label:(0,AP.__)("Close Collaborators List"),onClick:()=>r(!1)})})]}),(0,za.jsx)("div",{className:"editor-collaborators-presence__list-items",children:e.map(i=>{let s=i.isMe;return(0,za.jsxs)("button",{className:"editor-collaborators-presence__list-item",disabled:s,onClick:()=>n(i.clientId),children:[(0,za.jsx)(Xp,{src:Qp(i.collaboratorInfo.avatar_urls),name:i.collaboratorInfo.name,borderColor:s?"var(--wp-admin-theme-color)":ja(i.collaboratorInfo.id),dimmed:!i.isConnected}),(0,za.jsx)("div",{className:"editor-collaborators-presence__list-item-info",children:(0,za.jsx)("div",{className:"editor-collaborators-presence__list-item-name",children:s?(0,AP.__)("You"):i.collaboratorInfo.name})})]},i.clientId)})})]})})}function Mlt(e,t){e.classList.add("collaborators-overlay-cursor-highlighted"),setTimeout(()=>{e.classList.remove("collaborators-overlay-cursor-highlighted")},t)}function xRe(){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&&Mlt(o,r.highlightDuration),!0):!1},removeAll(){e.clear()}}}var URe=a(be(),1);var BD=a(Te(),1),_u=a(U(),1),zRe=a(j(),1);var RD="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)",Bq="9999px",Vq="32px",jq="24px",AD="4px",ID="8px",zq="1px",CRe="2px",zg="#fff",TRe="11px",ERe="13px",Hq="var(--wpds-typography-font-weight-emphasis, 600)",PRe="20px";var kRe=` |
| 220 |
.editor-avatar { |
| 221 |
position: relative; |
| 222 |
display: inline-flex; |
| 223 |
align-items: center; |
| 224 |
border-radius: ${Bq}; |
| 225 |
flex-shrink: 0; |
| 226 |
box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) ${zg}, ${RD}; |
| 227 |
} |
| 228 |
.editor-avatar__image { |
| 229 |
box-sizing: border-box; |
| 230 |
position: relative; |
| 231 |
width: ${Vq}; |
| 232 |
height: ${Vq}; |
| 233 |
border-radius: ${Bq}; |
| 234 |
border: 0; |
| 235 |
background-color: var(--wp-admin-theme-color, #3858e9); |
| 236 |
overflow: hidden; |
| 237 |
overflow: clip; |
| 238 |
flex-shrink: 0; |
| 239 |
font-size: 0; |
| 240 |
color: ${zg}; |
| 241 |
} |
| 242 |
.is-small > .editor-avatar__image { |
| 243 |
width: ${jq}; |
| 244 |
height: ${jq}; |
| 245 |
} |
| 246 |
.has-avatar-border-color > .editor-avatar__image { |
| 247 |
border: var(--wp-admin-border-width-focus, 2px) solid var(--editor-avatar-outline-color); |
| 248 |
background-clip: padding-box; |
| 249 |
} |
| 250 |
.has-avatar-border-color > .editor-avatar__image::after { |
| 251 |
content: ""; |
| 252 |
position: absolute; |
| 253 |
inset: 0; |
| 254 |
border-radius: inherit; |
| 255 |
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) ${zg}; |
| 256 |
pointer-events: none; |
| 257 |
z-index: 1; |
| 258 |
} |
| 259 |
.editor-avatar__img { |
| 260 |
position: absolute; |
| 261 |
inset: 0; |
| 262 |
width: 100%; |
| 263 |
height: 100%; |
| 264 |
object-fit: cover; |
| 265 |
border-radius: inherit; |
| 266 |
opacity: 0; |
| 267 |
} |
| 268 |
.has-src > .editor-avatar__image > .editor-avatar__img { |
| 269 |
opacity: 1; |
| 270 |
} |
| 271 |
.editor-avatar:not(.has-src) > .editor-avatar__image { |
| 272 |
display: flex; |
| 273 |
align-items: center; |
| 274 |
justify-content: center; |
| 275 |
font-size: ${TRe}; |
| 276 |
font-weight: ${Hq}; |
| 277 |
border: 0; |
| 278 |
background-clip: border-box; |
| 279 |
} |
| 280 |
.editor-avatar:not(.has-src) > .editor-avatar__image::after { |
| 281 |
content: none; |
| 282 |
} |
| 283 |
.editor-avatar:not(.has-src).has-avatar-border-color > .editor-avatar__image { |
| 284 |
background-color: var(--editor-avatar-outline-color); |
| 285 |
} |
| 286 |
.editor-avatar__name { |
| 287 |
font-size: ${ERe}; |
| 288 |
font-weight: ${Hq}; |
| 289 |
line-height: ${PRe}; |
| 290 |
color: var(--editor-avatar-name-color, ${zg}); |
| 291 |
min-width: 0; |
| 292 |
padding-bottom: 2px; /* $grid-unit-05 / 2 */ |
| 293 |
overflow: hidden; |
| 294 |
opacity: 0; |
| 295 |
white-space: nowrap; |
| 296 |
transition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1); |
| 297 |
} |
| 298 |
.editor-avatar.is-badge { |
| 299 |
display: inline-grid; |
| 300 |
grid-template-columns: min-content 0fr; |
| 301 |
column-gap: 0; |
| 302 |
padding-inline-end: 0; |
| 303 |
background-color: var(--wp-admin-theme-color, #3858e9); |
| 304 |
transition: |
| 305 |
grid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1), |
| 306 |
column-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1), |
| 307 |
padding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1); |
| 308 |
} |
| 309 |
.editor-avatar.is-badge:hover { |
| 310 |
grid-template-columns: min-content 1fr; |
| 311 |
column-gap: ${AD}; |
| 312 |
padding-inline-end: ${ID}; |
| 313 |
transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1); |
| 314 |
} |
| 315 |
.editor-avatar.is-badge:hover .editor-avatar__name { |
| 316 |
opacity: 1; |
| 317 |
transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1); |
| 318 |
} |
| 319 |
.editor-avatar.is-badge.has-avatar-border-color { |
| 320 |
background-color: var(--editor-avatar-outline-color); |
| 321 |
} |
| 322 |
@media (prefers-reduced-motion: reduce) { |
| 323 |
.editor-avatar.is-badge, |
| 324 |
.editor-avatar__name { |
| 325 |
transition: none; |
| 326 |
} |
| 327 |
} |
| 328 |
`;var RRe=` |
| 329 |
.block-canvas-cover { |
| 330 |
position: absolute; |
| 331 |
top: 0; |
| 332 |
left: 0; |
| 333 |
width: 100%; |
| 334 |
height: 100%; |
| 335 |
pointer-events: none; |
| 336 |
z-index: 20000; |
| 337 |
} |
| 338 |
.block-canvas-cover .collaborators-overlay-full { |
| 339 |
position: absolute; |
| 340 |
top: 0; |
| 341 |
left: 0; |
| 342 |
width: 100%; |
| 343 |
height: 100%; |
| 344 |
} |
| 345 |
.block-canvas-cover .collaborators-overlay-fixed { |
| 346 |
position: fixed; |
| 347 |
width: 100%; |
| 348 |
height: 100%; |
| 349 |
} |
| 350 |
.collaborators-overlay-user { |
| 351 |
position: absolute; |
| 352 |
} |
| 353 |
/* Cursor lines render below avatar labels across all users. The parent |
| 354 |
.collaborators-overlay-user has no z-index so it does not create a |
| 355 |
stacking context \u2014 children participate in the shared overlay context. */ |
| 356 |
.collaborators-overlay-user-cursor { |
| 357 |
position: absolute; |
| 358 |
z-index: 0; |
| 359 |
width: ${CRe}; |
| 360 |
border-radius: ${zq}; |
| 361 |
outline: ${zq} solid ${zg}; |
| 362 |
box-shadow: ${RD}; |
| 363 |
animation: collaborators-overlay-cursor-blink 1s infinite; |
| 364 |
} |
| 365 |
.collaborators-overlay-selection-rect { |
| 366 |
position: absolute; |
| 367 |
opacity: 0.15; |
| 368 |
pointer-events: none; |
| 369 |
border-radius: 2px; |
| 370 |
} |
| 371 |
|
| 372 |
/* Overlay-specific positioning applied to the Avatar cursor label. */ |
| 373 |
.collaborators-overlay-user-label.editor-avatar { |
| 374 |
position: absolute; |
| 375 |
z-index: 1; |
| 376 |
transform: translate(-11px, -100%); |
| 377 |
margin-top: -${AD}; |
| 378 |
pointer-events: auto; |
| 379 |
overflow: visible; |
| 380 |
width: max-content; |
| 381 |
} |
| 382 |
/* Avatar positioned above a highlighted block as a label. */ |
| 383 |
.collaborators-overlay-block-label.editor-avatar { |
| 384 |
position: absolute; |
| 385 |
z-index: 1; |
| 386 |
transform: translateY(calc(-100% - ${ID})); |
| 387 |
pointer-events: auto; |
| 388 |
overflow: visible; |
| 389 |
width: max-content; |
| 390 |
} |
| 391 |
|
| 392 |
@keyframes collaborators-overlay-cursor-blink { |
| 393 |
0%, 45% { opacity: 1; } |
| 394 |
55%, 95% { opacity: 0; } |
| 395 |
100% { opacity: 1; } |
| 396 |
} |
| 397 |
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor { |
| 398 |
animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3; |
| 399 |
} |
| 400 |
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label { |
| 401 |
animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3; |
| 402 |
} |
| 403 |
@keyframes collaborators-overlay-cursor-highlight { |
| 404 |
0%, 100% { |
| 405 |
transform: scale(1); |
| 406 |
filter: drop-shadow(0 0 0 transparent); |
| 407 |
} |
| 408 |
50% { |
| 409 |
transform: scale(1.2); |
| 410 |
filter: drop-shadow(0 0 8px currentColor); |
| 411 |
} |
| 412 |
} |
| 413 |
@keyframes collaborators-overlay-label-highlight { |
| 414 |
0%, 100% { |
| 415 |
transform: translate(-11px, -100%) scale(1); |
| 416 |
filter: drop-shadow(0 0 0 transparent); |
| 417 |
} |
| 418 |
50% { |
| 419 |
transform: translate(-11px, -100%) scale(1.1); |
| 420 |
filter: drop-shadow(0 0 6px currentColor); |
| 421 |
} |
| 422 |
} |
| 423 |
.block-editor-block-list__block.is-collaborator-selected:not(:focus)::after { |
| 424 |
content: ""; |
| 425 |
position: absolute; |
| 426 |
pointer-events: none; |
| 427 |
top: 0; |
| 428 |
right: 0; |
| 429 |
bottom: 0; |
| 430 |
left: 0; |
| 431 |
outline-color: var(--collaborator-outline-color); |
| 432 |
outline-style: solid; |
| 433 |
outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)); |
| 434 |
outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)); |
| 435 |
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(${zg}, 0.7); |
| 436 |
z-index: 1; |
| 437 |
} |
| 438 |
@media (prefers-reduced-motion: reduce) { |
| 439 |
.collaborators-overlay-user-label, |
| 440 |
.collaborators-overlay-user-cursor { |
| 441 |
animation: none; |
| 442 |
} |
| 443 |
} |
| 444 |
`;function ARe(e,t){let r=null,o=()=>{try{e()}catch{}r=setTimeout(o,t)};return r=setTimeout(o,t),()=>{r&&clearTimeout(r)}}var Wq=a(ae(),1),wx=a(U(),1);var wu=a(U(),1);function OD(e){let[t,r]=(0,wu.useState)(0),o=(0,wu.useRef)(null),n=(0,wu.useCallback)(()=>(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(i=>i+1)},e),()=>{o.current&&clearTimeout(o.current)}),[e]);return[t,n]}function ND(){let[e,t]=(0,wu.useState)(0),r=(0,wu.useRef)(null);(0,wu.useEffect)(()=>()=>{r.current!==null&&cancelAnimationFrame(r.current)},[]);let o=(0,wu.useCallback)(()=>{r.current!==null&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{r.current=null,t(n=>n+1)})},[]);return[e,o]}var{useActiveCollaborators:Flt,useResolvedSelection:Dlt}=Y(Wq.privateApis),{SelectionType:Llt}=Y(Wq.privateApis);function IRe(e,t,r,o,n){let i=(0,wx.useRef)(new Set),s=Flt(r??null,o??null),l=Dlt(r??null,o??null),[c,u]=(0,wx.useState)([]),[d,f]=OD(n),[m,h]=ND();return(0,wx.useEffect)(()=>{if(!t){u([]);return}let g=i.current,v=new Set,b=s.filter(S=>{let x=S.editorState?.selection?.type===Llt.WholeBlock;return!S.isMe&&x}).map(S=>{let x;try{({localClientId:x}=l(S.editorState?.selection))}catch{return null}return x?{blockId:x,color:S.isMe?"var(--wp-admin-theme-color)":ja(S.collaboratorInfo.id),userName:S.collaboratorInfo.name,avatarUrl:Qp(S.collaboratorInfo.avatar_urls)}:null}).filter(S=>!S||v.has(S.blockId)?!1:(v.add(S.blockId),!0)),_=new Set(b.map(S=>S.blockId));for(let S of g)if(!_.has(S)){let x=Uq(t,S);x&&(x.classList.remove("is-collaborator-selected"),x.style.removeProperty("--collaborator-outline-color")),g.delete(S)}let y=[],w=e?.getBoundingClientRect()??null;return b.forEach(S=>{let{color:x,blockId:C,userName:I,avatarUrl:k}=S,R=Uq(t,C);if(R&&(R.classList.add("is-collaborator-selected"),R.style.setProperty("--collaborator-outline-color",x),g.add(C),w)){let A=R.getBoundingClientRect();y.push({blockId:C,userName:I,avatarUrl:k,color:x,x:A.left-w.left,y:A.top-w.top})}}),u(y),()=>{for(let S of g){let x=Uq(t,S);x&&(x.classList.remove("is-collaborator-selected"),x.style.removeProperty("--collaborator-outline-color"))}g.clear()}},[s,t,e,d,m,l]),{highlights:c,rerenderHighlightsAfterDelay:f,rerenderHighlightsOnResize:h}}var Uq=(e,t)=>e.querySelector(`[data-block="${t}"]`);var Yq=a(ae(),1),LRe=a(K(),1),LD=a(U(),1),BRe=a(Dt(),1);var FRe=a(ae(),1);var Blt=500,MD=(e,t,r,o)=>e===null||!t?null:Vlt(t,e,r,o)??null,Vlt=(e,t,r,o)=>{let{node:n,offset:i}=Gq(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}},FD=(e,t,r,o,n)=>{let i=t,s=r;i>s&&([i,s]=[s,i]);let l=Gq(e,i,o),c=Gq(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},ORe=(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},NRe=(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},Gq=(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>Blt)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}},MRe=(e,t)=>e.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING;var{SelectionDirection:jlt,SelectionType:DD}=Y(FRe.privateApis);function IP(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 DRe(e,t,r,o){return e.type===DD.None||e.type===DD.WholeBlock?{}:e.type===DD.Cursor?zlt(t,o):r?Hlt(e,t,r,o):{}}function zlt(e,t){if(!e.localClientId)return{};let r=IP(t.editorDocument,e);return{coords:MD(e.richTextOffset,r,t.editorDocument,t.overlayRect)}}function Hlt(e,t,r,o){if(!t.localClientId||!r.localClientId||t.richTextOffset===null||r.richTextOffset===null)return{};let i=e.selectionDirection===jlt.Backward?t:r,s,l=null;if(e.type===DD.SelectionInOneBlock){let u=Ult(t,r,o);s=u.rects,l=u.blockElement}else{let u=Wlt(t,r,o);s=u.rects,l=i.localClientId===u.firstBlockClientId?u.firstBlock:u.lastBlock}if(s.length>0)return{coords:MD(i.richTextOffset,l,o.editorDocument,o.overlayRect),selectionRects:s};let c=IP(o.editorDocument,t);return{coords:MD(t.richTextOffset,c,o.editorDocument,o.overlayRect)}}function Ult(e,t,r){let o=IP(r.editorDocument,e);return!o||e.richTextOffset===null||t.richTextOffset===null?{rects:[],blockElement:null}:{rects:FD(o,e.richTextOffset,t.richTextOffset,r.editorDocument,r.overlayRect)??[],blockElement:o}}function Wlt(e,t,r){let o=e,n=t,i=IP(r.editorDocument,o),s=IP(r.editorDocument,n);if(i&&s&&MRe(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=FD(i,o.richTextOffset,Number.MAX_SAFE_INTEGER,r.editorDocument,r.overlayRect);c&&l.push(...c);let u=NRe(o.localClientId,n.localClientId,r.editorDocument);for(let f of u){let m=ORe(f,r.editorDocument,r.overlayRect);l.push(...m)}let d=FD(s,0,n.richTextOffset,r.editorDocument,r.overlayRect);return d&&l.push(...d),{rects:l,firstBlock:i,lastBlock:s,firstBlockClientId:o.localClientId}}var{useActiveCollaborators:Glt,useResolvedSelection:Ylt}=Y(Yq.privateApis),{SelectionType:_x}=Y(Yq.privateApis);function VRe(e,t,r,o,n){let i=Glt(r??null,o??null),s=Ylt(r??null,o??null),l=(0,LRe.useSelect)(g=>g(BRe.store).get("core","showCollaborationCursor"),[]),[c,u]=(0,LD.useState)([]),[d,f]=OD(n),[m,h]=ND();return(0,LD.useEffect)(()=>{if(!e||!t){u([]);return}let g=e.getBoundingClientRect(),v={editorDocument:t,overlayRect:g},b=[],_=i.some(y=>!y.isMe);i.forEach(y=>{if(y.isMe&&(!l||!_))return;let w=y.editorState?.selection??{type:_x.None},S={richTextOffset:null,localClientId:null,attributeKey:null},x;if(w.type===_x.Cursor)try{S=s(w)}catch{return}else if(w.type===_x.SelectionInOneBlock||w.type===_x.SelectionInMultipleBlocks)try{S=s({type:_x.Cursor,cursorPosition:w.cursorStartPosition}),x=s({type:_x.Cursor,cursorPosition:w.cursorEndPosition})}catch{return}let C=y.collaboratorInfo.name,I=y.clientId,k=y.isMe?"var(--wp-admin-theme-color)":ja(y.collaboratorInfo.id),R=Qp(y.collaboratorInfo.avatar_urls),A=DRe(w,S,x,v);if(A.coords){let P={userName:C,clientId:I,color:k,avatarUrl:R,isMe:y.isMe,...A.coords};A.selectionRects&&(P.selectionRects=A.selectionRects),b.push(P)}}),u(b)},[t,s,e,i,l,d,m]),{cursors:c,rerenderCursorsAfterDelay:f,rerenderCursorsOnResize:h}}var tf=a(E(),1),jRe=500,qlt=1e4;function HRe({blockEditorDocument:e,postId:t,postType:r,cursorRegistry:o}){let[n,i]=(0,_u.useState)(null),{cursors:s,rerenderCursorsAfterDelay:l,rerenderCursorsOnResize:c}=VRe(n,e??null,t??null,r??null,jRe),{highlights:u,rerenderHighlightsAfterDelay:d,rerenderHighlightsOnResize:f}=IRe(n,e??null,t??null,r??null,jRe),m=(0,_u.useCallback)(()=>{c(),f()},[c,f]),h=(0,BD.useResizeObserver)(m);(0,_u.useEffect)(()=>{let _=l(),y=d();return()=>{_(),y()}},[l,d]),(0,_u.useEffect)(()=>{if(s.length!==0)return ARe(l,qlt)},[s.length,l]);let g=(0,BD.useMergeRefs)([i,h]),v=(0,_u.useRef)(new Map);(0,_u.useEffect)(()=>{if(!o)return;let _=v.current,y=new Set(s.map(w=>w.clientId));for(let w of _.keys())y.has(w)||(o.unregisterCursor(w),_.delete(w));for(let[w,S]of _.entries())o.registerCursor(w,S);return()=>o.removeAll()},[s,o]);let b=(0,_u.useCallback)(_=>y=>{y?v.current.set(_,y):v.current.delete(_)},[]);return(0,tf.jsxs)("div",{className:"collaborators-overlay-full",ref:g,children:[(0,tf.jsx)("style",{children:kRe+RRe}),s.map(_=>(0,tf.jsxs)("div",{children:[!_.isMe&&_.selectionRects?.map((y,w)=>(0,tf.jsx)("div",{className:"collaborators-overlay-selection-rect",style:{left:`${y.x}px`,top:`${y.y}px`,width:`${y.width}px`,height:`${y.height}px`,backgroundColor:_.color}},`${_.clientId}-sel-${w}`)),(0,tf.jsxs)("div",{ref:b(_.clientId),className:"collaborators-overlay-user",style:{left:`${_.x}px`,top:`${_.y}px`},children:[!_.isMe&&(0,tf.jsx)("div",{className:"collaborators-overlay-user-cursor",style:{backgroundColor:_.color,height:`${_.height}px`}}),(0,tf.jsx)(Xp,{className:"collaborators-overlay-user-label",variant:"badge",size:"small",src:_.avatarUrl,name:_.userName,label:_.isMe?(0,zRe.__)("You"):void 0,borderColor:_.color})]})]},_.clientId)),u.map(_=>(0,tf.jsx)(Xp,{className:"collaborators-overlay-block-label",variant:"badge",size:"small",src:_.avatarUrl,name:_.userName,borderColor:_.color,style:{left:`${_.x}px`,top:`${_.y}px`}},_.blockId))]})}var qq=a(E(),1),{BlockCanvasCover:Klt}=Y(URe.privateApis);function VD({postId:e,postType:t,cursorRegistry:r}){return(0,qq.jsx)(Klt.Fill,{children:({containerRef:o})=>(0,qq.jsx)(HRe,{blockEditorDocument:o.current?.ownerDocument,postId:e,postType:t,cursorRegistry:r})})}var uc=a(E(),1),{useActiveCollaborators:Zlt}=Y(GRe.privateApis);function Kq({postId:e,postType:t}){let r=Zlt(e,t),o=r.filter(f=>!f.isMe),n=(0,Sx.useMemo)(()=>[...r].sort((f,m)=>f.isMe&&!m.isMe?-1:!f.isMe&&m.isMe?1:0),[r]),[i]=(0,Sx.useState)(xRe),[s,l]=(0,Sx.useState)(!1),[c,u]=(0,Sx.useState)(null);if(o.length===0)return null;let d=r.find(f=>f.isMe);return(0,uc.jsxs)(uc.Fragment,{children:[(0,uc.jsxs)("div",{className:"editor-collaborators-presence",children:[(0,uc.jsx)(WRe.Button,{__next40pxDefaultSize:!0,className:"editor-collaborators-presence__button",onClick:()=>l(!s),isPressed:s,ref:u,"aria-label":(0,jD.sprintf)((0,jD.__)("Collaborators list, %d online"),n.length),children:(0,uc.jsxs)(Dq,{max:4,children:[d&&(0,uc.jsx)(Xp,{src:Qp(d.collaboratorInfo.avatar_urls),name:d.collaboratorInfo.name,borderColor:"var(--wp-admin-theme-color)",size:"small"},d.clientId),o.map(f=>(0,uc.jsx)(Xp,{src:Qp(f.collaboratorInfo.avatar_urls),name:f.collaboratorInfo.name,borderColor:ja(f.collaboratorInfo.id),size:"small"},f.clientId))]})}),s&&(0,uc.jsx)(SRe,{activeCollaborators:n,popoverAnchor:c,setIsPopoverVisible:l,cursorRegistry:i})]}),(0,uc.jsx)(VD,{postId:e,postType:t,cursorRegistry:i})]})}var ko=a(E(),1);function Xlt({customSaveButton:e,forceIsDirty:t,setEntitiesSavedStatesCallback:r}){let o=(0,OP.useViewportMatch)("large"),n=(0,OP.useViewportMatch)("medium"),i=(0,OP.useMediaQuery)("(max-width: 403px)"),{postId:s,postType:l,isTextEditor:c,isPublishSidebarOpened:u,showIconLabels:d,hasFixedToolbar:f,hasBlockSelection:m,hasSectionRootClientId:h,isStylesCanvasActive:g}=(0,qRe.useSelect)(w=>{let{get:S}=w(KRe.store),{getEditorMode:x,getCurrentPostType:C,getCurrentPostId:I,isPublishSidebarOpened:k}=w(N),{getStylesPath:R,getShowStylebook:A}=Y(w(N)),{getBlockSelectionStart:P,getSectionRootClientId:T}=Y(w(YRe.store));return{postId:I(),postType:C(),isTextEditor:x()==="text",isPublishSidebarOpened:k(),showIconLabels:S("core","showIconLabels"),hasFixedToolbar:S("core","fixedToolbar"),hasBlockSelection:!!P(),hasSectionRootClientId:!!T(),isStylesCanvasActive:!!R()?.startsWith("/revisions")||A()}},[]),v=["post","page","wp_template"].includes(l)&&h,[b,_]=(0,ZRe.useState)(!0),y=!i&&(!f||f&&(!m||b));return(0,ko.jsx)(hD,{toolbar:(0,ko.jsxs)(ko.Fragment,{children:[(0,ko.jsx)(Ske,{disableBlockTools:g||c}),f&&n&&(0,ko.jsx)(vke,{isCollapsed:b,onToggle:_})]}),center:y?(0,ko.jsxs)(ko.Fragment,{children:[(0,ko.jsx)(Kq,{postType:l,postId:s}),(0,ko.jsx)(I3,{})]}):void 0,settings:(0,ko.jsxs)(ko.Fragment,{children:[!y&&!i&&(0,ko.jsx)(Kq,{postType:l,postId:s}),!e&&!u&&(0,ko.jsx)(CF,{forceIsDirty:t}),(0,ko.jsx)(Yke,{}),(0,ko.jsx)(Xke,{forceIsAutosaveable:t,disabled:g}),(0,ko.jsx)(DS,{className:"editor-header__post-preview-button",forceIsAutosaveable:t}),o&&v&&(0,ko.jsx)(tRe,{disabled:g}),(o||!d)&&(0,ko.jsx)(Vh.Slot,{scope:"core"}),!e&&(0,ko.jsx)(Vke,{forceIsDirty:t,setEntitiesSavedStatesCallback:r}),e,(0,ko.jsx)(_D,{})]})})}var XRe=Xlt;var NP=a(K(),1),HD=a(be(),1),QRe=a(Te(),1),MP=a(U(),1),JRe=a(Dt(),1),$Re=a(Mo(),1);var zD=a(E(),1),{PrivateInserterLibrary:Qlt}=Y(HD.privateApis);function e2e(){let{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:r,showMostUsedBlocks:o,sidebarIsOpened:n}=(0,NP.useSelect)(m=>{let{getInserterSidebarToggleRef:h,getInserter:g,isPublishSidebarOpened:v}=Y(m(N)),{getBlockRootClientId:b,isZoomOut:_,getSectionRootClientId:y}=Y(m(HD.store)),{get:w}=m(JRe.store),{getActiveComplementaryArea:S}=m(je),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,NP.useDispatch)(N),{disableComplementaryArea:s}=(0,NP.useDispatch)(je),l=(0,QRe.useViewportMatch)("medium","<"),c=(0,MP.useRef)(),u=(0,MP.useCallback)(()=>{i(!1),t.current?.focus()},[t,i]),d=(0,MP.useCallback)(m=>{m.keyCode===$Re.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),u())},[u]),f=(0,zD.jsx)("div",{className:"editor-inserter-sidebar__content",children:(0,zD.jsx)(Qlt,{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,zD.jsx)("div",{onKeyDown:d,className:"editor-inserter-sidebar",children:f})}var WD=a(be(),1),GD=a(Te(),1),YD=a(K(),1),Zq=a(Mp(),1),Su=a(U(),1),DP=a(j(),1),r2e=a(_a(),1),o2e=a(Mo(),1);var FP=a(G(),1),UD=a(j(),1);var Ei=a(E(),1);function t2e(){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)(FP.__experimentalText,{children:(0,UD.__)("Characters:")}),(0,Ei.jsx)(FP.__experimentalText,{children:(0,Ei.jsx)(ax,{})})]}),(0,Ei.jsxs)("div",{children:[(0,Ei.jsx)(FP.__experimentalText,{children:(0,UD.__)("Words:")}),(0,Ei.jsx)(ix,{})]}),(0,Ei.jsxs)("div",{children:[(0,Ei.jsx)(FP.__experimentalText,{children:(0,UD.__)("Time to read:")}),(0,Ei.jsx)(sx,{})]})]}),(0,Ei.jsx)(mS,{})]})}var Hg=a(E(),1),{TabbedSidebar:Jlt}=Y(WD.privateApis);function n2e(){let{setIsListViewOpened:e}=(0,YD.useDispatch)(N),{getListViewToggleRef:t}=Y((0,YD.useSelect)(N)),r=(0,GD.useFocusOnMount)("firstElement"),o=(0,Su.useCallback)(()=>{e(!1),t().current?.focus()},[t,e]),n=(0,Su.useCallback)(v=>{v.keyCode===o2e.ESCAPE&&!v.defaultPrevented&&(v.preventDefault(),o())},[o]),[i,s]=(0,Su.useState)(null),[l,c]=(0,Su.useState)("list-view"),u=(0,Su.useRef)(),d=(0,Su.useRef)(),f=(0,Su.useRef)(),m=(0,GD.useMergeRefs)([r,f,s]);function h(v){let b=Zq.focus.tabbable.find(d.current)[0];if(v==="list-view"){let _=Zq.focus.tabbable.find(f.current)[0];(u.current.contains(_)?_:b).focus()}else b.focus()}let g=(0,Su.useCallback)(()=>{u.current.contains(u.current.ownerDocument.activeElement)?o():h(l)},[o,l]);return(0,r2e.useShortcut)("core/editor/toggle-list-view",g),(0,Hg.jsx)("div",{className:"editor-list-view-sidebar",onKeyDown:n,ref:u,children:(0,Hg.jsx)(Jlt,{tabs:[{name:"list-view",title:(0,DP._x)("List View","Post overview"),panel:(0,Hg.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,Hg.jsx)("div",{className:"editor-list-view-sidebar__list-view-panel-content",children:(0,Hg.jsx)(WD.__experimentalListView,{dropZoneElement:i})})}),panelRef:m},{name:"outline",title:(0,DP._x)("Outline","Post overview"),panel:(0,Hg.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,Hg.jsx)(t2e,{})})}],onClose:o,onSelect:v=>c(v),defaultTabId:"list-view",ref:d,closeButtonLabel:(0,DP.__)("Close")})})}var BP=a(K(),1),LP=a(G(),1);var Wg=a(j(),1);var qD=a(K(),1),Ug=a(G(),1),i2e=a(ae(),1),Jp=a(j(),1),KD=a(an(),1),s2e=a(U(),1);var a2e=a(Te(),1);var xu=a(E(),1);function $lt(){let{revisions:e,perPage:t,currentRevisionId:r,revisionKey:o,revisionPage:n,totalRevisions:i}=(0,qD.useSelect)(w=>{let{getCurrentRevisionId:S,getRevisionPage:x,getPageRevisions:C,getRevisionsPerPage:I}=Y(w(N)),k=w(N).getCurrentPostType();if(!k)return{};let A=w(i2e.store).getEntityConfig("postType",k)?.revisionKey||"id",P=x();return{revisions:C(P),perPage:I(),currentRevisionId:S(),revisionKey:A,revisionPage:P,totalRevisions:w(N).getCurrentPostRevisionsCount()}},[]),{setCurrentRevisionId:s,setRevisionPage:l}=Y((0,qD.useDispatch)(N)),c=(0,a2e.useFocusOnMount)(!0),u=!e,d=Math.ceil(i/t)||1,f=(0,s2e.useMemo)(()=>e&&[...e].reverse(),[e]),m=f?.findIndex(w=>w[o]===r),h=w=>{let S=f?.[w];S&&s(S[o])},g=(0,KD.getSettings)(),v=w=>{let S=f?.[w];return S?(0,KD.dateI18n)(g.formats.datetime,S.date):w},b=d>1;if(u&&!b)return(0,xu.jsx)(Ug.Spinner,{});if(!u&&!f?.length)return(0,xu.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,Jp.__)("No revisions found.")});if(i<=1)return(0,xu.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,Jp.__)("Only one revision found.")});let _=w=>{let S=i-(w-1)*t,x=Math.max(1,S-t+1);return(0,Jp.sprintf)((0,Jp.__)("Revisions %1$s\u2013%2$s"),x,S)},y=u||m===-1?(0,xu.jsx)(Ug.Spinner,{}):(0,xu.jsx)(Ug.RangeControl,{ref:c,"aria-valuetext":v(m),className:"editor-revisions-header__slider",hideLabelFromVision:!0,label:(0,Jp.__)("Revision"),max:f?.length-1,min:0,marks:!0,onChange:h,renderTooltipContent:v,value:m,withInputField:!1});return b?(0,xu.jsxs)(se,{direction:"row",gap:"sm",align:"center",style:{flex:1},children:[(0,xu.jsx)(Ug.Button,{icon:Ar,label:n<d?_(n+1):(0,Jp.__)("No older revisions"),onClick:()=>l(n+1),disabled:u||n>=d,size:"compact",accessibleWhenDisabled:!0}),(0,xu.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",justifyContent:"center"},children:y}),(0,xu.jsx)(Ug.Button,{icon:mr,label:n>1?_(n-1):(0,Jp.__)("No newer revisions"),onClick:()=>l(n-1),disabled:u||n<=1,size:"compact",accessibleWhenDisabled:!0})]}):y}var l2e=$lt;var wl=a(E(),1);function ect({showDiff:e,onToggleDiff:t}){let{currentRevisionId:r,sidebarIsOpened:o}=(0,BP.useSelect)(d=>({currentRevisionId:Y(d(N)).getCurrentRevisionId(),sidebarIsOpened:!!d(je).getActiveComplementaryArea("core")}),[]),{setCurrentRevisionId:n,restoreRevision:i}=Y((0,BP.useDispatch)(N)),{enableComplementaryArea:s,disableComplementaryArea:l}=(0,BP.useDispatch)(je),c=!!r,u=()=>{r&&i(r)};return(0,wl.jsx)(hD,{className:"editor-revisions-header",toolbar:(0,wl.jsx)(LP.Button,{__next40pxDefaultSize:!0,size:"compact",icon:mv,label:(0,Wg._x)("Show changes","revisions"),isPressed:e,onClick:t}),center:(0,wl.jsx)(l2e,{}),settings:(0,wl.jsxs)(wl.Fragment,{children:[(0,wl.jsx)(DS,{className:"editor-header__post-preview-button"}),(0,wl.jsx)(LP.Button,{__next40pxDefaultSize:!0,icon:(0,Wg.isRTL)()?dv:Sf,label:(0,Wg._x)("Settings","panel button label"),isPressed:o,"aria-expanded":o,onClick:()=>{o?l("core"):s("core",as.document)},size:"compact"}),(0,wl.jsx)(LP.Button,{__next40pxDefaultSize:!0,variant:"secondary",size:"compact",onClick:()=>n(null),children:(0,Wg.__)("Exit")}),(0,wl.jsx)(LP.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,variant:"primary",size:"compact",className:"editor-revisions-header__restore-button",disabled:!c,onClick:u,children:(0,Wg.__)("Restore")}),(0,wl.jsx)(_D,{disabled:!0})]})})}var Xq=ect;var L2e=a(G(),1),B2e=a(be(),1),iK=a(K(),1),cL=a(U(),1),V2e=a(Vn(),1),j2e=a(Pt(),1),xl=a(j(),1);var dc=a(be(),1),_l=a(U(),1),nL=a(K(),1),rK=a(Pt(),1),A2e=a(ae(),1),iL=a(Te(),1);var Qq=a(K(),1),c2e=a(ae(),1),ZD=a(U(),1),Jq=a(j(),1),u2e=a(G(),1);var d2e=a(E(),1);function f2e({contentRef:e}){let{onNavigateToEntityRecord:t,templateId:r}=(0,Qq.useSelect)(s=>{let{getEditorSettings:l,getCurrentTemplateId:c}=s(N);return{onNavigateToEntityRecord:l().onNavigateToEntityRecord,templateId:c()}},[]),o=(0,Qq.useSelect)(s=>!!s(c2e.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[n,i]=(0,ZD.useState)(!1);return(0,ZD.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,d2e.jsx)(u2e.__experimentalConfirmDialog,{isOpen:n,confirmButtonText:(0,Jq.__)("Edit template"),onConfirm:()=>{i(!1),t({postId:r,postType:"wp_template"})},onCancel:()=>i(!1),size:"medium",children:(0,Jq.__)("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 m2e=a(Te(),1),XD=a(K(),1),$q=a(be(),1);var tct=500;function p2e(e,t,r){return Math.min(Math.max(e,t),r)}function rct(e,t,r){let o=e-p2e(e,r.left,r.right),n=t-p2e(t,r.top,r.bottom);return Math.sqrt(o*o+n*n)}function h2e({isEnabled:e=!0}={}){let{getEnabledClientIdsTree:t,getBlockName:r,getBlockOrder:o}=Y((0,XD.useSelect)($q.store)),{selectBlock:n}=(0,XD.useDispatch)($q.store);return(0,m2e.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=rct(c,u,v);b<f&&b<tct&&(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 QD=a(K(),1),g2e=a(Te(),1),eK=a(be(),1);function v2e(){let{getSettings:e,isZoomOut:t}=Y((0,QD.useSelect)(eK.store)),{resetZoomLevel:r}=Y((0,QD.useDispatch)(eK.store));return(0,g2e.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 b2e=a(K(),1),y2e=a(Te(),1),JD=a(be(),1),w2e=a(Pt(),1),oct=':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';function _2e(e){let t=(0,b2e.useRegistry)(),r=(0,y2e.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(JD.store).getBlockOrder(""),d=u[u.length-1],f=t.select(JD.store).getBlock(d),{selectBlock:m,insertDefaultBlock:h}=t.dispatch(JD.store);f&&(0,w2e.isUnmodifiedDefaultBlock)(f)?m(d):h()}let{ownerDocument:i}=o;return i.addEventListener("pointerdown",n),()=>{i.removeEventListener("pointerdown",n)}},[t]);return e?[r,oct]:[]}var $D=a(K(),1),S2e=a(Te(),1),tK=a(be(),1);function x2e(){let{getEditedContentOnlySection:e}=Y((0,$D.useSelect)(tK.store)),{stopEditingContentOnlySection:t}=Y((0,$D.useDispatch)(tK.store));return(0,S2e.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 eL=a(K(),1),T2e=a(Te(),1),E2e=a(Pt(),1),tL=a(ae(),1),rL=a(be(),1),rf=a(G(),1),P2e=a(Vn(),1),Gg=a(U(),1),Tu=a(j(),1);var xx=a(U(),1);function C2e(e){let[t,r]=(0,xx.useState)(),o=(0,xx.useRef)(!1);return(0,xx.useEffect)(()=>{if(!e)return;if(e.status==="connected"){r(void 0),o.current=!1;return}if(e.status!=="disconnected"||!e.willAutoRetryInMs)return;let{willAutoRetryInMs:n}=e,i=Date.now()+n,s=o.current;o.current=!0,s&&r(0);let l=null,c=()=>{r(Math.ceil((i-Date.now())/1e3)),l=setInterval(()=>{let d=Math.ceil((i-Date.now())/1e3);r(Math.max(0,d)),d<=0&&l&&clearInterval(l)},1e3)},u=s?setTimeout(c,500):null;return u||c(),()=>{u&&clearTimeout(u),l&&clearInterval(l)}},[e]),{onManualRetry:()=>{r(0)},secondsRemaining:t}}var Cu=a(E(),1),{BlockCanvasCover:nct}=Y(rL.privateApis),{retrySyncConnection:ict}=Y(tL.privateApis),sct=2e4;function k2e(){let[e,t]=(0,Gg.useState)(!1),[r,o]=(0,Gg.useState)(!1),[n,i]=(0,Gg.useState)(!1),{connectionStatus:s,isCollaborationEnabled:l,postType:c}=(0,eL.useSelect)(S=>{let{getSyncConnectionStatus:x,getPostType:C}=Y(S(tL.store)),{getCurrentPostType:I,isCollaborationEnabledForCurrentPost:k}=Y(S(N)),R=I();return{connectionStatus:x()||null,isCollaborationEnabled:k(),postType:R?C(R):null}},[]),{onManualRetry:u,secondsRemaining:d}=C2e(s),f=(0,T2e.useCopyToClipboard)(()=>{let S=(0,eL.select)(rL.store).getBlocks();return(0,E2e.serialize)(S)});(0,Gg.useEffect)(()=>{let S=setTimeout(()=>{t(!0)},sct);return()=>clearTimeout(S)},[]),(0,Gg.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,Gg.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===DY;if(!l||!e&&!h||!r)return null;let g=s&&"error"in s?s?.error:void 0;if(!m&&(0,P2e.applyFilters)("editor.isSyncConnectionErrorHandled",!1,g?.code)!==!1)return null;let v=n?()=>{u(),ict()}:void 0,b=xCe(g),_="",y=!1;d&&d>0?_=(0,Tu.sprintf)((0,Tu._n)("Retrying connection in %d second\u2026","Retrying connection in %d seconds\u2026",d),d):d===0&&(y=!0,_=(0,Tu.__)("Retrying\u2026"));let w="edit.php";return c?.slug&&(w=`edit.php?post_type=${c.slug}`),(0,Cu.jsx)(nct.Fill,{children:(0,Cu.jsx)(rf.Modal,{overlayClassName:"editor-sync-connection-error-modal",isDismissible:!1,onRequestClose:()=>{},shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,size:"medium",title:b.title,children:(0,Cu.jsxs)(rf.__experimentalVStack,{spacing:6,children:[(0,Cu.jsx)("p",{children:b.description}),_&&(0,Cu.jsx)("p",{className:"editor-sync-connection-error-modal__retry-countdown",children:_}),(0,Cu.jsxs)(rf.__experimentalHStack,{justify:"right",children:[(0,Cu.jsx)(rf.Button,{__next40pxDefaultSize:!0,href:w,isDestructive:!0,variant:"tertiary",children:(0,Tu.sprintf)((0,Tu.__)("Back to %s"),c?.labels?.name??(0,Tu.__)("Posts"))}),(0,Cu.jsx)(rf.Button,{__next40pxDefaultSize:!0,ref:f,variant:v?"secondary":"primary",children:(0,Tu.__)("Copy Post Content")}),v&&(0,Cu.jsx)(rf.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,"aria-disabled":y,disabled:y,isBusy:y,variant:"primary",onClick:v,children:(0,Tu.__)("Retry")})]})]})})})}var li=a(E(),1),{LayoutStyle:oL,useLayoutClasses:act,useLayoutStyles:lct,ExperimentalBlockCanvas:cct,useFlashEditableBlocks:uct}=Y(dc.privateApis);function oK(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=oK(e[t].innerBlocks);if(r)return r}}}function R2e(e){for(let t=0;t<e.length;t++)if(e[t].name==="core/post-content")return!0;return!1}function dct({autoFocus:e,iframeProps:t,contentRef:r,className:o}){let n=(0,iL.useViewportMatch)("small","<"),{renderingMode:i,postContentAttributes:s,editedPostTemplate:l={},wrapperBlockName:c,wrapperUniqueId:u,deviceType:d,isFocusedEntity:f,isDesignPostType:m,postType:h,isPreview:g,styles:v,hasCanvasWidth:b,canvasWidth:_,canvasHeight:y}=(0,nL.useSelect)(re=>{let{getCurrentPostId:ce,getCurrentPostType:ie,getCurrentTemplateId:le,getEditorSettings:Oe,getRenderingMode:ke,getDeviceType:Me,getCanvasWidth:Ne,getCanvasHeight:Fe}=Y(re(N)),{getPostType:X,getEditedEntityRecord:ge}=re(A2e.store),Ue=ie(),Ye=ke(),st;Ue===Nu?st="core/block":Ye==="post-only"&&(st="core/post-content");let St=Oe(),dt=St.supportsTemplateMode,xt=X(Ue),Kt=le(),Xe=Ne(),ds=Kt?ge("postType",xr,Kt):void 0;return{renderingMode:Ye,postContentAttributes:St.postContentAttributes,isDesignPostType:cm.includes(Ue),editedPostTemplate:xt?.viewable&&dt?ds:void 0,wrapperBlockName:st,wrapperUniqueId:ce(),deviceType:Me(),isFocusedEntity:!!St.onNavigateToPreviousEntityRecord,postType:Ue,isPreview:St.isPreviewMode,styles:St.styles,hasCanvasWidth:Xe!==void 0,canvasWidth:Xe,canvasHeight:Fe()}},[]),{isCleanNewPost:w}=(0,nL.useSelect)(N),{hasRootPaddingAwareAlignments:S,themeHasDisabledLayoutStyles:x,themeSupportsLayout:C,isZoomedOut:I}=(0,nL.useSelect)(re=>{let{getSettings:ce,isZoomOut:ie}=Y(re(dc.store)),le=ce();return{themeHasDisabledLayoutStyles:le.disableLayoutStyles,themeSupportsLayout:le.supportsLayout,hasRootPaddingAwareAlignments:le.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:ie()}},[]),k=(0,_l.useRef)(),[R,A]=(0,_l.useState)(!1),[P]=(0,dc.useSettings)("layout"),T=(0,_l.useMemo)(()=>i!=="post-only"||m?{type:"default"}:C?{...P,type:"constrained"}:{type:"default"},[i,C,P,m]),M=(0,_l.useMemo)(()=>{if(!l?.content&&!l?.blocks&&s)return s;if(l?.blocks)return oK(l?.blocks);let re=typeof l?.content=="string"?l?.content:"";return oK((0,rK.parse)(re))||{}},[l?.content,l?.blocks,s]),B=(0,_l.useMemo)(()=>{if(!l?.content&&!l?.blocks)return!1;if(l?.blocks)return R2e(l?.blocks);let re=typeof l?.content=="string"?l?.content:"";return R2e((0,rK.parse)(re))||!1},[l?.content,l?.blocks]),{layout:F={},align:V=""}=M||{},z=act(M,"core/post-content"),D=J({"is-layout-flow":!C},C&&z,V&&`align${V}`),O=lct(M,"core/post-content",".block-editor-block-list__layout.is-root-container"),L=(0,_l.useMemo)(()=>F&&(F?.type==="constrained"||F?.inherit||F?.contentSize||F?.wideSize)?{...P,...F,type:"constrained"}:{...P,...F,type:"default"},[F?.type,F?.inherit,F?.contentSize,F?.wideSize,P]),W=s?L:T,q=W?.type==="default"&&!B?T:W,Z=(0,_l.useRef)();(0,_l.useEffect)(()=>{!e||!w()||Z?.current?.focus()},[e,w]);let Q=`.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;} |
| 445 |
.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);} |
| 446 |
.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;} |
| 447 |
.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`,ue=[gk,Ii,Nu].includes(h),te=ue&&!g&&!n&&!I||b,de=h===gk&&g,[pe,$]=_2e(!g&&i==="post-only"&&!m),ee="display:flex;align-items:center;justify-content:center;",ve=y!==void 0&&!ue&&!R?"min-height:100vh;":"",we=(0,_l.useMemo)(()=>[...v??[],{css:`:where(.block-editor-iframe__body){display:flow-root;}.is-root-container{display:flow-root;${te||de?"min-height:0!important;":""}} |
| 448 |
${$||""} |
| 449 |
${te?`.block-editor-iframe__html{background:var(--wp-editor-canvas-background);min-height:100vh;${ee}}.block-editor-iframe__body{width:100%;${ve}}`:""}${de?`.block-editor-iframe__body{${ee}padding:var(--wp--style--block-gap,2em);}`:""}`}],[v,te,ee,ve,de,$]),oe=(0,dc.__unstableUseTypewriter)();return r=(0,iL.useMergeRefs)([k,r,i==="post-only"?oe:null,uct({isEnabled:i==="template-locked"}),h2e({isEnabled:i==="template-locked"}),v2e(),pe,x2e()]),(0,li.jsxs)("div",{className:J("editor-visual-editor","edit-post-visual-editor",o,{"has-vertical-padding":f||b,"has-horizontal-padding":f||te}),children:[(0,li.jsx)(k2e,{}),(0,li.jsx)(fS,{enableResizing:te,width:te&&_?_+"px":"100%",height:te&&y&&!R?y+"px":"100%",onResizeStart:()=>A(!0),onResizeStop:()=>A(!1),children:(0,li.jsxs)(cct,{shouldIframe:!0,contentRef:r,styles:we,height:"100%",iframeProps:{...t,style:t?.style},children:[C&&!x&&i==="post-only"&&!m&&(0,li.jsxs)(li.Fragment,{children:[(0,li.jsx)(oL,{selector:".editor-visual-editor__post-title-wrapper",layout:T}),(0,li.jsx)(oL,{selector:".block-editor-block-list__layout.is-root-container",layout:q}),V&&(0,li.jsx)(oL,{css:Q}),O&&(0,li.jsx)(oL,{layout:L,css:O})]}),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":S}),contentEditable:!1,style:{marginTop:"4rem"},children:(0,li.jsx)(YF,{ref:Z})}),(0,li.jsxs)(dc.RecursionProvider,{blockName:c,uniqueId:u,children:[(0,li.jsx)(dc.BlockList,{className:J("is-"+d.toLowerCase()+"-preview",i!=="post-only"||m?"wp-site-blocks":`${D} wp-block-post-content`,{"has-global-padding":i==="post-only"&&!m&&S}),layout:W,dropZoneElement:k.current?.parentNode,__unstableDisableDropZone:i==="template-locked"}),i==="template-locked"&&(0,li.jsx)(f2e,{contentRef:k})]})]})})]})}var sL=dct;var Sl=a(U(),1),aL=a(Te(),1),O2e=a(K(),1),lL=a(be(),1),VP=a(j(),1);var Yg=a(E(),1),{useBlockElementRef:fct}=Y(lL.privateApis);function N2e(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(...N2e(r.innerBlocks));return t}var I2e={added:(0,VP.__)("Go to added block"),removed:(0,VP.__)("Go to removed block"),modified:(0,VP.__)("Go to modified block")};function nK(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 pct({clientId:e,status:t,subscribe:r}){let o=(0,Sl.useRef)();fct(e,o);let[n,i]=(0,Sl.useState)(()=>nK(o.current));return(0,Sl.useEffect)(()=>r(()=>{i(nK(o.current))}),[r]),(0,Sl.useEffect)(()=>{i(nK(o.current))},[t]),n?(0,Yg.jsxs)(Ze.Root,{children:[(0,Yg.jsx)(Ze.Trigger,{render:(0,Yg.jsx)("button",{className:`revision-diff-marker is-${t}`,style:{top:`${n.top}%`,height:`${Math.max(n.height,.5)}%`},onClick:()=>o.current?.focus(),"aria-label":I2e[t]})}),(0,Yg.jsx)(Ze.Popup,{children:I2e[t]})]}):null}function M2e(){let[e,t]=(0,Sl.useState)(!1),r=(0,Sl.useRef)(new Set),o=(0,O2e.useSelect)(l=>l(lL.store).getBlocks(),[]),n=(0,Sl.useMemo)(()=>N2e(o),[o]),i=(0,Sl.useCallback)(l=>(r.current.add(l),()=>r.current.delete(l)),[]),s=(0,aL.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,aL.useMergeRefs)([s,t]),(0,Yg.jsx)("div",{className:"revision-diff-markers",role:"navigation","aria-label":(0,VP.__)("Document changes"),children:e&&n.map(({clientId:l,status:c})=>(0,Yg.jsx)(pct,{clientId:l,status:c,subscribe:i},l))},"diff-markers")]}var go=a(E(),1),{usePrivateStyleOverride:F2e,PrivateBlockContext:D2e}=Y(B2e.privateApis),mct=` |
| 450 |
<svg |
| 451 |
xmlns="http://www.w3.org/2000/svg" |
| 452 |
viewBox="0 0 0 0" |
| 453 |
width="0" |
| 454 |
height="0" |
| 455 |
focusable="false" |
| 456 |
role="none" |
| 457 |
aria-hidden="true" |
| 458 |
style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" |
| 459 |
> |
| 460 |
<defs> |
| 461 |
<filter id="revision-removed-filter" x="0" y="0" width="100%" height="100%"> |
| 462 |
<!-- Desaturate and add red tint --> |
| 463 |
<feColorMatrix type="matrix" |
| 464 |
values="0.5 0.3 0.2 0 0.15 |
| 465 |
0.2 0.2 0.1 0 0 |
| 466 |
0.2 0.2 0.1 0 0 |
| 467 |
0 0 0 0.8 0"/> |
| 468 |
</filter> |
| 469 |
</defs> |
| 470 |
</svg> |
| 471 |
`,hct=` |
| 472 |
.is-revision-added { |
| 473 |
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%); |
| 474 |
outline: 3px solid #00a32a; |
| 475 |
outline-offset: 2px; |
| 476 |
} |
| 477 |
.is-revision-removed, |
| 478 |
.revision-diff-removed { |
| 479 |
text-decoration: line-through; |
| 480 |
filter: url(#revision-removed-filter); |
| 481 |
} |
| 482 |
.is-revision-removed { |
| 483 |
outline: 3px dashed #d63638; |
| 484 |
outline-offset: 2px; |
| 485 |
} |
| 486 |
.is-revision-modified { |
| 487 |
outline: 3px dotted #9a7000 !important; |
| 488 |
outline-offset: 2px; |
| 489 |
} |
| 490 |
.revision-diff-added { |
| 491 |
background-color: color-mix(in srgb, currentColor 5%, #00a32a 15%); |
| 492 |
text-decoration: none; |
| 493 |
} |
| 494 |
/* Reset UA <mark> styles so format markers keep the same look as before. */ |
| 495 |
mark.revision-diff-format-added, |
| 496 |
mark.revision-diff-format-removed, |
| 497 |
mark.revision-diff-format-changed { |
| 498 |
background: transparent; |
| 499 |
color: inherit; |
| 500 |
padding: 0; |
| 501 |
} |
| 502 |
.revision-diff-format-added { |
| 503 |
text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #00a32a 70%); |
| 504 |
text-decoration-thickness: 2px; |
| 505 |
} |
| 506 |
.revision-diff-format-removed { |
| 507 |
text-decoration: underline wavy color-mix(in srgb, currentColor 20%, #d63638 80%); |
| 508 |
text-decoration-thickness: 2px; |
| 509 |
} |
| 510 |
.revision-diff-format-changed { |
| 511 |
text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #dba617 70%); |
| 512 |
text-decoration-thickness: 2px; |
| 513 |
} |
| 514 |
`;function gct(e,t){switch(e){case"added":return(0,xl.sprintf)((0,xl.__)("Added block: %s"),t);case"removed":return(0,xl.sprintf)((0,xl.__)("Removed block: %s"),t);case"modified":return(0,xl.sprintf)((0,xl.__)("Modified block: %s"),t)}}function vct({status:e,name:t,attributes:r,children:o}){let n=(0,cL.useContext)(D2e),i=(0,iK.useSelect)(s=>{let{getActiveBlockVariation:l,getBlockType:c}=s(j2e.store);return l(t,r)?.title??c(t)?.title},[t,r]);return(0,go.jsx)(D2e.Provider,{value:{...n,ariaLabel:i?gct(e,i):void 0},children:o})}function bct(e){return function(r){let{block:o,className:n,name:i,attributes:s}=r,l=o?.__revisionDiffStatus?.status,c=J(n,{"is-revision-added":l==="added","is-revision-removed":l==="removed","is-revision-modified":l==="modified"});return l?(0,go.jsx)(vct,{status:l,name:i,attributes:s,children:(0,go.jsx)(e,{...r,className:c})}):(0,go.jsx)(e,{...r,className:c})}}var yct="editor/revisions-canvas/withRevisionDiffClasses";(0,V2e.addFilter)("editor.BlockListBlock",yct,bct);function wct({showDiff:e}){return F2e({css:e?hct:""}),F2e({assets:e?mct:"",__unstableType:"svgs"}),null}function _ct(){return(0,go.jsxs)(Gt,{children:[(0,go.jsx)("span",{id:rc.removed,children:(0,xl.__)("Removed")}),(0,go.jsx)("span",{id:rc.added,children:(0,xl.__)("Added")}),(0,go.jsx)("span",{id:rc.formatAdded,children:(0,xl.__)("Format added")}),(0,go.jsx)("span",{id:rc.formatRemoved,children:(0,xl.__)("Format removed")}),(0,go.jsx)("span",{id:rc.formatChanged,children:(0,xl.__)("Format changed")})]})}function Sct({showDiff:e}){let[t,r]=M2e();return(0,go.jsxs)(go.Fragment,{children:[e&&(0,go.jsx)(_ct,{}),(0,go.jsx)(sL,{contentRef:t}),e&&r]})}function sK(){(0,cL.useEffect)(()=>(W0e(),()=>{G0e()}),[]);let{revision:e,showDiff:t}=(0,iK.useSelect)(r=>{let{getCurrentRevision:o,isShowingRevisionDiff:n}=Y(r(N));return{revision:o(),showDiff:n()}},[]);return e?(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(wct,{showDiff:t}),(0,go.jsx)("div",{className:"editor-revisions-canvas__content",children:(0,go.jsx)(Sct,{showDiff:t})})]}):(0,go.jsx)("div",{className:"editor-revisions-canvas__loading",children:(0,go.jsx)(L2e.Spinner,{})})}var dL=a(K(),1),uL=a(U(),1),fc=a(j(),1),z2e=a(It(),1),H2e=a(ae(),1),U2e=a(Dt(),1);var{useOnCollaboratorJoin:xct,useOnCollaboratorLeave:Cct,useOnPostSave:Tct}=Y(H2e.privateApis),aK={COLLAB_POST_UPDATED:"collab-post-updated",COLLAB_USER_ENTERED:"collab-user-entered",COLLAB_USER_EXITED:"collab-user-exited"},lK=["publish","private","future"];function Ect(e,t,r){return r?(0,fc.sprintf)((0,fc.__)("Post published by %s."),e):lK.includes(t)?(0,fc.sprintf)((0,fc.__)("Post updated by %s."),e):(0,fc.sprintf)((0,fc.__)("Draft saved by %s."),e)}function W2e(e,t){let{postStatus:r,isCollaborationEnabled:o,showJoinNotifications:n,showLeaveNotifications:i,showPostSaveNotifications:s}=(0,dL.useSelect)(y=>{let{getCurrentPostAttribute:w,isCollaborationEnabledForCurrentPost:S}=Y(y(N)),x=C=>y(U2e.store).get("core",C)??!0;return{postStatus:w("status"),isCollaborationEnabled:S(),showJoinNotifications:x("showCollaborationJoinNotifications"),showLeaveNotifications:x("showCollaborationLeaveNotifications"),showPostSaveNotifications:x("showCollaborationPostSaveNotifications")}},[]),{createNotice:l}=(0,dL.useDispatch)(z2e.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);xct(m,h,(0,uL.useCallback)((y,w)=>{c&&(w&&y.collaboratorInfo.enteredAt<w.collaboratorInfo.enteredAt||l("info",(0,fc.sprintf)((0,fc.__)("%s has joined the post."),y.collaboratorInfo.name),{id:`${aK.COLLAB_USER_ENTERED}-${y.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1}))},[l,c])),Cct(g,v,(0,uL.useCallback)(y=>{u&&l("info",(0,fc.sprintf)((0,fc.__)("%s has left the post."),y.collaboratorInfo.name),{id:`${aK.COLLAB_USER_EXITED}-${y.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[l,u])),Tct(b,_,(0,uL.useCallback)((y,w,S)=>{if(!d||!r)return;let x=y.postStatus??r??"draft",C=S?.postStatus??r,I=!(C&&lK.includes(C))&&lK.includes(x),k=Ect(w.collaboratorInfo.name,x,I);l("info",k,{id:`${aK.COLLAB_POST_UPDATED}-${w.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[l,r,d]))}var fL=a(K(),1),jP=a(G(),1),cK=a(j(),1),G2e=a(U(),1),Y2e=a(ae(),1);var pc=a(E(),1),{Fill:B_r,Slot:Pct}=(0,jP.createSlotFill)("ActionsPanel"),{EntitiesSavedStates:kct}=Y(Y2e.privateApis);function q2e({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:r,forceIsDirtyPublishPanel:o}){let{closePublishSidebar:n,togglePublishSidebar:i}=(0,fL.useDispatch)(N),{publishSidebarOpened:s,isPublishable:l,isDirty:c,hasOtherEntitiesChanges:u}=(0,fL.useSelect)(m=>{let{isPublishSidebarOpened:h,isEditedPostPublishable:g,isCurrentPostPublished:v,isEditedPostDirty:b,hasNonPostEntityChanges:_}=m(N),y=_();return{publishSidebarOpened:h(),isPublishable:!v()&&g(),isDirty:y||b(),hasOtherEntitiesChanges:y}},[]),d=(0,G2e.useCallback)(()=>e(!0),[]),f;return s?f=(0,pc.jsx)(pF,{onClose:n,forceIsDirty:o,PrePublishExtension:l6.Slot,PostPublishExtension:i6.Slot}):l&&!u?f=(0,pc.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,pc.jsx)(jP.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,"aria-expanded":!1,children:(0,cK.__)("Open publish panel")})}):f=(0,pc.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,pc.jsx)(jP.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:d,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!c,accessibleWhenDisabled:!0,children:(0,cK.__)("Open save panel")})}),(0,pc.jsxs)(pc.Fragment,{children:[r&&(0,pc.jsx)(kct,{close:t,renderDialog:!0}),(0,pc.jsx)(Pct,{bubblesVirtually:!0}),!r&&f]})}var K2e=a(G(),1),pL=a(K(),1),uK=a(j(),1),Z2e=a(_a(),1),mL=a(U(),1);var $p=a(E(),1);function X2e({autoFocus:e=!1}){let{switchEditorMode:t}=(0,pL.useDispatch)(N),{shortcut:r,isRichEditingEnabled:o}=(0,pL.useSelect)(i=>{let{getEditorSettings:s}=i(N),{getShortcutRepresentation:l}=i(Z2e.store);return{shortcut:l("core/editor/toggle-mode"),isRichEditingEnabled:s().richEditingEnabled}},[]),n=(0,mL.useRef)();return(0,mL.useEffect)(()=>{e||n?.current?.focus()},[e]),(0,$p.jsxs)("div",{className:"editor-text-editor",children:[o&&(0,$p.jsxs)("div",{className:"editor-text-editor__toolbar",children:[(0,$p.jsx)("h2",{children:(0,uK.__)("Editing code")}),(0,$p.jsx)(K2e.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t("visual"),shortcut:r,children:(0,uK.__)("Exit code editor")})]}),(0,$p.jsxs)("div",{className:"editor-text-editor__body",children:[(0,$p.jsx)(KF,{ref:n}),(0,$p.jsx)(hP,{})]})]})}var Pr=a(E(),1),Q2e={header:(0,qg.__)("Editor top bar"),body:(0,qg.__)("Editor content"),sidebar:(0,qg.__)("Editor settings"),actions:(0,qg.__)("Editor publish"),footer:(0,qg.__)("Editor footer")};function J2e(){let e=(0,zP.useSelect)(t=>t(Cx.store).isValidTemplate(),[]);return(0,Pr.jsx)(oAe.ThemeProvider,{cornerRadius:"none",children:(0,Pr.jsx)(rAe.InlineNotices,{className:"editor-notices",pinnedNoticesClassName:"editor-notices__pinned",dismissibleNoticesClassName:"editor-notices__dismissible",children:!e&&(0,Pr.jsx)(U3,{})})})}function nAe({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,zP.useSelect)(B=>{let{get:F}=B($2e.store),{getEditorSettings:V,getPostTypeLabel:z,getCurrentPostType:D,getCurrentPostId:O}=B(N),{getStylesPath:L,getShowStylebook:W,isRevisionsMode:q,isShowingRevisionDiff:Z}=Y(B(N)),Q=V(),ue=B(N).getEditorMode();return!Q.richEditingEnabled&&ue==="visual"&&(ue="text"),!Q.codeEditingEnabled&&ue==="text"&&(ue="visual"),{mode:ue,postId:O(),postType:D(),isInserterOpened:B(N).isInserterOpened(),isListViewOpened:B(N).isListViewOpened(),isDistractionFree:F("core","distractionFree"),isPreviewMode:Q.isPreviewMode,showBlockBreadcrumbs:F("core","showBlockBreadcrumbs"),postTypeLabel:z(),stylesPath:L(),showStylebook:W(),isRevisionsMode:q(),showDiff:Z()}},[]),{setShowRevisionDiff:C}=Y((0,zP.useDispatch)(N));W2e(d,f);let I=(0,eAe.useViewportMatch)("medium"),k=h?(0,qg.__)("Document Overview"):(0,qg.__)("Block Library"),R=w||y?.startsWith("/revisions"),A=!R,[P,T]=(0,hL.useState)(!1),M=(0,hL.useCallback)(B=>{typeof P=="function"&&P(B),T(!1)},[P]);return S?(0,Pr.jsx)(Ob,{className:J("editor-editor-interface",e),labels:Q2e,header:(0,Pr.jsx)(Xq,{showDiff:x,onToggleDiff:()=>C(!x)}),content:(0,Pr.jsx)(sK,{}),sidebar:(0,Pr.jsx)(Yl.Slot,{scope:"core"})}):(0,Pr.jsx)(Ob,{isDistractionFree:g,className:J("editor-editor-interface",e,{"is-entity-save-view-open":!!P,"is-distraction-free":g&&!v}),labels:{...Q2e,secondarySidebar:k},header:!v&&(0,Pr.jsx)(XRe,{forceIsDirty:r,setEntitiesSavedStatesCallback:T,customSaveButton:i,forceDisableBlockTools:l}),editorNotices:(0,Pr.jsx)(J2e,{}),secondarySidebar:!v&&u==="visual"&&(m&&(0,Pr.jsx)(e2e,{})||h&&(0,Pr.jsx)(n2e,{})),sidebar:!v&&!g&&(0,Pr.jsx)(Yl.Slot,{scope:"core"}),content:(0,Pr.jsxs)(Pr.Fragment,{children:[!g&&!v&&(0,Pr.jsx)(J2e,{}),R&&(0,Pr.jsx)(cSe,{}),A&&(0,Pr.jsxs)(Pr.Fragment,{children:[!v&&u==="text"&&(0,Pr.jsx)(X2e,{autoFocus:n}),!v&&!I&&u==="visual"&&(0,Pr.jsx)(Cx.BlockToolbar,{hideDragHandle:!0}),(v||u==="visual")&&(0,Pr.jsx)(sL,{contentRef:o,autoFocus:n,iframeProps:c}),t,(0,Pr.jsx)(VD,{postId:d,postType:f})]})]}),footer:!v&&!g&&I&&b&&u==="visual"&&(0,Pr.jsx)(Cx.BlockBreadcrumb,{rootLabelText:_?(0,tAe.decodeEntities)(_):void 0}),actions:v?void 0:s||(0,Pr.jsx)(q2e,{closeEntitiesSavedStates:M,isEntitiesSavedStatesOpen:P,setEntitiesSavedStatesCallback:T,forceIsDirtyPublishPanel:r})})}var WL=a(be(),1),XP=a(K(),1),ev=a(U(),1),Hx=a(j(),1);var pOe=a(_a(),1),mOe=a(G(),1);var iAe=a(K(),1),sAe=a(Al(),1);var aAe=a(E(),1),{OverridesPanel:Rct}=Y(sAe.privateApis);function lAe(){return(0,iAe.useSelect)(t=>t(N).getCurrentPostType()==="wp_block",[])?(0,aAe.jsx)(Rct,{}):null}var GAe=a(K(),1);var Cl=a(G(),1);var SL=a(ae(),1),wAe=a(K(),1),_Ae=a(U(),1),Xg=a(j(),1),SAe=a(Mp(),1);var _L=a(K(),1),UP=a(U(),1),vAe=a(j(),1),Rx=a(G(),1);var bAe=a(ae(),1);var HP=a(K(),1),yL=a(U(),1),hAe=a(ae(),1);var mc=a(j(),1),cAe=a(U(),1),em=a(G(),1),Ex=a(K(),1),vL=a(ae(),1),uAe=a(It(),1);var gL=a(Vt(),1);function Tx(e){return typeof e.title=="string"?(0,gL.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,gL.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,gL.decodeEntities)(e.title.raw):""}var Kg=a(E(),1),Act=({items:e,closeModal:t})=>{let[r]=e,o=Tx(r),{showOnFront:n,currentHomePage:i,isSaving:s}=(0,Ex.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:b}=g(vL.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,Ex.useDispatch)(vL.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Ex.useDispatch)(uAe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_on_front:r.id,show_on_front:"page"}),c((0,mc.__)("Homepage updated."),{type:"snackbar"})}catch(v){let b=v.message&&v.code!=="unknown_error"?v.message:(0,mc.__)("An error occurred while setting the homepage.");u(b,{type:"snackbar"})}finally{t?.()}}let f="";n==="posts"?f=(0,mc.__)("This will replace the current homepage which is set to display latest posts."):i&&(f=(0,mc.sprintf)((0,mc.__)('This will replace the current homepage: "%s"'),Tx(i)));let m=(0,mc.sprintf)((0,mc.__)('Set "%1$s" as the site homepage? %2$s'),o,f).trim(),h=(0,mc.__)("Set homepage");return(0,Kg.jsx)("form",{onSubmit:d,children:(0,Kg.jsxs)(em.__experimentalVStack,{spacing:"5",children:[(0,Kg.jsx)(em.__experimentalText,{children:m}),(0,Kg.jsxs)(em.__experimentalHStack,{justify:"right",children:[(0,Kg.jsx)(em.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:s,accessibleWhenDisabled:!0,children:(0,mc.__)("Cancel")}),(0,Kg.jsx)(em.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:s,accessibleWhenDisabled:!0,children:h})]})]})})},dAe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,Ex.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(vL.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,cAe.useMemo)(()=>({id:"set-as-homepage",label:(0,mc.__)("Set as homepage"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:Act}),[t,e])};var hc=a(j(),1),fAe=a(U(),1),tm=a(G(),1),Px=a(K(),1),bL=a(ae(),1),pAe=a(It(),1);var Zg=a(E(),1),Ict=({items:e,closeModal:t})=>{let[r]=e,o=Tx(r),{currentPostsPage:n,isPageForPostsSet:i,isSaving:s}=(0,Px.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:b}=g(bL.store),_=v("root","site");return{currentPostsPage:v("postType","page",_?.page_for_posts),isPageForPostsSet:_?.page_for_posts!==0,isSaving:b("root","site")}}),{saveEntityRecord:l}=(0,Px.useDispatch)(bL.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Px.useDispatch)(pAe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_for_posts:r.id,show_on_front:"page"}),c((0,hc.__)("Posts page updated."),{type:"snackbar"})}catch(v){let b=v.message&&v.code!=="unknown_error"?v.message:(0,hc.__)("An error occurred while setting the posts page.");u(b,{type:"snackbar"})}finally{t?.()}}let f=i&&n?(0,hc.sprintf)((0,hc.__)('This will replace the current posts page: "%s"'),Tx(n)):(0,hc.__)("This page will show the latest posts."),m=(0,hc.sprintf)((0,hc.__)('Set "%1$s" as the posts page? %2$s'),o,f),h=(0,hc.__)("Set posts page");return(0,Zg.jsx)("form",{onSubmit:d,children:(0,Zg.jsxs)(tm.__experimentalVStack,{spacing:"5",children:[(0,Zg.jsx)(tm.__experimentalText,{children:m}),(0,Zg.jsxs)(tm.__experimentalHStack,{justify:"right",children:[(0,Zg.jsx)(tm.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:s,accessibleWhenDisabled:!0,children:(0,hc.__)("Cancel")}),(0,Zg.jsx)(tm.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:s,accessibleWhenDisabled:!0,children:h})]})]})})},mAe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,Px.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(bL.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,fAe.useMemo)(()=>({id:"set-as-posts-page",label:(0,hc.__)("Set as posts page"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:Ict}),[t,e])};var gAe=a(E(),1);function wL({postType:e,onActionPerformed:t,context:r}){let{defaultActions:o}=(0,HP.useSelect)(c=>{let{getEntityActions:u}=Y(c(N));return{defaultActions:u("postType",e)}},[e]),n=(0,HP.useSelect)(c=>{if(e!=="page")return!1;let{getDefaultTemplateId:u,getEntityRecord:d,canUser:f}=c(hAe.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=dAe(),s=mAe(),{registerPostTypeSchema:l}=Y((0,HP.useDispatch)(N));return(0,yL.useEffect)(()=>{l(e)},[l,e]),(0,yL.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,gAe.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:kx,kebabCase:Oct}=Y(Rx.privateApis);function yAe({postType:e,postId:t,onActionPerformed:r}){let[o,n]=(0,UP.useState)(null),{item:i,permissions:s}=(0,_L.useSelect)(d=>{let{getEditedEntityRecord:f,getEntityRecordPermissions:m}=Y(d(bAe.store));return{item:f("postType",e,t),permissions:m("postType",e,t)}},[t,e]),l=(0,UP.useMemo)(()=>({...i,permissions:s}),[i,s]),c=wL({postType:e,onActionPerformed:r}),u=(0,UP.useMemo)(()=>c.filter(d=>!d.isEligible||d.isEligible(l)),[c,l]);return(0,Pi.jsxs)(Pi.Fragment,{children:[(0,Pi.jsxs)(kx,{placement:"bottom-end",children:[(0,Pi.jsx)(kx.TriggerButton,{render:(0,Pi.jsx)(Rx.Button,{size:"small",icon:yo,label:(0,vAe.__)("Actions"),disabled:!u.length,accessibleWhenDisabled:!0,className:"editor-all-actions-button"})}),(0,Pi.jsx)(kx.Popover,{children:(0,Pi.jsx)(Fct,{actions:u,items:[l],setActiveModalAction:n})})]}),!!o&&(0,Pi.jsx)(Mct,{action:o,items:[l],closeModal:()=>n(null)})]})}function Nct({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Pi.jsx)(kx.Item,{onClick:t,children:(0,Pi.jsx)(kx.ItemLabel,{children:o})})}function Mct({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t);return(0,Pi.jsx)(Rx.Modal,{title:e.modalHeader||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r??(()=>{}),focusOnMount:"firstContentElement",size:"medium",overlayClassName:`editor-action-modal editor-action-modal__${Oct(e.id)}`,children:(0,Pi.jsx)(e.RenderModal,{items:t,closeModal:r})})}function Fct({actions:e,items:t,setActiveModalAction:r}){let o=(0,_L.useRegistry)();return(0,Pi.jsx)(kx.Group,{children:e.map(n=>(0,Pi.jsx)(Nct,{action:n,onClick:()=>{if("RenderModal"in n){r(n);return}n.callback(t,{registry:o})},items:t},n.id))})}var Eu=a(E(),1),{Badge:Dct}=Y(Cl.privateApis),{getTemplateInfo:Lct}=Y(SL.privateApis);function Qg({postType:e,postId:t,hideActions:r=!1,onActionPerformed:o,onClose:n}){let i=(0,_Ae.useMemo)(()=>Array.isArray(t)?t:[t],[t]),{postTitle:s,icon:l,labels:c}=(0,wAe.useSelect)(f=>{let{getEditedEntityRecord:m,getCurrentTheme:h,getPostType:g}=f(SL.store),{getPostIcon:v,getCurrentPostType:b,isRevisionsMode:_,getCurrentRevision:y}=Y(f(N)),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,Ii].includes(e)?Lct({template:S,templateTypes:x}):{})?.title||S?.title}return{postTitle:w,icon:v(e,{area:S?.area}),labels:g(e)?.labels}},[i,e]),u=g3(t),d=(0,Xg.__)("No title");return c?.name&&i.length>1?d=(0,Xg.sprintf)((0,Xg.__)("%1$d %2$s"),i.length,c?.name):s&&(d=(0,SAe.__unstableStripHTML)(s)),(0,Eu.jsxs)(Cl.__experimentalVStack,{spacing:1,className:"editor-post-card-panel",children:[(0,Eu.jsxs)(Cl.__experimentalHStack,{spacing:2,className:"editor-post-card-panel__header",alignment:"flex-start",children:[(0,Eu.jsx)(Cl.Icon,{className:"editor-post-card-panel__icon",icon:l}),(0,Eu.jsxs)(Cl.__experimentalText,{numberOfLines:2,truncate:!0,className:"editor-post-card-panel__title",as:"h2",children:[(0,Eu.jsx)("span",{className:"editor-post-card-panel__title-name",children:d}),u&&i.length===1&&(0,Eu.jsx)(Dct,{children:u})]}),!r&&i.length===1&&(0,Eu.jsx)(yAe,{postType:e,postId:i[0],onActionPerformed:o}),n&&(0,Eu.jsx)(Cl.Button,{size:"small",icon:g1,label:(0,Xg.__)("Close"),onClick:n})]}),i.length>1&&(0,Eu.jsx)(Cl.__experimentalText,{className:"editor-post-card-panel__description",children:(0,Xg.sprintf)((0,Xg.__)("Changes will be applied to all selected %s."),c?.name?.toLowerCase())})]})}var xAe=a(G(),1),CAe=a(K(),1),gc=a(j(),1),TAe=a(yw(),1),EAe=a(U(),1),dK=a(ae(),1);var xL=a(E(),1),Bct=189;function PAe(){let e=(0,CAe.useSelect)(t=>{let{getEditedPostAttribute:r,getCurrentPostType:o,getCurrentPostId:n}=t(N),{canUser:i}=t(dK.store),{getEntityRecord:s}=t(dK.store),l=i("read",{kind:"root",name:"site"})?s("root","site"):void 0,c=o();return!(+n()===l?.page_for_posts)&&![xr,Ii].includes(c)&&r("content")},[]);return(0,xL.jsx)(fK,{postContent:e})}function fK({postContent:e}){let t=(0,gc._x)("words","Word count type. Do not translate!"),r=(0,EAe.useMemo)(()=>e?(0,TAe.count)(e,t):0,[e,t]);if(!r)return null;let o=Math.round(r/Bct),n=(0,gc.sprintf)((0,gc._n)("%s word","%s words",r),r.toLocaleString()),i=o<=1?(0,gc.__)("1 minute"):(0,gc.sprintf)((0,gc._n)("%s minute","%s minutes",o),o.toLocaleString());return(0,xL.jsx)("div",{className:"editor-post-content-information",children:(0,xL.jsx)(xAe.__experimentalText,{children:(0,gc.sprintf)((0,gc.__)("%1$s, %2$s read time."),n,i)})})}var CL=a(G(),1),Ax=a(j(),1),kAe=a(K(),1),TL=a(U(),1),RAe=a(be(),1);var rm=a(E(),1);function Vct(){let{postFormat:e}=(0,kAe.useSelect)(i=>{let{getEditedPostAttribute:s}=i(N);return{postFormat:s("format")??"standard"}},[]),t=$E.find(i=>i.id===e),[r,o]=(0,TL.useState)(null),n=(0,TL.useMemo)(()=>({anchor:r,placement:"left-start",offset:36,shift:!0}),[r]);return(0,rm.jsx)(NS,{children:(0,rm.jsx)(dr,{label:(0,Ax.__)("Format"),ref:o,children:(0,rm.jsx)(CL.Dropdown,{popoverProps:n,contentClassName:"editor-post-format__dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:s})=>(0,rm.jsx)(CL.Button,{size:"compact",variant:"tertiary","aria-expanded":i,"aria-label":(0,Ax.sprintf)((0,Ax.__)("Change format: %s"),t?.caption),onClick:s,children:t?.caption}),renderContent:({onClose:i})=>(0,rm.jsxs)("div",{className:"editor-post-format__dialog-content",children:[(0,rm.jsx)(RAe.__experimentalInspectorPopoverHeader,{title:(0,Ax.__)("Format"),onClose:i}),(0,rm.jsx)(eP,{})]})})})})}var AAe=Vct;var IAe=a(G(),1),OAe=a(K(),1),EL=a(j(),1),NAe=a(an(),1);var pK=a(E(),1);function MAe(){let e=(0,OAe.useSelect)(t=>t(N).getEditedPostAttribute("modified"),[]);return e?(0,pK.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,pK.jsx)(IAe.__experimentalText,{children:(0,EL.sprintf)((0,EL.__)("Last edited %s."),(0,NAe.humanTimeDiff)(e))})}):null}var FAe=a(G(),1),DAe=a(E(),1);function jct({className:e,children:t}){return(0,DAe.jsx)(FAe.__experimentalVStack,{className:J("editor-post-panel__section",e),children:t})}var Ix=jct;var om=a(j(),1),LAe=a(Te(),1),PL=a(K(),1),mK=a(ae(),1),BAe=a(Vt(),1),Ox=a(G(),1),kL=a(U(),1),VAe=a(be(),1);var of=a(E(),1),zct={};function jAe(){let{editEntityRecord:e}=(0,PL.useDispatch)(mK.store),{postsPageTitle:t,postsPageId:r,isTemplate:o,postSlug:n}=(0,PL.useSelect)(d=>{let{getEntityRecord:f,getEditedEntityRecord:m,canUser:h}=d(mK.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):zct,{getEditedPostAttribute:b,getCurrentPostType:_}=d(N);return{postsPageId:v?.id,postsPageTitle:v?.title,isTemplate:_()===xr,postSlug:b("slug")}},[]),[i,s]=(0,kL.useState)(null),l=(0,kL.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,BAe.decodeEntities)(t);return(0,of.jsx)(dr,{label:(0,om.__)("Blog title"),ref:s,children:(0,of.jsx)(Ox.Dropdown,{popoverProps:l,contentClassName:"editor-blog-title-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:d,onToggle:f})=>(0,of.jsx)(Ox.Button,{size:"compact",variant:"tertiary","aria-expanded":d,"aria-label":(0,om.sprintf)((0,om.__)("Change blog title: %s"),u),onClick:f,children:u}),renderContent:({onClose:d})=>(0,of.jsxs)(of.Fragment,{children:[(0,of.jsx)(VAe.__experimentalInspectorPopoverHeader,{title:(0,om.__)("Blog title"),onClose:d}),(0,of.jsx)(Ox.__experimentalInputControl,{placeholder:(0,om.__)("No title"),value:t,onChange:(0,LAe.debounce)(c,300),label:(0,om.__)("Blog title"),help:(0,om.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),hideLabelFromVision:!0})]})})})}var Nx=a(j(),1),RL=a(K(),1),hK=a(ae(),1),Mx=a(G(),1),AL=a(U(),1),zAe=a(be(),1);var nf=a(E(),1);function HAe(){let{editEntityRecord:e}=(0,RL.useDispatch)(hK.store),{postsPerPage:t,isTemplate:r,postSlug:o}=(0,RL.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(N),{getEditedEntityRecord:f,canUser:m}=c(hK.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,AL.useState)(null),s=(0,AL.useMemo)(()=>({anchor:n,placement:"left-start",offset:36,shift:!0}),[n]);if(!r||!["home","index"].includes(o))return null;let l=c=>{e("root","site",void 0,{posts_per_page:c})};return(0,nf.jsx)(dr,{label:(0,Nx.__)("Posts per page"),ref:i,children:(0,nf.jsx)(Mx.Dropdown,{popoverProps:s,contentClassName:"editor-posts-per-page-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,nf.jsx)(Mx.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,Nx.__)("Change posts per page"),onClick:u,children:t}),renderContent:({onClose:c})=>(0,nf.jsxs)(nf.Fragment,{children:[(0,nf.jsx)(zAe.__experimentalInspectorPopoverHeader,{title:(0,Nx.__)("Posts per page"),onClose:c}),(0,nf.jsx)(Mx.__experimentalNumberControl,{placeholder:0,value:t,spinControls:"custom",step:"1",min:"1",onChange:l,label:(0,Nx.__)("Posts per page"),help:(0,Nx.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),hideLabelFromVision:!0})]})})})}var Ha=a(j(),1),IL=a(K(),1),gK=a(ae(),1),sf=a(G(),1),OL=a(U(),1),UAe=a(be(),1);var vc=a(E(),1),Hct=[{label:(0,Ha._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,Ha.__)("Visitors can add new comments and replies.")},{label:(0,Ha.__)("Closed"),value:"",description:[(0,Ha.__)("Visitors cannot add new comments or replies."),(0,Ha.__)("Existing comments remain visible.")].join(" ")}];function WAe(){let{editEntityRecord:e}=(0,IL.useDispatch)(gK.store),{allowCommentsOnNewPosts:t,isTemplate:r,postSlug:o}=(0,IL.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(N),{getEditedEntityRecord:f,canUser:m}=c(gK.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,OL.useState)(null),s=(0,OL.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,vc.jsx)(dr,{label:(0,Ha.__)("Discussion"),ref:i,children:(0,vc.jsx)(sf.Dropdown,{popoverProps:s,contentClassName:"editor-site-discussion-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,vc.jsx)(sf.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,Ha.__)("Change discussion settings"),onClick:u,children:t?(0,Ha.__)("Comments open"):(0,Ha.__)("Comments closed")}),renderContent:({onClose:c})=>(0,vc.jsxs)(vc.Fragment,{children:[(0,vc.jsx)(UAe.__experimentalInspectorPopoverHeader,{title:(0,Ha.__)("Discussion"),onClose:c}),(0,vc.jsxs)(sf.__experimentalVStack,{spacing:3,children:[(0,vc.jsx)(sf.__experimentalText,{children:(0,Ha.__)("Changes will apply to new posts only. Individual posts may override these settings.")}),(0,vc.jsx)(sf.RadioControl,{className:"editor-site-discussion__options",hideLabelFromVision:!0,label:(0,Ha.__)("Comment status"),options:Hct,onChange:l,selected:t})]})]})})})}var fr=a(E(),1),Uct="post-status";function YAe({onActionPerformed:e}){let{isRemovedPostStatusPanel:t,postType:r,postId:o}=(0,GAe.useSelect)(n=>{let{isEditorPanelRemoved:i,getCurrentPostType:s,getCurrentPostId:l}=n(N);return{isRemovedPostStatusPanel:i(Uct),postType:s(),postId:l()}},[]);return(0,fr.jsx)(Ix,{className:"editor-post-summary",children:(0,fr.jsx)(CS.Slot,{children:n=>(0,fr.jsx)(fr.Fragment,{children:(0,fr.jsxs)(se,{direction:"column",gap:"lg",children:[(0,fr.jsx)(Qg,{postType:r,postId:o,onActionPerformed:e}),(0,fr.jsx)(L6,{withPanelBody:!1}),(0,fr.jsx)(tCe,{}),(0,fr.jsxs)(se,{direction:"column",gap:"xs",children:[(0,fr.jsx)(PAe,{}),(0,fr.jsx)(MAe,{})]}),!t&&(0,fr.jsxs)(se,{direction:"column",gap:"lg",children:[(0,fr.jsxs)(se,{direction:"column",gap:"xs",children:[(0,fr.jsx)(sq,{}),(0,fr.jsx)(kF,{}),(0,fr.jsx)(oD,{}),(0,fr.jsx)(v6,{}),(0,fr.jsx)(u6,{}),(0,fr.jsx)(P6,{}),(0,fr.jsx)(bCe,{}),(0,fr.jsx)(Z3,{}),(0,fr.jsx)(IF,{}),(0,fr.jsx)(jAe,{}),(0,fr.jsx)(HAe,{}),(0,fr.jsx)(WAe,{}),(0,fr.jsx)(AAe,{}),n]}),(0,fr.jsx)(rx,{onActionPerformed:e})]})]})})})})}var iIe=a(j(),1),nm=a(K(),1),Fx=a(ae(),1);var WP=a(U(),1);var qAe=a(U(),1),KAe=a(K(),1),Yct=a(Dt(),1);var qct=a(K(),1),Kct=a(Dt(),1);var QAe=a(K(),1),JAe=a(ae(),1);var ZAe=a(yf(),1),{lock:Dxr,unlock:XAe}=(0,ZAe.__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 vK({kind:e,name:t,fields:r}){let o=Array.isArray(r)?r:r?.split(","),n=o?[...o].sort().join(","):void 0;return(0,QAe.useSelect)(i=>XAe(i(JAe.store)).getViewConfig(e,t,{fields:n}),[e,t,n])}var oIe=a(j(),1);var $Ae=a(G(),1),NL=a(K(),1),ML=a(j(),1),eIe=a(bo(),1);var tIe=a(E(),1);function rIe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=(0,NL.useSelect)(i=>{let{getCurrentPostLastRevisionId:s,getCurrentPostRevisionsCount:l,getEditorSettings:c}=i(N);return{lastRevisionId:s(),revisionsCount:l(),disableVisualRevisions:!!c().disableVisualRevisions}},[]),{setCurrentRevisionId:o}=Y((0,NL.useDispatch)(N)),n=r?{href:(0,eIe.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,tIe.jsx)($Ae.Button,{...n,variant:"link",text:String(t),"aria-label":(0,ML.sprintf)((0,ML._n)("Open revisions screen: %d revision","Open revisions screen: %d revisions",t),t)})}var Zct={id:"revisions",label:(0,oIe.__)("Revisions"),readOnly:!0,enableSorting:!1,render:rIe,isVisible:e=>{let t=e._links?.["version-history"]?.[0]?.count??0;return!!(e._links?.["predecessor-version"]?.[0]?.id??null)&&t>=2}},nIe=Zct;var bc=a(E(),1),Xct={layout:{type:"panel"},fields:[]},Qct=["form"];function Jct(e){let{isPostStatusRemoved:t,featuredImageEnabled:r,excerptEnabled:o,discussionEnabled:n,pageAttributesEnabled:i}=(0,nm.useSelect)(l=>{let{isEditorPanelRemoved:c,isEditorPanelEnabled:u}=l(N);return{isPostStatusRemoved:c("post-status"),featuredImageEnabled:u("featured-image"),excerptEnabled:u("post-excerpt"),discussionEnabled:u("discussion-panel"),pageAttributesEnabled:u("page-attributes")}},[]);return(0,WP.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 FL={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(Fx.store).getEditedEntityRecord("root","site")?.page_for_posts,fields:["posts_page_title"],isVisible:e=>["home","index"].includes(e.slug??"")}}};function $ct(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 sIe({onActionPerformed:e}){let{postType:t,postId:r,isPostStatusRemoved:o,availableTemplates:n}=(0,nm.useSelect)(_=>{let{getCurrentPostType:y,getCurrentPostId:w,isEditorPanelRemoved:S,getEditorSettings:x}=_(N),C=_(Fx.store).getCurrentTheme()?.is_block_theme?null:x().availableTemplates??null;return{postType:y(),postId:w(),isPostStatusRemoved:S("post-status"),availableTemplates:C}},[]),{form:i}=vK({kind:"postType",name:t,fields:Qct}),s=Jct(i??Xct),l=(0,nm.useSelect)(_=>!t||!r?null:_(Fx.store).getEditedEntityRecord("postType",t,r),[t,r]),c=_S(),u=(0,nm.useSelect)(_=>{let{getEditedEntityRecord:y,canUser:w}=_(Fx.store),S={};for(let[x,C]of Object.entries(FL[t]??{})){if(!w("read",{kind:C.kind,name:C.name}))continue;let I=C.getId?C.getId(_):void 0;C.getId&&!I||(S[x]=y(C.kind,C.name,I))}return S},[t]),d=(0,WP.useMemo)(()=>{if(!l)return l;let _={...u};return n&&Object.keys(n).length&&(_.available_templates=n),{...l,..._}},[l,u,n]),{editEntityRecord:f}=(0,nm.useDispatch)(Fx.store),m=(0,nm.useRegistry)(),h=(0,WP.useMemo)(()=>{let _={};for(let[y,w]of Object.entries(FL[t]??{}))for(let S of w.fields??[])_[S]=y;return _},[t]),g=nS({postType:t}),v=(0,WP.useMemo)(()=>g?.map(_=>{let y=h[_.id];return y?$ct(_,y,FL[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,iIe.__)("Default template")}:_:null:_}).filter(Boolean).concat(nIe),[g,c,n,h,t]);return(0,bc.jsx)(Ix,{className:"editor-post-summary",children:(0,bc.jsxs)(se,{direction:"column",gap:"lg",children:[(0,bc.jsx)(Qg,{postType:t,postId:r,onActionPerformed:e}),(0,bc.jsx)(NT,{data:d,fields:v,form:s,onChange:_=>{let y=FL[t]??{},w={};for(let[S,x]of Object.entries(_)){let C=y[S];if(C){let I=C.getId?C.getId(m.select):void 0;f(C.kind,C.name,I,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,bc.jsxs)(bc.Fragment,{children:[(0,bc.jsx)(CS.Slot,{children:_=>_.length>0&&(0,bc.jsx)(se,{direction:"column",gap:"xs",children:_})}),(0,bc.jsx)(rx,{onActionPerformed:e})]})]})})}var wIe=a(K(),1),BL=a(G(),1),_Ie=a(j(),1),SIe=a(bo(),1);var DL=a(K(),1),cIe=a(ae(),1);var im=a(an(),1),Pu=a(U(),1),Jg=a(j(),1);var yc=a(E(),1),eut=10,aIe=[],tut={pickerActivity:!0},rut={type:"pickerActivity",titleField:"date",descriptionField:"details",fields:["author"],layout:{density:"compact"},page:1,perPage:eut},out=864e5;function lIe(e){let t=(0,im.getDate)(null).getTime(),r=(0,im.getDate)(e??null);return t-r.getTime()>out?(0,im.dateI18n)((0,im.getSettings)().formats.datetimeAbbreviated,r):(0,im.humanTimeDiff)(r)}function uIe(e){return e.slug?.endsWith("-autosave-v1")??!1}function nut({item:e}){return uIe(e)?(0,yc.jsx)(mC,{intent:"none",children:(0,Jg.__)("Autosave")}):null}function dIe(){let{setCurrentRevisionId:e}=Y((0,DL.useDispatch)(N)),[t,r]=(0,Pu.useState)(rut),{revisions:o,revisionKey:n,currentRevisionId:i}=(0,DL.useSelect)(h=>{let{getCurrentPostType:g}=h(N),{getCurrentRevisionId:v,getRevisionPage:b,getPageRevisions:_}=Y(h(N)),{getEntityConfig:y}=h(cIe.store),w=g(),x=y("postType",w)?.revisionKey||"id",C=v();return{revisions:_(b()),revisionKey:x,currentRevisionId:C}},[]),s=!o,l=(0,Pu.useMemo)(()=>[{id:"date",label:(0,Jg.__)("Date"),getValue:({item:h})=>{let g=lIe(h.date);return uIe(h)?(0,Jg.sprintf)((0,Jg.__)("%1$s, %2$s"),g,(0,Jg.__)("Autosave")):g},render:({item:h})=>(0,yc.jsxs)(se,{direction:"row",align:"center",gap:"sm",children:[(0,yc.jsx)(ws,{variant:"heading-sm",render:(0,yc.jsx)("time",{dateTime:h.date}),children:lIe(h.date)}),(0,yc.jsx)(nut,{item:h})]}),enableSorting:!1,enableHiding:!1},GC,{id:"details",label:(0,Jg.__)("Details"),render:({item:h})=>String(h[n])!==String(i)?null:(0,yc.jsx)(fK,{postContent:h.content?.raw}),enableSorting:!1,enableHiding:!1}],[n,i]),{data:c,paginationInfo:u}=(0,Pu.useMemo)(()=>$U(o||aIe,t,l),[o,t,l]);(0,Pu.useEffect)(()=>{if(!i||!o)return;let h=o.findIndex(v=>String(v[n])===String(i));if(h<0)return;let g=Math.floor(h/t.perPage)+1;r(v=>v.page===g?v:{...v,page:g})},[i,o,n,t.perPage]);let d=(0,Pu.useMemo)(()=>i?[String(i)]:aIe,[i]),f=(0,Pu.useCallback)(h=>{if(h.length===0)return;let g=h[h.length-1];e(Number(g))},[e]),m=(0,Pu.useCallback)(h=>String(h[n]),[n]);return(0,yc.jsx)("div",{className:"editor-post-revisions-timeline",children:(0,yc.jsxs)(lp,{view:t,onChangeView:r,fields:l,data:c,isLoading:s,paginationInfo:u,defaultLayouts:tut,getItemId:m,selection:d,onChangeSelection:f,children:[(0,yc.jsx)(lp.Layout,{}),(0,yc.jsx)(lp.Footer,{})]})})}var hIe=a(K(),1),gIe=a(U(),1),vIe=a(j(),1);var fIe=a(G(),1);var $g=a(E(),1);function LL({title:e,entries:t,initialOpen:r,className:o}){if(!t)return null;let n=Object.entries(t).map(([i,s])=>(0,$g.jsx)(dr,{label:i,children:(0,$g.jsx)("span",{className:"editor-revision-fields-diff__value",children:s.map((l,c)=>l.added?(0,$g.jsx)("ins",{className:"editor-revision-fields-diff__added",children:l.value},c):l.removed?(0,$g.jsx)("del",{className:"editor-revision-fields-diff__removed",children:l.value},c):(0,$g.jsx)("span",{children:l.value},c))})},i));return(0,$g.jsx)(fIe.PanelBody,{title:e,initialOpen:r,children:(0,$g.jsx)("div",{className:o,children:n})})}var bIe=a(E(),1);function pIe(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function mIe(e){return!e||e==="[]"||e==="{}"}function yIe(){let{revision:e,previousRevision:t}=(0,hIe.useSelect)(o=>{let{getCurrentRevision:n,getPreviousRevision:i}=Y(o(N));return{revision:n(),previousRevision:i()}},[]),r=(0,gIe.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=pIe(o[l]),u=pIe(n[l]);mIe(c)&&mIe(u)||(s[l]=Q_(u,c))}return Object.keys(s).length===0?null:s},[e,t]);return(0,bIe.jsx)(LL,{title:(0,vIe.__)("Meta"),entries:r,initialOpen:!1,className:"editor-revision-meta-diff__content"})}var ku=a(E(),1);function xIe(){let{revisionId:e,postId:t}=(0,wIe.useSelect)(r=>{let{getCurrentRevisionId:o,getCurrentPostId:n}=Y(r(N));return{revisionId:o(),postId:n()}},[]);return e?(0,ku.jsxs)(ku.Fragment,{children:[(0,ku.jsx)(Ix,{className:"editor-post-summary",children:(0,ku.jsxs)(BL.__experimentalVStack,{spacing:4,children:[(0,ku.jsx)(Qg,{postId:t,hideActions:!0}),(0,ku.jsx)(BL.ExternalLink,{href:(0,SIe.addQueryArgs)("revision.php",{revision:e}),children:(0,_Ie.__)("Open classic revisions screen")})]})}),(0,ku.jsx)(yIe,{}),(0,ku.jsx)(dIe,{})]}):null}var YP=a(K(),1),yK=a(ae(),1),AIe=a(G(),1),wK=a(j(),1),IIe=a(be(),1),OIe=a(Pt(),1);var CIe=a(K(),1),TIe=a(U(),1),bK=a(ae(),1),EIe=a(Pt(),1),PIe=a(Al(),1);var{EXCLUDED_PATTERN_SOURCES:iut,PATTERN_TYPES:sut}=Y(PIe.privateApis);function kIe(e,t){return e.innerBlocks=e.innerBlocks.map(r=>kIe(r,t)),e.name==="core/template-part"&&e.attributes.theme===void 0&&(e.attributes.theme=t),e}function aut(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:!iut.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 lut(e,t){return e.map(r=>({...r,keywords:r.keywords||[],type:sut.theme,blocks:(0,EIe.parse)(r.content,{__unstableSkipMigrationLogs:!0}).map(o=>kIe(o,t))}))}function RIe({area:e,name:t,slug:r}){let{blockPatterns:o,restBlockPatterns:n,currentThemeStylesheet:i}=(0,CIe.useSelect)(s=>{let{getEditorSettings:l}=s(N),c=l();return{blockPatterns:c.__experimentalAdditionalBlockPatterns??c.__experimentalBlockPatterns,restBlockPatterns:s(bK.store).getBlockPatterns(),currentThemeStylesheet:s(bK.store).getCurrentTheme().stylesheet}},[]);return(0,TIe.useMemo)(()=>{let s=[...o||[],...n||[]],l=aut(s,{area:e,name:t,slug:r});return lut(l,i)},[e,t,r,o,n,i])}var GP=a(E(),1);function cut({availableTemplates:e,onSelect:t}){return!e||e?.length===0?null:(0,GP.jsx)(IIe.__experimentalBlockPatternsList,{label:(0,wK.__)("Templates"),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0})}function uut(){let{area:e,name:t,slug:r,postType:o,postId:n}=(0,YP.useSelect)(c=>{let{getCurrentPostType:u,getCurrentPostId:d}=c(N),{getEditedEntityRecord:f}=c(yK.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,YP.useDispatch)(yK.store),s=RIe({area:e,name:t,slug:r}),l=async c=>{await i("postType",o,n,{blocks:c.blocks,content:(0,OIe.serialize)(c.blocks)})};return s?.length?(0,GP.jsx)(AIe.PanelBody,{title:(0,wK.__)("Design"),initialOpen:o===Ii,children:(0,GP.jsx)(cut,{availableTemplates:s,onSelect:l})}):null}function NIe(){let{postType:e}=(0,YP.useSelect)(t=>{let{getCurrentPostType:r}=t(N);return{postType:r()}},[]);return[Ii,xr].includes(e)?(0,GP.jsx)(uut,{}):null}var MIe=a(G(),1),qP=a(j(),1),FIe=a(K(),1),DIe=a(U(),1),LIe=a(Vt(),1);var KP=a(E(),1),{Tabs:_K}=Y(MIe.privateApis),dut=(e,t)=>{let{postTypeLabel:r,isRevisionsMode:o}=(0,FIe.useSelect)(i=>{let{getPostTypeLabel:s}=i(N),{isRevisionsMode:l}=Y(i(N));return{postTypeLabel:s(),isRevisionsMode:l()}},[]),n;return o?n=(0,qP.__)("Revision"):r?n=(0,LIe.decodeEntities)(r):n=(0,qP._x)("Document","noun, panel"),(0,KP.jsxs)(_K.TabList,{ref:t,children:[(0,KP.jsx)(_K.Tab,{tabId:as.document,"data-tab-id":as.document,children:n}),(0,KP.jsx)(_K.Tab,{tabId:as.block,"data-tab-id":as.block,children:(0,qP.__)("Block")})]})},BIe=(0,DIe.forwardRef)(dut);var Dx=a(K(),1),Lx=a(ae(),1),SK=a(be(),1),am=a(G(),1),xK=a(U(),1),sm=a(j(),1),VIe=a(Vt(),1),VL=a(Mo(),1),jIe=a(It(),1),zIe=a(Dt(),1);var Bn=a(E(),1);function HIe(){let e=(0,Dx.useSelect)(x=>x(N).getCurrentTemplateId(),[]),[t,r]=(0,xK.useState)(!1),[o,n]=(0,xK.useState)(!1),s=!!YE()?.length,{onNavigateToEntityRecord:l,canCreateTemplate:c,hasGoBack:u,getEditorSettings:d}=(0,Dx.useSelect)(x=>{let{getEditorSettings:C}=x(N),I=C();return{onNavigateToEntityRecord:I.onNavigateToEntityRecord,canCreateTemplate:!!x(Lx.store).canUser("create",{kind:"postType",name:"wp_template"}),hasGoBack:I.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:C}},[]),{get:f}=(0,Dx.useSelect)(zIe.store),{createSuccessNotice:m}=(0,Dx.useDispatch)(jIe.store),{editedRecord:h,hasResolved:g}=(0,Lx.useEntityRecord)("postType","wp_template",e),[v]=(0,Lx.useEntityBlockEditor)("postType","wp_template",{id:e});if(!g)return null;let b=u?[{label:(0,sm.__)("Go back"),onClick:()=>d().onNavigateToPreviousEntityRecord()}]:void 0,_=()=>{f("core/edit-site","welcomeGuideTemplate")||m((0,sm.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:b})},y=(0,VIe.decodeEntities)(h.title),w=!!v?.length&&(0,Bn.jsx)(SK.BlockPreview.Async,{children:(0,Bn.jsx)(SK.BlockPreview,{blocks:v})}),S=()=>{if(!w)return null;if(s){let x=(0,sm.__)("Change template");return(0,Bn.jsxs)(Ze.Root,{children:[(0,Bn.jsx)(Ze.Trigger,{render:(0,Bn.jsx)("div",{className:"editor-template-actions-panel__preview",role:"button",tabIndex:0,"aria-label":x,onClick:()=>n(!0),onKeyDown:C=>{(C.keyCode===VL.ENTER||C.keyCode===VL.SPACE)&&(C.preventDefault(),n(!0))},children:w})}),(0,Bn.jsx)(Ze.Popup,{children:x})]})}return(0,Bn.jsx)("div",{className:"editor-template-actions-panel__preview",children:w})};return(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsx)(am.PanelBody,{title:(0,sm.sprintf)((0,sm.__)("Template: %s"),y),initialOpen:!1,children:(0,Bn.jsxs)(am.__experimentalVStack,{children:[S(),(0,Bn.jsxs)(am.__experimentalHStack,{children:[l&&(0,Bn.jsx)(am.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{l({postId:h.id,postType:"wp_template"}),_()},children:(0,sm.__)("Edit")}),c&&(0,Bn.jsx)(am.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:(0,sm.__)("Create new")})]})]})}),t&&(0,Bn.jsx)(_g,{onClose:()=>r(!1)}),o&&(0,Bn.jsx)(xY,{onRequestClose:()=>n(!1)})]})}var Bx=a(K(),1),Vx=a(ae(),1),CK=a(be(),1),Au=a(G(),1),UIe=a(U(),1),Ru=a(j(),1),WIe=a(Vt(),1),GIe=a(It(),1),YIe=a(Dt(),1);var Qs=a(E(),1);function qIe(){let e=(0,Bx.useSelect)(v=>v(N).getCurrentTemplateId(),[]),[t,r]=(0,UIe.useState)(!1),{onNavigateToEntityRecord:o,canCreateTemplate:n,hasGoBack:i,getEditorSettings:s}=(0,Bx.useSelect)(v=>{let{getEditorSettings:b}=v(N),_=b();return{onNavigateToEntityRecord:_.onNavigateToEntityRecord,canCreateTemplate:!!v(Vx.store).canUser("create",{kind:"postType",name:"wp_template"})&&_.supportsTemplateMode,hasGoBack:_.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:b}},[]),{get:l}=(0,Bx.useSelect)(YIe.store),{createSuccessNotice:c}=(0,Bx.useDispatch)(GIe.store),{editedRecord:u}=(0,Vx.useEntityRecord)("postType","wp_template",e),[d]=(0,Vx.useEntityBlockEditor)("postType","wp_template",{id:e});if(!e&&!n)return null;let f=i?[{label:(0,Ru.__)("Go back"),onClick:()=>s().onNavigateToPreviousEntityRecord()}]:void 0,m=()=>{l("core/edit-site","welcomeGuideTemplate")||c((0,Ru.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:f})},h=u?(0,WIe.decodeEntities)(u.title):void 0,g=!!d?.length&&(0,Qs.jsx)(CK.BlockPreview.Async,{children:(0,Qs.jsx)(CK.BlockPreview,{blocks:d})});return(0,Qs.jsxs)(Qs.Fragment,{children:[(0,Qs.jsx)(Au.PanelBody,{title:u?(0,Ru.sprintf)((0,Ru.__)("Template: %s"),h):(0,Ru.__)("Template"),initialOpen:!1,children:(0,Qs.jsxs)(Au.__experimentalVStack,{children:[!e&&(0,Qs.jsx)(Au.__experimentalText,{children:(0,Ru.__)("This page uses a classic template. To edit this template with blocks, create a block template.")}),u&&g&&(0,Qs.jsx)("div",{className:"editor-template-actions-panel__preview",children:g}),(0,Qs.jsxs)(Au.__experimentalHStack,{children:[u&&o&&(0,Qs.jsx)(Au.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o({postId:u.id,postType:"wp_template"}),m()},children:(0,Ru.__)("Edit")}),n&&(0,Qs.jsx)(Au.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:e?(0,Ru.__)("Create new"):(0,Ru.__)("Create block template")})]})]})}),t&&(0,Qs.jsx)(_g,{onClose:()=>r(!1)})]})}var TK=a(E(),1);function KIe(){let e=_S();return e==="classic"?(0,TK.jsx)(qIe,{}):e==="block-theme"?(0,TK.jsx)(HIe,{}):null}var ZP=a(K(),1),ZIe=a(be(),1),XIe=a(G(),1),QIe=a(j(),1);var jL=a(E(),1),{BlockQuickNavigation:fut}=Y(ZIe.privateApis),put="core/template-part";function mut({postType:e}){let t=VM(),r=(0,ZP.useSelect)(n=>{let{getPostBlocksByName:i}=Y(n(N));return i(xr===e?put:t)},[e,t]),{enableComplementaryArea:o}=(0,ZP.useDispatch)(je);return r.length===0?null:(0,jL.jsx)(XIe.PanelBody,{title:(0,QIe.__)("Content"),children:(0,jL.jsx)(fut,{clientIds:r,onSelect:()=>{o("core","edit-post/document")}})})}function JIe(){let{postType:e,renderingMode:t}=(0,ZP.useSelect)(r=>{let{getCurrentPostType:o,getRenderingMode:n}=Y(r(N));return{postType:o(),renderingMode:n()}},[]);return t==="post-only"&&e!==xr?null:(0,jL.jsx)(mut,{postType:e})}var zL=a(K(),1),$Ie=a(U(),1),eOe=a(Pt(),1),UL=a(be(),1),tOe=a(G(),1),rOe=a(j(),1);var HL=a(E(),1),{BlockQuickNavigation:hut}=Y(UL.privateApis);function gut(){let e=(0,zL.useSelect)(o=>{let{getBlockTypes:n}=o(eOe.store);return n()},[]),t=(0,$Ie.useMemo)(()=>e.filter(o=>o.category==="theme").map(({name:o})=>o),[e]),r=(0,zL.useSelect)(o=>{let{getBlocksByName:n}=o(UL.store);return n(t)},[t]);return r.length===0?null:(0,HL.jsx)(tOe.PanelBody,{title:(0,rOe.__)("Content"),children:(0,HL.jsx)(hut,{clientIds:r})})}function oOe(){return(0,zL.useSelect)(t=>{let{getCurrentPostType:r}=t(N);return r()},[])!==Ii?null:(0,HL.jsx)(gut,{})}var nOe=a(be(),1),iOe=a(K(),1),sOe=a(j(),1);var aOe=a(E(),1);function lOe(){let{block:e}=(0,iOe.useSelect)(r=>{let{getSelectedBlock:o}=r(nOe.store);return{block:o()}},[]);if(!e)return null;let t=e.attributes?.__revisionDiffStatus?.changedAttributes;return(0,aOe.jsx)(LL,{title:(0,sOe.__)("Changed attributes"),entries:t,initialOpen:!0})}var jx=a(K(),1),cOe=a(U(),1),uOe=a(be(),1),dOe=a(Dt(),1);function vut(){let{hasBlockSelection:e}=(0,jx.useSelect)(n=>({hasBlockSelection:!!n(uOe.store).getBlockSelectionStart()}),[]),{getActiveComplementaryArea:t}=(0,jx.useSelect)(je),{enableComplementaryArea:r}=(0,jx.useDispatch)(je),{get:o}=(0,jx.useSelect)(dOe.store);(0,cOe.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 fOe=vut;var to=a(E(),1),{Tabs:zx}=Y(mOe.privateApis),but=!0,yut=({tabName:e,keyboardShortcut:t,onActionPerformed:r,extraPanels:o})=>{let n=(0,ev.useRef)(null),i=(0,ev.useContext)(zx.Context),s=(0,XP.useSelect)(c=>Y(c(N)).isRevisionsMode());(0,ev.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,to.jsx)(xIe,{});else{let c=window?.__experimentalDataFormInspector;l=(0,to.jsxs)(to.Fragment,{children:[c?(0,to.jsx)(sIe,{onActionPerformed:r}):(0,to.jsx)(YAe,{onActionPerformed:r}),(0,to.jsx)(o6.Slot,{}),(0,to.jsx)(JIe,{}),c&&(0,to.jsx)(KIe,{}),(0,to.jsx)(oOe,{}),(0,to.jsx)(NIe,{}),(0,to.jsx)(MF,{}),(0,to.jsx)(lAe,{}),o]})}return(0,to.jsx)(ky,{identifier:e,header:(0,to.jsx)(zx.Context.Provider,{value:i,children:(0,to.jsx)(BIe,{ref:n})}),closeLabel:(0,Hx.__)("Close Settings"),className:"editor-sidebar__panel",headerClassName:"editor-sidebar__panel-tabs",title:(0,Hx._x)("Settings","panel button label"),toggleShortcut:t,icon:(0,Hx.isRTL)()?dv:Sf,isActiveByDefault:but,children:(0,to.jsxs)(zx.Context.Provider,{value:i,children:[(0,to.jsx)(zx.TabPanel,{tabId:as.document,focusable:!1,children:l}),(0,to.jsxs)(zx.TabPanel,{tabId:as.block,focusable:!1,children:[(0,to.jsx)(WL.BlockInspector,{}),s&&(0,to.jsx)(lOe,{})]})]})})},wut=({extraPanels:e,onActionPerformed:t})=>{fOe();let{tabName:r,keyboardShortcut:o}=(0,XP.useSelect)(s=>{let l=s(pOe.store).getShortcutRepresentation("core/editor/toggle-sidebar"),c=s(je).getActiveComplementaryArea("core"),u=[as.block,as.document].includes(c),d=c;return u||(d=s(WL.store).getBlockSelectionStart()?as.block:as.document),{tabName:d,keyboardShortcut:l}},[]),{enableComplementaryArea:n}=(0,XP.useDispatch)(je),i=(0,ev.useCallback)(s=>{s&&n("core",s)},[n]);return(0,to.jsx)(zx,{selectedTabId:r,onSelect:i,selectOnMove:!1,children:(0,to.jsx)(yut,{tabName:r,keyboardShortcut:o,onActionPerformed:t,extraPanels:e})})},hOe=wut;var s4=a(j(),1),ff=a(K(),1),t5e=a(U(),1),r5e=a(Te(),1),o5e=a(_a(),1);var AK=a(be(),1);var n5e=a(Dt(),1);var df=a(U(),1),t4=a(j(),1),qx=a(K(),1);var tk=a(be(),1);var Gx=a(U(),1),QL=a(G(),1);var JL=a(Te(),1),ki=a(j(),1),ek=a(K(),1),OOe=a(Mp(),1),$L=a(be(),1);var KL=a(j(),1),AOe=a(U(),1),IOe=a(Te(),1),r0=a(K(),1),QP=a(be(),1);var wOe=a(G(),1);var GL=a(j(),1),af=a(an(),1),gOe=a(ae(),1),vOe=a(K(),1),bOe=a(be(),1);var wc=a(E(),1);function yOe({avatar:e,name:t,date:r,userId:o}){let n=!!e,i=(0,af.getSettings)(),{currentUserAvatar:s,currentUserName:l,currentUserId:c,dateFormat:u=i.formats.date}=(0,vOe.useSelect)(v=>{let{canUser:b,getCurrentUser:_,getEntityRecord:y}=v(gOe.store),w=b("read",{kind:"root",name:"site"})?y("root","site"):void 0;if(n)return{dateFormat:w?.date_format};let{getSettings:S}=v(bOe.store),{__experimentalDiscussionSettings:x}=S(),C=x?.avatarURL,I=_();return{currentUserAvatar:I?.avatar_urls?.[48]??C,currentUserName:I?.name,currentUserId:I?.id,dateFormat:w?.date_format}},[n]),d=(0,af.getDate)(r),f=(0,af.dateI18n)("c",d),h=Math.floor((new Date-d)/(1e3*60*60*24))<30?(0,af.humanTimeDiff)(d):(0,af.dateI18n)(u,d),g=(0,af.dateI18n)((0,GL._x)("F j, Y g:i\xA0a","Note date full date format"),r);return(0,wc.jsxs)(wc.Fragment,{children:[(0,wc.jsx)("img",{src:e||s,className:"editor-collab-sidebar-panel__user-avatar",alt:(0,GL.__)("User avatar"),width:32,height:32,style:{borderColor:ja(o??c)}}),(0,wc.jsxs)(se,{direction:"column",children:[(0,wc.jsx)("span",{className:"editor-collab-sidebar-panel__user-name",children:t??l}),r&&(0,wc.jsxs)(Ze.Root,{children:[(0,wc.jsx)(Ze.Trigger,{render:(0,wc.jsx)("time",{dateTime:f,className:"editor-collab-sidebar-panel__user-time",children:h})}),(0,wc.jsx)(Ze.Popup,{children:g})]})]})]})}var e0=a(E(),1);function Ux({note:e,actions:t,className:r,children:o,...n}){return(0,e0.jsxs)(se,{direction:"column",gap:"sm",className:r,...n,children:[(0,e0.jsxs)(se,{direction:"row",align:"center",justify:"flex-start",gap:"md",children:[(0,e0.jsx)(yOe,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date,userId:e?.author}),t&&(0,e0.jsx)(wOe.FlexItem,{className:"editor-collab-sidebar-panel__note-actions",onClick:i=>i.stopPropagation(),children:(0,e0.jsx)(se,{direction:"row",align:"center",children:t})})]}),o]})}var EK=a(U(),1),Wx=a(G(),1);var YL=a(j(),1),EOe=a(Te(),1),POe=a(Mo(),1);var kOe=a(Mp(),1);var _Oe=a(U(),1),SOe=a(K(),1),xOe=a(ae(),1);var COe=a(E(),1),_ut={name:"note-mentions",className:"editor-autocompleters__user editor-collab-sidebar-panel__mention-suggestion",triggerPrefix:"@",useItems(e){let t=(0,SOe.useSelect)(o=>{let{getUsers:n}=o(xOe.store);return n({context:"view",search:e})},[e]);return[(0,_Oe.useMemo)(()=>t?t.map(o=>({key:`note-mention-${o.slug}`,value:o,label:GG(o)})):[],[t])]},getOptionCompletion(e){return{action:"insert-at-caret",value:(0,COe.jsx)("span",{className:`wp-note-mention user-${e.id}`,children:"@"+e.name})}}},TOe=_ut;var lf=a(E(),1),{RichTextControl:Sut}=Y(rN),xut=["core/bold","core/italic","core/link","core/code"],Cut=[TOe];function t0({onSubmit:e,onCancel:t,note:r,labels:o}){let[n,i]=(0,EK.useState)(r?.content?.raw??""),[s,l]=(0,EK.useState)(!1),c=(0,EOe.useInstanceId)(t0,"comment-input"),u=dRe((0,kOe.__unstableStripHTML)(n)),d=s||n===r?.content?.raw||!u.length;async function f(){if(d)return;l(!0);let m=n;await e(m)&&i(g=>g===m?"":g),l(!1)}return(0,lf.jsxs)(se,{className:"editor-collab-sidebar-panel__note-form",direction:"column",gap:"lg",render:(0,lf.jsx)("form",{}),onSubmit:m=>{m.preventDefault(),f()},onKeyDown:m=>{if(POe.isKeyboardEvent.primary(m,"Enter")){m.preventDefault(),f();return}m.key==="Escape"&&!m.defaultPrevented&&(m.preventDefault(),t(m))},children:[(0,lf.jsx)(Sut,{id:c,label:o?.input??(0,YL.__)("Note"),hideLabelFromVision:!0,value:n,onChange:i,placeholder:o?.placeholder,allowedFormats:xut,completers:Cut}),(0,lf.jsxs)(se,{direction:"row",align:"center",justify:"flex-end",gap:"sm",wrap:"wrap",children:[(0,lf.jsx)(Wx.Button,{size:"compact",variant:"tertiary",onClick:t,children:(0,lf.jsx)(Wx.__experimentalTruncate,{children:(0,YL.__)("Cancel")})}),(0,lf.jsx)(Wx.Button,{size:"compact",accessibleWhenDisabled:!0,variant:"primary",type:"submit",disabled:d,children:(0,lf.jsx)(Wx.__experimentalTruncate,{children:o?.submit??(0,YL.__)("Add note")})})]})]})}var ROe=a(E(),1);function qL({floating:e,className:t,style:r,children:o,...n}){let i=!!e;return(0,ROe.jsx)(se,{direction:"column",className:J(t,{"is-floating":i}),ref:i?e.ref:void 0,style:i?{top:e.y,...r}:r,...n,children:o})}var ZL=a(E(),1),{useBlockElement:Tut}=Y(QP.privateApis);function JP({onSubmit:e,sidebarRef:t,floating:r}){let{clientId:o}=(0,r0.useSelect)(m=>{let{getSelectedBlockClientId:h}=m(QP.store);return{clientId:h()}},[]),n=(0,r0.useSelect)(m=>Y(m(N)).getSelectedNote(),[]),i=Tut(o),{toggleBlockSpotlight:s}=Y((0,r0.useDispatch)(QP.store)),{selectNote:l}=Y((0,r0.useDispatch)(N)),{getSelectedNote:c}=Y((0,r0.useSelect)(N)),u=(0,AOe.useRef)(!1),d=(0,IOe.__experimentalUseFocusOutside)(m=>{m.relatedTarget?.closest(".editor-collab-sidebar-panel__add-note")||u.current||c()==="new"&&(s(o,!1),l(void 0))}),f=()=>{l(void 0),i?.focus(),s(o,!1)};return n!=="new"||!o?null:(0,ZL.jsx)(qL,{floating:r,className:"editor-collab-sidebar-panel__add-note is-selected",gap:"md",tabIndex:0,"aria-label":(0,KL.__)("New note"),role:"treeitem",style:r?{opacity:r.y?void 0:0}:void 0,...d,children:(0,ZL.jsx)(Ux,{children:(0,ZL.jsx)(t0,{onSubmit:async m=>{u.current=!0;try{let h=await e({content:m});return h&&(l(h.id),ls(h.id,t.current)),h}finally{u.current=!1}},onCancel:f,labels:{input:(0,KL.__)("New note"),placeholder:(0,KL.__)("Add a note or @ mention")}})})})}var cf=a(U(),1),o0=a(G(),1);var Sn=a(j(),1);var ci=a(E(),1),{Menu:$P}=Y(o0.privateApis);function Eut({items:e,buttonRef:t}){return(0,ci.jsxs)($P,{placement:"bottom-end",children:[(0,ci.jsx)($P.TriggerButton,{render:(0,ci.jsx)(o0.Button,{ref:t,size:"small",icon:yo,label:(0,Sn.__)("Actions"),disabled:!e.length,accessibleWhenDisabled:!0})}),(0,ci.jsx)($P.Popover,{modal:!1,children:e.map(r=>(0,ci.jsx)($P.Item,{onClick:r.onClick,children:(0,ci.jsx)($P.ItemLabel,{children:r.title})},r.id))})]})}function XL({note:e,parentNote:t,isSelected:r,onEditNote:o,onDeleteNote:n,onResolve:i}){let[s,l]=(0,cf.useState)(null),c=(0,cf.useRef)(null),u=(0,cf.useRef)(null),d=e?.content?.raw,[f,m]=(0,cf.useState)(d),[h,g]=(0,cf.useState)(!1),[v,b]=(0,cf.useState)(!1);f!==d&&(m(d),g(!1)),(0,cf.useLayoutEffect)(()=>{let R=u.current;R&&b(R.scrollHeight>R.clientHeight)},[d]);let _=e.parent===0,y=e.type==="note"&&e.meta&&(e.meta._wp_note_status==="resolved"||e.meta._wp_note_status==="reopen"),w=[{id:"edit",title:(0,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()},I;if(s==="edit")I=(0,ci.jsx)(t0,{onSubmit:async R=>{let A=await o({id:e.id,content:R});return A&&C(),A},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 A=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"),A,P):A}else R=e?.content?.rendered;I=(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)(o0.Button,{label:(0,Sn._x)("Resolve","Mark note as resolved"),size:"small",icon:fv,disabled:e.status==="approved",accessibleWhenDisabled:e.status==="approved",onClick:i}),(0,ci.jsx)(Eut,{items:S,buttonRef:c})]}):null;return(0,ci.jsxs)(Ux,{note:e,actions:k,role:e.parent!==0?"treeitem":void 0,children:[I,s==="delete"&&(0,ci.jsx)(o0.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{n(e),l(null)},onCancel:C,confirmButtonText:(0,Sn.__)("Delete"),children:x}),v&&s!=="edit"&&(0,ci.jsx)(ute,{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 Ua=a(E(),1),{useBlockElement:Put}=Y($L.privateApis);function NOe({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}=Y((0,ek.useDispatch)($L.store)),{selectNote:m}=Y((0,ek.useDispatch)(N)),{getSelectedNote:h}=Y((0,ek.useSelect)(N)),g=Put(e.blockClientId),v=(0,JL.useDebounce)(u,50),b=(0,Gx.useRef)(null),_=(0,Gx.useRef)(!1),y=s?.registerThread,w=s?.unregisterThread;(0,Gx.useEffect)(()=>{let V=b.current;return V&&y&&y(e.id,g,V),()=>w?.(e.id)},[g,e.id,y,w]),(0,Gx.useEffect)(()=>{!n||e.id==="new"||wRe(e.id,i.current)},[n,s?.y,e.id,i]);let S=(0,JL.__experimentalUseFocusOutside)(V=>{let z=V.relatedTarget?.closest(".editor-collab-sidebar-panel__thread");z&&!_.current||(z||(v.cancel(),u(e.blockClientId,!1)),h()===e.id&&R())});function x(){v(e.blockClientId,!0)}function C(){v(e.blockClientId,!1)}function I(V){S.onFocus(V),v.cancel(),u(e.blockClientId,!0)}function k(){n||(m(e.id),ls(e.id,i.current),f(e.blockClientId,!0),e.blockClientId&&d(e.blockClientId,null))}function R(){m(void 0),f(e.blockClientId,!1)}function A(){t({id:e.id,status:"approved"}),R(),c?g?.focus():ls(e.id,i.current)}let P=e?.reply||[],T=P.length>0?P[P.length-1]:void 0,M=P.length>0?P.slice(0,-1):[],B=fRe((0,OOe.__unstableStripHTML)(e.content?.rendered),10),F=e.blockClientId?(0,ki.sprintf)((0,ki.__)("Note: %s"),B):(0,ki.sprintf)((0,ki.__)("Original block deleted. Note: %s"),B);return c&&e.id==="new"?(0,Ua.jsx)(JP,{onSubmit:r,sidebarRef:i,floating:{y:s.y,ref:b}}):(0,Ua.jsxs)(qL,{floating:c?{y:s.y,ref:b}:void 0,className:J("editor-collab-sidebar-panel__thread",{"is-selected":n}),id:`note-thread-${e.id}`,gap:"md",onClick:k,onMouseEnter:x,onMouseLeave:C,...S,onFocus:I,onKeyUp:V=>{V.key==="Tab"&&(_.current=!1)},onKeyDown:V=>{V.key==="Tab"?_.current=!0:l(V)},tabIndex:0,role:"treeitem","aria-label":F,"aria-expanded":n,children:[(0,Ua.jsx)(QL.Button,{className:"editor-collab-sidebar-panel__skip-to-note",variant:"secondary",size:"compact",onClick:()=>{ls(e.id,i.current,'[role="textbox"]')},children:(0,ki.__)("Add new reply")}),!e.blockClientId&&(0,Ua.jsx)("p",{className:"editor-collab-sidebar-panel__deleted-block-notice",children:(0,ki.__)("Original block deleted.")}),(0,Ua.jsx)(XL,{note:e,isSelected:n,onEditNote:t,onDeleteNote:o,onResolve:A}),n&&P.map(V=>(0,Ua.jsx)(XL,{note:V,parentNote:e,isSelected:n,onEditNote:t,onDeleteNote:o},V.id)),!n&&M.length>0&&(0,Ua.jsx)(se,{direction:"row",align:"center",justify:"space-between",className:"editor-collab-sidebar-panel__more-reply-separator",children:(0,Ua.jsx)(QL.Button,{size:"compact",variant:"tertiary",className:"editor-collab-sidebar-panel__more-reply-button",onClick:V=>{V.stopPropagation(),k()},children:(0,ki.sprintf)((0,ki._n)("%s more reply","%s more replies",M.length),M.length)})}),!n&&T&&(0,Ua.jsx)(XL,{note:T,parentNote:e,isSelected:!1,onEditNote:t,onDeleteNote:o}),n&&(0,Ua.jsx)(Ux,{role:"treeitem",children:(0,Ua.jsx)(t0,{onSubmit:V=>e.status==="approved"?t({id:e.id,status:"hold",content:V}):r({content:V,parent:e.id}),onCancel:V=>{V.stopPropagation(),R(),ls(e.id,i.current)},labels:{submit:e.status==="approved"?(0,ki.__)("Reopen & Reply"):(0,ki.__)("Reply"),input:(0,ki.sprintf)((0,ki.__)("Reply to note %1$s by %2$s"),e.id,e.author_name),placeholder:(0,ki.__)("Reply or @ mention")}})}),!!e.blockClientId&&(0,Ua.jsx)(QL.Button,{className:"editor-collab-sidebar-panel__skip-to-block",variant:"secondary",size:"compact",onClick:V=>{V.stopPropagation(),g?.focus()},children:(0,ki.__)("Back to block")})]})}var DOe=a(na(),1),tv=a(j(),1),uf=a(U(),1),e4=a(ae(),1),Iu=a(K(),1),n0=a(be(),1),LOe=a(It(),1),BOe=a(Mp(),1),VOe=a(Vt(),1);var Yx=a(hd(),1);function MOe(){let e=new Set,t=new Map,r=new Map,o=new WeakMap,n={},i={};function s(){i={...n};for(let c of e)c()}let l=new window.ResizeObserver(c=>{let u=!1;for(let d of c){let f=o.get(d.target),m=d.borderBoxSize[0].blockSize;n[f]!==m&&(n[f]=m,u=!0)}u&&s()});return{subscribe(c){return e.add(c),()=>{e.delete(c),e.size===0&&l.disconnect()}},getSnapshot(){return i},registerThread(c,u,d){t.set(c,u);let f=r.get(c);f&&f!==d&&(l.unobserve(f),o.delete(f)),d&&(r.set(c,d),o.set(d,c),l.observe(d)),s()},unregisterThread(c){t.delete(c);let u=r.get(c);u&&(l.unobserve(u),o.delete(u),r.delete(c)),delete n[c]},getAnchorRects(){return Object.fromEntries(Array.from(t).flatMap(([c,u])=>{if(!u)return[];if(c==="new"){let f=mRe(u)??u.getBoundingClientRect();return[[c,f]]}let d=u.querySelector(PD(c))??u;return[[c,d.getBoundingClientRect()]]}))},getFirstBlockElement(){return t.values().next().value??null}}}var{cleanEmptyObject:FOe}=Y(n0.privateApis);function jOe(e){let t={post:e,type:"note",status:"all",per_page:-1},{records:r}=(0,e4.useEntityRecords)("root","comment",t,{enabled:!!e&&typeof e=="number"}),{getBlockAttributes:o}=(0,Iu.useSelect)(n0.store),{clientIds:n}=(0,Iu.useSelect)(l=>{let{getClientIdsWithDescendants:c}=l(n0.store);return{clientIds:c()}},[]),{notes:i,unresolvedNotes:s}=(0,uf.useMemo)(()=>{if(!r||r.length===0)return{notes:[],unresolvedNotes:[]};let l={},c=new Map;for(let g of n){let v=o(g)?.metadata,b=jg(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:hRe(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 kut(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 Rut(e,t,r,o){if(!(e instanceof Yx.RichTextData))return null;let n=gRe((0,Yx.create)({html:e.toHTMLString()}),{type:dD,attributes:{"data-id":String(t)}},r,o);return Yx.RichTextData.fromHTMLString(new Yx.RichTextData(n).toHTMLString())}function Aut(e,t,r,o){for(let n of t()){let i=r(n),s=ED(i,e);if(!s)continue;let l=Lq(i[s.attributeKey],e);l&&o(n,{[s.attributeKey]:l});return}}function zOe(){let{createNotice:e}=(0,Iu.useDispatch)(LOe.store),{saveEntityRecord:t,deleteEntityRecord:r}=(0,Iu.useDispatch)(e4.store),{getCurrentPostId:o}=(0,Iu.useSelect)(N),{getBlockAttributes:n,getClientIdsWithDescendants:i,getSelectedBlockClientId:s,getSelectionStart:l,getSelectionEnd:c}=(0,Iu.useSelect)(n0.store),{updateBlockAttributes:u}=(0,Iu.useDispatch)(n0.store),d=g=>{let v=g.message&&g.code!=="unknown_error"?(0,VOe.decodeEntities)(g.message):(0,tv.__)("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:kut(l,c),_=v?null:b?.clientId||s(),y=await t("root","comment",{post:o(),content:g,status:"hold",type:"note",parent:v||0},{throwOnError:!0});if(!v&&y?.id&&_){let w=n(_),S=w?.metadata,x=pRe(S,y.id),C={metadata:FOe(x)};if(b){let I=Rut(w?.[b.attributeKey],y.id,b.start,b.end);I&&(C[b.attributeKey]=I)}u(_,C)}return e("snackbar",v?(0,tv.__)("Reply added."):(0,tv.__)("Note added."),{type:"snackbar",isDismissible:!0}),y}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 w={post:o(),content:v||"",type:"note",status:b,parent:g,meta:{_wp_note_status:b==="approved"?"resolved":"reopen"}},S=await t("root","comment",w,{throwOnError:!0});return b==="approved"&&Aut(g,i,n,u),(0,DOe.speak)(b==="approved"?(0,tv.__)("Note marked as resolved."):(0,tv.__)("Note reopened.")),S}let y=await t("root","comment",{id:g,content:v,status:b},{throwOnError:!0});return e("snackbar",(0,tv.__)("Note updated."),{type:"snackbar",isDismissible:!0}),y}catch(_){d(_)}},onDelete:async g=>{try{let v=g.parent?null:g.blockClientId||s();if(await r("root","comment",g.id,void 0,{throwOnError:!0}),v){let b=n(v),_={metadata:FOe(vRe(b?.metadata,g.id))},y=ED(b,g.id);if(y){let w=Lq(b[y.attributeKey],g.id);w&&(_[y.attributeKey]=w)}u(v,_)}return e("snackbar",(0,tv.__)("Note deleted."),{type:"snackbar",isDismissible:!0}),!0}catch(v){d(v)}}}}function HOe(e=!1){let t=(0,Iu.useRegistry)();(0,uf.useEffect)(()=>{if(!e)return;let{getActiveComplementaryArea:r}=t.select(je),{disableComplementaryArea:o,enableComplementaryArea:n}=t.dispatch(je),i=t.subscribe(()=>{r("core")===null&&n("core",Lg)});return()=>{i(),r("core")===Lg&&o("core",Lg)}},[e,t])}function UOe({threads:e,selectedNoteId:t,isFloating:r,sidebarRef:o}){let[n,i]=(0,uf.useState)({}),[s]=(0,uf.useState)(MOe),l=(0,uf.useSyncExternalStore)(s.subscribe,s.getSnapshot);return(0,uf.useEffect)(()=>{if(!r||!o?.current)return;let c=o.current,u=s.getFirstBlockElement(),d=u?.closest(".is-root-container")??u,f=d?(0,BOe.getScrollContainer)(d):null,m=()=>{c.style.setProperty("--canvas-scroll",`${-(f?.scrollTop??0)}px`)},h,g=()=>{window.cancelAnimationFrame(h),h=window.requestAnimationFrame(()=>{let y=bRe({threads:e,selectedNoteId:t,blockRects:s.getAnchorRects(),heights:l,scrollTop:f?.scrollTop??0});i(y.positions),m()})};g();let v=new window.ResizeObserver(g);d&&v.observe(d);let b=f?.ownerDocument?.defaultView,_={passive:!0,capture:!0};return b?.addEventListener("scroll",m,_),()=>{window.cancelAnimationFrame(h),v.disconnect(),b?.removeEventListener("scroll",m,_)}},[o,l,r,t,s,e]),{notePositions:n,registerThread:s.registerThread,unregisterThread:s.unregisterThread}}var Tl=a(E(),1),{useBlockElement:Iut}=Y(tk.privateApis);function PK({notes:e,sidebarRef:t,isFloating:r=!1,styles:o}){let{onCreate:n,onEdit:i,onDelete:s}=zOe(),{selectNote:l}=Y((0,qx.useDispatch)(N)),{selectBlock:c,toggleBlockSpotlight:u}=Y((0,qx.useDispatch)(tk.store)),{noteId:d,selectedBlockClientId:f,orderedBlockIds:m}=(0,qx.useSelect)(A=>{let{getBlockAttributes:P,getSelectedBlockClientId:T,getClientIdsWithDescendants:M}=A(tk.store),B=T();return{noteId:B?P(B)?.metadata?.noteId:null,selectedBlockClientId:B,orderedBlockIds:M()}},[]),{selectedNote:h,noteFocused:g}=(0,qx.useSelect)(A=>{let{getSelectedNote:P,isNoteFocused:T}=Y(A(N));return{selectedNote:P(),noteFocused:T()}},[]),v=Iut(f),b=(0,df.useMemo)(()=>{if(!r||h!=="new")return e;let A={id:"new",blockClientId:f,content:{rendered:""}},P=[];return m.forEach(T=>{let M=e.filter(B=>B.blockClientId===T);P.push(...M),T===f&&P.push(A)}),P},[e,r,h,f,m]),_=async A=>{let P=b.findIndex(V=>V.id===A.id),T=b[P+1],M=b[P-1];if(!await s(A))return;if(A.parent!==0){l(A.parent),ls(A.parent,t.current);return}let F=T??M;F?(l(F.id),ls(F.id,t.current),F.blockClientId&&(u(F.blockClientId,!0),c(F.blockClientId,null))):(l(void 0),u(A.blockClientId,!1),v?.focus())},y=(0,df.useMemo)(()=>{let A=jg({noteId:d}),P=e.filter(T=>A.includes(T.id));return RP(P)?.id},[d,e]),w=(0,df.useRef)(f);(0,df.useEffect)(()=>{w.current!==f&&(w.current=f,l(y))},[f,y,l]),(0,df.useEffect)(()=>{g&&h&&(ls(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}),I=Array.isArray(b)&&b.length>0,k=(A,P,T)=>{if(A.defaultPrevented)return;let M=b.findIndex(F=>F.id===P.id),B=A.currentTarget===A.target;(A.key==="Enter"||A.key==="ArrowRight")&&B&&!T?(l(P.id),P.blockClientId&&(c(P.blockClientId,null),u(P.blockClientId,!0))):(A.key==="Enter"||A.key==="ArrowLeft")&&B&&T||A.key==="Escape"?(l(void 0),P.blockClientId&&u(P.blockClientId,!1),ls(P.id,t.current)):A.key==="ArrowDown"&&M<b.length-1&&B?ls(b[M+1].id,t.current):A.key==="ArrowUp"&&M>0&&B?ls(b[M-1].id,t.current):A.key==="Home"&&B?ls(b[0].id,t.current):A.key==="End"&&B&&ls(b[b.length-1].id,t.current)},R=r?-1:b.findIndex(A=>A.status==="approved"&&!!A.blockClientId);return(0,Tl.jsx)(se,{className:"editor-collab-sidebar-panel",style:o,role:"tree",direction:"column",gap:"md",justify:"flex-start",ref:A=>{A&&(t.current=A)},"aria-label":r?(0,t4.__)("Unresolved notes"):(0,t4.__)("All notes"),children:!I&&!r?(0,Tl.jsx)(JP,{onSubmit:n,sidebarRef:t}):(0,Tl.jsxs)(Tl.Fragment,{children:[!r&&h==="new"&&(0,Tl.jsx)(JP,{onSubmit:n,sidebarRef:t}),b.map((A,P)=>(0,Tl.jsxs)(df.Fragment,{children:[P===R&&(0,Tl.jsx)(se,{direction:"row",align:"center",justify:"center",gap:"sm",className:"editor-collab-sidebar-panel__status-separator",children:(0,Tl.jsx)(ws,{variant:"heading-sm",render:(0,Tl.jsx)("p",{}),children:(0,t4.__)("Resolved")})}),(0,Tl.jsx)(NOe,{note:A,onAddReply:n,onDeleteNote:_,onEditNote:i,isSelected:h===A.id,sidebarRef:t,floating:r?{y:S[A.id],registerThread:x,unregisterThread:C}:void 0,onKeyDown:T=>k(T,A,h===A.id)})]},A.id))]})})}var WOe=a(G(),1),r4=a(j(),1),n4=a(be(),1),kK=a(K(),1),GOe=a(Pt(),1),YOe=a(_a(),1);var o4=a(E(),1),{NoteIconSlotFill:Out}=Y(n4.privateApis);function Nut({clientId:e,onClick:t,isDistractionFree:r}){let o=(0,kK.useSelect)(l=>l(n4.store).getBlock(e),[e]),n=(0,kK.useSelect)(l=>l(YOe.store).getShortcutRepresentation("core/editor/new-note"),[]);if(!o?.isValid||o?.name===(0,GOe.getUnregisteredTypeHandlerName)())return null;let i=r||o?.name==="core/freeform",s;return r?s=(0,r4.__)("Notes are disabled in distraction free mode."):o?.name==="core/freeform"&&(s=(0,r4.__)("Convert to blocks to add notes.")),(0,o4.jsx)(WOe.MenuItem,{onClick:t,"aria-haspopup":"dialog",disabled:i,info:s,shortcut:n,children:(0,r4.__)("Add note")})}function RK({onClick:e,isDistractionFree:t}){return(0,o4.jsx)(Out.Fill,{children:({clientId:r,onClose:o})=>(0,o4.jsx)(Nut,{clientId:r,isDistractionFree:t,onClick:()=>{e(r),o()}})})}var qOe=a(G(),1);var Kx=a(j(),1),KOe=a(U(),1),i4=a(be(),1),ZOe=a(K(),1);var rv=a(E(),1),{NoteIconToolbarSlotFill:Mut}=Y(i4.privateApis);function Fut({participants:e}){let t=(0,ZOe.useSelect)(c=>{let{getSettings:u}=c(i4.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,Kx.__)("100+"):(0,Kx.sprintf)((0,Kx.__)("+%s"),i);return(0,rv.jsxs)(se,{direction:"row",align:"center",gap:"xs",children:[n.map(c=>(0,rv.jsx)("img",{src:c.avatar||t,alt:c.name,className:"editor-note-indicator__avatar",style:{borderColor:ja(c.id)}},c.id)),i>0&&(0,rv.jsx)("span",{className:"editor-note-indicator__overflow",children:l})]})}function XOe({onClick:e,note:t}){let r=(0,KOe.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,rv.jsx)(Mut.Fill,{children:(0,rv.jsx)(qOe.ToolbarButton,{className:"editor-note-indicator",label:(0,Kx.__)("View notes"),onClick:()=>e(),showTooltip:!0,children:(0,rv.jsx)(Fut,{participants:r})})}):null}var JOe=a(U(),1),$Oe=a(be(),1);var Dut="40",QOe="80",Lut="mark.wp-note{background-color:transparent;color:inherit;}";function But(e,t=null){let r=[Lut];for(let o of e??[]){if(!o?.id)continue;let n=ja(o.author??0),i=PD(o.id);r.push(`${i}{background-color:${n}${Dut};}`),r.push(`${i}:hover,${i}:focus-within{background-color:${n}${QOe};}`),t&&String(t)===String(o.id)&&r.push(`${i}{background-color:${n}${QOe};}`)}return r.join("")}function e5e({threads:e,selectedId:t}){let r=(0,JOe.useMemo)(()=>But(e,t),[e,t]);return(0,$Oe.useStyleOverride)({id:"core-note-highlights",css:r}),null}var cs=a(E(),1);function Vut({postId:e}){let{getActiveComplementaryArea:t}=(0,ff.useSelect)(je),{enableComplementaryArea:r}=(0,ff.useDispatch)(je),{toggleBlockSpotlight:o,selectBlock:n}=Y((0,ff.useDispatch)(AK.store)),{selectNote:i}=Y((0,ff.useDispatch)(N)),s=(0,r5e.useViewportMatch)("medium"),l=(0,t5e.useRef)(null),{clientId:c,noteId:u,isClassicBlock:d}=(0,ff.useSelect)(R=>{let{getBlockAttributes:A,getSelectedBlockClientId:P,getBlockName:T}=R(AK.store),M=P();return{clientId:M,noteId:M?A(M)?.metadata?.noteId:null,isClassicBlock:M?T(M)==="core/freeform":!1}},[]),f=jg({noteId:u}),{isDistractionFree:m}=(0,ff.useSelect)(R=>{let{get:A}=R(n5e.store);return{isDistractionFree:A("core","distractionFree")}},[]),h=(0,ff.useSelect)(R=>Y(R(N)).getSelectedNote(),[]),{notes:g,unresolvedNotes:v}=jOe(e),b=s,_=g.length>0||!b;HOe(b&&(v.length>0||h!==void 0));async function y({targetClientId:R,noteId:A,isApproved:P}){if(!R)return;let T=await t("core");P?r("core",mx):(!_P.includes(T)||!_)&&r("core",b?Lg:mx);let M=await t("core");_P.includes(M)&&(n(R,null),o(R,!0),i(A,{focus:!0}))}function w(R){let A=g.filter(T=>T.blockClientId===R),P=RP(A);return y({targetClientId:R,noteId:P?.id??"new",isApproved:P?.status==="approved"})}function S(R){return y({targetClientId:R,noteId:"new",isApproved:!1})}(0,o5e.useShortcut)("core/editor/new-note",R=>{R.preventDefault(),S(c)},{isDisabled:m||d||!c});let{merged:x}=Hr(),C=x?.styles?.color?.background,I=f.length>0?g.filter(R=>f.includes(R.id)):[],k=RP(I);return m?(0,cs.jsx)(RK,{isDistractionFree:!0}):(0,cs.jsxs)(cs.Fragment,{children:[(0,cs.jsx)(e5e,{threads:v,selectedId:h}),!!k&&(0,cs.jsx)(XOe,{note:k,onClick:()=>w(c)}),(0,cs.jsx)(RK,{onClick:R=>S(R)}),_&&(0,cs.jsx)(ky,{identifier:mx,name:mx,title:(0,s4.__)("All notes"),header:(0,cs.jsx)("h2",{className:"interface-complementary-area-header__title",children:(0,s4.__)("All notes")}),icon:WB,closeLabel:(0,s4.__)("Close Notes"),children:(0,cs.jsx)(PK,{notes:g,sidebarRef:l})}),s&&(0,cs.jsx)(ky,{isPinnable:!1,header:!1,identifier:Lg,className:"editor-collab-sidebar",headerClassName:"editor-collab-sidebar__header",backgroundColor:C,children:(0,cs.jsx)(PK,{notes:v,sidebarRef:l,styles:{backgroundColor:C},isFloating:!0})})]})}function i5e(){let{postId:e,editorMode:t,revisionsMode:r}=(0,ff.useSelect)(o=>{let{getCurrentPostId:n,getEditorMode:i,isRevisionsMode:s}=Y(o(N));return{postId:n(),editorMode:i(),revisionsMode:s()}},[]);return!e||typeof e!="number"||t==="text"||r?null:(0,cs.jsx)(fo,{supportKeys:"editor.notes",children:(0,cs.jsx)(Vut,{postId:e})})}var pf=a(G(),1),Zx=a(j(),1);var ik=a(K(),1),OK=a(U(),1),u5e=a(Dt(),1),d4=a(Te(),1),d5e=a(ae(),1);var f5e=a(be(),1);var lm=a(G(),1),a4=a(K(),1),rk=a(j(),1),s5e=a(Dt(),1);var a5e=a(ae(),1);var Ou=a(E(),1);function l4({hideWelcomeGuide:e=!1,onChangePath:t}){let{user:r,setUser:o}=Hr(),n=!!r&&(Object.keys(r?.styles??{}).length>0||Object.keys(r?.settings??{}).length>0),i=()=>{o({styles:{},settings:{}})},{toggle:s}=(0,a4.useDispatch)(s5e.store),{canEditCSS:l}=(0,a4.useSelect)(u=>{let{getEntityRecord:d,__experimentalGetCurrentGlobalStylesId:f}=u(a5e.store),m=f();return{canEditCSS:!!(m?d("root","globalStyles",m):void 0)?._links?.["wp:action-edit-css"]}},[]),c=()=>{t("/css")};return(0,Ou.jsx)(lm.DropdownMenu,{icon:yo,label:(0,rk.__)("More"),toggleProps:{size:"compact"},children:({onClose:u})=>(0,Ou.jsxs)(Ou.Fragment,{children:[(0,Ou.jsxs)(lm.MenuGroup,{children:[l&&(0,Ou.jsx)(lm.MenuItem,{onClick:c,children:(0,rk.__)("Additional CSS")}),!e&&(0,Ou.jsx)(lm.MenuItem,{onClick:()=>{s("core/edit-site","welcomeGuideStyles"),u()},children:(0,rk.__)("Welcome Guide")})]}),(0,Ou.jsx)(lm.MenuGroup,{children:(0,Ou.jsx)(lm.MenuItem,{onClick:()=>{i(),u()},disabled:!n,children:(0,rk.__)("Reset styles")})})]})})}var i0=a(E(),1);function l5e({className:e,identifier:t,title:r,icon:o,children:n,closeLabel:i,header:s,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,i0.jsxs)(i0.Fragment,{children:[(0,i0.jsx)(Yl,{className:e,scope:"core",identifier:t,title:r,icon:o,closeLabel:i,header:s,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:n}),(0,i0.jsx)(Bh,{scope:"core",identifier:t,icon:o,children:r})]})}var c4=a(K(),1),u4=a(G(),1),_c=a(j(),1),IK=a(Dt(),1);var ok=a(E(),1);function nk({nonAnimatedSrc:e,animatedSrc:t}){return(0,ok.jsxs)("picture",{className:"editor-welcome-guide__image",children:[(0,ok.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,ok.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var ro=a(E(),1);function c5e(){let{toggle:e}=(0,c4.useDispatch)(IK.store),{isActive:t,isStylesOpen:r}=(0,c4.useSelect)(n=>{let i=n(je).getActiveComplementaryArea("core");return{isActive:!!n(IK.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:i==="edit-site/global-styles"}},[]);if(!t||!r)return null;let o=(0,_c.__)("Welcome to Styles");return(0,ro.jsx)(u4.Guide,{className:"editor-welcome-guide guide-styles",contentLabel:o,finishButtonText:(0,_c.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,ro.jsx)(nk,{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,ro.jsxs)(ro.Fragment,{children:[(0,ro.jsx)("h1",{className:"editor-welcome-guide__heading",children:o}),(0,ro.jsx)("p",{className:"editor-welcome-guide__text",children:(0,_c.__)("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,ro.jsx)(nk,{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,ro.jsxs)(ro.Fragment,{children:[(0,ro.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,_c.__)("Set the design")}),(0,ro.jsx)("p",{className:"editor-welcome-guide__text",children:(0,_c.__)("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,ro.jsx)(nk,{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,ro.jsxs)(ro.Fragment,{children:[(0,ro.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,_c.__)("Personalize blocks")}),(0,ro.jsx)("p",{className:"editor-welcome-guide__text",children:(0,_c.__)("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,ro.jsx)(nk,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,ro.jsxs)(ro.Fragment,{children:[(0,ro.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,_c.__)("Learn more")}),(0,ro.jsxs)("p",{className:"editor-welcome-guide__text",children:[(0,_c.__)("New to block themes and styling your site?")," ",(0,ro.jsx)(u4.ExternalLink,{href:(0,_c.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,_c.__)("Here\u2019s a detailed guide to learn how to make the most of it.")})]})]})}]})}var Ri=a(E(),1);function p5e(){let{shouldResetNavigation:e,stylesPath:t,showStylebook:r,showListViewByDefault:o,hasRevisions:n,activeComplementaryArea:i,editorSettings:s,styleStateViewport:l}=(0,ik.useSelect)(y=>{let{getActiveComplementaryArea:w}=y(je),{getStylesPath:S,getShowStylebook:x}=Y(y(N)),C=y(N).getEditorMode()==="visual",I=y(u5e.store).get("core","showListViewByDefault"),{getEntityRecord:k,__experimentalGetCurrentGlobalStylesId:R}=y(d5e.store),A=R(),P=A?k("root","globalStyles",A):void 0;return{stylesPath:S(),showStylebook:x(),shouldResetNavigation:w("core")!=="edit-site/global-styles"||!C,showListViewByDefault:I,hasRevisions:!!P?._links?.["version-history"]?.[0]?.count,activeComplementaryArea:y(je).getActiveComplementaryArea("core"),editorSettings:y(N).getEditorSettings(),styleStateViewport:Y(y(f5e.store)).getStyleStateViewport()}},[]),{setStylesPath:c,setShowStylebook:u,resetStylesNavigation:d}=Y((0,ik.useDispatch)(N)),f=(0,d4.useViewportMatch)("medium","<"),m=t.startsWith("/revisions")&&!r,h=t.startsWith("/revisions")&&r,g=(0,d4.usePrevious)(i);(0,OK.useEffect)(()=>{i==="edit-site/global-styles"&&g!=="edit-site/global-styles"&&d()},[i,g,d]),(0,OK.useEffect)(()=>{e&&d()},[e,d]);let{setIsListViewOpened:v}=(0,ik.useDispatch)(N),b=()=>{v(!1),c(m||h?"/":"/revisions")},_=()=>{v(r&&o),u(!r)};return(0,Ri.jsxs)(Ri.Fragment,{children:[(0,Ri.jsx)(l5e,{className:"editor-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,Zx.__)("Styles"),icon:p8,closeLabel:(0,Zx.__)("Close Styles"),panelClassName:"editor-global-styles-sidebar__panel",header:(0,Ri.jsxs)(pf.Flex,{className:"editor-global-styles-sidebar__header",gap:1,children:[(0,Ri.jsx)(pf.FlexItem,{children:(0,Ri.jsx)("h2",{className:"editor-global-styles-sidebar__header-title",children:(0,Zx.__)("Styles")})}),(0,Ri.jsxs)(pf.Flex,{justify:"flex-end",gap:1,className:"editor-global-styles-sidebar__header-actions",children:[!f&&(0,Ri.jsx)(pf.FlexItem,{children:(0,Ri.jsx)(pf.Button,{icon:mv,label:(0,Zx.__)("Style Book"),isPressed:r,accessibleWhenDisabled:!0,disabled:e,onClick:_,size:"compact"})}),(0,Ri.jsx)(pf.FlexItem,{children:(0,Ri.jsx)(pf.Button,{label:(0,Zx.__)("Revisions"),icon:_f,onClick:b,accessibleWhenDisabled:!0,disabled:!n,isPressed:m||h,size:"compact"})}),(0,Ri.jsx)(l4,{onChangePath:c})]})]}),children:(0,Ri.jsx)(LM,{path:t,onPathChange:c,settings:s,selectedViewport:l,showResponsiveStateControls:!1})}),(0,Ri.jsx)(c5e,{})]})}var Sc=a(E(),1);function jut({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,m5e.useSelect)(b=>{let{getEntityRecord:_,getResolutionError:y,hasFinishedResolution:w,getCurrentTheme:S,__experimentalGetCurrentGlobalStylesId:x,canUser:C}=b(h5e.store),{getRenderingMode:I,getCurrentPostType:k}=b(N),R=["postType",e,t],A=I(),P=k(),T=S()?.is_block_theme,M=x(),B=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&&B&&(P==="wp_template"||A==="template-locked")}},[e,t,r]);return(0,Sc.jsxs)(Sc.Fragment,{children:[m&&!d&&(0,Sc.jsx)(g5e.Notice,{status:h?"error":"warning",isDismissible:!1,children:h||(0,v5e.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")}),!!d&&(0,Sc.jsxs)(DG,{post:d,__unstableTemplate:f,settings:o,initialEdits:i,useSubRegistry:!1,children:[(0,Sc.jsx)(nAe,{...u,children:l}),n,(0,Sc.jsx)(hOe,{onActionPerformed:s,extraPanels:c}),(0,Sc.jsx)(i5e,{}),g&&(0,Sc.jsx)(S3,{}),v&&(0,Sc.jsx)(p5e,{})]})]})}var b5e=jut;var Ge=a(j(),1),P5e=a(Te(),1),s0=a(K(),1),k5e=a(U(),1),sk=a(Dt(),1);var f4=a(K(),1),y5e=a(Dt(),1);var w5e=a(E(),1),{PreferenceBaseOption:zut}=Y(y5e.privateApis);function _5e(e){let t=(0,f4.useSelect)(n=>n(N).isPublishSidebarEnabled(),[]),{enablePublishSidebar:r,disablePublishSidebar:o}=(0,f4.useDispatch)(N);return(0,w5e.jsx)(zut,{isChecked:t,onChange:n=>n?r():o(),...e})}var p4=a(K(),1),S5e=a(Dt(),1),m4=a(Pt(),1),x5e=a(U(),1),C5e=a(G(),1),Qx=a(j(),1),T5e=a(be(),1);var Xx=a(E(),1),{BlockManager:Hut}=Y(T5e.privateApis),Uut=[];function E5e(){let{showBlockTypes:e,hideBlockTypes:t}=Y((0,p4.useDispatch)(N)),{blockTypes:r,allowedBlockTypes:o,hiddenBlockTypes:n}=(0,p4.useSelect)(m=>({blockTypes:m(m4.store).getBlockTypes(),allowedBlockTypes:m(N).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:m(S5e.store).get("core","hiddenBlockTypes")??Uut}),[]),s=(0,x5e.useMemo)(()=>o===!0?r:r.filter(({name:m})=>o?.includes(m)),[o,r]).filter(m=>(0,m4.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,Xx.jsxs)("div",{className:"editor-block-visibility",children:[!!u&&(0,Xx.jsxs)("div",{className:"editor-block-visibility__disabled-blocks-count",children:[(0,Qx.sprintf)((0,Qx._n)("%d block is hidden.","%d blocks are hidden.",u),u),(0,Xx.jsx)(C5e.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:d,children:(0,Qx.__)("Reset")})]}),(0,Xx.jsx)(Hut,{blockTypes:s,selectedBlockTypes:c,onChange:f,showSelectAll:!1})]})}var nt=a(E(),1),{PreferencesModal:Wut,PreferencesModalTabs:Gut,PreferencesModalSection:mf,PreferenceToggleControl:us}=Y(sk.privateApis);function R5e({extraSections:e={}}){let t=(0,s0.useSelect)(o=>o(je).isModalActive("editor/preferences"),[]),{closeModal:r}=(0,s0.useDispatch)(je);return t?(0,nt.jsx)(Wut,{closeModal:r,children:(0,nt.jsx)(Yut,{extraSections:e})}):null}function Yut({extraSections:e={}}){let t=(0,P5e.useViewportMatch)("medium"),{showBlockBreadcrumbsOption:r,showCollaborationOptions:o}=(0,s0.useSelect)(c=>{let{getEditorSettings:u,isCollaborationEnabledForCurrentPost:d}=Y(c(N)),{get:f}=c(sk.store),m=u().richEditingEnabled;return{showBlockBreadcrumbsOption:!f("core","distractionFree")&&t&&m,showCollaborationOptions:d()}},[t]),{setIsListViewOpened:n,setIsInserterOpened:i}=(0,s0.useDispatch)(N),{set:s}=(0,s0.useDispatch)(sk.store),l=(0,k5e.useMemo)(()=>[{name:"general",tabLabel:(0,Ge.__)("General"),content:(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsxs)(mf,{title:(0,Ge.__)("Interface"),children:[(0,nt.jsx)(us,{scope:"core",featureName:"showListViewByDefault",help:(0,Ge.__)("Opens the List View panel by default."),label:(0,Ge.__)("Always open List View")}),r&&(0,nt.jsx)(us,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,Ge.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,Ge.__)("Show block breadcrumbs")}),(0,nt.jsx)(us,{scope:"core",featureName:"allowRightClickOverrides",help:(0,Ge.__)("Allows contextual List View menus via right-click, overriding browser defaults."),label:(0,Ge.__)("Allow right-click contextual menus")}),(0,nt.jsx)(us,{scope:"core",featureName:"enableChoosePatternModal",help:(0,Ge.__)("Pick from starter content when creating a new page."),label:(0,Ge.__)("Show starter patterns")}),o&&(0,nt.jsx)(us,{scope:"core",featureName:"showCollaborationCursor",help:(0,Ge.__)("Show your own avatar inside blocks during collaborative editing sessions."),label:(0,Ge.__)("Show avatar in blocks")})]}),o&&(0,nt.jsxs)(mf,{title:(0,Ge.__)("Collaboration notifications"),children:[(0,nt.jsx)(us,{scope:"core",featureName:"showCollaborationJoinNotifications",help:(0,Ge.__)("Show notifications when collaborators join the post."),label:(0,Ge.__)("Collaborator joined")}),(0,nt.jsx)(us,{scope:"core",featureName:"showCollaborationLeaveNotifications",help:(0,Ge.__)("Show notifications when collaborators leave the post."),label:(0,Ge.__)("Collaborator left")}),(0,nt.jsx)(us,{scope:"core",featureName:"showCollaborationPostSaveNotifications",help:(0,Ge.__)("Show notifications when collaborators save, update, or publish the post."),label:(0,Ge.__)("Post updated")})]}),(0,nt.jsxs)(mf,{title:(0,Ge.__)("Document settings"),description:(0,Ge.__)("Select what settings are shown in the document panel."),children:[(0,nt.jsx)(e6.Slot,{}),(0,nt.jsx)(ZS,{taxonomyWrapper:(c,u)=>(0,nt.jsx)(xg,{label:u.labels.menu_name,panelName:`taxonomy-panel-${u.slug}`})}),(0,nt.jsx)(zp,{children:(0,nt.jsx)(xg,{label:(0,Ge.__)("Featured image"),panelName:"featured-image"})}),(0,nt.jsx)(Oy,{children:(0,nt.jsx)(xg,{label:(0,Ge.__)("Excerpt"),panelName:"post-excerpt"})}),(0,nt.jsx)(fo,{supportKeys:["comments","trackbacks"],children:(0,nt.jsx)(xg,{label:(0,Ge.__)("Discussion"),panelName:"discussion-panel"})}),(0,nt.jsx)(gS,{children:(0,nt.jsx)(xg,{label:(0,Ge.__)("Page attributes"),panelName:"page-attributes"})})]}),t&&(0,nt.jsx)(mf,{title:(0,Ge.__)("Publishing"),children:(0,nt.jsx)(_5e,{help:(0,Ge.__)("Review settings, such as visibility and tags."),label:(0,Ge.__)("Enable pre-publish checks")})}),e?.general]})},{name:"appearance",tabLabel:(0,Ge.__)("Appearance"),content:(0,nt.jsxs)(mf,{title:(0,Ge.__)("Appearance"),description:(0,Ge.__)("Customize the editor interface to suit your needs."),children:[(0,nt.jsx)(us,{scope:"core",featureName:"fixedToolbar",onToggle:()=>s("core","distractionFree",!1),help:(0,Ge.__)("Access all block and document tools in a single place."),label:(0,Ge.__)("Top toolbar")}),(0,nt.jsx)(us,{scope:"core",featureName:"distractionFree",onToggle:()=>{s("core","fixedToolbar",!0),i(!1),n(!1)},help:(0,Ge.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,Ge.__)("Distraction free")}),(0,nt.jsx)(us,{scope:"core",featureName:"focusMode",help:(0,Ge.__)("Highlights the current block and fades other content."),label:(0,Ge.__)("Spotlight mode")}),e?.appearance]})},{name:"accessibility",tabLabel:(0,Ge.__)("Accessibility"),content:(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(mf,{title:(0,Ge.__)("Navigation"),description:(0,Ge.__)("Optimize the editing experience for enhanced control."),children:(0,nt.jsx)(us,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,Ge.__)("Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users."),label:(0,Ge.__)("Contain text cursor inside block")})}),(0,nt.jsx)(mf,{title:(0,Ge.__)("Interface"),children:(0,nt.jsx)(us,{scope:"core",featureName:"showIconLabels",label:(0,Ge.__)("Show button text labels"),help:(0,Ge.__)("Show text instead of icons on buttons across the interface.")})})]})},{name:"blocks",tabLabel:(0,Ge.__)("Blocks"),content:(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(mf,{title:(0,Ge.__)("Inserter"),children:(0,nt.jsx)(us,{scope:"core",featureName:"mostUsedBlocks",help:(0,Ge.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,Ge.__)("Show most used blocks")})}),(0,nt.jsx)(mf,{title:(0,Ge.__)("Manage block visibility"),description:(0,Ge.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."),children:(0,nt.jsx)(E5e,{})})]})},window.__clientSideMediaProcessing&&{name:"media",tabLabel:(0,Ge.__)("Media"),content:(0,nt.jsx)(nt.Fragment,{children:(0,nt.jsxs)(mf,{title:(0,Ge.__)("General"),description:(0,Ge.__)("Customize options related to the media upload flow."),children:[(0,nt.jsx)(us,{scope:"core/media",featureName:"optimizeOnUpload",help:(0,Ge.__)("Compress media items before uploading to the server."),label:(0,Ge.__)("Pre-upload compression")}),(0,nt.jsx)(us,{scope:"core/media",featureName:"requireApproval",help:(0,Ge.__)("Require approval step when optimizing existing media."),label:(0,Ge.__)("Approval step")})]})})}].filter(Boolean),[r,o,e,i,n,s,t]);return(0,nt.jsx)(Gut,{sections:l})}var uk=a(Pt(),1);var ak=a(be(),1),A5e="content",I5e={name:"core/pattern-overrides",getValues({select:e,clientId:t,context:r,bindings:o}){let n=r["pattern/overrides"],{getBlockAttributes:i}=e(ak.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(ak.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(ak.store).updateBlockAttributes(g.clientId,d),m(g.innerBlocks)};m(s());return}let f=n(u)?.[A5e];t(ak.store).updateBlockAttributes(u,{[A5e]:{...f,[c]:{...f?.[c],...Object.entries(d).reduce((m,[h,g])=>(m[h]=g===void 0?"":g,m),{})}}})},canUserEditValue:()=>!0};var h4=a(j(),1),g4=a(ae(),1),lk=a(be(),1),NK=["core/navigation-link","core/navigation-submenu"],O5e=[{label:(0,h4.__)("Post Date"),args:{field:"date"},type:"string"},{label:(0,h4.__)("Post Modified Date"),args:{field:"modified"},type:"string"},{label:(0,h4.__)("Post Link"),args:{field:"link"},type:"string"}],N5e={name:"core/post-data",getValues({select:e,context:t,bindings:r,clientId:o}){let{getBlockAttributes:n,getBlockName:i}=e(lk.store),s=i(o),l=NK.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(g4.store),f=d("postType",u,c),m={};for(let[h,g]of Object.entries(r)){let v=O5e.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(lk.store),s=i(o);if(NK.includes(s))return!1;let l={};Object.values(r).forEach(({args:c,newValue:u})=>{l[c.field]=u}),e(g4.store).editEntityRecord("postType",t?.postType,t?.postId,l)},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(lk.store),n=o(),i=r(n);return!(NK.includes(i)||t?.query||t?.queryId||!t?.postType||!e(g4.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({context:e,select:t}){return t(lk.store).getSelectedBlock()?.name!=="core/post-date"?[]:!e||!e.postId||!e.postType?[]:O5e}};var ck=a(ae(),1);function MK(e,t){let{getRegisteredPostMeta:r}=Y(e(ck.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 qut({select:e,context:t,args:r}){let n=MK(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(ck.store);return i("postType",t?.postType,t?.postId).meta?.[r.key]??n?.label??r.key}var M5e={name:"core/post-meta",getValues({select:e,context:t,bindings:r}){let o={};for(let[n,i]of Object.entries(r))o[n]=qut({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(ck.store).editEntityRecord("postType",t?.postType,t?.postId,{meta:o})},canUserEditValue({select:e,context:t,args:r}){return!(t?.query||t?.queryId||!t?.postType||!MK(e,t).some(l=>l.args.key===r.key)||e(N).getEditorSettings().enableCustomFields||!e(ck.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({select:e,context:t}){return MK(e,t).map(({default:o,...n})=>({...n}))}};var ov=a(j(),1),F5e=a(ae(),1),v4=a(be(),1),FK=["core/navigation-link","core/navigation-submenu"],DK=[{label:(0,ov.__)("Term ID"),args:{field:"id"},type:"string"},{label:(0,ov.__)("Name"),args:{field:"name"},type:"string"},{label:(0,ov.__)("Slug"),args:{field:"slug"},type:"string"},{label:(0,ov.__)("Link"),args:{field:"link"},type:"string"},{label:(0,ov.__)("Description"),args:{field:"description"},type:"string"},{label:(0,ov.__)("Parent ID"),args:{field:"parent"},type:"string"},{label:(0,ov.__)("Count"),args:{field:"count"},type:"string"}],D5e={name:"core/term-data",usesContext:["taxonomy","termId","termData"],getValues({select:e,context:t,bindings:r,clientId:o}){let{getEntityRecord:n}=e(F5e.store),{getBlockAttributes:i,getBlockName:s}=e(v4.store),l=s(o),c=FK.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=DK.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(v4.store),n=o(),i=r(n);return FK.includes(i)||t?.termQuery||!t?.taxonomy||!t?.termId,!1},getFieldsList({context:e,select:t}){let{getBlockAttributes:r,getBlockName:o,getSelectedBlockClientId:n}=t(v4.store),i=n(),s=o(i);if(FK.includes(s)){let l=r(i);return!l||!l.id||!l.type?[]:DK}return e?e.taxonomy&&e.termId||e.termData?DK:[]:[]}};function L5e(){(0,uk.registerBlockBindingsSource)(I5e),(0,uk.registerBlockBindingsSource)(N5e),(0,uk.registerBlockBindingsSource)(M5e),(0,uk.registerBlockBindingsSource)(D5e)}var b4=a(K(),1),gf=a(U(),1),hf=a(j(),1),BK=a(na(),1),V5e=a(QM(),1),j5e=a(It(),1),y4=a(G(),1);var dk=a(E(),1),LK="upload-progress",Kut=3e3,B5e=40;function Zut(e){if(e.length<=B5e)return e;let t="\u2026",r=B5e-t.length,o=Math.ceil(r/2),n=Math.floor(r/2);return e.slice(0,o)+t+e.slice(e.length-n)}var Xut=(0,dk.jsx)("span",{className:"editor-upload-progress-snackbar__spinner","aria-hidden":"true",children:(0,dk.jsx)(y4.Spinner,{})}),Qut=(0,dk.jsx)("span",{className:"editor-upload-progress-snackbar__check","aria-hidden":"true",children:(0,dk.jsx)(y4.Icon,{icon:Oo})});function z5e(){let e=(0,b4.useSelect)(h=>h(V5e.store).getItems(),[]),t=cge(),r=(0,gf.useMemo)(()=>e.filter(h=>!h.parentId),[e]),o=r.length,n=t?t.total-t.completed:0,i=o+n,s=o+(t?t.total:0),l=(0,gf.useRef)(0),{createNotice:c,removeNotice:u}=(0,b4.useDispatch)(j5e.store),d=(0,gf.useRef)(!1),f=(0,gf.useRef)(!1),m=(0,gf.useRef)(null);return(0,gf.useEffect)(()=>()=>{m.current&&clearTimeout(m.current)},[]),(0,gf.useEffect)(()=>{let h=i>0;if(h&&!f.current?(d.current=!1,(0,BK.speak)((0,hf.__)("Media upload started"),"polite"),m.current&&(clearTimeout(m.current),m.current=null,l.current=0)):!h&&f.current&&((0,BK.speak)((0,hf.__)("Media upload complete"),"polite"),d.current?l.current=0:(c("info",(0,hf.__)("Upload complete"),{id:LK,type:"snackbar",isDismissible:!1,explicitDismiss:!1,speak:!1,icon:Qut,onDismiss:()=>{d.current=!0}}),m.current=setTimeout(()=>{u(LK),m.current=null,l.current=0},Kut))),f.current=h,!h||d.current)return;s>l.current&&(l.current=s);let g=l.current,v=g-i+1,b=Zut(r[0]?.sourceFile?.name||t?.pending[0]||(0,hf.__)("Uploading")),_=g===1?(0,hf.sprintf)((0,hf.__)("Uploading \u2014 %s"),b):(0,hf.sprintf)((0,hf.__)("Uploading %1$d of %2$d \u2014 %3$s"),v,g,b);c("info",_,{id:LK,type:"snackbar",isDismissible:!1,explicitDismiss:!0,speak:!1,icon:Xut,onDismiss:()=>{d.current=!0}})},[i,s,r,t,c,u]),null}var{store:Jut,...$ut}=sW,H5e={};pZ(H5e,{CreateTemplatePartModal:Cw,patternTitleField:wC,templateTitleField:B1,BackButton:fD,Editor:b5e,PluginPostExcerpt:ZE,PostCardPanel:Qg,PreferencesModal:R5e,usePostActions:wL,usePostFields:nS,ToolsMoreMenuGroup:yD,ViewMoreMenuGroup:wD,ResizableEditor:fS,UploadProgressSnackbar:z5e,registerCoreBlockBindingsSources:L5e,GlobalStylesUIWrapper:LM,GlobalStylesActionMenu:l4,StyleBookPreview:q_e,useGlobalStyles:Hr,useStyle:ng,interfaceStore:Jut,...$ut});var fk=a(K(),1);function edt(e,t,r){let{registerEntityAction:o}=Y((0,fk.dispatch)(N));o(e,t,r)}function tdt(e,t,r){let{unregisterEntityAction:o}=Y((0,fk.dispatch)(N));o(e,t,r)}function rdt(e,t,r){let{registerEntityField:o}=Y((0,fk.dispatch)(N));o(e,t,r)}function odt(e,t,r){let{unregisterEntityField:o}=Y((0,fk.dispatch)(N));o(e,t,r)}var U5e=a(be(),1);return Q5e(ndt);})(); |
| 515 |
/*! Bundled license information: |
| 516 |
|
| 517 |
use-sync-external-store/cjs/use-sync-external-store-shim.production.js: |
| 518 |
(** |
| 519 |
* @license React |
| 520 |
* use-sync-external-store-shim.production.js |
| 521 |
* |
| 522 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
| 523 |
* |
| 524 |
* This source code is licensed under the MIT license found in the |
| 525 |
* LICENSE file in the root directory of this source tree. |
| 526 |
*) |
| 527 |
|
| 528 |
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js: |
| 529 |
(** |
| 530 |
* @license React |
| 531 |
* use-sync-external-store-shim/with-selector.production.js |
| 532 |
* |
| 533 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
| 534 |
* |
| 535 |
* This source code is licensed under the MIT license found in the |
| 536 |
* LICENSE file in the root directory of this source tree. |
| 537 |
*) |
| 538 |
|
| 539 |
autosize/dist/autosize.js: |
| 540 |
(*! |
| 541 |
autosize 4.0.2 |
| 542 |
license: MIT |
| 543 |
http://www.jacklmoore.com/autosize |
| 544 |
*) |
| 545 |
|
| 546 |
is-plain-object/dist/is-plain-object.mjs: |
| 547 |
(*! |
| 548 |
* is-plain-object <https://github.com/jonschlinkert/is-plain-object> |
| 549 |
* |
| 550 |
* Copyright (c) 2014-2017, Jon Schlinkert. |
| 551 |
* Released under the MIT License. |
| 552 |
*) |
| 553 |
*/ |
| 554 |
//# sourceMappingURL=index.min.js.map |
| 555 |
|