function e(e){let t=e.trim().toLowerCase();return t?/\.mp4(?:\?|$)/i.test(t)||/\.m3u8(?:\?|$)/i.test(t)||t.includes(`cloud.video.taobao.com/play/`):!1}function t(t){return t.kind===`video`||e(t.url)}function n(n){return t(n)?n.posterUrl?.trim()||(e(n.url)?``:n.url.trim()):n.url.trim()}function r(e,t){let n=t.trim();if(n)return e.find(e=>e.url.trim()===n)}function i(t,i){let a=r(t,i);return a?n(a):e(i)?``:i.trim()}function a(e){return e.find(e=>t(e)&&e.url.trim())}function o(e){return e?!!a(Array.isArray(e)?e:e.images):!1}function s(e,t,n){let r=n.videoUrl.trim();if(!r||t.has(r))return!1;t.add(r);let i=n.posterUrl?.trim();return i&&t.add(i),e.unshift({url:r,role:n.role??`main`,kind:`video`,posterUrl:i||void 0,width:n.width,height:n.height}),!0}var c=`xyxp_item_collection`,l=`mtop.taobao.idle.pc.detail`,u=`window.context.result.data.productPackInfo.fields.pieceWeightScale.pieceWeightScaleInfo`,d=`window.rawData.store.initDataObj.goods.skus`,f=`window.__ICE_APP_CONTEXT__.loaderData.home.data.res.skuBase`;export{f as a,r as c,o as d,e as f,d as i,a as l,c as n,n as o,s as p,l as r,i as s,u as t,t as u};