shiplightai 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ "use strict";var _e=Object.create;var k=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var Ee=Object.getOwnPropertyNames;var Ie=Object.getPrototypeOf,xe=Object.prototype.hasOwnProperty;var u=(e,i)=>()=>(e&&(i=e(e=0)),i);var E=(e,i)=>{for(var o in i)k(e,o,{get:i[o],enumerable:!0})},K=(e,i,o,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of Ee(i))!xe.call(e,r)&&r!==o&&k(e,r,{get:()=>i[r],enumerable:!(t=ke(i,r))||t.enumerable});return e};var y=(e,i,o)=>(o=e!=null?_e(Ie(e)):{},K(i||!e||!e.__esModule?k(o,"default",{value:e,enumerable:!0}):o,e)),Oe=e=>K(k({},"__esModule",{value:!0}),e);var R=u(()=>{"use strict"});var U=u(()=>{"use strict"});var z=u(()=>{"use strict"});var I=u(()=>{"use strict"});var $=u(()=>{"use strict";I()});var V,De,j,X,A,Ce,We,Y=u(()=>{"use strict";V=112,De=1080-V,j={"Blackberry PlayBook":{name:"Blackberry PlayBook",userAgent:"Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/26.0 Safari/536.2+",screen:{width:600,height:1024},viewport:{width:600,height:1024},deviceScaleFactor:1,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"BlackBerry Z30":{name:"BlackBerry Z30",userAgent:"Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/26.0 Mobile Safari/537.10+",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy Note 3":{name:"Galaxy Note 3",userAgent:"Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/26.0 Mobile Safari/534.30",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy Note II":{name:"Galaxy Note II",userAgent:"Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/26.0 Mobile Safari/534.30",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy S III":{name:"Galaxy S III",userAgent:"Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/26.0 Mobile Safari/534.30",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Galaxy S5":{name:"Galaxy S5",userAgent:"Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy S8":{name:"Galaxy S8",userAgent:"Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:740},viewport:{width:360,height:740},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy S9+":{name:"Galaxy S9+",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:320,height:658},viewport:{width:320,height:658},deviceScaleFactor:4.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy S24":{name:"Galaxy S24",userAgent:"Mozilla/5.0 (Linux; Android 14; SM-S921U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:780},viewport:{width:360,height:780},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy A55":{name:"Galaxy A55",userAgent:"Mozilla/5.0 (Linux; Android 14; SM-A556B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:480,height:1040},viewport:{width:480,height:1040},deviceScaleFactor:2.25,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy Tab S4":{name:"Galaxy Tab S4",userAgent:"Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:712,height:1138},viewport:{width:712,height:1138},deviceScaleFactor:2.25,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Galaxy Tab S9":{name:"Galaxy Tab S9",userAgent:"Mozilla/5.0 (Linux; Android 14; SM-X710) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:640,height:1024},viewport:{width:640,height:1024},deviceScaleFactor:2.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"iPad (gen 5)":{name:"iPad (gen 5)",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:768,height:1024},viewport:{width:768,height:1024},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad (gen 6)":{name:"iPad (gen 6)",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:768,height:1024},viewport:{width:768,height:1024},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad (gen 7)":{name:"iPad (gen 7)",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:810,height:1080},viewport:{width:810,height:1080},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad (gen 11)":{name:"iPad (gen 11)",userAgent:"Mozilla/5.0 (iPad; CPU OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/19E241 Safari/604.1",screen:{width:656,height:944},viewport:{width:656,height:944},deviceScaleFactor:2.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad Mini":{name:"iPad Mini",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:768,height:1024},viewport:{width:768,height:1024},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPad Pro 11":{name:"iPad Pro 11",userAgent:"Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:834,height:1194},viewport:{width:834,height:1194},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 6":{name:"iPhone 6",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 6 Plus":{name:"iPhone 6 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:414,height:736},viewport:{width:414,height:736},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 7":{name:"iPhone 7",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 7 Plus":{name:"iPhone 7 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:414,height:736},viewport:{width:414,height:736},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 8":{name:"iPhone 8",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 8 Plus":{name:"iPhone 8 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:414,height:736},viewport:{width:414,height:736},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone SE":{name:"iPhone SE",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/26.0 Mobile/14E304 Safari/602.1",screen:{width:320,height:568},viewport:{width:320,height:568},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone SE (3rd gen)":{name:"iPhone SE (3rd gen)",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/26.0 Mobile/19E241 Safari/602.1",screen:{width:375,height:667},viewport:{width:375,height:667},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone X":{name:"iPhone X",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:812},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone XR":{name:"iPhone XR",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:414,height:896},viewport:{width:414,height:896},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 11":{name:"iPhone 11",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:414,height:896},viewport:{width:414,height:715},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 11 Pro":{name:"iPhone 11 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:635},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 11 Pro Max":{name:"iPhone 11 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:414,height:896},viewport:{width:414,height:715},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12":{name:"iPhone 12",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12 Pro":{name:"iPhone 12 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12 Pro Max":{name:"iPhone 12 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:428,height:926},viewport:{width:428,height:746},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 12 Mini":{name:"iPhone 12 Mini",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:629},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13":{name:"iPhone 13",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13 Pro":{name:"iPhone 13 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13 Pro Max":{name:"iPhone 13 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:428,height:926},viewport:{width:428,height:746},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 13 Mini":{name:"iPhone 13 Mini",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:375,height:812},viewport:{width:375,height:629},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14":{name:"iPhone 14",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:390,height:844},viewport:{width:390,height:664},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14 Plus":{name:"iPhone 14 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:428,height:926},viewport:{width:428,height:746},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14 Pro":{name:"iPhone 14 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:393,height:852},viewport:{width:393,height:660},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 14 Pro Max":{name:"iPhone 14 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:430,height:932},viewport:{width:430,height:740},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15":{name:"iPhone 15",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:393,height:852},viewport:{width:393,height:659},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15 Plus":{name:"iPhone 15 Plus",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:430,height:932},viewport:{width:430,height:739},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15 Pro":{name:"iPhone 15 Pro",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:393,height:852},viewport:{width:393,height:659},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"iPhone 15 Pro Max":{name:"iPhone 15 Pro Max",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1",screen:{width:430,height:932},viewport:{width:430,height:739},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Kindle Fire HDX":{name:"Kindle Fire HDX",userAgent:"Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",screen:{width:800,height:1280},viewport:{width:800,height:1280},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"LG Optimus L70":{name:"LG Optimus L70",userAgent:"Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:384,height:640},viewport:{width:384,height:640},deviceScaleFactor:1.25,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Microsoft Lumia 550":{name:"Microsoft Lumia 550",userAgent:"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36 Edge/14.14263",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Microsoft Lumia 950":{name:"Microsoft Lumia 950",userAgent:"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36 Edge/14.14263",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:4,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 10":{name:"Nexus 10",userAgent:"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:800,height:1280},viewport:{width:800,height:1280},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 4":{name:"Nexus 4",userAgent:"Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:384,height:640},viewport:{width:384,height:640},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 5":{name:"Nexus 5",userAgent:"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 5X":{name:"Nexus 5X",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:732},viewport:{width:412,height:732},deviceScaleFactor:2.625,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 6":{name:"Nexus 6",userAgent:"Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:732},viewport:{width:412,height:732},deviceScaleFactor:3.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 6P":{name:"Nexus 6P",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:732},viewport:{width:412,height:732},deviceScaleFactor:3.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nexus 7":{name:"Nexus 7",userAgent:"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:600,height:960},viewport:{width:600,height:960},deviceScaleFactor:2,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nokia Lumia 520":{name:"Nokia Lumia 520",userAgent:"Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)",screen:{width:320,height:533},viewport:{width:320,height:533},deviceScaleFactor:1.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Nokia N9":{name:"Nokia N9",userAgent:"Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13",screen:{width:480,height:854},viewport:{width:480,height:854},deviceScaleFactor:1,isMobile:!0,hasTouch:!0,defaultBrowserType:"webkit"},"Pixel 2":{name:"Pixel 2",userAgent:"Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:411,height:731},viewport:{width:411,height:731},deviceScaleFactor:2.625,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 2 XL":{name:"Pixel 2 XL",userAgent:"Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:411,height:823},viewport:{width:411,height:823},deviceScaleFactor:3.5,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 3":{name:"Pixel 3",userAgent:"Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:393,height:786},viewport:{width:393,height:786},deviceScaleFactor:2.75,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 4":{name:"Pixel 4",userAgent:"Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:353,height:745},viewport:{width:353,height:745},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 4a (5G)":{name:"Pixel 4a (5G)",userAgent:"Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:892},viewport:{width:412,height:765},deviceScaleFactor:2.63,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 5":{name:"Pixel 5",userAgent:"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:393,height:851},viewport:{width:393,height:727},deviceScaleFactor:2.75,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Pixel 7":{name:"Pixel 7",userAgent:"Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:412,height:915},viewport:{width:412,height:839},deviceScaleFactor:2.625,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Moto G4":{name:"Moto G4",userAgent:"Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Mobile Safari/537.36",screen:{width:360,height:640},viewport:{width:360,height:640},deviceScaleFactor:3,isMobile:!0,hasTouch:!0,defaultBrowserType:"chromium"},"Desktop Chrome HiDPI":{name:"Desktop Chrome HiDPI",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Edge HiDPI":{name:"Desktop Edge HiDPI",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Firefox HiDPI":{name:"Desktop Firefox HiDPI",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0.1) Gecko/20100101 Firefox/142.0.1",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"firefox"},"Desktop Safari":{name:"Desktop Safari",userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Safari/605.1.15",screen:{width:1792,height:1120},viewport:{width:1280,height:720},deviceScaleFactor:2,isMobile:!1,hasTouch:!1,defaultBrowserType:"webkit"},"Desktop Chrome":{name:"Desktop Chrome",displayName:"Playwright Chromium",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1920,height:1080},viewport:{width:1920,height:1080},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Chrome Medium Resolution":{name:"Desktop Chrome Medium Resolution",displayName:"Playwright Chromium",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1280,height:720},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Chrome (Branded)":{name:"Desktop Chrome (Branded)",displayName:"Google Chrome",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1920,height:1080},viewport:{width:1920,height:1080},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"chrome"},"Desktop Chrome Medium Resolution (Branded)":{name:"Desktop Chrome Medium Resolution (Branded)",displayName:"Google Chrome",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36",screen:{width:1280,height:720},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"chrome"},"Desktop Edge":{name:"Desktop Edge",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1920,height:1080},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium"},"Desktop Edge (Branded)":{name:"Desktop Edge (Branded)",displayName:"Microsoft Edge",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1920,height:1080},viewport:{width:1920,height:1080},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"msedge"},"Desktop Edge Medium Resolution (Branded)":{name:"Desktop Edge Medium Resolution (Branded)",displayName:"Microsoft Edge",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.16 Safari/537.36 Edg/141.0.7390.16",screen:{width:1280,height:720},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"chromium",channel:"msedge"},"Desktop Firefox":{name:"Desktop Firefox",userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0.1) Gecko/20100101 Firefox/142.0.1",screen:{width:1920,height:1080},viewport:{width:1280,height:720},deviceScaleFactor:1,isMobile:!1,hasTouch:!1,defaultBrowserType:"firefox"}},X={desktop:["Desktop Chrome","Desktop Chrome Medium Resolution","Desktop Chrome (Branded)","Desktop Chrome Medium Resolution (Branded)","Desktop Edge (Branded)","Desktop Edge Medium Resolution (Branded)","Desktop Safari"],mobile:["iPhone 15 Pro Max","iPhone 15 Pro","iPhone 15 Plus","iPhone 15","iPhone 14 Pro Max","iPhone 14 Pro","iPhone 14 Plus","iPhone 14","iPhone 13 Pro Max","iPhone 13 Pro","iPhone 13","iPhone 13 Mini","iPhone 12 Pro Max","iPhone 12 Pro","iPhone 12","iPhone 12 Mini","iPhone 11 Pro Max","iPhone 11 Pro","iPhone 11","iPhone XR","iPhone X","iPhone SE (3rd gen)","iPhone SE","iPhone 8 Plus","iPhone 8","iPhone 7 Plus","iPhone 7","iPhone 6 Plus","iPhone 6","Galaxy S24","Galaxy A55","Galaxy S9+","Galaxy S8","Galaxy S5","Galaxy Note 3","Galaxy Note II","Galaxy S III","Pixel 7","Pixel 5","Pixel 4a (5G)","Pixel 4","Pixel 3","Pixel 2 XL","Pixel 2","Nexus 6P","Nexus 6","Nexus 5X","Nexus 5","Nexus 4","Moto G4","LG Optimus L70","Microsoft Lumia 950","Microsoft Lumia 550","Nokia Lumia 520","Nokia N9","BlackBerry Z30"]},A=(e,i=!1)=>{let o=["chromium"];return i&&o.push("webkit"),X[e].map(t=>j[t]).filter(t=>t.defaultBrowserType&&o.includes(t.defaultBrowserType))},Ce={desktop:{label:"Desktop",type:"desktop",devices:A("desktop")},mobile:{label:"Mobile Web",type:"mobile",devices:A("mobile")}},We={desktop:{label:"Desktop",type:"desktop",devices:A("desktop",!0)},mobile:{label:"Mobile Web",type:"mobile",devices:A("mobile",!0)}}});var J=u(()=>{"use strict"});var s,q,L,Z,b,Q,ee,te,w,D,C=u(()=>{"use strict";s=require("zod"),q=s.z.enum(["JS_CODE","AI_MODE"]),L=s.z.object({type:q,expression:s.z.string()}),Z=s.z.enum(["DRAFT","STEP","ACTION","IF_ELSE","WHILE_LOOP"]),b=s.z.object({uid:s.z.string(),type:Z}),Q=s.z.object({action_data:s.z.object({action_name:s.z.string(),kwargs:s.z.record(s.z.any()).optional(),args:s.z.array(s.z.any()).optional()}),action_description:s.z.string().optional(),url:s.z.string().optional(),xpath:s.z.string().nullable().optional(),locator:s.z.string().nullable().optional(),css_selector:s.z.string().nullable().optional(),unique_selector:s.z.string().nullable().optional(),element_index:s.z.number().nullable().optional(),frame_path:s.z.array(s.z.any()).optional(),artifacts:s.z.record(s.z.any()).optional(),feedback:s.z.string().optional(),original_browser_use_action:s.z.any().optional()}).passthrough(),ee=b.extend({type:s.z.literal("DRAFT"),description:s.z.string()}),te=b.extend({type:s.z.literal("ACTION"),description:s.z.string(),action_entity:Q.optional(),locator:s.z.string().optional(),use_pure_vision:s.z.boolean().optional()}),w=s.z.lazy(()=>s.z.union([ee,te,b.extend({type:s.z.literal("STEP"),description:s.z.string().optional().default(""),statements:s.z.array(w),reference_id:s.z.number().optional()}),b.extend({type:s.z.literal("IF_ELSE"),description:s.z.string().optional(),condition:L,then:s.z.array(w),else:s.z.array(w).optional()}),b.extend({type:s.z.literal("WHILE_LOOP"),description:s.z.string().optional(),condition:L,body:s.z.array(w),timeout_ms:s.z.number().optional()})])),D=s.z.object({version:s.z.string().optional(),goal:s.z.string(),url:s.z.string().optional(),final_feedback:s.z.string().optional(),completed:s.z.boolean().optional(),success:s.z.boolean().optional(),statements:s.z.array(w),teardown:s.z.array(w).optional(),last_modified_at:s.z.string().optional()})});function re(e,i){let o={...i?.test_case_id!==void 0?{test_case_id:i.test_case_id}:{},...i?.name?{name:i.name}:{},goal:e.goal,url:e.url,statements:e.statements.map(M)};return e.final_feedback&&(o.final_feedback=e.final_feedback),e.teardown&&e.teardown.length>0&&(o.teardown=e.teardown.map(M)),o}function W(e,i){return(0,P.stringify)(re(e,i),He)}function M(e){switch(e.type){case"DRAFT":return Fe(e);case"ACTION":return Ke(e);case"STEP":return Ge(e);case"IF_ELSE":return Ne(e);case"WHILE_LOOP":return Be(e)}}function Fe(e){return e.description}function Ke(e){let i=e.action_entity?.action_data?.action_name??e.action_entity?.action?.action_name,o=e.action_entity?.action_data?.kwargs??e.action_entity?.action?.kwargs;if(i==="verify"){let a=o?.statement;if(typeof a=="string"&&!e.action_entity?.locator&&!e.action_entity?.xpath)return{VERIFY:a}}if(i==="go_to_url"){let a=o?.url;if(typeof a=="string"&&!e.action_entity?.locator&&!e.action_entity?.xpath){let l={URL:a};return o?.new_tab===!0&&(l.new_tab=!0),typeof o?.timeout_seconds=="number"&&(l.timeout_seconds=o.timeout_seconds),l}}if(i==="js_code"){let a=o?.code;if(typeof a=="string"&&!e.action_entity?.locator&&!e.action_entity?.xpath)return{JS:a}}if(!e.action_entity)return e.description;let t=e.action_entity.action_data??e.action_entity.action;if(!t)return e.description;let r={action:t.action_name,description:e.description},n=e.locator??e.action_entity.locator;n&&(r.locator=n);let c=e.action_entity.xpath;if(c&&(r.xpath=c),e.use_pure_vision&&(r.use_pure_vision=!0),t.kwargs&&Object.keys(t.kwargs).length>0)for(let[a,l]of Object.entries(t.kwargs))r[a]=l;return t.args&&t.args.length>0&&(r.args=t.args),r}function Ge(e){let i={STEP:e.description,statements:e.statements.map(M)};return e.reference_id!==void 0&&(i.reference_id=e.reference_id),i}function Ne(e){let i={IF:oe(e.condition),THEN:e.then.map(M)};return e.else&&e.else.length>0&&(i.ELSE=e.else.map(M)),i}function Be(e){let i={WHILE:oe(e.condition),DO:e.body.map(M)};return e.timeout_ms!==void 0&&(i.timeout_ms=e.timeout_ms),i}function oe(e){return e.type==="JS_CODE"?`js:${e.expression}`:e.expression}function H(e){try{let i=(0,P.parse)(e);if(!i||typeof i!="object")return{};let o={};return typeof i.test_case_id=="number"&&Number.isFinite(i.test_case_id)&&(o.test_case_id=i.test_case_id),typeof i.name=="string"&&i.name.trim()&&(o.name=i.name.trim()),o}catch{return{}}}function _(e){if(e.length>ie)throw new Error(`YAML input too large (${e.length} bytes, max ${ie})`);let i=(0,P.parse)(e);if(!i||typeof i!="object")throw new Error("Invalid YAML: expected an object at root level");let o={version:"1.2.0",goal:i.goal,url:i.url,statements:T(i.statements??[])};i.final_feedback&&(o.final_feedback=i.final_feedback),i.teardown&&Array.isArray(i.teardown)&&(o.teardown=T(i.teardown));let t=D.safeParse(o);if(!t.success)throw new Error(`Invalid TestFlow after YAML conversion: ${JSON.stringify(t.error.errors)}`);return t.data}function T(e){if(!Array.isArray(e))throw new Error("Expected an array of statements");return e.map(Re)}function Re(e){if(typeof e=="string")return Ue(e);if(typeof e!="object"||e===null)throw new Error(`Invalid statement: expected string or object, got ${typeof e}`);let i=e;if("IF"in i)return ze(i);if("WHILE"in i)return $e(i);if("STEP"in i)return Ve(i);if("VERIFY"in i){let o=i.VERIFY;return{uid:(0,p.v4)(),type:"ACTION",description:`Verify: ${o}`,action_entity:{action_description:`Verify: ${o}`,action_data:{action_name:"verify",kwargs:{statement:typeof o=="string"?o:String(o)}}}}}if("URL"in i){let o=i.URL,t=i.new_tab===!0?!0:void 0,r=typeof i.timeout_seconds=="number"?i.timeout_seconds:void 0,n={url:typeof o=="string"?o:String(o)};return t&&(n.new_tab=!0),r!==void 0&&(n.timeout_seconds=r),{uid:(0,p.v4)(),type:"ACTION",description:`Navigate to ${o}`,action_entity:{action_description:`Navigate to ${o}`,action_data:{action_name:"go_to_url",kwargs:n}}}}if("JS"in i){let o=i.JS;return{uid:(0,p.v4)(),type:"ACTION",description:"JS code block",action_entity:{action_description:"JS code block",action_data:{action_name:"js_code",kwargs:{code:typeof o=="string"?o:String(o)}}}}}if("action"in i)return Xe(i);if("description"in i&&typeof i.description=="string")return{uid:(0,p.v4)(),type:"DRAFT",description:i.description};throw new Error(`Cannot infer statement type from object: ${JSON.stringify(i)}`)}function Ue(e){return{uid:(0,p.v4)(),type:"DRAFT",description:e}}function ne(e){if(typeof e!="string")throw new Error(`Condition must be a string, got ${typeof e}`);return e.startsWith("js:")?{type:"JS_CODE",expression:e.slice(3)}:{type:"AI_MODE",expression:e}}function ze(e){let i=ne(e.IF),o=e.THEN;if(!Array.isArray(o))throw new Error("IF_ELSE requires a THEN array");let t={uid:(0,p.v4)(),type:"IF_ELSE",condition:i,then:T(o)};return"ELSE"in e&&Array.isArray(e.ELSE)&&(t.else=T(e.ELSE)),t}function $e(e){let i=ne(e.WHILE),o=e.DO;if(!Array.isArray(o))throw new Error("WHILE_LOOP requires a DO array");let t={uid:(0,p.v4)(),type:"WHILE_LOOP",condition:i,body:T(o)};return typeof e.timeout_ms=="number"&&(t.timeout_ms=e.timeout_ms),t}function Ve(e){let i=typeof e.STEP=="string"?e.STEP:"";if(!Array.isArray(e.statements))throw new Error("STEP requires a statements array");let o={uid:(0,p.v4)(),type:"STEP",description:i,statements:T(e.statements)};return typeof e.reference_id=="number"&&(o.reference_id=e.reference_id),o}function Xe(e){let i=typeof e.action=="string"?e.action:String(e.action),o=typeof e.description=="string"?e.description:"",t=typeof e.locator=="string"?e.locator:void 0,r=typeof e.xpath=="string"?e.xpath:void 0,n=typeof e.use_pure_vision=="boolean"?e.use_pure_vision:void 0,c={};for(let[h,d]of Object.entries(e))je.has(h)||(c[h]=d);let a={action_description:o,action_data:{action_name:i,kwargs:Object.keys(c).length>0?c:{}}};t&&(a.locator=t),r&&(a.xpath=r);let l={uid:(0,p.v4)(),type:"ACTION",description:o,action_entity:a};return n&&(l.use_pure_vision=!0),l}var P,p,He,ie,je,x=u(()=>{"use strict";C();P=require("yaml"),p=require("uuid");He={lineWidth:120,defaultKeyType:"PLAIN",defaultStringType:"PLAIN"};ie=1024*1024;je=new Set(["action","description","locator","xpath","use_pure_vision"])});var se,ae=u(()=>{"use strict";x();se=require("yaml")});var O=u(()=>{"use strict"});var ce=u(()=>{"use strict";x();O()});var le=u(()=>{"use strict";O()});var ue=u(()=>{"use strict"});var he=u(()=>{"use strict"});var de=u(()=>{"use strict"});var pe=u(()=>{"use strict"});var fe=u(()=>{"use strict";I()});var ge=u(()=>{"use strict";R();U();z();$();Y();J();ae();ce();x();C();le();O();ue();he();de();pe();fe();I()});var ye={};E(ye,{createTestFlowRouter:()=>Ze});function Ze(e){let i=(0,me.Router)();return i.get("/api/test-flow",async(o,t)=>{try{let r=await f.readFile(e,"utf-8"),n=_(r),c=H(r),a=await f.stat(e);t.json({testFlow:n,metadata:c,filePath:e,fileName:we.basename(e),lastModified:a.mtimeMs})}catch(r){if(r.code==="ENOENT")return t.status(404).json({error:`File not found: ${e}`});console.error("[debugger] Error loading test flow:",r),t.status(500).json({error:r.message})}}),i.put("/api/test-flow",async(o,t)=>{try{let{testFlow:r,metadata:n}=o.body;if(!r)return t.status(400).json({error:"testFlow is required"});let c=W(r,n),a=e+".tmp";await f.writeFile(a,c,"utf-8"),await f.rename(a,e);let l=await f.stat(e);t.json({success:!0,lastModified:l.mtimeMs})}catch(r){console.error("[debugger] Error saving test flow:",r),t.status(500).json({error:r.message})}}),i}var me,f,we,Se=u(()=>{"use strict";me=require("express"),f=y(require("fs/promises"),1),we=y(require("path"),1);ge()});var Me={};E(Me,{createIntRunnerRouter:()=>Qe});function Qe(e){let i=(0,be.Router)();return i.post("/api/int-runner/create-session",async(o,t)=>{try{let r=o.body.startingUrl||o.body.testFlow?.url||o.body.urlOverride,n=await e.createSession({startingUrl:r});t.json({status:"success",sessionId:n.sessionId,searchParams:""})}catch(r){console.error("[debugger] create-session error:",r),t.status(500).json({status:"error",message:r.message})}}),i.post("/api/int-runner/login",async(o,t)=>{try{let{session:r}=o.body;if(!r?.sessionId)return t.status(400).json({status:"error",message:"Missing session"});let n=await e.executeLogin(r.sessionId);t.json(n)}catch(r){console.error("[debugger] login error:",r),t.status(500).json({status:"error",details:r.message})}}),i.post("/api/int-runner/liveview-url",async(o,t)=>{let{session:r}=o.body;if(!r?.sessionId)return t.status(400).json({status:"error",message:"Missing session"});t.json({liveviewUrl:"",browserWsUrl:""})}),i.post("/api/int-runner/end-debug",async(o,t)=>{let{session:r}=o.body;if(!r?.sessionId)return t.status(400).json({status:"error",message:"Missing session"});t.json({status:"success"})}),i.post("/api/int-runner/start-debug",async(o,t)=>{try{let{session:r}=o.body;if(!r?.sessionId)return t.status(400).json({status:"error",message:"Missing session"});let n=await e.startDebug(r.sessionId);t.json({status:"success",...n})}catch(r){console.error("[debugger] start-debug error:",r),t.status(500).json({status:"error",message:r.message})}}),i.post("/api/int-runner/execute-action",async(o,t)=>{try{let{session:r,actionEntity:n,stepId:c,withSelfHealing:a,stmtUid:l,executionHistory:h}=o.body;if(!r?.sessionId||!n)return t.status(400).json({status:"error",message:"Missing session or actionEntity"});let d=await e.executeAction(r.sessionId,n,c,{withSelfHealing:a,stmtUid:l,executionHistory:h});t.json(d)}catch(r){console.error("[debugger] execute-action error:",r),t.status(500).json({status:"error",details:r.message})}}),i.post("/api/int-runner/run-step",async(o,t)=>{let{session:r,statement:n,stepId:c,executionHistory:a}=o.body;if(!r?.sessionId||!n)return t.status(400).json({success:!1,message:"Session and statement required"});t.setHeader("Content-Type","text/event-stream"),t.setHeader("Cache-Control","no-cache"),t.setHeader("Connection","keep-alive"),t.flushHeaders();let l=h=>{t.write(`data: ${JSON.stringify(h)}
2
+
3
+ `)};try{await e.runStep(r.sessionId,n,c,l,a)}catch(h){l({type:"error",data:{message:h.message}})}finally{t.end()}}),i.post("/api/int-runner/execute-step",async(o,t)=>{let{session:r,statement:n,stepId:c,executionHistory:a,maxSteps:l}=o.body;if(!r?.sessionId||!n)return t.status(400).json({success:!1,message:"Session and statement required"});t.setHeader("Content-Type","text/event-stream"),t.setHeader("Cache-Control","no-cache"),t.setHeader("Connection","keep-alive"),t.flushHeaders();let h=d=>{t.write(`data: ${JSON.stringify(d)}
4
+
5
+ `)};try{await e.runStep(r.sessionId,n,c,h,a)}catch(d){h({type:"error",data:{message:d.message}})}finally{t.end()}}),i.post("/api/int-runner/stop-run-step",async(o,t)=>{try{let{session:r}=o.body;if(!r?.sessionId)return t.status(400).json({status:"error",message:"Missing session"});let n=e.stopRunStep(r.sessionId);t.json({status:"success",aborted:n})}catch(r){console.error("[debugger] stop-run-step error:",r),t.status(500).json({status:"error",aborted:!1,details:r.message})}}),i.post("/api/int-runner/evaluate",async(o,t)=>{try{let{session:r,statement:n,stepId:c,executionHistory:a}=o.body;if(!r?.sessionId||!n)return t.status(400).json({status:"error",message:"Missing session or statement"});let l=await e.evaluate(r.sessionId,n,a);t.json(l)}catch(r){console.error("[debugger] evaluate error:",r),t.status(500).json({status:"error",conclusion:"unknown",explanation:r.message})}}),i.post("/api/int-runner/generate-action",async(o,t)=>{try{let{session:r,statement:n,stepId:c,executionHistory:a,usePureVision:l,includeDebugInfo:h}=o.body;if(!r?.sessionId||!n)return t.status(400).json({status:"error",message:"Missing session or statement"});let d=await e.generateAction(r.sessionId,n,c,{executionHistory:a,usePureVision:l,includeDebugInfo:h});t.json(d)}catch(r){console.error("[debugger] generate-action error:",r),t.status(500).json({status:"error",details:r.message})}}),i.post("/api/int-runner/screenshot",async(o,t)=>{try{let{session:r}=o.body;if(!r?.sessionId)return t.status(400).json({status:"error",message:"Missing session"});let n=await e.takeScreenshot(r.sessionId);t.json({status:"success",...n})}catch(r){console.error("[debugger] screenshot error:",r),t.status(500).json({status:"error",message:r.message})}}),i.post("/api/int-runner/terminate-session",async(o,t)=>{try{let{session:r}=o.body;if(!r?.sessionId)return t.status(400).json({status:"error",message:"Missing session"});await e.terminateSession(r.sessionId),t.json({status:"success",details:`Session ${r.sessionId} terminated`})}catch(r){console.error("[debugger] terminate-session error:",r),t.status(500).json({status:"error",details:r.message})}}),i.post("/api/int-runner/session-status",async(o,t)=>{let{session:r}=o.body;if(!r?.sessionId)return t.status(400).json({status:"timed_out"});t.json({status:"active",remainingSeconds:9999})}),i}var be,Te=u(()=>{"use strict";be=require("express")});var ve={};E(ve,{createCopilotRouter:()=>et});function et(e){let i=(0,Pe.Router)();return i.post("/api/int-runner/copilot/init",async(o,t)=>{try{let{session:r,initialTestFlow:n}=o.body;if(!r?.sessionId)return t.status(400).json({success:!1,message:"Missing session"});await e.initializeCopilot(r.sessionId,n),t.json({success:!0,status:"success"})}catch(r){console.error("[debugger] copilot/init error:",r),t.status(500).json({success:!1,message:r.message})}}),i.post("/api/int-runner/copilot/send",async(o,t)=>{let{session:r,message:n,testFlow:c}=o.body;if(!r?.sessionId||!n)return t.status(400).json({success:!1,message:"Session and message required"});t.setHeader("Content-Type","text/event-stream"),t.setHeader("Cache-Control","no-cache"),t.setHeader("Connection","keep-alive"),t.flushHeaders();let a=l=>{t.write(`data: ${JSON.stringify(l)}
6
+
7
+ `)};try{await e.sendCopilotMessage(r.sessionId,n,a,c)}catch(l){a({type:"copilot_message",data:{type:"error",message:l.message},sequenceNumber:0,timestamp:new Date().toISOString()})}finally{t.end()}}),i.post("/api/int-runner/copilot/abort",async(o,t)=>{try{let{session:r}=o.body;if(!r?.sessionId)return t.status(400).json({success:!1,message:"Missing session"});let n=e.abortCopilot(r.sessionId);t.json({success:!0,status:"success",aborted:n})}catch(r){console.error("[debugger] copilot/abort error:",r),t.status(500).json({success:!1,message:r.message})}}),i.post("/api/int-runner/copilot/status",async(o,t)=>{try{let{session:r}=o.body;if(!r?.sessionId)return t.status(400).json({status:"error",message:"Missing session"});let n=e.getCopilotTestFlow(r.sessionId);t.json({status:"success",copilotInitialized:!0,testFlow:n})}catch(r){t.status(500).json({status:"error",details:r.message})}}),i}var Pe,Ae=u(()=>{"use strict";Pe=require("express")});var it={};E(it,{PlaywrightSandboxService:()=>S,startPlaywrightDebugServer:()=>tt});module.exports=Oe(it);var F=y(require("express"),1);var G=y(require("path"),1),N=y(require("fs/promises"),1),B=y(require("os"),1),S=class{page;agent;sessionId="pw-"+Math.random().toString(36).slice(2,10);abortController=null;constructor(i,o){this.page=i,this.agent=o}async createSession(i){return{sessionId:this.sessionId}}async executeLogin(i){return{status:"success",details:"Handled by Playwright"}}async ensureBrowser(i){return{page:this.page,liveviewUrl:""}}async startDebug(i){return{sessionId:this.sessionId,liveviewUrl:"",browserWsUrl:""}}async executeAction(i,o,t,r){let n=o.action_data||o.action;if(!n)throw new Error("ActionEntity has no action_data");if(console.error(`[pw-sandbox] executeAction stepId=${JSON.stringify(t)} action_name=${JSON.stringify(n.action_name)} locator=${JSON.stringify(o.locator)} kwargs=${JSON.stringify(n.kwargs)}`),n.action_name==="js_code"&&t==="prelude"){if(this.page.url()==="about:blank"){let l=n.kwargs?.code?.match(/PLAYWRIGHT_STARTING_URL \|\| '([^']*)'/)?.[1];l&&await this.page.goto(l,{waitUntil:"domcontentloaded"})}return{status:"success"}}let c=o.action_description||n.action_name;return{status:"success",...await this.agent.step(this.page,async()=>{await this.agent.execAction(n.action_name,this.page,o)},c,t,r?.stmtUid,!!r?.withSelfHealing)}}async runStep(i,o,t,r,n){let c=[],a={},l=this.agent._actionHandler;this.abortController=new AbortController;try{let h=await this.agent.execute(this.page,o,t,!1);return{success:h?.success??!0,actions:c,details:h?.details}}finally{this.abortController=null}}stopRunStep(i){return this.abortController?(this.abortController.abort(),!0):!1}async evaluate(i,o,t){try{let r=await this.agent.assert(this.page,o);return{conclusion:r?"pass":"fail",explanation:r?"Assertion passed":"Assertion failed"}}catch(r){return{conclusion:"fail",explanation:r.message}}}async generateAction(i,o,t,r){return this.agent.generate(this.page,o,t,r?.usePureVision)}async takeScreenshot(i){let o=await this.page.screenshot(),t=G.join(B.tmpdir(),`shiplight-screenshot-${Date.now()}.png`);return await N.writeFile(t,o),{screenshot:o.toString("base64"),screenshotPath:t}}async initializeCopilot(i,o){}async sendCopilotMessage(i,o,t,r){throw new Error("Copilot not supported in Playwright debug mode")}abortCopilot(i){return!1}getCopilotTestFlow(i){}async terminateSession(i){console.error("[debugger] Playwright session released")}async cleanupAll(){}};async function tt(e){let{yamlFilePath:i,port:o,page:t,agent:r}=e,n=new S(t,r),c=(0,F.default)();c.use(F.default.json({limit:"10mb"})),c.use((v,g,m)=>{if(g.setHeader("Access-Control-Allow-Origin","*"),g.setHeader("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, OPTIONS"),g.setHeader("Access-Control-Allow-Headers","Content-Type"),v.method==="OPTIONS")return g.sendStatus(204);m()});let{createTestFlowRouter:a}=await Promise.resolve().then(()=>(Se(),ye)),{createIntRunnerRouter:l}=await Promise.resolve().then(()=>(Te(),Me)),{createCopilotRouter:h}=await Promise.resolve().then(()=>(Ae(),ve));c.use(a(i)),c.use(l(n)),c.use(h(n));let d=await new Promise((v,g)=>{let m=c.listen(o,"localhost",()=>v(m));m.on("error",g)});return{url:`http://localhost:${o}`,close:async()=>{await n.cleanupAll(),await new Promise((v,g)=>{d.close(m=>m?g(m):v())})}}}0&&(module.exports={PlaywrightSandboxService,startPlaywrightDebugServer});