/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
const n=[["binary","application/octet-stream","bin",""]];function t(n,t){return null!=j(t.name,n?.supportedFormats??[])}function r(n,t){if(!n)return!1;const r=c(t,n.supportedFormats??[]);return null!=r&&n.editFormats.includes(r)}function o(n){return b(n?.supportedFormats??[]).flatMap(_).map(n=>`.${n}`)}function e(n){const t={};for(const r of b(n?.supportedFormats??[])){const[n,o]=$(r).split(";"),e=n.trim().toLowerCase(),u=_(r).map(n=>`.${n}`);t[e]??=[],t[e].push(...u)}return{description:"3D Models",accept:t}}function u(n,t){return M(y(n,t))}function i(n,t){return M(j(n,t))}function s(n,t){return $(g(n,t))}function c(n,t){return i(n.name,t)??u(n.type,t)}function f(n,t,r){return u(n,r)??i(t,r)}function a(n,t){if(!n||!g(n,t))return;const r=/^3d_(.+)$/iu.exec(n)?.[1]?.toLowerCase();return r||void 0}function p(n,t){return(n??[]).map(n=>a(n,t)).filter(n=>!!n)}function l(n,t){return M(t.find(r=>a(M(r),t)===n))}function d({supportedFormats:n}){return f("model/gltf-binary","glb",n)}function m(n){const t=d(n);return null!=t&&n.editFormats.includes(t)}function F({supportedFormats:n}){return f("model/gltf+json","gltf",n)}function w(n){if(!n)return null;const t=d(n),r=F(n);let o=null;for(const e of n.queryFormats){if(e===t)return e;e===r&&(o=e)}return o}function C({supportedFormats:n}){return f("application/esri3do-SR_world","wld",n)}function L({supportedFormats:n}){return f("application/esri3do-SR_prj","prj",n)}function b(t){return[...n,...t]}function g(n,t){return b(t).find(t=>M(t)===n)}function y(n,t){const r=n.toLowerCase();return b(t).find(n=>$(n)===r)}function j(n,t){const r=n.toLowerCase();return b(t).find(n=>_(n).some(n=>r.endsWith(n)))}function M(n){return n?.[0]}function $(n){return n?.[1].toLowerCase()}function _(n){return n?.[2].split(",").map(n=>n.toLowerCase())??[]}function h(n){return n?.[3]}function x(n){return n.tables?.find(n=>"assetMaps"===n.role)}export{l as formatIdFromModelFormat,x as getAssetMapTable,c as getFileFormatId,e as getFilePickerAcceptType,i as getFilenameFormatId,h as getFormatDescription,_ as getFormatExtensions,M as getFormatId,g as getFormatIdFormat,s as getFormatIdMimeType,$ as getFormatMimeType,d as getGlbFormatId,F as getGltfFormatId,w as getGltfQueryFormat,u as getMimeTypeFormatId,f as getMimeTypeOrFilenameFormatId,L as getPrjFormatId,o as getSupportedExtensions,C as getWorldFileFormatId,r as isFileEditFormat,t as isFileSupported,m as isGlbSupportedEditFormat,a as modelFormatFromFormatId,p as modelFormatsFromFormatIds};
