golden hour
/home/godaofbq/cellsonic-shockwave.com/wp-includes/js/dist
⬆️ Go Up
Upload
File/Folder
Size
Actions
a11y.js
5.45 KB
Del
OK
a11y.min.js
2.44 KB
Del
OK
annotations.js
15.13 KB
Del
OK
annotations.min.js
5.62 KB
Del
OK
api-fetch.js
17.46 KB
Del
OK
api-fetch.min.js
6.32 KB
Del
OK
autop.js
9.73 KB
Del
OK
autop.min.js
5.5 KB
Del
OK
base-styles.js
48 B
Del
OK
base-styles.min.js
75 B
Del
OK
blob.js
2.3 KB
Del
OK
blob.min.js
1.16 KB
Del
OK
block-directory.js
55.67 KB
Del
OK
block-directory.min.js
21.96 KB
Del
OK
block-editor.js
2.7 MB
Del
OK
block-editor.min.js
1.01 MB
Del
OK
block-library.js
2.57 MB
Del
OK
block-library.min.js
1.09 MB
Del
OK
block-serialization-default-parser.js
6.54 KB
Del
OK
block-serialization-default-parser.min.js
2.39 KB
Del
OK
block-serialization-spec-parser.js
50.48 KB
Del
OK
block-serialization-spec-parser.min.js
10.38 KB
Del
OK
blocks.js
381.06 KB
Del
OK
blocks.min.js
180.62 KB
Del
OK
commands.js
151.71 KB
Del
OK
commands.min.js
63.14 KB
Del
OK
components.js
3.83 MB
Del
OK
components.min.js
786.28 KB
Del
OK
compose.js
80.75 KB
Del
OK
compose.min.js
28.18 KB
Del
OK
core-commands.js
28.68 KB
Del
OK
core-commands.min.js
11.87 KB
Del
OK
core-data.js
612.03 KB
Del
OK
core-data.min.js
210.46 KB
Del
OK
customize-widgets.js
91.57 KB
Del
OK
customize-widgets.min.js
36.62 KB
Del
OK
data-controls.js
4.13 KB
Del
OK
data-controls.min.js
1.77 KB
Del
OK
data.js
82.78 KB
Del
OK
data.min.js
25.92 KB
Del
OK
date.js
176.34 KB
Del
OK
date.min.js
141.22 KB
Del
OK
deprecated.js
3.04 KB
Del
OK
deprecated.min.js
1.28 KB
Del
OK
development
-
Del
OK
dom-ready.js
1.47 KB
Del
OK
dom-ready.min.js
818 B
Del
OK
dom.js
34.61 KB
Del
OK
dom.min.js
12.65 KB
Del
OK
edit-post.js
117.4 KB
Del
OK
edit-post.min.js
49.11 KB
Del
OK
edit-site.js
1.69 MB
Del
OK
edit-site.min.js
684.45 KB
Del
OK
edit-widgets.js
160.25 KB
Del
OK
edit-widgets.min.js
61.86 KB
Del
OK
editor.js
2.5 MB
Del
OK
editor.min.js
1021.63 KB
Del
OK
element.js
27.93 KB
Del
OK
element.min.js
12.17 KB
Del
OK
escape-html.js
2.29 KB
Del
OK
escape-html.min.js
1.07 KB
Del
OK
format-library.js
73.34 KB
Del
OK
format-library.min.js
28.88 KB
Del
OK
hooks.js
11.96 KB
Del
OK
hooks.min.js
4.93 KB
Del
OK
html-entities.js
1.65 KB
Del
OK
html-entities.min.js
879 B
Del
OK
i18n.js
15.3 KB
Del
OK
i18n.min.js
5.6 KB
Del
OK
is-shallow-equal.js
2.69 KB
Del
OK
is-shallow-equal.min.js
1.1 KB
Del
OK
keyboard-shortcuts.js
9.68 KB
Del
OK
keyboard-shortcuts.min.js
3.44 KB
Del
OK
keycodes.js
8.3 KB
Del
OK
keycodes.min.js
2.91 KB
Del
OK
list-reusable-blocks.js
13.06 KB
Del
OK
list-reusable-blocks.min.js
5.24 KB
Del
OK
media-utils.js
637.15 KB
Del
OK
media-utils.min.js
237.64 KB
Del
OK
notices.js
10.11 KB
Del
OK
notices.min.js
4.38 KB
Del
OK
nux.js
10.32 KB
Del
OK
nux.min.js
3.95 KB
Del
OK
patterns.js
58.25 KB
Del
OK
patterns.min.js
21.63 KB
Del
OK
plugins.js
11.67 KB
Del
OK
plugins.min.js
4.76 KB
Del
OK
preferences-persistence.js
17.22 KB
Del
OK
preferences-persistence.min.js
5.49 KB
Del
OK
preferences.js
21.07 KB
Del
OK
preferences.min.js
7.71 KB
Del
OK
primitives.js
5.08 KB
Del
OK
primitives.min.js
1.98 KB
Del
OK
priority-queue.js
10.02 KB
Del
OK
priority-queue.min.js
3.35 KB
Del
OK
private-apis.js
4.09 KB
Del
OK
private-apis.min.js
2.66 KB
Del
OK
react-i18n.js
3.91 KB
Del
OK
react-i18n.min.js
1.53 KB
Del
OK
redux-routine.js
24.68 KB
Del
OK
redux-routine.min.js
9.65 KB
Del
OK
reusable-blocks.js
20.51 KB
Del
OK
reusable-blocks.min.js
7.22 KB
Del
OK
rich-text.js
97.04 KB
Del
OK
rich-text.min.js
39.89 KB
Del
OK
router.js
36.12 KB
Del
OK
router.min.js
14.13 KB
Del
OK
script-modules
-
Del
OK
server-side-render.js
10.97 KB
Del
OK
server-side-render.min.js
3.94 KB
Del
OK
shortcode.js
7.96 KB
Del
OK
shortcode.min.js
3.28 KB
Del
OK
style-engine.js
17.62 KB
Del
OK
style-engine.min.js
6.42 KB
Del
OK
theme.js
127.65 KB
Del
OK
theme.min.js
56.12 KB
Del
OK
token-list.js
6.12 KB
Del
OK
token-list.min.js
1.62 KB
Del
OK
undo-manager.js
5.29 KB
Del
OK
undo-manager.min.js
1.7 KB
Del
OK
upload-media.js
55.67 KB
Del
OK
upload-media.min.js
23.05 KB
Del
OK
url.js
23.39 KB
Del
OK
url.min.js
10.13 KB
Del
OK
vendor
-
Del
OK
viewport.js
6.61 KB
Del
OK
viewport.min.js
2.24 KB
Del
OK
warning.js
1.52 KB
Del
OK
warning.min.js
755 B
Del
OK
widgets.js
50.08 KB
Del
OK
widgets.min.js
20.83 KB
Del
OK
wordcount.js
6.93 KB
Del
OK
wordcount.min.js
2.45 KB
Del
OK
Edit: upload-media.min.js
/*! This file is auto-generated */ "use strict";var wp;(wp||={}).uploadMedia=(()=>{var Xe=Object.create;var N=Object.defineProperty;var Ze=Object.getOwnPropertyDescriptor;var Ke=Object.getOwnPropertyNames;var Je=Object.getPrototypeOf,et=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 S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),M=(e,t)=>{for(var r in t)N(e,r,{get:t[r],enumerable:!0})},pe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ke(t))!et.call(e,n)&&n!==r&&N(e,n,{get:()=>t[n],enumerable:!(o=Ze(t,n))||o.enumerable});return e};var y=(e,t,r)=>(r=e!=null?Xe(Je(e)):{},pe(t||!e||!e.__esModule?N(r,"default",{value:e,enumerable:!0}):r,e)),rt=e=>pe(N({},"__esModule",{value:!0}),e);var q=S((ur,me)=>{me.exports=window.wp.data});var he=S((_r,ye)=>{ye.exports=window.wp.url});var D=S((Pr,Ue)=>{Ue.exports=window.wp.i18n});var Oe=S((Hr,Fe)=>{Fe.exports=window.wp.blob});var De=S((no,Me)=>{Me.exports=window.wp.privateApis});var se=S((po,Ne)=>{Ne.exports=window.wp.element});var ke=S((mo,qe)=>{qe.exports=window.wp.compose});var ue=S((fo,Le)=>{Le.exports=window.ReactJSXRuntime});var ar={};M(ar,{MediaUploadProvider:()=>je,UploadError:()=>v,clearFeatureDetectionCache:()=>Ye,detectClientSideMediaSupport:()=>ce,isClientSideMediaSupported:()=>He,store:()=>P});var O=y(q(),1);var s=(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.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.UpdateSettings="UPDATE_SETTINGS",e))(s||{}),w=(e=>(e.Queued="QUEUED",e.Processing="PROCESSING",e.Paused="PAUSED",e.Uploaded="UPLOADED",e.Error="ERROR",e))(w||{}),u=(e=>(e.Prepare="PREPARE",e.Upload="UPLOAD",e.ResizeCrop="RESIZE_CROP",e.Rotate="ROTATE",e.TranscodeImage="TRANSCODE_IMAGE",e.ThumbnailGeneration="THUMBNAIL_GENERATION",e.Finalize="FINALIZE",e))(u||{});var k="core/upload-media",de=5,fe=2,ge=["image/jpeg","image/png","image/gif","image/webp","image/avif"];var ot=()=>{},nt={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:ot,maxConcurrentUploads:de,maxConcurrentImageProcessing:fe}};function it(e=nt,t={type:s.Unknown}){switch(t.type){case s.PauseQueue:return{...e,queueStatus:"paused"};case s.ResumeQueue:return{...e,queueStatus:"active"};case s.PauseItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:w.Paused}:r)};case s.ResumeItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:w.Processing}:r)};case s.Add:return{...e,queue:[...e.queue,t.item]};case s.Cancel:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,error:t.error}:r)};case s.RetryItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:w.Processing,error:void 0,retryCount:(r.retryCount??0)+1}:r)};case s.Remove:return{...e,queue:e.queue.filter(r=>r.id!==t.id)};case s.OperationStart:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,currentOperation:t.operation}:r)};case s.AddOperations:return{...e,queue:e.queue.map(r=>r.id!==t.id?r:{...r,operations:[...r.operations||[],...t.operations]})};case s.OperationFinish:return{...e,queue:e.queue.map(r=>{if(r.id!==t.id)return r;let o=r.operations?r.operations.slice(1):[],n=r.attachment||t.item.attachment?{...r.attachment,...t.item.attachment}:void 0;return{...r,currentOperation:void 0,operations:o,...t.item,attachment:n,additionalData:{...r.additionalData,...t.item.additionalData}}})};case s.CacheBlobUrl:{let r=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...r,t.blobUrl]}}}case s.RevokeBlobUrls:{let r={...e.blobUrls};return delete r[t.id],{...e,blobUrls:r}}case s.UpdateProgress:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,progress:t.progress}:r)};case s.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e}var Z=it;var L={};M(L,{getItems:()=>at,getSettings:()=>lt,isUploading:()=>st,isUploadingById:()=>ct,isUploadingByUrl:()=>ut});function at(e){return e.queue}function st(e){return e.queue.length>=1}function ut(e,t){return e.queue.some(r=>r.attachment?.url===t||r.sourceUrl===t)}function ct(e,t){return e.queue.some(r=>r.attachment?.id===t||r.sourceAttachmentId===t)}function lt(e){return e.settings}var K={};M(K,{getActiveImageProcessingCount:()=>vt,getActiveUploadCount:()=>ht,getAllItems:()=>pt,getBlobUrls:()=>yt,getFailedItems:()=>wt,getItem:()=>mt,getItemProgress:()=>Et,getPausedUploadForPost:()=>gt,getPendingImageProcessing:()=>bt,getPendingUploads:()=>Ut,hasPendingItemsByParentId:()=>Rt,isBatchUploaded:()=>dt,isPaused:()=>It,isUploadingToPost:()=>ft});function pt(e){return e.queue}function mt(e,t){return e.queue.find(r=>r.id===t)}function dt(e,t){return e.queue.filter(o=>t===o.batchId).length===0}function ft(e,t){return e.queue.some(r=>r.currentOperation===u.Upload&&r.additionalData.post===t)}function gt(e,t){return e.queue.find(r=>r.status===w.Paused&&r.additionalData.post===t)}function It(e){return e.queueStatus==="paused"}function yt(e,t){return e.blobUrls[t]||[]}function ht(e){return e.queue.filter(t=>t.currentOperation===u.Upload).length}function Ut(e){return e.queue.filter(t=>(Array.isArray(t.operations?.[0])?t.operations[0][0]:t.operations?.[0])===u.Upload&&t.currentOperation!==u.Upload)}function vt(e){return e.queue.filter(t=>t.currentOperation===u.ResizeCrop||t.currentOperation===u.Rotate).length}function bt(e){return e.queue.filter(t=>{let r=Array.isArray(t.operations?.[0])?t.operations[0][0]:t.operations?.[0];return(r===u.ResizeCrop||r===u.Rotate)&&t.currentOperation!==u.ResizeCrop&&t.currentOperation!==u.Rotate})}function wt(e){return e.queue.filter(t=>t.error!==void 0)}function Rt(e,t){return e.queue.some(r=>r.parentId===t)}function Et(e,t){return e.queue.find(o=>o.id===t)?.progress}var H={};M(H,{addItems:()=>Ft,cancelItem:()=>Ot,retryItem:()=>Tt});var W,St=new Uint8Array(16);function J(){if(!W&&(W=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!W))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return W(St)}var I=[];for(let e=0;e<256;++e)I.push((e+256).toString(16).slice(1));function Ie(e,t=0){return I[e[t+0]]+I[e[t+1]]+I[e[t+2]]+I[e[t+3]]+"-"+I[e[t+4]]+I[e[t+5]]+"-"+I[e[t+6]]+I[e[t+7]]+"-"+I[e[t+8]]+I[e[t+9]]+"-"+I[e[t+10]]+I[e[t+11]]+I[e[t+12]]+I[e[t+13]]+I[e[t+14]]+I[e[t+15]]}var _t=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ee={randomUUID:_t};function Pt(e,t,r){if(ee.randomUUID&&!t&&!e)return ee.randomUUID();e=e||{};let o=e.random||(e.rng||J)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return Ie(o)}var _=Pt;var te=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,o,n){super([e],e.name,{type:e.type,lastModified:e.lastModified}),this.width=t,this.height=r,this.originalWidth=o,this.originalHeight=n}};var At=y(he(),1),Ct=y(D(),1);function ve(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 G(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}function re(e){return G(e,e.name)}function Q(e){return e.includes(".")?e.split(".").slice(0,-1).join("."):e}var oe,z;function $(){return oe||(oe=import("@wordpress/vips/worker").then(e=>(z=e,e))),oe}async function be(e,t,r,o,n){let{vipsConvertImageFormat:i}=await $(),a=await i(e,await t.arrayBuffer(),t.type,r,o,n),c=r.split("/")[1],l=`${Q(t.name)}.${c}`;return new File([new Blob([a])],l,{type:r})}async function we(e){let{vipsHasTransparency:t}=await $(),r=await fetch(e);if(!r.ok)throw new Error(`Failed to fetch image: ${r.status}`);return t(await r.arrayBuffer())}async function Re(e,t,r,o,n,i,a,c){if(i?.aborted)throw new Error("Operation aborted");let{vipsResizeImage:l}=await $(),{buffer:d,width:p,height:f,originalWidth:m,originalHeight:h}=await l(e,await t.arrayBuffer(),t.type,r,o,c),U=t.name;if(m>p||h>f){let R=Q(t.name);a?U=t.name.replace(R,`${R}-scaled`):n&&(U=t.name.replace(R,`${R}-${p}x${f}`))}return new te(new File([new Blob([d],{type:t.type})],U,{type:t.type}),p,f,m,h)}async function ne(e,t,r,o){if(o?.aborted)throw new Error("Operation aborted");if(r===1)return t;let{vipsRotateImage:n}=await $(),{buffer:i,width:a,height:c}=await n(e,await t.arrayBuffer(),t.type,r),l=Q(t.name),d=t.name.replace(l,`${l}-rotated`);return new te(new File([new Blob([i],{type:t.type})],d,{type:t.type}),a,c)}async function Ee(e){return z?z.vipsCancelOperations(e):!1}function Se(){z&&z.terminateVipsWorker()}var V=y(D(),1);var v=class extends Error{code;file;constructor({code:e,message:t,file:r,cause:o}){super(t,{cause:o}),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.file=r}};function _e(e,t){if(!t)return;let r=t.some(o=>o.includes("/")?o===e.type:e.type.startsWith(`${o}/`));if(e.type&&!r)throw new v({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,V.sprintf)((0,V.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}var j=y(D(),1);function Pe(e){return e?Object.entries(e).flatMap(([t,r])=>{let[o]=r.split("/"),n=t.split("|");return[r,...n.map(i=>`${o}/${i}`)]}):null}function Ae(e,t){let r=Pe(t);if(!r)return;let o=r.includes(e.type);if(e.type&&!o)throw new v({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,j.sprintf)((0,j.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}var F=y(D(),1);function Ce(e,t){if(e.size<=0)throw new v({code:"EMPTY_FILE",message:(0,F.sprintf)((0,F.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new v({code:"SIZE_ABOVE_LIMIT",message:(0,F.sprintf)((0,F.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function Ft({files:e,onChange:t,onSuccess:r,onError:o,onBatchSuccess:n,additionalData:i,allowedTypes:a}){return async({select:c,dispatch:l})=>{let d=_();for(let p of e){try{_e(p,a),Ae(p,c.getSettings().allowedMimeTypes)}catch(f){o?.(f);continue}try{Ce(p,c.getSettings().maxUploadFileSize)}catch(f){o?.(f);continue}l.addItem({file:p,batchId:d,onChange:t,onSuccess:r,onBatchSuccess:n,onError:o,additionalData:i})}}}function Ot(e,t,r=!1){return async({select:o,dispatch:n})=>{let i=o.getItem(e);if(i){if(i.abortController?.abort(),await Ee(e),!r){let{onError:a}=i;a?.(t??new Error("Upload cancelled")),!a&&t&&console.error("Upload cancelled",t)}n({type:s.Cancel,id:e,error:t}),n.removeItem(e),n.revokeBlobUrls(e),i.batchId&&o.isBatchUploaded(i.batchId)&&i.onBatchSuccess?.()}}}function Tt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);o&&o.error&&(r({type:s.RetryItem,id:e}),r.processItem(e))}}var ae={};M(ae,{addItem:()=>Mt,addSideloadItem:()=>Dt,finalizeItem:()=>Jt,finishOperation:()=>Wt,generateThumbnails:()=>Kt,getTranscodeImageOperation:()=>ie,pauseItem:()=>qt,pauseQueue:()=>Bt,prepareItem:()=>Vt,processItem:()=>zt,removeItem:()=>Lt,resizeCropItem:()=>Yt,resumeItemByPostId:()=>kt,resumeQueue:()=>Nt,revokeBlobUrls:()=>er,rotateItem:()=>Xt,sideloadItem:()=>Ht,transcodeImageItem:()=>Zt,updateItemProgress:()=>tr,updateSettings:()=>rr,uploadItem:()=>jt});var b=y(Oe(),1);var Te=class extends File{constructor(e="stub-file"){super([],e)}};var xe=.82;function xt(e,t,r){return t!==u.Upload||!e.parentId||!e.additionalData.post?!1:r.isUploadingToPost(e.additionalData.post)}function Mt({file:e,batchId:t,onChange:r,onSuccess:o,onBatchSuccess:n,onError:i,additionalData:a={},sourceUrl:c,sourceAttachmentId:l,abortController:d,operations:p}){return async({dispatch:f})=>{let m=_(),h=ve(e),U;h instanceof Te||(U=(0,b.createBlobURL)(h),f({type:s.CacheBlobUrl,id:m,blobUrl:U})),f({type:s.Add,item:{id:m,batchId:t,status:w.Processing,sourceFile:re(h),file:h,attachment:{url:U},additionalData:{convert_format:!1,generate_sub_sizes:!1,...a},onChange:r,onSuccess:o,onBatchSuccess:n,onError:i,sourceUrl:c,sourceAttachmentId:l,abortController:d||new AbortController,operations:Array.isArray(p)?p:[u.Prepare]}}),f.processItem(m)}}function Dt({file:e,onChange:t,additionalData:r,operations:o,batchId:n,parentId:i}){return({dispatch:a})=>{let c=_();a({type:s.Add,item:{id:c,batchId:n,status:w.Processing,sourceFile:re(e),file:e,onChange:t,additionalData:{...r},parentId:i,operations:Array.isArray(o)?o:[u.Prepare],abortController:new AbortController}}),a.processItem(c)}}function zt(e){return async({select:t,dispatch:r})=>{if(t.isPaused())return;let o=t.getItem(e);if(!o)return;let{attachment:n,onChange:i,onSuccess:a,onBatchSuccess:c,batchId:l,parentId:d}=o,p=Array.isArray(o.operations?.[0])?o.operations[0][0]:o.operations?.[0],f=Array.isArray(o.operations?.[0])?o.operations[0][1]:void 0;if(xt(o,p,t)){r({type:s.PauseItem,id:e});return}if(p===u.Upload){let m=t.getSettings();if(t.getActiveUploadCount()>=m.maxConcurrentUploads)return}if(p===u.ResizeCrop||p===u.Rotate){let m=t.getSettings();if(t.getActiveImageProcessingCount()>=m.maxConcurrentImageProcessing)return}if(n&&i?.([n]),!p){if((d||!d&&!t.hasPendingItemsByParentId(e))&&(n&&a?.([n]),r.removeItem(e),r.revokeBlobUrls(e),l&&t.isBatchUploaded(l)&&c?.()),d&&l&&t.isBatchUploaded(l)){let m=t.getItem(d);if(!m)return;if(m.operations&&m.operations.length>0){r.processItem(d);return}n&&m.onSuccess?.([n]),r.removeItem(d),r.revokeBlobUrls(d),m.batchId&&t.isBatchUploaded(m.batchId)&&m.onBatchSuccess?.()}return}if(!(p===u.Finalize&&t.hasPendingItemsByParentId(e)))switch(r({type:s.OperationStart,id:e,operation:p}),p){case u.Prepare:r.prepareItem(o.id);break;case u.ResizeCrop:r.resizeCropItem(o.id,f);break;case u.Rotate:r.rotateItem(o.id,f);break;case u.TranscodeImage:r.transcodeImageItem(o.id,f);break;case u.Upload:o.parentId?r.sideloadItem(e):r.uploadItem(e);break;case u.ThumbnailGeneration:r.generateThumbnails(e);break;case u.Finalize:r.finalizeItem(e);break}}}function Bt(){return{type:s.PauseQueue}}function Nt(){return async({select:e,dispatch:t})=>{t({type:s.ResumeQueue});for(let r of e.getAllItems())t.processItem(r.id)}}function qt(e){return async({dispatch:t})=>{t({type:s.PauseItem,id:e})}}function kt(e){return async({select:t,dispatch:r})=>{let o=t.getPausedUploadForPost(e);o&&(r({type:s.ResumeItem,id:o.id}),r.processItem(o.id))}}function Lt(e){return async({select:t,dispatch:r})=>{t.getItem(e)&&(r({type:s.Remove,id:e}),t.getAllItems().length===0&&Se())}}function Wt(e,t){return async({select:r,dispatch:o})=>{let i=r.getItem(e)?.currentOperation;if(o({type:s.OperationFinish,id:e,item:t}),o.processItem(e),i===u.Upload){let a=r.getPendingUploads();for(let c of a)o.processItem(c.id)}if(i===u.ResizeCrop||i===u.Rotate){let a=r.getPendingImageProcessing();for(let c of a)o.processItem(c.id)}}}var Gt=["jpeg","webp","avif","png","gif"];function Qt(e){return Gt.includes(e)}function $t(e,t){switch(e){case"image/jpeg":return t.jpegInterlaced??!1;case"image/png":return t.pngInterlaced??!1;case"image/gif":return t.gifInterlaced??!1;default:return!1}}async function ie(e,t,r){if(e.type==="image/png"&&t==="image/jpeg"){let n=(0,b.createBlobURL)(e);try{if(await we(n))return null}catch{return null}finally{(0,b.revokeBlobURL)(n)}}let o=t.split("/")[1];return Qt(o)?[u.TranscodeImage,{outputFormat:o,outputQuality:xe,interlaced:$t(t,r)}]:null}function Vt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;let{file:n}=o,i=[],a=t.getSettings(),c=n.type.startsWith("image/"),l=ge.includes(n.type);if(c&&l){let{imageOutputFormats:p}=a,f=p?.[n.type];if(f&&f!==n.type){let m=await ie(n,f,a);m&&i.push(m)}i.push(u.Upload,u.ThumbnailGeneration,u.Finalize)}else i.push(u.Upload);r({type:s.AddOperations,id:e,operations:i});let d=!l||!c?{additionalData:{...o.additionalData,generate_sub_sizes:!0,convert_format:!0}}:{};r.finishOperation(e,d)}}function jt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);o&&t.getSettings().mediaUpload({filesList:[o.file],additionalData:o.additionalData,signal:o.abortController?.signal,onFileChange:([n])=>{n&&!(0,b.isBlobURL)(n.url)&&r.finishOperation(e,{attachment:n})},onSuccess:([n])=>{r.finishOperation(e,{attachment:n})},onError:n=>{r.cancelItem(e,n)}})}}function Ht(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;let{post:n,...i}=o.additionalData,a=t.getSettings().mediaSideload;if(!a){r.finishOperation(e,{});return}a({file:o.file,attachmentId:n,additionalData:i,signal:o.abortController?.signal,onFileChange:([c])=>{r.finishOperation(e,{attachment:c}),r.resumeItemByPostId(n)},onError:c=>{r.cancelItem(e,c),r.resumeItemByPostId(n)}})}}function Yt(e,t){return async({select:r,dispatch:o})=>{let n=r.getItem(e);if(!n)return;if(!t?.resize){o.finishOperation(e,{file:n.file});return}let i=!!n.parentId,a=!!t.isThresholdResize;try{let c=await Re(n.id,n.file,t.resize,!1,i,n.abortController?.signal,a),l=(0,b.createBlobURL)(c);o({type:s.CacheBlobUrl,id:e,blobUrl:l}),o.finishOperation(e,{file:c,attachment:{url:l}})}catch(c){o.cancelItem(e,new v({code:"IMAGE_TRANSCODING_ERROR",message:"File could not be uploaded",file:n.file,cause:c instanceof Error?c:void 0}))}}}function Xt(e,t){return async({select:r,dispatch:o})=>{let n=r.getItem(e);if(n){if(!t?.orientation||t.orientation===1){o.finishOperation(e,{file:n.file});return}try{let i=await ne(n.id,n.file,t.orientation,n.abortController?.signal),a=(0,b.createBlobURL)(i);o({type:s.CacheBlobUrl,id:e,blobUrl:a}),o.finishOperation(e,{file:i,attachment:{url:a}})}catch(i){o.cancelItem(e,new v({code:"IMAGE_ROTATION_ERROR",message:"Image could not be rotated",file:n.file,cause:i instanceof Error?i:void 0}))}}}}function Zt(e,t){return async({select:r,dispatch:o})=>{let n=r.getItem(e);if(!n)return;if(!t?.outputFormat){o.finishOperation(e,{file:n.file});return}let i=`image/${t.outputFormat}`,a=t.outputQuality??xe,c=t.interlaced??!1;try{let l=await be(n.id,n.file,i,a,c),d=(0,b.createBlobURL)(l);o({type:s.CacheBlobUrl,id:e,blobUrl:d}),o.finishOperation(e,{file:l,attachment:{url:d}})}catch(l){o.cancelItem(e,new v({code:"MEDIA_TRANSCODING_ERROR",message:"Image could not be transcoded to the target format",file:n.file,cause:l instanceof Error?l:void 0}))}}}function Kt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;if(!o.attachment){r.finishOperation(e,{});return}let n=o.attachment;if(n.exif_orientation&&n.exif_orientation!==1&&!o.file.name.includes("-scaled")&&n.id)try{let a=await ne(o.id,o.sourceFile,n.exif_orientation,o.abortController?.signal);r.addSideloadItem({file:a,batchId:_(),parentId:o.id,additionalData:{post:n.id,image_size:"original",convert_format:!1},operations:[u.Upload]})}catch{console.warn("Failed to rotate image, continuing with thumbnails")}if(!o.parentId&&n.missing_image_sizes&&n.missing_image_sizes.length>0){let a=t.getSettings(),c=a.allImageSizes||{},l=n.missing_image_sizes,d=n.filename?G(o.sourceFile,n.filename):o.sourceFile,p=_(),{imageOutputFormats:f}=a,m=o.sourceFile.type,h=f?.[m],U=null;h&&h!==m&&(U=await ie(o.sourceFile,h,a));for(let E of l){let R=c[E];if(!R){console.warn(`Image size "${E}" not found in configuration`);continue}let x=[[u.ResizeCrop,{resize:R}]];U&&x.push(U),x.push(u.Upload),r.addSideloadItem({file:d,onChange:([C])=>{(0,b.isBlobURL)(C.url)||o.onChange?.([C])},batchId:p,parentId:o.id,additionalData:{post:n.id,image_size:E,convert_format:!1},operations:x})}let{bigImageSizeThreshold:A}=a;if(A&&n.id){let E=await createImageBitmap(o.sourceFile),R=E.width>A||E.height>A;if(E.close(),R){let x=n.filename?G(o.sourceFile,n.filename):o.sourceFile,C=[[u.ResizeCrop,{resize:{width:A,height:A},isThresholdResize:!0}]];U&&C.push(U),C.push(u.Upload),r.addSideloadItem({file:x,onChange:([le])=>{(0,b.isBlobURL)(le.url)||o.onChange?.([le])},batchId:p,parentId:o.id,additionalData:{post:n.id,image_size:"scaled",convert_format:!1},operations:C})}}}r.finishOperation(e,{})}}function Jt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;let n=o.attachment,{mediaFinalize:i}=t.getSettings();if(n?.id&&i)try{await i(n.id)}catch(a){console.warn("Media finalization failed:",a)}r.finishOperation(e,{})}}function er(e){return async({select:t,dispatch:r})=>{let o=t.getBlobUrls(e);for(let n of o)(0,b.revokeBlobURL)(n);r({type:s.RevokeBlobUrls,id:e})}}function tr(e,t){return async({dispatch:r})=>{r({type:s.UpdateProgress,id:e,progress:t})}}function rr(e){return{type:s.UpdateSettings,settings:e}}var ze=y(De(),1),{lock:io,unlock:B}=(0,ze.__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/upload-media");var Be={reducer:Z,selectors:L,actions:H},P=(0,O.createReduxStore)(k,{reducer:Z,selectors:L,actions:H});(0,O.select)(P)||(0,O.register)(P);B(P).registerPrivateActions(ae);B(P).registerPrivateSelectors(K);var $e=y(se(),1),Ve=y(q(),1);var We=y(se(),1),T=y(q(),1),Ge=y(ke(),1);var Y=y(ue(),1);function or(e,t,r){if(!r)return t;let o=e.get(t);return o||(o=(0,T.createRegistry)({},t),o.registerStore(k,Be),e.set(t,o)),o}var nr=(0,Ge.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...r})=>{let o=(0,T.useRegistry)(),[n]=(0,We.useState)(()=>new WeakMap),i=or(n,o,t);return i===o?(0,Y.jsx)(e,{registry:o,...r}):(0,Y.jsx)(T.RegistryProvider,{value:i,children:(0,Y.jsx)(e,{registry:i,...r})})},"withRegistryProvider"),Qe=nr;var X=y(ue(),1),ir=Qe(e=>{let{children:t,settings:r}=e,{updateSettings:o}=B((0,Ve.useDispatch)(P));return(0,$e.useEffect)(()=>{o(r)},[r,o]),(0,X.jsx)(X.Fragment,{children:t})}),je=ir;var g=null;function ce(){if(g!==null)return g;if(typeof WebAssembly>"u")return g={supported:!1,reason:"WebAssembly is not supported in this browser."},g;if(typeof SharedArrayBuffer>"u")return g={supported:!1,reason:"SharedArrayBuffer is not available. This may be due to missing cross-origin isolation headers."},g;if(typeof Worker>"u")return g={supported:!1,reason:"Web Workers are not supported in this browser."},g;if(typeof navigator<"u"&&"deviceMemory"in navigator&&navigator.deviceMemory<=2)return g={supported:!1,reason:"Device has insufficient memory for client-side media processing."},g;if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency<2)return g={supported:!1,reason:"Device has insufficient CPU cores for client-side media processing."},g;if(typeof navigator<"u"){let e=navigator.connection;if(e){if(e.saveData)return g={supported:!1,reason:"Data saver mode is enabled."},g;if(e.effectiveType==="slow-2g"||e.effectiveType==="2g")return g={supported:!1,reason:"Network connection is too slow for client-side media processing."},g}}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 g={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."},g}return g={supported:!0},g}function He(){return ce().supported}function Ye(){g=null}return rt(ar);})();
Save