1const t=/(?:https:\/\/)?(?:player\.)?vimeo(?:\.com)?\/(?:video\/)?(\d+)(?:(?:\?hash=|\?h=|\/)(.*))?/,n=new Map,e=new Map,i=1920;function o(n){const e=n.match(t);return{videoId:null==e?void 0:e[1],hash:null==e?void 0:e[2]}}async function h(t,i,o){if(n.has(t))return n.get(t);if(e.has(t))return e.get(t);let h=`https://vimeo.com/api/oembed.json?url=https://player.vimeo.com/video/${t}`;o&&(h=h.concat(`?h=${o}`));const r=window.fetch(h,{mode:"cors",signal:i.signal}).then(t=>t.json()).then(e=>{const i={title:(null==e?void 0:e.title)??"",duration:(null==e?void 0:e.duration)??0,poster:l(e),pro:"basic"!==e.account_type};return n.set(t,i),i}).finally(()=>e.delete(t));return e.set(t,r),r}function l(t){var n;const e=(null==t?void 0:t.thumbnail_url)??"",o=null==(n=e.match(/vimeocdn\.com\/video\/([^_/?#]+)_/))?void 0:n[1];if(!o)return e;const h=function(t){const n=t.width||t.thumbnail_width,e=t.height||t.thumbnail_height;return n&&e?n>e?{width:i,height:Math.round(i*e/n)}:{width:Math.round(i*n/e),height:i}:null}(t);return h?`https://i.vimeocdn.com/video/${o}_${h.width}x${h.height}.webp`:e}export{h as getVimeoVideoInfo,o as resolveVimeoVideoId};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.