/*! This file is auto-generated */
(function() {
"use strict";var wp;(wp||={}).uploadMedia=(()=>{var pr=Object.create;var Ie=Object.defineProperty;var mr=Object.getOwnPropertyDescriptor;var gr=Object.getOwnPropertyNames;var hr=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty;var tt=(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 V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ae=(e,t)=>{for(var r in t)Ie(e,r,{get:t[r],enumerable:!0})},rt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of gr(t))!yr.call(e,o)&&o!==r&&Ie(e,o,{get:()=>t[o],enumerable:!(n=mr(t,o))||n.enumerable});return e};var w=(e,t,r)=>(r=e!=null?pr(hr(e)):{},rt(t||!e||!e.__esModule?Ie(r,"default",{value:e,enumerable:!0}):r,e)),Ir=e=>rt(Ie({},"__esModule",{value:!0}),e);var Ee=V((Xn,nt)=>{nt.exports=window.wp.data});var q=V((fo,ft)=>{ft.exports=window.wp.i18n});var mt=V((go,pt)=>{pt.exports=window.wp.url});var Dt=V(($o,Mt)=>{Mt.exports=window.wp.blob});var Kt=V((yi,Zt)=>{Zt.exports=window.wp.privateApis});var Ze=V((Ui,rr)=>{rr.exports=window.wp.element});var or=V((_i,nr)=>{nr.exports=window.wp.compose});var Ke=V((Ci,ir)=>{ir.exports=window.ReactJSXRuntime});var jn={};ae(jn,{ErrorCode:()=>I,MediaUploadProvider:()=>lr,UploadError:()=>U,clearFeatureDetectionCache:()=>Yt,detectClientSideMediaSupport:()=>Qe,getErrorMessage:()=>dr,getHeicConversionAdvice:()=>de,getHeicUnsupportedMessage:()=>ee,isClientSideMediaSupported:()=>Pe,isHeicCanvasSupported:()=>Wt,store:()=>j});var te=w(Ee(),1);var h=(e=>(e.Unknown="REDUX_UNKNOWN",e.Add="ADD_ITEM",e.Prepare="PREPARE_ITEM",e.Cancel="CANCEL_ITEM",e.Remove="REMOVE_ITEM",e.RetryItem="RETRY_ITEM",e.ScheduleRetry="SCHEDULE_RETRY",e.PauseItem="PAUSE_ITEM",e.ResumeItem="RESUME_ITEM",e.PauseQueue="PAUSE_QUEUE",e.ResumeQueue="RESUME_QUEUE",e.OperationStart="OPERATION_START",e.OperationFinish="OPERATION_FINISH",e.AddOperations="ADD_OPERATIONS",e.CacheBlobUrl="CACHE_BLOB_URL",e.RevokeBlobUrls="REVOKE_BLOB_URLS",e.UpdateProgress="UPDATE_PROGRESS",e.AccumulateSubSize="ACCUMULATE_SUB_SIZE",e.UpdateSettings="UPDATE_SETTINGS",e))(h||{}),z=(e=>(e.Queued="QUEUED",e.Processing="PROCESSING",e.Paused="PAUSED",e.PendingRetry="PENDING_RETRY",e.Uploaded="UPLOADED",e.Error="ERROR",e))(z||{}),l=(e=>(e.Prepare="PREPARE",e.Upload="UPLOAD",e.ResizeCrop="RESIZE_CROP",e.Rotate="ROTATE",e.TranscodeImage="TRANSCODE_IMAGE",e.TranscodeGif="TRANSCODE_GIF",e.ThumbnailGeneration="THUMBNAIL_GENERATION",e.Finalize="FINALIZE",e.DetectUltraHdr="DETECT_ULTRAHDR",e))(l||{});var ve="core/upload-media",ot=5,it=2,at={maxRetryAttempts:3,initialRetryDelayMs:1e3,maxRetryDelayMs:3e4,backoffMultiplier:2,retryJitter:.1},st=["image/jpeg","image/png","image/gif","image/webp","image/avif"],ct=["image/heic","image/heif"];var Er=()=>{},vr={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:Er,maxConcurrentUploads:ot,maxConcurrentImageProcessing:it,retry:{...at}},failureCount:0};function wr(e=vr,t={type:h.Unknown}){switch(t.type){case h.PauseQueue:return{...e,queueStatus:"paused"};case h.ResumeQueue:return{...e,queueStatus:"active"};case h.PauseItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:z.Paused}:r)};case h.ResumeItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:z.Processing}:r)};case h.Add:return{...e,queue:[...e.queue,t.item]};case h.Cancel:{let r=e.queue.find(n=>n.id===t.id);return{...e,failureCount:r&&!r.parentId?e.failureCount+1:e.failureCount,queue:e.queue.map(n=>n.id===t.id?{...n,error:t.error}:n)}}case h.RetryItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:z.Processing,error:void 0,retryCount:(r.retryCount??0)+1,abortController:new AbortController}:r)};case h.ScheduleRetry:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:z.PendingRetry,error:t.error,retryCount:t.retryCount,nextRetryTimestamp:t.nextRetryTimestamp}:r)};case h.Remove:return{...e,queue:e.queue.filter(r=>r.id!==t.id)};case h.OperationStart:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,currentOperation:t.operation}:r)};case h.AddOperations:return{...e,queue:e.queue.map(r=>r.id!==t.id?r:{...r,operations:[...r.operations||[],...t.operations]})};case h.OperationFinish:return{...e,queue:e.queue.map(r=>{if(r.id!==t.id)return r;let n=r.operations?r.operations.slice(1):[],o=r.attachment||t.item.attachment?{...r.attachment,...t.item.attachment}:void 0;return{...r,currentOperation:void 0,operations:n,...t.item,attachment:o,additionalData:{...r.additionalData,...t.item.additionalData}}})};case h.CacheBlobUrl:{let r=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...r,t.blobUrl]}}}case h.RevokeBlobUrls:{let r={...e.blobUrls};return delete r[t.id],{...e,blobUrls:r}}case h.UpdateProgress:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,progress:t.progress}:r)};case h.AccumulateSubSize:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,subSizes:[...r.subSizes||[],t.subSize]}:r)};case h.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e}var De=wr;var we={};ae(we,{getItems:()=>Rr,getSettings:()=>Cr,isUploading:()=>Sr,isUploadingById:()=>_r,isUploadingByUrl:()=>Ur});function Rr(e){return e.queue}function Sr(e){return e.queue.length>=1}function Ur(e,t){return e.queue.some(r=>r.attachment?.url===t||r.sourceUrl===t)}function _r(e,t){return e.queue.some(r=>r.attachment?.id===t||r.sourceAttachmentId===t)}function Cr(e){return e.settings}var ze={};ae(ze,{getActiveImageProcessingCount:()=>Dr,getActiveUploadCount:()=>Fr,getActiveVideoProcessingCount:()=>zr,getAllItems:()=>br,getBlobUrls:()=>Pr,getFailedItems:()=>Gr,getFailureCount:()=>Tr,getItem:()=>xr,getItemProgress:()=>Hr,getPendingImageProcessing:()=>Nr,getPendingUploads:()=>Mr,getPendingVideoProcessing:()=>Br,hasPendingItemsByParentId:()=>Lr,isBatchUploaded:()=>Or,isPaused:()=>Ar});function br(e){return e.queue}function Tr(e){return e.failureCount}function xr(e,t){return e.queue.find(r=>r.id===t)}function Or(e,t){return e.queue.filter(n=>t===n.batchId).length===0}function Ar(e){return e.queueStatus==="paused"}function Pr(e,t){return e.blobUrls[t]||[]}function Fr(e){return e.queue.filter(t=>t.currentOperation===l.Upload).length}function Mr(e){return e.queue.filter(t=>(Array.isArray(t.operations?.[0])?t.operations[0][0]:t.operations?.[0])===l.Upload&&t.currentOperation!==l.Upload)}function Dr(e){return e.queue.filter(t=>t.currentOperation===l.ResizeCrop||t.currentOperation===l.Rotate).length}function zr(e){return e.queue.filter(t=>t.currentOperation===l.TranscodeGif).length}function Nr(e){return e.queue.filter(t=>{let r=Array.isArray(t.operations?.[0])?t.operations[0][0]:t.operations?.[0];return(r===l.ResizeCrop||r===l.Rotate)&&t.currentOperation!==l.ResizeCrop&&t.currentOperation!==l.Rotate})}function Br(e){return e.queue.filter(t=>(Array.isArray(t.operations?.[0])?t.operations[0][0]:t.operations?.[0])===l.TranscodeGif&&t.currentOperation!==l.TranscodeGif)}function Gr(e){return e.queue.filter(t=>t.error!==void 0)}function Lr(e,t){return e.queue.some(r=>r.parentId===t)}function Hr(e,t){return e.queue.find(n=>n.id===t)?.progress}var Te={};ae(Te,{addItems:()=>Zr,cancelItem:()=>Kr,executeRetry:()=>rn,retryItem:()=>en,scheduleRetry:()=>tn});var _=[];for(let e=0;e<256;++e)_.push((e+256).toString(16).slice(1));function ut(e,t=0){return(_[e[t+0]]+_[e[t+1]]+_[e[t+2]]+_[e[t+3]]+"-"+_[e[t+4]]+_[e[t+5]]+"-"+_[e[t+6]]+_[e[t+7]]+"-"+_[e[t+8]]+_[e[t+9]]+"-"+_[e[t+10]]+_[e[t+11]]+_[e[t+12]]+_[e[t+13]]+_[e[t+14]]+_[e[t+15]]).toLowerCase()}var kr=new Uint8Array(16);function Ne(){return crypto.getRandomValues(kr)}function $r(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():qr(e,t,r)}function qr(e,t,r){e=e||{};let n=e.random??e.rng?.()??Ne();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[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 o=0;o<16;++o)t[r+o]=n[o];return t}return ut(n)}var B=$r;var Ft=w(q(),1);function lt(e){let{attempt:t,initialDelay:r,maxDelay:n,multiplier:o,jitter:a}=e,i=r*Math.pow(o,t-1),s=Math.min(i,n),c=1+(Math.random()*2-1)*a;return Math.floor(s*c)}var Vr=[/network/i,/timeout/i,/ECONNRESET/i,/fetch failed/i,/connection/i,/socket/i,/ETIMEDOUT/i,/ENOTFOUND/i,/Could not get a valid response/i,/Failed to fetch/i,/Load failed/i];function dt(e,t,r){if(t>=r)return!1;let n=typeof e=="string"?e:e?.message||"";return Vr.some(o=>o.test(n))}var se=new Map;function Re(e){let t=se.get(e);t!==void 0&&(clearTimeout(t),se.delete(e))}var Be=class extends File{width=0;height=0;originalWidth=0;originalHeight=0;get wasResized(){return(this.originalWidth||0)>this.width||(this.originalHeight||0)>this.height}constructor(e,t,r,n,o){super([e],e.name,{type:e.type,lastModified:e.lastModified}),this.width=t,this.height=r,this.originalWidth=n,this.originalHeight=o}};var Wr=w(mt(),1),Yr=w(q(),1);function gt(e){if(e instanceof File)return e;if("name"in e&&typeof e.name=="string")return new File([e],e.name,{type:e.type,lastModified:e.lastModified});let t=e.type.split("/")[1],r=e.type==="application/pdf"?"document":e.type.split("/")[0];return new File([e],`${r}.${t}`,{type:e.type})}function Se(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}function Ge(e){return Se(e,e.name)}function W(e){return e.includes(".")?e.split(".").slice(0,-1).join("."):e}function ht(e){let t=new Uint8Array(e);if(t.length<4||t[0]!==71||t[1]!==73||t[2]!==70||t[3]!==56)return!1;let r=0;for(let n=0;n e.length)return 1;let o=t.getUint16(r),a;if(o===18761)a=!0;else if(o===19789)a=!1;else return 1;let i=r+t.getUint32(r+4,a);if(i+2>e.length)return 1;let s=t.getUint16(i,a);for(let c=0;ce.length)break;if(t.getUint16(u,a)===274){let f=t.getUint16(u+8,a);return f>=1&&f<=8?f:1}}return 1}function $t(e){let t=le(e,0,e.view.byteLength,"meta");if(!t)return null;let r=t.offset+t.headerSize+4,n=t.offset+t.size;return{box:t,children:fe(e,r,n)}}function fn(e){try{let t=new We(e),r=$t(t);if(!r)return 1;let n=r.children.find(f=>f.type==="iinf"),o=r.children.find(f=>f.type==="iloc");if(!n||!o)return 1;let a=Gt(t,n),i;for(let[f,d]of a)if(d==="Exif"){i=f;break}if(i===void 0)return 1;let s=zt(t,o).get(i);if(!s||s.extents.length===0)return 1;let c=r.children.find(f=>f.type==="idat"),u=c?c.offset+c.headerSize:0;return un(xe(e,s,u))}catch{return 1}}function ln(e){let t=$t(e);if(!t)return!1;let r=t.children.find(i=>i.type==="iprp");if(!r)return!1;let n=le(e,r.offset+r.headerSize,r.offset+r.size,"ipco");if(!n)return!1;let o=n.offset+n.headerSize,a=n.offset+n.size;return!!(le(e,o,a,"irot")||le(e,o,a,"imir"))}function Oe(e){try{if(ln(new We(e)))return 1}catch{return 1}return fn(e)}var O=w(q(),1);function Ae(){if(typeof navigator>"u")return null;let e=navigator.userAgentData?.brands;if(e?.length&&e.some(({brand:r})=>/Chromium/i.test(r)))return"chromium";let t=navigator.userAgent||"";return/Firefox|FxiOS/i.test(t)?"firefox":/Chrome|Chromium|CriOS|Edg|OPR/i.test(t)?"chromium":/Safari/i.test(t)?"safari":null}function qt(){if(typeof navigator>"u")return"other";let e=navigator.userAgentData?.platform||navigator.userAgent||"";return/iPhone|iPad|iPod|iOS/i.test(e)?"other":/macOS|Mac OS X|Macintosh/i.test(e)?"macos":/Windows/i.test(e)?"windows":/Android|CrOS|Chrome OS/i.test(e)?"other":/Linux|X11/i.test(e)?"linux":"other"}function dn(){if(Ae()==="chromium"){let e=navigator.userAgentData?.brands??[],t=navigator.userAgent||"";return e.some(({brand:r})=>/Edge/i.test(r))||/Edg\//i.test(t)?"Edge":e.some(({brand:r})=>/Opera/i.test(r))||/OPR\//i.test(t)?"Opera":"Chrome"}switch(Ae()){case"firefox":return"Firefox";case"safari":return"Safari";default:return null}}function de(){let e=qt(),t=Ae();if(e==="macos"){if(t==="chromium")return(0,O.__)("Safari usually can, or you can upload a JPEG instead.");if(t!=="safari")return(0,O.__)("Safari or Chrome usually can, or you can upload a JPEG instead.")}return e==="windows"&&t==="firefox"?(0,O.__)("Chrome or Edge might, or you can upload a JPEG instead."):(0,O.__)("You can upload a JPEG instead.")}function ee(){let e=qt(),t=Ae(),r=dn(),n;return e==="linux"?n=(0,O.__)("HEIC photos can't be decoded on Linux, so unfortunately we couldn't convert this one."):t==="firefox"?n=(0,O.__)("Firefox can't read HEIC photos, so we couldn't convert this one."):r&&e==="windows"?n=(0,O.sprintf)((0,O.__)("%s couldn't decode HEIC on this PC, so we couldn't convert this one."),r):r&&e==="macos"?n=(0,O.sprintf)((0,O.__)("%s couldn't decode HEIC on this Mac, so we couldn't convert this one."),r):r?n=(0,O.sprintf)((0,O.__)("%s couldn't decode HEIC on this device, so we couldn't convert this one."),r):n=(0,O.__)("This browser can't read HEIC photos, so we couldn't convert this one."),`${n} ${de()}`}var je=class extends Error{};async function Vt(e,t=.82){let r=W(e.name);try{let o=await createImageBitmap(e);try{let a=new OffscreenCanvas(o.width,o.height),i=a.getContext("2d");if(!i)throw new Error("Could not get canvas 2d context");i.drawImage(o,0,0);let s=await a.convertToBlob({type:"image/jpeg",quality:t});return new File([s],`${r}.jpg`,{type:"image/jpeg"})}finally{o.close()}}catch{}if(typeof ImageDecoder<"u"&&await ImageDecoder.isTypeSupported(e.type)){let a=new ImageDecoder({type:e.type,data:e.stream()});try{let{image:i}=await a.decode();try{let s=new OffscreenCanvas(i.displayWidth,i.displayHeight),c=s.getContext("2d");if(!c)throw new Error("Could not get canvas 2d context");c.drawImage(i,0,0);let u=await s.convertToBlob({type:"image/jpeg",quality:t});return new File([u],`${r}.jpg`,{type:"image/jpeg"})}finally{i.close()}}finally{a.close()}}let n;try{n=kt(await e.arrayBuffer())}catch(o){throw new Error("The HEIC file could not be parsed",{cause:o})}if(typeof VideoDecoder<"u"){let o=!1;try{o=(await VideoDecoder.isConfigSupported({codec:n.codecString})).supported===!0}catch{}if(o){let a=new OffscreenCanvas(n.outputWidth,n.outputHeight),i=a.getContext("2d");if(!i)throw new Error("Could not get canvas 2d context");for(let u of n.tiles){let f=await gn(n.codecString,n.description,n.tileWidth,n.tileHeight,u.data);try{i.drawImage(f,u.x,u.y)}finally{f.close()}}let c=await(n.rotation!==0?pn(a,n.rotation):mn(a,n.exifOrientation)).convertToBlob({type:"image/jpeg",quality:t});return new File([c],`${r}.jpg`,{type:"image/jpeg"})}}throw new je(ee())}function pn(e,t){if(t===0)return e;let r=t===90||t===270,n=r?e.height:e.width,o=r?e.width:e.height,a=new OffscreenCanvas(n,o),i=a.getContext("2d");return i?(i.translate(n/2,o/2),i.rotate(-t*Math.PI/180),i.drawImage(e,-e.width/2,-e.height/2),a):e}function mn(e,t){if(t<=1||t>8)return e;let{width:r,height:n}=e,o=t>=5,a=new OffscreenCanvas(o?n:r,o?r:n),i=a.getContext("2d");if(!i)return e;switch(t){case 2:i.transform(-1,0,0,1,r,0);break;case 3:i.transform(-1,0,0,-1,r,n);break;case 4:i.transform(1,0,0,-1,0,n);break;case 5:i.transform(0,1,1,0,0,0);break;case 6:i.transform(0,1,-1,0,n,0);break;case 7:i.transform(0,-1,-1,0,n,r);break;case 8:i.transform(0,-1,1,0,0,r);break}return i.drawImage(e,0,0),a}function gn(e,t,r,n,o){return new Promise((a,i)=>{let s=new VideoDecoder({output:c=>{s.close(),a(c)},error:c=>{s.state!=="closed"&&s.close(),i(c)}});s.configure({codec:e,codedWidth:r,codedHeight:n,description:t}),s.decode(new EncodedVideoChunk({type:"key",timestamp:0,data:o})),s.flush().catch(c=>{s.state!=="closed"&&s.close(),i(c)})})}var R=null;function Qe(){if(R!==null)return R;if(typeof WebAssembly>"u")return R={supported:!1,reason:"WebAssembly is not supported in this browser."},R;if(typeof SharedArrayBuffer>"u")return R={supported:!1,reason:"SharedArrayBuffer is not available. This may be due to missing cross-origin isolation headers."},R;if(typeof Worker>"u")return R={supported:!1,reason:"Web Workers are not supported in this browser."},R;if(typeof navigator<"u"&&"deviceMemory"in navigator&&navigator.deviceMemory<=2)return R={supported:!1,reason:"Device has insufficient memory for client-side media processing."},R;if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency<2)return R={supported:!1,reason:"Device has insufficient CPU cores for client-side media processing."},R;if(typeof navigator<"u"){let e=navigator.connection;if(e){if(e.saveData)return R={supported:!1,reason:"Data saver mode is enabled."},R;if(e.effectiveType==="slow-2g"||e.effectiveType==="2g")return R={supported:!1,reason:"Network connection is too slow for client-side media processing."},R}}if(typeof window<"u")try{let e=new Blob([""],{type:"application/javascript"}),t=URL.createObjectURL(e);try{new Worker(t).terminate()}finally{URL.revokeObjectURL(t)}}catch{return R={supported:!1,reason:"The site's Content Security Policy (CSP) does not allow blob: workers. The worker-src directive must include blob: to enable client-side media processing."},R}return R={supported:!0},R}function Pe(){return Qe().supported}function Wt(){return typeof createImageBitmap<"u"&&typeof OffscreenCanvas<"u"}function Yt(){R=null}var hn=4,yn=.5*1024*1024*1024,In=.9*1024*1024*1024;function jt(e){let{width:t,height:r,interlaced:n}=e;return t*r*hn>(n?yn:In)}var En=524288;function vn(e){let t=2;for(;t