import{Q as e,et as t}from"./runtime-core.esm-bundler-Babufkcf.js";import{a as n}from"./create-CGAkPJkS.js";var r=t(!1),i;function a(e,t){let n=/(edg|edge|edga|edgios)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(vivaldi)[\/]([\w.]+)/.exec(e)||/(chrome|crios)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(firefox|fxios)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[\/]([\w.]+)/.exec(e)||[];return{browser:n[5]||n[3]||n[1]||``,version:n[4]||n[2]||`0`,platform:t[0]||``}}function o(e){return/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[]}var s=`ontouchstart`in window||window.navigator.maxTouchPoints>0;function c(e){let t=e.toLowerCase(),n=a(t,o(t)),c={mobile:!1,desktop:!1,cordova:!1,capacitor:!1,nativeMobile:!1,electron:!1,bex:!1,linux:!1,mac:!1,win:!1,cros:!1,chrome:!1,firefox:!1,opera:!1,safari:!1,vivaldi:!1,edge:!1,edgeChromium:!1,ie:!1,webkit:!1,android:!1,ios:!1,ipad:!1,iphone:!1,ipod:!1,kindle:!1,winphone:!1,blackberry:!1,playbook:!1,silk:!1};n.browser&&(c[n.browser]=!0,c.version=n.version,c.versionNumber=Number.parseInt(n.version,10)),n.platform&&(c[n.platform]=!0);let l=c.android||c.ios||c.bb||c.blackberry||c.ipad||c.iphone||c.ipod||c.kindle||c.playbook||c.silk||c[`windows phone`];if(l===!0||t.includes(`mobile`)?c.mobile=!0:c.desktop=!0,c[`windows phone`]&&(c.winphone=!0,delete c[`windows phone`]),c.edga||c.edgios||c.edg?(c.edge=!0,n.browser=`edge`):c.crios?(c.chrome=!0,n.browser=`chrome`):c.fxios&&(c.firefox=!0,n.browser=`firefox`),(c.ipod||c.ipad||c.iphone)&&(c.ios=!0),c.vivaldi&&=(n.browser=`vivaldi`,!0),(c.chrome||c.opr||c.safari||c.vivaldi||c.mobile&&!c.ios&&!l)&&(c.webkit=!0),c.opr&&(n.browser=`opera`,c.opera=!0),c.safari&&(c.blackberry||c.bb?(n.browser=`blackberry`,c.blackberry=!0):c.playbook?(n.browser=`playbook`,c.playbook=!0):c.android?(n.browser=`android`,c.android=!0):c.kindle?(n.browser=`kindle`,c.kindle=!0):c.silk&&=(n.browser=`silk`,!0)),c.name=n.browser,c.platform=n.platform,t.includes(`electron`))c.electron=!0;else if(document.location.href.includes(`-extension://`))c.bex=!0;else{if(window.Capacitor===void 0?(window._cordovaNative!==void 0||window.cordova!==void 0)&&(c.cordova=!0,c.nativeMobile=!0,c.nativeMobileWrapper=`cordova`):(c.capacitor=!0,c.nativeMobile=!0,c.nativeMobileWrapper=`capacitor`),r.value&&(i={is:{...c}}),s&&c.mac&&(c.desktop&&c.safari||c.nativeMobile&&!c.android&&!c.ios&&!c.ipad)){delete c.mac,delete c.desktop;let e=Math.min(window.innerHeight,window.innerWidth)>414?`ipad`:`iphone`;Object.assign(c,{mobile:!0,ios:!0,platform:e,[e]:!0})}!c.mobile&&window.navigator.userAgentData&&window.navigator.userAgentData.mobile&&(delete c.desktop,c.mobile=!0)}return c}var l=navigator.userAgent||navigator.vendor||window.opera,u={has:{touch:!1,webStorage:!1},within:{iframe:!1}},d={userAgent:l,is:c(l),has:{touch:s},within:{iframe:window.self!==window.top}},f={install(t){let{$q:n}=t;r.value?(t.onSSRHydrated.push(()=>{Object.assign(n.platform,d),r.value=!1}),n.platform=e(this)):n.platform=this}};{let e;n(d.has,`webStorage`,()=>{if(e!==void 0)return e;try{if(window.localStorage)return e=!0,!0}catch{}return e=!1,!1}),Object.assign(f,d),r.value&&(Object.assign(f,i,u),i=null)}export{d as n,r,f as t};