import{b as c,a as S}from"./constant-CWUMdlVX.js";import{d as A,__tla as I}from"./config-C0g_4z86.js";import{__tla as O}from"./build-yT0n5P2B.js";import{__tla as P}from"./oxide_parser_wasm-CcZ9_5i4.min.js";import{g as W}from"./intellisense-DbpUZH18.js";import{__tla as z}from"./monaco-editor-CCkURBm_.min.js";import{l as q}from"./logger-BTW-zIW3.js";import{c as T}from"./index.browser-CJrp5d7n.min.js";Promise.all([(()=>{try{return I}catch{}})(),(()=>{try{return O}catch{}})(),(()=>{try{return P}catch{}})(),(()=>{try{return z}catch{}})()]).then(async()=>{const v=()=>T("1234567890abcdefghijklmnopqrstuvwxyz",6)();function x(){let n=v();for(;n.match(/^\d/);)n=v();return`windpress${n}`}async function m(){c.$_state.globalVariables=c.$_state.globalVariables.filter(o=>o.category!=="windpress"),c.$_state.globalVariablesCategories.find(o=>o.id==="windpress")||c.$_state.globalVariablesCategories.push({id:"windpress",name:"WindPress"});const n=S.contentWindow.document.querySelector('script[type="text/tailwindcss"]'),i=A(n.textContent);(await W({volume:i})).forEach(o=>{c.$_state.globalVariables.push({id:x(),name:o.key.substring(2),value:o.value,category:"windpress"})})}new BroadcastChannel("windpress").addEventListener("message",async n=>{const i=n.data;i.source==="windpress/autocomplete"&&i.task==="windpress.code-editor.saved.done"&&setTimeout(()=>{m()},1e3)}),m();function C(){var g,E,k,L;if(c.$_state.activePanel!=="element"||!((E=(g=c.$_state)==null?void 0:g.activeElement)!=null&&E.id)||!((k=S)!=null&&k.contentWindow))return;const n=document.querySelector(".expand .options-wrapper"),i=n==null?void 0:n.querySelector(".searchable"),o=n==null?void 0:n.querySelector(".dropdown"),d=o==null?void 0:o.querySelectorAll(".variable-picker-item:not(.title)"),r=(L=document.querySelector(".variable-picker-button.open"))==null?void 0:L.previousElementSibling;if(!r||!(d!=null&&d.length)||!n||!o||!i)return;const $=e=>{var t;const a=((t=e.querySelector("span:first-of-type"))==null?void 0:t.textContent)??"";!r||!a||h(w(a))},j=e=>{var s;const a=((s=e.querySelector("span:first-of-type"))==null?void 0:s.textContent)??"";if(!r||!a)return;const t=w(a);r.value=t,r.click()},M=(e,a)=>{e.forEach(t=>{t.isIntersecting&&!t.target.classList.contains("open")&&t.target.click()})},f=()=>{h(V);const e=r.nextElementSibling;_.observe(e),n.removeEventListener("mouseleave",f)},y=(e,a)=>{e.forEach(t=>{const[s,u]=Object.entries(t)[0]||[];a.insertAdjacentHTML("beforeend",`