This commit is contained in:
Hanson.xyz Dev
2026-01-04 17:50:08 -06:00
parent 7e45ce0756
commit acc8ac87a0
4131 changed files with 232562 additions and 250244 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
/*! This file is auto-generated */
(()=>{"use strict";var e={7734:e=>{e.exports=function e(r,t){if(r===t)return!0;if(r&&t&&"object"==typeof r&&"object"==typeof t){if(r.constructor!==t.constructor)return!1;var n,o,s;if(Array.isArray(r)){if((n=r.length)!=t.length)return!1;for(o=n;0!=o--;)if(!e(r[o],t[o]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(o of r.entries())if(!t.has(o[0]))return!1;for(o of r.entries())if(!e(o[1],t.get(o[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(o of r.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(r)&&ArrayBuffer.isView(t)){if((n=r.length)!=t.length)return!1;for(o=n;0!=o--;)if(r[o]!==t[o])return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if((n=(s=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=n;0!=o--;){var i=s[o];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t}}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var s=r[n]={exports:{}};return e[n](s,s.exports,t),s.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n={};t.d(n,{default:()=>j});const o=window.wp.element,s=window.wp.data;var i=t(7734),u=t.n(i);const c=window.wp.compose,l=window.wp.i18n,a=window.wp.apiFetch;var f=t.n(a);const d=window.wp.url,p=window.wp.components,w=window.wp.blocks,h=window.ReactJSXRuntime,y={};function g({className:e}){return(0,h.jsx)(p.Placeholder,{className:e,children:(0,l.__)("Block rendered as empty.")})}function m({response:e,className:r}){const t=(0,l.sprintf)((0,l.__)("Error loading block: %s"),e.errorMsg);return(0,h.jsx)(p.Placeholder,{className:r,children:t})}function v({children:e,showLoader:r}){return(0,h.jsxs)("div",{style:{position:"relative"},children:[r&&(0,h.jsx)("div",{style:{position:"absolute",top:"50%",left:"50%",marginTop:"-9px",marginLeft:"-9px"},children:(0,h.jsx)(p.Spinner,{})}),(0,h.jsx)("div",{style:{opacity:r?"0.3":1},children:e})]})}function b(e){const{attributes:r,block:t,className:n,httpMethod:s="GET",urlQueryArgs:i,skipBlockSupportAttributes:l=!1,EmptyResponsePlaceholder:a=g,ErrorResponsePlaceholder:p=m,LoadingResponsePlaceholder:b=v}=e,x=(0,o.useRef)(!1),[j,S]=(0,o.useState)(!1),O=(0,o.useRef)(),[P,k]=(0,o.useState)(null),R=(0,c.usePrevious)(e),[A,M]=(0,o.useState)(!1);function T(){var e,n;if(!x.current)return;M(!0);const o=setTimeout((()=>{S(!0)}),1e3);let u=r&&(0,w.__experimentalSanitizeBlockAttributes)(t,r);l&&(u=function(e){const{backgroundColor:r,borderColor:t,fontFamily:n,fontSize:o,gradient:s,textColor:i,className:u,...c}=e,{border:l,color:a,elements:f,spacing:d,typography:p,...w}=e?.style||y;return{...c,style:w}}(u));const c="POST"===s,a=c?null:null!==(e=u)&&void 0!==e?e:null,p=function(e,r=null,t={}){return(0,d.addQueryArgs)(`/wp/v2/block-renderer/${e}`,{context:"edit",...null!==r?{attributes:r}:{},...t})}(t,a,i),h=c?{attributes:null!==(n=u)&&void 0!==n?n:null}:null,g=O.current=f()({path:p,data:h,method:c?"POST":"GET"}).then((e=>{x.current&&g===O.current&&e&&k(e.rendered)})).catch((e=>{x.current&&g===O.current&&k({error:!0,errorMsg:e.message})})).finally((()=>{x.current&&g===O.current&&(M(!1),S(!1),clearTimeout(o))}));return g}const _=(0,c.useDebounce)(T,500);(0,o.useEffect)((()=>(x.current=!0,()=>{x.current=!1})),[]),(0,o.useEffect)((()=>{void 0===R?T():u()(R,e)||_()}));const E=!!P,N=""===P,z=P?.error;return A?(0,h.jsx)(b,{...e,showLoader:j,children:E&&(0,h.jsx)(o.RawHTML,{className:n,children:P})}):N||!E?(0,h.jsx)(a,{...e}):z?(0,h.jsx)(p,{response:P,...e}):(0,h.jsx)(o.RawHTML,{className:n,children:P})}const x={},j=(0,s.withSelect)((e=>{const r=e("core/editor");if(r){const e=r.getCurrentPostId();if(e&&"number"==typeof e)return{currentPostId:e}}return x}))((({urlQueryArgs:e=x,currentPostId:r,...t})=>{const n=(0,o.useMemo)((()=>r?{post_id:r,...e}:e),[r,e]);return(0,h.jsx)(b,{urlQueryArgs:n,...t})}));(window.wp=window.wp||{}).serverSideRender=n.default})();
(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{default:()=>x});const r=window.ReactJSXRuntime,n=window.wp.element,o=window.wp.i18n,s=window.wp.components,c=window.wp.data,l=window.wp.compose,a=window.wp.apiFetch;var i=e.n(a);const u=window.wp.url,d=window.wp.blocks;function p(e){const[t,r]=(0,n.useState)({status:"idle"}),o=(0,n.useRef)(!1),{attributes:s,block:c,skipBlockSupportAttributes:a=!1,httpMethod:p="GET",urlQueryArgs:w}=e;let f=s&&(0,d.__experimentalSanitizeBlockAttributes)(c,s);a&&(f=function(e){const{backgroundColor:t,borderColor:r,fontFamily:n,fontSize:o,gradient:s,textColor:c,className:l,...a}=e,{border:i,color:u,elements:d,shadow:p,spacing:w,typography:f,...m}=e?.style||{};return{...a,style:m}}(f));const m="POST"===p,h=function(e,t=null,r={}){return(0,u.addQueryArgs)(`/wp/v2/block-renderer/${e}`,{context:"edit",...null!==t?{attributes:t}:{},...r})}(c,m?null:f,w),y=m?JSON.stringify({attributes:f??null}):void 0;return(0,n.useEffect)((()=>{const e=new AbortController,t=(0,l.debounce)((function(){r({status:"loading"}),i()({path:h,method:m?"POST":"GET",body:y,headers:m?{"Content-Type":"application/json"}:{},signal:e.signal}).then((e=>{r({status:"success",content:e?e.rendered:""})})).catch((e=>{"AbortError"!==e.name&&r({status:"error",error:e.message})})).finally((()=>{o.current=!0}))}),o.current?500:0);return t(),()=>{e.abort(),t.cancel()}}),[h,m,y]),t}const w={};function f({className:e}){return(0,r.jsx)(s.Placeholder,{className:e,children:(0,o.__)("Block rendered as empty.")})}function m({message:e,className:t}){const n=(0,o.sprintf)((0,o.__)("Error loading block: %s"),e);return(0,r.jsx)(s.Placeholder,{className:t,children:n})}function h({children:e}){const[t,o]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{const e=setTimeout((()=>{o(!0)}),1e3);return()=>clearTimeout(e)}),[]),(0,r.jsxs)("div",{style:{position:"relative"},children:[t&&(0,r.jsx)("div",{style:{position:"absolute",top:"50%",left:"50%",marginTop:"-9px",marginLeft:"-9px"},children:(0,r.jsx)(s.Spinner,{})}),(0,r.jsx)("div",{style:{opacity:t?"0.3":1},children:e})]})}function y(e){const t=(0,n.useRef)(""),{className:o,EmptyResponsePlaceholder:s=f,ErrorResponsePlaceholder:c=m,LoadingResponsePlaceholder:l=h,...a}=e,{content:i,status:u,error:d}=p(a);return(0,n.useEffect)((()=>{i&&(t.current=i)}),[i]),"loading"===u?(0,r.jsx)(l,{...e,children:!!t.current&&(0,r.jsx)(n.RawHTML,{className:o,children:t.current})}):"success"!==u||i?"error"===u?(0,r.jsx)(c,{message:d,...e}):(0,r.jsx)(n.RawHTML,{className:o,children:i}):(0,r.jsx)(s,{...e})}function b({urlQueryArgs:e=w,...t}){const o=(0,c.useSelect)((e=>{const t=e("core/editor")?.getCurrentPostId();return t&&"number"==typeof t?t:null}),[]),s=(0,n.useMemo)((()=>o?{post_id:o,...e}:e),[o,e]);return(0,r.jsx)(y,{urlQueryArgs:s,...t})}const g=b;g.ServerSideRender=b,g.useServerSideRender=p;var x=g;(window.wp=window.wp||{}).serverSideRender=t.default})();