tekivex-ui 3.4.0 → 3.18.0
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.
- package/LICENSE +21 -21
- package/README.md +146 -33
- package/dist/agent.cjs +1 -0
- package/dist/agent.js +17 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.js +41 -22
- package/dist/experimental.cjs +1 -0
- package/dist/experimental.js +39 -0
- package/dist/headless.cjs +1 -1
- package/dist/headless.js +55 -1
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +31 -6
- package/dist/index.js +694 -571
- package/dist/quantum.cjs +1 -1
- package/dist/quantum.js +59 -74
- package/dist/realtime.cjs +1 -1
- package/dist/realtime.js +1 -1
- package/dist/src/agent/a2a/A2AClient.d.ts +32 -0
- package/dist/src/agent/a2a/a2aTool.d.ts +11 -0
- package/dist/src/agent/a2a/createA2ARoute.d.ts +5 -0
- package/dist/src/agent/bindings/solid.d.ts +12 -0
- package/dist/src/agent/bindings/svelte.d.ts +10 -0
- package/dist/src/agent/bindings/vanilla.d.ts +17 -0
- package/dist/src/agent/bindings/vue.d.ts +15 -0
- package/dist/src/agent/components/TkxAgentMessage.d.ts +15 -0
- package/dist/src/agent/components/TkxReasoningTrace.d.ts +9 -0
- package/dist/src/agent/components/TkxToolCallCard.d.ts +12 -0
- package/dist/src/agent/content/helpers.d.ts +17 -0
- package/dist/src/agent/core/Agent.d.ts +29 -0
- package/dist/src/agent/core/Memory.d.ts +12 -0
- package/dist/src/agent/core/Middleware.d.ts +10 -0
- package/dist/src/agent/core/Provider.d.ts +44 -0
- package/dist/src/agent/core/Sanitizer.d.ts +4 -0
- package/dist/src/agent/core/Tool.d.ts +13 -0
- package/dist/src/agent/core/Transport.d.ts +18 -0
- package/dist/src/agent/core/events.d.ts +19 -0
- package/dist/src/agent/core/sse.d.ts +6 -0
- package/dist/src/agent/core/types.d.ts +39 -0
- package/dist/src/agent/devtools/DevToolsPanel.d.ts +8 -0
- package/dist/src/agent/devtools/useEventCollector.d.ts +8 -0
- package/dist/src/agent/eval/runEval.d.ts +31 -0
- package/dist/src/agent/index.d.ts +54 -0
- package/dist/src/agent/mcp/MCPClient.d.ts +33 -0
- package/dist/src/agent/mcp/mcpAdapter.d.ts +3 -0
- package/dist/src/agent/memory/SlidingWindowMemory.d.ts +10 -0
- package/dist/src/agent/memory/SummarizingMemory.d.ts +16 -0
- package/dist/src/agent/memory/VectorMemory.d.ts +17 -0
- package/dist/src/agent/middleware/guardrails.d.ts +20 -0
- package/dist/src/agent/middleware/otel.d.ts +13 -0
- package/dist/src/agent/middleware/retry.d.ts +11 -0
- package/dist/src/agent/middleware/tokenUsage.d.ts +27 -0
- package/dist/src/agent/multi/agentAsTool.d.ts +11 -0
- package/dist/src/agent/providers/anthropic.d.ts +16 -0
- package/dist/src/agent/providers/gemini.d.ts +16 -0
- package/dist/src/agent/providers/ollama.d.ts +14 -0
- package/dist/src/agent/providers/openai.d.ts +16 -0
- package/dist/src/agent/rag/Retriever.d.ts +13 -0
- package/dist/src/agent/rag/retrievalTool.d.ts +11 -0
- package/dist/src/agent/react/useAgent.d.ts +12 -0
- package/dist/src/agent/replay/ReplayProvider.d.ts +13 -0
- package/dist/src/agent/replay/recorder.d.ts +16 -0
- package/dist/src/agent/research/DeepResearch.d.ts +37 -0
- package/dist/src/agent/research/citations.d.ts +10 -0
- package/dist/src/agent/server/createAgentClient.d.ts +11 -0
- package/dist/src/agent/server/createAgentRoute.d.ts +10 -0
- package/dist/src/agent/structured/generateObject.d.ts +19 -0
- package/dist/src/agent/tools/cancellable.d.ts +6 -0
- package/dist/src/charts/TkxDataExplorer.d.ts +17 -0
- package/dist/src/charts/index.d.ts +2 -0
- package/dist/src/components/TkxAccessibilityChecker.d.ts +12 -0
- package/dist/src/components/TkxAppBar.d.ts +2 -1
- package/dist/src/components/TkxButton.d.ts +1 -0
- package/dist/src/components/TkxCommandPalette.d.ts +32 -0
- package/dist/src/components/TkxDataGrid.d.ts +37 -1
- package/dist/src/components/TkxFlowChart.d.ts +52 -0
- package/dist/src/components/TkxFormBuilder.d.ts +34 -0
- package/dist/src/components/TkxFormulaBar.d.ts +19 -0
- package/dist/src/components/TkxFunnelChart.d.ts +21 -0
- package/dist/src/components/TkxGantt.d.ts +29 -0
- package/dist/src/components/TkxGauge.d.ts +21 -0
- package/dist/src/components/TkxHeatmap.d.ts +25 -0
- package/dist/src/components/TkxHolographic.d.ts +2 -0
- package/dist/src/components/TkxHolographicAdvanced.d.ts +48 -0
- package/dist/src/components/TkxMindMap.d.ts +22 -0
- package/dist/src/components/TkxPivotTable.d.ts +21 -0
- package/dist/src/components/TkxSparkline.d.ts +15 -0
- package/dist/src/components/TkxSpreadsheet.d.ts +33 -0
- package/dist/src/components/TkxTreemap.d.ts +21 -0
- package/dist/src/components/TkxTypography.d.ts +1 -1
- package/dist/src/components/index.d.ts +5 -3
- package/dist/src/engine/security.d.ts +3 -0
- package/dist/src/experimental/index.d.ts +8 -0
- package/dist/src/headless/index.d.ts +6 -0
- package/dist/src/headless/rhfBindings.d.ts +59 -0
- package/dist/src/headless/useFormState.d.ts +12 -2
- package/dist/src/headless/valibotResolver.d.ts +25 -0
- package/dist/src/headless/zodResolver.d.ts +25 -0
- package/dist/src/i18n/index.d.ts +20 -0
- package/dist/src/i18n/plurals.d.ts +4 -0
- package/dist/src/quantum/index.d.ts +0 -2
- package/dist/src/themes/index.d.ts +7 -1
- package/dist/themes.cjs +1 -0
- package/dist/themes.js +1 -0
- package/package.json +32 -8
- package/dist/chunk-BHX35YDv.js +0 -1
- package/dist/chunk-BpuJ3-K8.js +0 -1
- package/dist/chunk-Bze40nDX.js +0 -1
- package/dist/chunk-C8Wy8P59.js +0 -1
- package/dist/chunk-D7-yknXg.js +0 -1
- package/dist/chunk-DTO-RrPx.js +0 -3
- package/dist/chunk-DcVMayoM.js +0 -1
- package/dist/chunk-DdHSYetV.js +0 -1
- package/dist/chunk-DmRB1Blb.js +0 -1
package/dist/quantum.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunk-DmRB1Blb.js"),t=require("./chunk-BpuJ3-K8.js"),n=require("./chunk-D7-yknXg.js");let r=require("react");r=e.__toESM(r,1);let o=require("react/jsx-runtime");var i=class e{constructor(e,t){this.re=e,this.im=t}add(t){return new e(this.re+t.re,this.im+t.im)}sub(t){return new e(this.re-t.re,this.im-t.im)}mul(t){return new e(this.re*t.re-this.im*t.im,this.re*t.im+this.im*t.re)}scale(t){return new e(this.re*t,this.im*t)}conjugate(){return new e(this.re,-this.im)}magnitudeSquared(){return this.re*this.re+this.im*this.im}magnitude(){return Math.sqrt(this.magnitudeSquared())}static fromPolar(t,n){return new e(t*Math.cos(n),t*Math.sin(n))}static zero(){return new e(0,0)}static one(){return new e(1,0)}},a=class e{constructor(e=i.one(),t=i.zero()){this.alpha=e,this.beta=t,this.normalize()}normalize(){const e=Math.sqrt(this.alpha.magnitudeSquared()+this.beta.magnitudeSquared());e>0&&(this.alpha=this.alpha.scale(1/e),this.beta=this.beta.scale(1/e))}hadamard(){const t=1/Math.SQRT2;return new e(this.alpha.add(this.beta).scale(t),this.alpha.sub(this.beta).scale(t))}ry(t){const n=Math.cos(t/2),r=Math.sin(t/2);return new e(this.alpha.scale(n).sub(this.beta.scale(r)),this.alpha.scale(r).add(this.beta.scale(n)))}phase(t){const n=i.fromPolar(1,t);return new e(this.alpha,this.beta.mul(n))}measure(){const e=this.beta.magnitudeSquared();return Math.random()<e?1:0}expectation(){return this.beta.magnitudeSquared()}getAlpha(){return this.alpha}getBeta(){return this.beta}},l=class{constructor(e){this.qubits=Array.from({length:e},()=>new a)}get size(){return this.qubits.length}getQubit(e){return this.qubits[e]}superpose(){this.qubits=this.qubits.map(e=>e.hadamard())}cnot(e,t){const n=this.qubits[e],r=this.qubits[t],o=n.expectation();this.qubits[t]=r.ry(Math.PI*o)}rotate(e,t){this.qubits[e]=this.qubits[e].ry(t)}measure(){return this.qubits.map(e=>e.measure())}probs(){return this.qubits.map(e=>e.expectation())}},s=class{constructor(e=1,t=.995,n=.3,r=1e-6){this.temperature=e,this.coolingRate=t,this.tunnelingStrength=n,this.minTemp=r}anneal(e,t,n,r=1e3){let o=e,i=t(o),a=o,l=i,s=this.temperature,d=0,c=0;for(let p=0;p<r&&s>this.minTemp;p++){const e=n(o),r=t(e),p=r-i;let h=!1;if(p<=0)h=!0;else{const e=Math.exp(-p/s),t=Math.sqrt(2*Math.abs(p)),n=Math.abs(p),r=Math.exp(-2*t*Math.sqrt(n)*this.tunnelingStrength);Math.random()<e+r&&(h=!0,Math.random()<r/(e+r+1e-10)&&c++)}h&&(o=e,i=r,d++,i<l&&(a=o,l=i)),s*=this.coolingRate}return{state:a,energy:l,iterations:r,accepted:d,tunnels:c}}},d=class{constructor(e,t){const n=Math.sqrt(2/(e+t));this.weights=Array.from({length:e},()=>Array.from({length:t},()=>(2*Math.random()-1)*n)),this.visibleBias=Array.from({length:e},()=>0),this.hiddenBias=Array.from({length:t},()=>0)}sigmoid(e){const t=.1*(Math.random()-.5);return 1/(1+Math.exp(-(e+t)))}sample(e){return Math.random()<e?1:0}energy(e,t){const n=this.visibleBias.reduce((t,n,r)=>t+n*e[r],0),r=this.hiddenBias.reduce((e,n,r)=>e+n*t[r],0);let o=0;for(let i=0;i<e.length;i++)for(let n=0;n<t.length;n++)o+=e[i]*this.weights[i][n]*t[n];return-(n+r+o)}hiddenProbs(e){return this.hiddenBias.map((t,n)=>{const r=t+e.reduce((e,t,r)=>e+this.weights[r][n]*t,0);return this.sigmoid(r)})}visibleProbs(e){return this.visibleBias.map((t,n)=>{const r=t+e.reduce((e,t,r)=>e+this.weights[n][r]*t,0);return this.sigmoid(r)})}gibbs(e,t=1){let n=[...e],r=[];for(let o=0;o<t;o++)r=this.hiddenProbs(n).map(e=>this.sample(e)),n=this.visibleProbs(r).map(e=>this.sample(e));return{visible:n,hidden:r}}trainCD1(e,t=.01){const n=this.visibleBias.length,r=this.hiddenBias.length,o=Array.from({length:n},()=>Array(r).fill(0)),i=Array(n).fill(0),a=Array(r).fill(0);for(const s of e){const e=this.hiddenProbs(s),t=e.map(e=>this.sample(e)),l=this.visibleProbs(t).map(e=>this.sample(e)),d=this.hiddenProbs(l);for(let a=0;a<n;a++){for(let t=0;t<r;t++)o[a][t]+=s[a]*e[t]-l[a]*d[t];i[a]+=s[a]-l[a]}for(let n=0;n<r;n++)a[n]+=e[n]-d[n]}const l=e.length;for(let s=0;s<n;s++){for(let e=0;e<r;e++)this.weights[s][e]+=t*o[s][e]/l;this.visibleBias[s]+=t*i[s]/l}for(let s=0;s<r;s++)this.hiddenBias[s]+=t*a[s]/l}infer(e){const t=this.hiddenProbs(e),n=t.map(e=>this.sample(e));return{hidden:t,visible:this.visibleProbs(n),energy:this.energy(e,n),iterations:1}}},c=class{amplify(e,t,n=.5){const r=e.length;if(0===r)return[];const o=e.map(t),i=o.filter(e=>e>n).length,a=Math.max(1,i);let l=Array(r).fill(1/Math.sqrt(r));const s=Math.max(1,Math.floor(Math.PI/4*Math.sqrt(r/a)));for(let d=0;d<s;d++){for(let t=0;t<r;t++)o[t]>n&&(l[t]=-l[t]);const e=l.reduce((e,t)=>e+t,0)/r;l=l.map(t=>2*e-t)}return e.map((e,t)=>({index:t,amplitude:l[t],probability:l[t]*l[t],classicalSimilarity:o[t],combined:l[t]*l[t]*.6+.4*o[t]})).sort((e,t)=>t.combined-e.combined)}},p=[{keywords:["email","e-mail","mail"],type:"email",validations:[{rule:"required",message:"Email is required"},{rule:"pattern",value:"^[^@]+@[^@]+\\.[^@]+$",message:"Enter a valid email address"},{rule:"maxLength",value:254,message:"Email too long"}],placeholder:"you@example.com",label:"Email Address",confidence:.98},{keywords:["password","passwd","pwd","pass"],type:"password",validations:[{rule:"required",message:"Password is required"},{rule:"minLength",value:8,message:"Password must be at least 8 characters"},{rule:"pattern",value:"(?=.*[A-Z])(?=.*[0-9])",message:"Include uppercase and a number"}],placeholder:"••••••••",label:"Password",confidence:.97},{keywords:["confirm_password","confirmpassword","confirm_pass","repassword","password2","repeat_password"],type:"password",validations:[{rule:"required",message:"Please confirm your password"},{rule:"match",value:"password",message:"Passwords do not match"}],placeholder:"••••••••",label:"Confirm Password",confidence:.95},{keywords:["phone","mobile","cell","tel","telephone","contact_number"],type:"tel",validations:[{rule:"pattern",value:"^[+]?[(]?[0-9]{3}[)]?[-\\s.]?[0-9]{3}[-\\s.]?[0-9]{4,6}$",message:"Enter a valid phone number"}],placeholder:"+1 (555) 000-0000",label:"Phone Number",confidence:.93},{keywords:["age"],type:"number",validations:[{rule:"min",value:0,message:"Age cannot be negative"},{rule:"max",value:150,message:"Enter a valid age"},{rule:"integer",message:"Age must be a whole number"}],placeholder:"25",label:"Age",confidence:.9},{keywords:["price","amount","cost","fee","payment","salary","wage","total"],type:"number",validations:[{rule:"min",value:0,message:"Amount cannot be negative"},{rule:"pattern",value:"^\\d+(\\.\\d{1,2})?$",message:"Enter a valid amount (e.g. 9.99)"}],placeholder:"0.00",label:"Amount",confidence:.88},{keywords:["url","website","site","link","homepage","web"],type:"url",validations:[{rule:"pattern",value:"https?://.+",message:"Enter a valid URL starting with http:// or https://"}],placeholder:"https://example.com",label:"Website URL",confidence:.92},{keywords:["zip","zipcode","postal","postcode","pin_code"],type:"text",validations:[{rule:"pattern",value:"^[0-9]{5}(-[0-9]{4})?$",message:"Enter a valid ZIP code (e.g. 12345)"}],placeholder:"12345",label:"ZIP / Postal Code",confidence:.91},{keywords:["date","dob","birthday","birth_date","birthdate","born"],type:"date",validations:[{rule:"required",message:"Date is required"}],placeholder:"YYYY-MM-DD",label:"Date of Birth",confidence:.89},{keywords:["first_name","firstname","fname","given_name"],type:"text",validations:[{rule:"minLength",value:2,message:"First name too short"},{rule:"maxLength",value:50,message:"First name too long"}],placeholder:"Jane",label:"First Name",confidence:.9},{keywords:["last_name","lastname","lname","surname","family_name"],type:"text",validations:[{rule:"minLength",value:2,message:"Last name too short"},{rule:"maxLength",value:50,message:"Last name too long"}],placeholder:"Doe",label:"Last Name",confidence:.9},{keywords:["name","full_name","fullname","display_name"],type:"text",validations:[{rule:"minLength",value:2,message:"Name too short"},{rule:"maxLength",value:100,message:"Name too long"}],placeholder:"Jane Doe",label:"Full Name",confidence:.85},{keywords:["username","user_name","handle","login","loginname"],type:"text",validations:[{rule:"minLength",value:3,message:"Username must be at least 3 characters"},{rule:"maxLength",value:32,message:"Username too long"},{rule:"pattern",value:"^[a-zA-Z0-9_.-]+$",message:"Only letters, numbers, _, - and . allowed"}],placeholder:"cooluser42",label:"Username",confidence:.94},{keywords:["bio","biography","about","description","summary","details"],type:"textarea",validations:[{rule:"maxLength",value:500,message:"Bio must be under 500 characters"}],placeholder:"Tell us about yourself...",label:"Bio",confidence:.87},{keywords:["message","comment","feedback","note","notes","remarks","body"],type:"textarea",validations:[{rule:"minLength",value:10,message:"Message too short"},{rule:"maxLength",value:2e3,message:"Message too long"}],placeholder:"Write your message here...",label:"Message",confidence:.86},{keywords:["search","query","q","keyword","find"],type:"search",validations:[],placeholder:"Search...",label:"Search",confidence:.9},{keywords:["otp","one_time_password","verification_code","pin","code"],type:"text",validations:[{rule:"minLength",value:4,message:"Code too short"},{rule:"maxLength",value:8,message:"Code too long"},{rule:"pattern",value:"^[0-9]+$",message:"Code must be numeric"}],placeholder:"123456",label:"Verification Code",confidence:.92},{keywords:["color","colour","hex_color","brand_color"],type:"color",validations:[],placeholder:"#3b82f6",label:"Color",confidence:.95},{keywords:["address","street","street_address","addr"],type:"text",validations:[{rule:"maxLength",value:200,message:"Address too long"}],placeholder:"123 Main Street",label:"Street Address",confidence:.87},{keywords:["city","town","municipality"],type:"text",validations:[{rule:"maxLength",value:100,message:"City name too long"}],placeholder:"San Francisco",label:"City",confidence:.89},{keywords:["country","nation","country_code"],type:"text",validations:[],placeholder:"United States",label:"Country",confidence:.88},{keywords:["company","organization","org","employer","company_name"],type:"text",validations:[{rule:"maxLength",value:200,message:"Company name too long"}],placeholder:"Acme Inc.",label:"Company",confidence:.87}];function h(e){const t=e.toLowerCase().replace(/[\s-]/g,"_"),n=(new c).amplify(p,e=>{let n=0;for(const r of e.keywords)t===r?n=Math.max(n,1):t.includes(r)||r.includes(t)?n=Math.max(n,.8):r.split("_").some(e=>t.includes(e))&&(n=Math.max(n,.5));return n},.3);if(n.length>0&&n[0].combined>.1){const e=p[n[0].index];return{type:e.type,validations:e.validations,placeholder:e.placeholder,confidence:Math.min(e.confidence*n[0].combined*2,.99),label:e.label}}return{type:"text",validations:[{rule:"maxLength",value:255,message:"Input too long"}],placeholder:e.replace(/_/g," "),confidence:.3,label:e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}}function u(e,t,n){const r=n/100,o=t/100*Math.min(r,1-r),i=t=>{const n=(t+e/30)%12,i=r-o*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*i).toString(16).padStart(2,"0")};return`#${i(0)}${i(8)}${i(4)}`}function g(e){const[t,n,r]=function(e){const t=e.replace("#",""),n=3===t.length?t.split("").map(e=>e+e).join(""):t;return[parseInt(n.slice(0,2),16),parseInt(n.slice(2,4),16),parseInt(n.slice(4,6),16)]}(e).map(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*t+.7152*n+.0722*r}function m(e,t){const n=g(e),r=g(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function f(e,t,n){return Math.max(t,Math.min(n,e))}function y(e,t,n=800){const r=t?{primary:{h:e,s:70,l:55},secondary:{h:(e+137.5)%360,s:65,l:50},bg:{h:e,s:10,l:8},surface:{h:e,s:10,l:13},text:{h:e,s:15,l:90},border:{h:e,s:15,l:22},accent:{h:(e+120)%360,s:75,l:60}}:{primary:{h:e,s:65,l:40},secondary:{h:(e+137.5)%360,s:55,l:38},bg:{h:e,s:15,l:97},surface:{h:e,s:12,l:100},text:{h:e,s:15,l:12},border:{h:e,s:12,l:85},accent:{h:(e+120)%360,s:70,l:42}};return function(e,t){const n=e=>u(e.h,e.s,e.l),r=t?e.text.l-20:e.text.l+15;return{primary:n(e.primary),secondary:n(e.secondary),background:n(e.bg),surface:n(e.surface),text:n(e.text),textMuted:u(e.text.h,Math.max(0,e.text.s-10),Math.max(20,Math.min(85,r))),border:n(e.border),error:t?"#f87171":"#dc2626",warning:t?"#fbbf24":"#d97706",success:t?"#34d399":"#059669",accent:n(e.accent)}}(new s(1.5,.994,.35,1e-5).anneal(r,e=>function(e,t){let n=0;const r=e=>u(e.h,e.s,e.l),o=r(e.text),i=r(e.bg),a=r(e.surface),l=r(e.primary),s=m(o,i),d=m(o,a),c=m(l,i);s<4.5&&(n+=10*(4.5-s)),d<4.5&&(n+=8*(4.5-d)),c<3&&(n+=5*(3-c)),n+=.05*Math.abs((e.secondary.h-e.primary.h+360)%360-137.508),n+=.03*Math.abs((e.accent.h-e.primary.h+360)%360-120);const p=(e.primary.s+e.secondary.s)/2;p<20&&(n+=.5*(20-p)),p>90&&(n+=.5*(p-90));const h=e.bg.l;t?(h>25&&(n+=2*(h-25)),h<3&&(n+=2*(3-h)),e.text.l<70&&(n+=1.5*(70-e.text.l))):(h<90&&(n+=2*(90-h)),h>100&&(n+=2*(h-100)),e.text.l>30&&(n+=1.5*(e.text.l-30)));const g=Math.abs(e.surface.l-e.bg.l);return g<2&&(n+=2*(2-g)),g>12&&(n+=1*(g-12)),n}(e,t),e=>{const t=["primary","secondary","bg","surface","text","border","accent"],n=t[Math.floor(Math.random()*t.length)],r=["h","s","l"],o=r[Math.floor(Math.random()*r.length)],i=(Math.random()-.5)*("h"===o?30:15),a={...e,[n]:{...e[n]}};return a[n]="h"===o?{...a[n],h:(e[n].h+i+360)%360}:"s"===o?{...a[n],s:f(e[n].s+i,0,100)}:{...a[n],l:f(e[n].l+i,0,100)},a},n).state,t)}var x={qubit:()=>new a,register:e=>new l(e),annealer:(e,t,n)=>new s(e,t,n),qbm:(e,t)=>new d(e,t),amplifier:()=>new c,inferField:h,optimizeTheme:y,contrast:m,hslToHex:u};function b(e,t,n,r){const o=n.trim();switch(e){case"required":return""!==o;case"email":case"pattern":if("string"==typeof t)try{return""===o||new RegExp(t).test(o)}catch{return!0}return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o);case"phone":return""===o||/^\+?[\d\s\-()]{7,15}$/.test(o);case"url":return""===o||/^https?:\/\/.+/.test(o);case"minLength":case"min":{const e=Number(t??0);return""===o||(isNaN(Number(o))?o.length>=e:Number(o)>=e)}case"maxLength":case"max":{const e=Number(t??1/0);return""===o||(isNaN(Number(o))?o.length<=e:Number(o)<=e)}case"integer":return""===o||/^\d+$/.test(o);case"alphanumeric":return""===o||/^[a-zA-Z0-9]+$/.test(o);case"match":return o===(r["string"==typeof t?t:"password"]??"");default:return!0}}function v({phase:e,collapsed:t,primaryColor:n,borderColor:r}){const i=12,a=t?0:e,l=t?0:1.618*e,s=i+10*Math.sin(a)*Math.cos(l),d=12-10*Math.cos(a);return(0,o.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",style:{flexShrink:0,opacity:t?.4:1,transition:"opacity 0.6s"},children:[(0,o.jsx)("circle",{cx:i,cy:12,r:10,fill:"none",stroke:r,strokeWidth:"0.8"}),(0,o.jsx)("ellipse",{cx:i,cy:12,rx:10,ry:3,fill:"none",stroke:r,strokeWidth:"0.5",strokeDasharray:"2 2"}),(0,o.jsx)("line",{x1:i,y1:2,x2:i,y2:22,stroke:r,strokeWidth:"0.5"}),(0,o.jsx)("line",{x1:i,y1:12,x2:s,y2:d,stroke:n,strokeWidth:"1.5",style:{transition:t?"all 0.6s ease-out":"none"}}),(0,o.jsx)("circle",{cx:s,cy:d,r:"2",fill:n,style:{transition:t?"all 0.6s ease-out":"none"}})]})}function k({confidence:e,theme:t}){const n=Math.round(100*e),r=n>=80?t.success:n>=60?t.warning:t.danger;return(0,o.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",fontSize:"10px",fontWeight:600,padding:"1px 5px",borderRadius:"999px",backgroundColor:`${r}22`,color:r,border:`1px solid ${r}44`,marginLeft:"6px",verticalAlign:"middle",letterSpacing:"0.03em"},children:["⚛ ",n,"%"]})}function w({config:e,intel:t,qubitPhase:r,value:i,error:a,touched:l,showConfidence:s,showQuantumState:d,collapsed:c,onChange:p,onBlur:h,theme:u,mounted:g,index:m}){const f=e.type??t.type,y=e.label??t.label,x=e.placeholder??t.placeholder,b=void 0!==e.required?e.required:t.validations.some(e=>"required"===e.rule),w=n.sanitizeString(y),S="textarea"===f,C=l&&""!==a,M=`qf-${e.name}`,z={width:"100%",padding:"9px 12px",border:`1.5px solid ${C?u.danger:u.border}`,borderRadius:"8px",backgroundColor:u.surface,color:u.text,fontSize:"14px",fontFamily:"inherit",outline:"none",boxSizing:"border-box",transition:"border-color 0.15s, box-shadow 0.15s",resize:S?"vertical":void 0,minHeight:S?"80px":void 0};return(0,o.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"4px",opacity:g?1:0,transform:g?"scaleY(1)":"scaleY(0.92)",transition:`opacity 0.35s ease ${60*m}ms, transform 0.35s ease ${60*m}ms`,transformOrigin:"top"},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[d&&(0,o.jsx)(v,{phase:r,collapsed:c,primaryColor:u.primary,borderColor:u.border}),(0,o.jsxs)("label",{htmlFor:M,style:{fontSize:"13px",fontWeight:500,color:u.text,cursor:"pointer"},children:[w,b&&(0,o.jsx)("span",{"aria-hidden":"true",style:{color:u.danger,marginLeft:"3px"},children:"*"})]}),s&&(0,o.jsx)(k,{confidence:t.confidence,theme:u})]}),S?(0,o.jsx)("textarea",{id:M,value:i,onChange:e=>p(e.target.value),onBlur:h,placeholder:x,"aria-invalid":C,"aria-required":b,style:z}):(0,o.jsx)("input",{id:M,type:f,value:i,onChange:e=>p(e.target.value),onBlur:h,placeholder:x,"aria-invalid":C,"aria-required":b,style:z}),C&&(0,o.jsxs)("span",{role:"alert",style:{fontSize:"12px",color:u.danger,display:"flex",alignItems:"center",gap:"4px"},children:[(0,o.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,o.jsx)("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),n.sanitizeString(a)]})]})}function S(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return(65535&t)/65535*Math.PI*2}function C({fields:e,onSubmit:i,submitLabel:a="Submit",layout:l="vertical",showConfidence:s=!0,showQuantumState:d=!1}){const c=t.useTheme(),p=e.map(e=>h(e.name)),[u,g]=(0,r.useState)(()=>Object.fromEntries(e.map(e=>[e.name,""]))),[m,f]=(0,r.useState)({}),[y,x]=(0,r.useState)({}),[v,k]=(0,r.useState)(!1),[C,M]=(0,r.useState)(!1),[z,T]=(0,r.useState)(!1);(0,r.useEffect)(()=>{const e=requestAnimationFrame(()=>M(!0));return()=>cancelAnimationFrame(e)},[]);const $=(0,r.useCallback)((t,n)=>{const r=e.find(e=>e.name===t),o=p[e.findIndex(e=>e.name===t)];if(!r||!o)return"";const i=n[t]??"";for(const{rule:e,value:a,message:l}of o.validations)if(("required"!==e||!1!==r.required)&&!b(e,a,i,n))return l;return""},[e]),A=(0,r.useCallback)(t=>{const n={};for(const r of e){const e=$(r.name,t);e&&(n[r.name]=e)}return n},[e,$]),W=(0,r.useCallback)((t,n)=>{g(r=>{const o={...r,[t]:n};if(y[t]&&(f(e=>({...e,[t]:$(t,o)})),"password"===t)){const t=e.find(e=>["confirmpassword","confirm_password","passwordconfirm"].includes(e.name.toLowerCase().replace(/[\s_-]/g,"")))?.name;t&&y[t]&&f(e=>({...e,[t]:$(t,o)}))}return o}),T(!0)},[e,y,$]),R=(0,r.useCallback)(e=>{x(t=>({...t,[e]:!0})),f(t=>({...t,[e]:$(e,u)}))},[u,$]),B=(0,r.useCallback)(async t=>{t.preventDefault(),x(Object.fromEntries(e.map(e=>[e.name,!0])));const n=A(u);if(f(n),!(Object.keys(n).length>0)){k(!0);try{await i(u)}finally{k(!1)}}},[e,u,A,i]),F=p.length>0?Math.round(p.reduce((e,t)=>e+t.confidence,0)/p.length*100):0,L=F>=80?c.success:F>=60?c.warning:c.danger,I="horizontal"===l;return(0,o.jsxs)("form",{onSubmit:B,noValidate:!0,className:n.tkx("w-full"),style:{backgroundColor:c.surface,border:`1px solid ${c.border}`,borderRadius:"12px",padding:"24px",position:"relative",boxSizing:"border-box"},children:[(0,o.jsx)("span",{"aria-label":"Powered by Quantum AI",style:{position:"absolute",top:"16px",right:"16px",fontSize:"10px",fontWeight:700,padding:"3px 8px",borderRadius:"999px",backgroundColor:`${c.primary}20`,color:c.primary,border:`1px solid ${c.primary}44`,letterSpacing:"0.04em",userSelect:"none"},children:"⚛ Quantum AI"}),s&&(0,o.jsxs)("div",{style:{marginBottom:"20px",paddingRight:"100px"},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"4px"},children:[(0,o.jsx)("span",{style:{fontSize:"11px",color:c.textMuted,fontWeight:500},children:"Form Intelligence Confidence"}),(0,o.jsxs)("span",{style:{fontSize:"11px",fontWeight:700,color:L},children:[F,"%"]})]}),(0,o.jsx)("div",{style:{height:"4px",borderRadius:"4px",backgroundColor:c.border,overflow:"hidden"},children:(0,o.jsx)("div",{style:{height:"100%",width:`${F}%`,backgroundColor:L,borderRadius:"4px",transition:"width 0.8s ease"}})})]}),(0,o.jsx)("div",{style:{display:"grid",gridTemplateColumns:I?"repeat(auto-fill, minmax(260px, 1fr))":"1fr",gap:"16px",marginBottom:"20px"},children:e.map((e,t)=>(0,o.jsx)(w,{config:e,intel:p[t],qubitPhase:S(e.name),value:u[e.name]??"",error:m[e.name]??"",touched:y[e.name]??!1,showConfidence:s,showQuantumState:d,collapsed:z,onChange:t=>W(e.name,t),onBlur:()=>R(e.name),theme:c,mounted:C,index:t},e.name))}),(0,o.jsx)("button",{type:"submit",disabled:v,style:{width:"100%",padding:"10px 20px",borderRadius:"8px",border:"none",backgroundColor:v?`${c.primary}88`:c.primary,color:c.bg,fontSize:"14px",fontWeight:700,fontFamily:"inherit",cursor:v?"not-allowed":"pointer",transition:"background-color 0.15s, opacity 0.15s",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"},children:v?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{animation:"qf-spin 0.8s linear infinite"},"aria-hidden":"true",children:[(0,o.jsx)("circle",{cx:"12",cy:"12",r:"10",strokeOpacity:"0.25"}),(0,o.jsx)("path",{d:"M12 2a10 10 0 0 1 10 10"})]}),"Processing…"]}):n.sanitizeString(a)}),(0,o.jsx)("style",{children:"@keyframes qf-spin { to { transform: rotate(360deg); } }"})]})}function M(e){return e?{primary:"#00f5d4",secondary:"#7b2ff7",background:"#0a0a0f",surface:"#12121a",text:"#e8e8f4",textMuted:"#8888aa",border:"#2a2a3e",error:"#f87171",warning:"#fbbf24",success:"#34d399",accent:"#ff6b6b"}:{primary:"#0d7c5f",secondary:"#6930c3",background:"#f8f6f1",surface:"#ffffff",text:"#1a1815",textMuted:"#6b6560",border:"#ddd8cc",error:"#dc2626",warning:"#d97706",success:"#059669",accent:"#e05a00"}}function z({points:e,primary:t}){if(e.length<2)return(0,o.jsx)("div",{style:{height:48,display:"flex",alignItems:"center",justifyContent:"center",color:"#888",fontSize:12},children:"Waiting for data..."});const n=Math.max(...e.map(e=>e.energy)),r=Math.min(...e.map(e=>e.energy)),i=n-r||1,a=e[e.length-1].iteration||1;return(0,o.jsxs)("svg",{width:280,height:48,style:{display:"block"},children:[(0,o.jsx)("polyline",{points:e.map(e=>{const t=e.iteration/a*280,n=48-(e.energy-r)/i*44-2;return`${t.toFixed(1)},${n.toFixed(1)}`}).join(" "),fill:"none",stroke:t,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",opacity:.9}),(0,o.jsxs)("text",{x:2,y:10,fontSize:9,fill:"#888",children:["E=",n.toFixed(1)]}),(0,o.jsxs)("text",{x:2,y:46,fontSize:9,fill:"#888",children:["E=",r.toFixed(1)]})]})}function T({label:e,value:t,onChange:n,text:r,border:i}){return(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[(0,o.jsx)("input",{type:"color",value:t,onChange:e=>n(e.target.value),style:{width:32,height:32,border:`1px solid ${i}`,borderRadius:6,padding:2,cursor:"pointer",background:"transparent"}}),(0,o.jsx)("div",{style:{width:60,height:28,borderRadius:6,background:t,border:`1px solid ${i}`}}),(0,o.jsx)("span",{style:{flex:1,fontSize:13,color:r,fontFamily:"monospace"},children:e}),(0,o.jsx)("code",{style:{fontSize:12,color:r,opacity:.7,fontFamily:"monospace"},children:t})]})}function $({label:e,ratio:t}){const n=t>=4.5,r=t>=4.5,i=t>=7;return(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,o.jsx)("span",{style:{fontSize:11,opacity:.8,minWidth:140},children:e}),(0,o.jsxs)("span",{style:{fontSize:12,fontWeight:600},children:[t.toFixed(2),":1"]}),(0,o.jsx)("span",{style:{fontSize:11,color:r?"#22c55e":"#ef4444"},children:r?"✓ AA":"✗ AA"}),(0,o.jsx)("span",{style:{fontSize:11,color:i?"#22c55e":"#888"},children:i?"✓ AAA":"— AAA"}),(0,o.jsx)("span",{style:{fontSize:13},children:n?"✅":"❌"})]})}C.displayName="TkxQuantumForm";var A=["fetch(","XMLHttpRequest","navigator.sendBeacon","document.cookie","localStorage","sessionStorage","indexedDB","WebSocket","EventSource","import(","eval(","new Function(","postMessage","window.open","location.href","location.replace","location.assign","document.write","crypto.subtle"],W=[{label:"Hello World",code:"<div style={{ padding: 24, fontFamily: 'sans-serif', color: '#e8e8f4' }}>\n <h2 style={{ margin: 0 }}>👋 Hello, TkxPlayground!</h2>\n <p style={{ marginTop: 8, opacity: 0.7 }}>Edit the code on the left to see live updates.</p>\n</div>"},{label:"Button Styles",code:"<div style={{ display: 'flex', gap: 12, flexWrap: 'wrap', padding: 24 }}>\n {['primary', 'success', 'danger', 'warning', 'info'].map(color => (\n <button\n key={color}\n style={{\n padding: '8px 18px',\n borderRadius: 8,\n border: 'none',\n background: color === 'primary' ? '#00f5d4' : color === 'success' ? '#06d6a0' : color === 'danger' ? '#f72585' : color === 'warning' ? '#ffbe0b' : '#3a86ff',\n color: '#0a0a0f',\n fontWeight: 700,\n cursor: 'pointer',\n textTransform: 'capitalize',\n }}\n >\n {color}\n </button>\n ))}\n</div>"},{label:"Card Grid",code:"<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 16, padding: 24 }}>\n {['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Zeta'].map(name => (\n <div key={name} style={{\n background: '#1a1a2e',\n borderRadius: 10,\n border: '1px solid #2a2a3e',\n padding: '16px',\n }}>\n <div style={{ fontWeight: 700, color: '#00f5d4', marginBottom: 4 }}>{name}</div>\n <div style={{ fontSize: 12, color: '#8888aa' }}>Quantum module {name.toLowerCase()}</div>\n </div>\n ))}\n</div>"},{label:"Animated Counter",code:"(() => {\n const [count, setCount] = React.useState(0);\n return (\n <div style={{ padding: 32, textAlign: 'center', fontFamily: 'sans-serif' }}>\n <div style={{ fontSize: 64, fontWeight: 900, color: '#00f5d4', marginBottom: 16 }}>\n {count}\n </div>\n <div style={{ display: 'flex', gap: 12, justifyContent: 'center' }}>\n <button onClick={() => setCount(c => c - 1)} style={{ padding: '8px 20px', borderRadius: 8, border: '1px solid #2a2a3e', background: '#1a1a2e', color: '#e8e8f4', fontSize: 20, cursor: 'pointer' }}>−</button>\n <button onClick={() => setCount(0)} style={{ padding: '8px 20px', borderRadius: 8, border: '1px solid #2a2a3e', background: '#1a1a2e', color: '#8888aa', cursor: 'pointer' }}>Reset</button>\n <button onClick={() => setCount(c => c + 1)} style={{ padding: '8px 20px', borderRadius: 8, border: '1px solid #2a2a3e', background: '#1a1a2e', color: '#e8e8f4', fontSize: 20, cursor: 'pointer' }}>+</button>\n </div>\n </div>\n );\n})()"},{label:"Data Table",code:"(() => {\n const rows = [\n { id: 1, name: 'Hydrogen', symbol: 'H', mass: 1.008 },\n { id: 2, name: 'Helium', symbol: 'He', mass: 4.003 },\n { id: 3, name: 'Lithium', symbol: 'Li', mass: 6.941 },\n { id: 4, name: 'Carbon', symbol: 'C', mass: 12.011 },\n { id: 5, name: 'Nitrogen', symbol: 'N', mass: 14.007 },\n ];\n const cell = { padding: '8px 14px', borderBottom: '1px solid #2a2a3e', color: '#e8e8f4', fontSize: 13 };\n const hcell = { ...cell, color: '#8888aa', fontWeight: 600, fontSize: 11, textTransform: 'uppercase', letterSpacing: '0.06em' };\n return (\n <div style={{ padding: 16 }}>\n <table style={{ width: '100%', borderCollapse: 'collapse', fontFamily: 'sans-serif' }}>\n <thead>\n <tr>{['ID','Element','Symbol','Atomic Mass'].map(h => <th key={h} style={hcell}>{h}</th>)}</tr>\n </thead>\n <tbody>\n {rows.map(r => (\n <tr key={r.id} style={{ transition: 'background 0.15s' }}>\n <td style={cell}>{r.id}</td>\n <td style={cell}>{r.name}</td>\n <td style={{ ...cell, color: '#00f5d4', fontWeight: 700 }}>{r.symbol}</td>\n <td style={cell}>{r.mass}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n})()"}],R=class extends r.default.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){this.props.onError(e.message)}componentDidUpdate(e){e.children!==this.props.children&&this.state.hasError&&this.setState({hasError:!1})}render(){return this.state.hasError?null:this.props.children}};function B({code:e,lineHeight:t}){const n=e.split("\n");return(0,o.jsx)("div",{"aria-hidden":"true",style:{position:"absolute",top:0,left:0,width:"36px",padding:"12px 0",textAlign:"right",paddingRight:"8px",userSelect:"none",pointerEvents:"none",fontSize:"12px",lineHeight:`${t}px`,color:"#555577",fontFamily:'"Fira Code", "Cascadia Code", "Consolas", monospace',boxSizing:"border-box"},children:n.map((e,t)=>(0,o.jsx)("div",{children:t+1},t))})}var F=["TkxButton","TkxInput","TkxCard","TkxModal","TkxTable","TkxSelect","TkxCheckbox","TkxRadio","TkxSwitch","TkxSlider","TkxBadge","TkxAlert","TkxToast","TkxTooltip","TkxPopover","TkxTabs","TkxAccordion","TkxDrawer","TkxDropdown","TkxMenu","TkxForm","TkxDataGrid","TkxChart","TkxSpinner","TkxSkeleton","TkxAvatar","TkxTag","TkxDivider","TkxProgress","TkxStatistic","TkxQuantumForm","TkxPlayground"],L=new c;function I(e){const t=e.match(/([A-Z][a-zA-Z0-9]*)$/);return t?t[1]:""}function P({defaultCode:e,examples:n,height:i=480,imports:a={},strictMode:l=!0,forbiddenTokens:s}){const d=t.useTheme(),c=[...W,...n??[]],p=e??W[0].code,[h,u]=(0,r.useState)(p),[g,m]=(0,r.useState)({element:null,error:null,renderMs:0}),[f,y]=(0,r.useState)(null),[x,b]=(0,r.useState)([]),[v,k]=(0,r.useState)(!1),[w,S]=(0,r.useState)(0),C=(0,r.useRef)(null),M=(0,r.useRef)(null),z=(0,r.useCallback)(e=>{y(null),m(function(e,t,n){const o=performance.now();try{const i=e.trim();if(!1!==n?.strictMode){const e=function(e,t){const n=[...A,...t??[]],r=e.toLowerCase();for(const o of n)if(r.includes(o.toLowerCase()))return o;return null}(i,n?.forbiddenTokens);if(e)return{element:null,error:`Blocked by playground strictMode: code contains "${e}". This token is disallowed because playground snippets run in the page's JavaScript context. If you trust the source, pass strictMode={false} to <TkxPlayground>.`,renderMs:parseFloat((performance.now()-o).toFixed(2))}}let a=`\n function PlaygroundRoot() {\n ${i.startsWith("<")||i.startsWith("(")?`return (${i});`:i}\n }\n `;const l="undefined"==typeof window?null:window.Babel??null;l&&(a=l.transform(a,{presets:["react"],filename:"playground.jsx"}).code??a);const s=new Function("React","imports",`\n "use strict";\n const { ${Object.keys(t).join(", ")} } = imports;\n ${a}\n return PlaygroundRoot;\n `)(r.default,t);return{element:r.default.createElement(s),error:null,renderMs:parseFloat((performance.now()-o).toFixed(2))}}catch(i){const e=parseFloat((performance.now()-o).toFixed(2));return{element:null,error:i instanceof Error?i.message:String(i),renderMs:e}}}(e,a,{strictMode:l,forbiddenTokens:s}))},[a,l,s]);(0,r.useEffect)(()=>(M.current&&clearTimeout(M.current),M.current=setTimeout(()=>z(h),300),()=>{M.current&&clearTimeout(M.current)}),[h,z]),(0,r.useEffect)(()=>{z(p)},[]);const T=(0,r.useCallback)(e=>{const t=e.target.value;u(t);const n=I(t);n.length>=2?b(function(e,t=4){if(!e||e.length<2)return[];const n=e.toLowerCase();return L.amplify(F,e=>{const t=e.toLowerCase();if(t.startsWith(n))return 1;if(t.includes(n))return.7;let r=0;for(let o=0;o<n.length-1;o++)t.includes(n.slice(o,o+2))&&(r+=.15);return Math.min(r,.5)},.1).slice(0,t).map(e=>({name:F[e.index]??"",amplitude:parseFloat(e.combined.toFixed(3))})).filter(e=>""!==e.name)}(n,4)):b([])},[]),$=(0,r.useCallback)(e=>{const t=c[e];t&&(S(e),u(t.code),b([]))},[c]),P=(0,r.useCallback)(async()=>{try{await navigator.clipboard.writeText(h),k(!0),setTimeout(()=>k(!1),1500)}catch{}},[h]),q=(0,r.useCallback)(()=>{u(p),S(0),b([])},[p]),_=(0,r.useCallback)(e=>{const t=I(h);t&&u(n=>n.slice(0,n.lastIndexOf(t))+e),b([])},[h]),E=null!==g.error||null!==f,D=g.error??f??"",j=d.bg,N=d.surfaceAlt,H=d.border,O=d.surface,Q={width:"50%",display:"flex",flexDirection:"column",borderRight:`1px solid ${H}`,position:"relative"},Z={display:"flex",alignItems:"center",gap:"6px",padding:"6px 10px",borderBottom:`1px solid ${H}`,backgroundColor:d.surface,flexWrap:"wrap"},U={padding:"3px 10px",borderRadius:"6px",border:`1px solid ${H}`,backgroundColor:"transparent",color:d.textMuted,fontSize:"11px",fontWeight:600,cursor:"pointer",fontFamily:"inherit",transition:"color 0.15s, border-color 0.15s"};return(0,o.jsxs)("div",{style:{display:"flex",flexDirection:"column",border:`1px solid ${H}`,borderRadius:"12px",overflow:"hidden",backgroundColor:j,fontFamily:"inherit",boxSizing:"border-box",position:"relative"},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",borderBottom:`1px solid ${H}`,backgroundColor:d.surface},children:[(0,o.jsx)("span",{style:{fontSize:"12px",fontWeight:700,color:d.primary,letterSpacing:"0.05em"},children:"⚛ TkxPlayground"}),(0,o.jsx)("span",{style:{fontSize:"10px",color:d.textMuted},children:"Live JSX Preview"})]}),(0,o.jsx)("div",{style:{display:"flex",gap:"4px",padding:"6px 10px",borderBottom:`1px solid ${H}`,backgroundColor:d.surface,overflowX:"auto"},children:c.map((e,t)=>(0,o.jsx)("button",{onClick:()=>$(t),style:{padding:"3px 10px",borderRadius:"6px",border:`1px solid ${t===w?d.primary:H}`,backgroundColor:t===w?`${d.primary}20`:"transparent",color:t===w?d.primary:d.textMuted,fontSize:"11px",fontWeight:t===w?700:400,cursor:"pointer",whiteSpace:"nowrap",fontFamily:"inherit",transition:"all 0.15s"},children:e.label},t))}),(0,o.jsxs)("div",{style:{display:"flex",height:`${i}px`},children:[(0,o.jsxs)("div",{style:Q,children:[(0,o.jsxs)("div",{style:Z,children:[(0,o.jsx)("span",{style:{fontSize:"11px",color:d.textMuted,marginRight:"auto"},children:"editor.tsx"}),(0,o.jsx)("button",{onClick:P,style:U,title:"Copy code",children:v?"✓ Copied":"⎘ Copy"}),(0,o.jsx)("button",{onClick:q,style:U,title:"Reset to default",children:"↺ Reset"})]}),(0,o.jsxs)("div",{style:{position:"relative",flex:1,overflow:"hidden"},children:[(0,o.jsx)(B,{code:h,lineHeight:18}),(0,o.jsx)("textarea",{ref:C,value:h,onChange:T,spellCheck:!1,autoCorrect:"off",autoCapitalize:"off",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",padding:"12px 12px 12px 44px",margin:0,border:"none",outline:"none",resize:"none",backgroundColor:j,color:d.text,fontSize:"12px",lineHeight:"18px",fontFamily:'"Fira Code", "Cascadia Code", "Consolas", "Courier New", monospace',boxSizing:"border-box",overflowY:"auto",tabSize:2}})]}),x.length>0&&(0,o.jsxs)("div",{style:{position:"absolute",bottom:"40px",left:"44px",zIndex:10,backgroundColor:d.surface,border:`1px solid ${d.primary}44`,borderRadius:"8px",overflow:"hidden",boxShadow:"0 4px 16px rgba(0,0,0,0.3)",minWidth:"180px"},children:[(0,o.jsx)("div",{style:{padding:"4px 10px 4px",fontSize:"10px",color:d.primary,fontWeight:700,borderBottom:`1px solid ${H}`,letterSpacing:"0.05em"},children:"⚛ Quantum Suggestions"}),x.map(e=>(0,o.jsxs)("button",{onClick:()=>_(e.name),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"6px 10px",border:"none",backgroundColor:"transparent",color:d.text,fontSize:"12px",fontFamily:'"Fira Code", monospace',cursor:"pointer",textAlign:"left",gap:"12px"},children:[(0,o.jsx)("span",{children:e.name}),(0,o.jsxs)("span",{style:{fontSize:"10px",color:d.textMuted,flexShrink:0},children:[Math.round(100*e.amplitude),"%"]})]},e.name))]})]}),(0,o.jsxs)("div",{style:{width:"50%",display:"flex",flexDirection:"column"},children:[(0,o.jsx)("div",{style:{padding:"6px 10px",borderBottom:`1px solid ${H}`,backgroundColor:d.surface,fontSize:"11px",color:d.textMuted,fontWeight:600},children:"Preview"}),(0,o.jsx)("div",{style:{flex:1,overflow:"auto",backgroundColor:N,position:"relative"},children:E?(0,o.jsxs)("div",{style:{padding:"16px",color:d.danger,fontFamily:'"Fira Code", monospace',fontSize:"12px",lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[(0,o.jsxs)("div",{style:{marginBottom:"8px",fontWeight:700,display:"flex",alignItems:"center",gap:"6px"},children:[(0,o.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,o.jsx)("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),"Runtime Error"]}),D]}):(0,o.jsx)(R,{onError:y,children:(0,o.jsx)("div",{style:{minHeight:"100%"},children:g.element})})})]})]}),(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"16px",padding:"4px 12px",backgroundColor:O,borderTop:`1px solid ${H}`,fontSize:"11px",color:d.textMuted},children:[(0,o.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"4px",color:E?d.danger:d.success,fontWeight:600},children:[(0,o.jsx)("span",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:E?d.danger:d.success,display:"inline-block"}}),E?"Error":"OK"]}),(0,o.jsxs)("span",{children:["⏱ ",g.renderMs," ms"]}),(0,o.jsxs)("span",{children:[h.split("\n").length," lines"]}),(0,o.jsxs)("span",{children:[h.length," chars"]}),x.length>0&&(0,o.jsxs)("span",{style:{marginLeft:"auto",color:d.primary,fontWeight:600},children:["⚛ ",x.length," suggestion",x.length>1?"s":""]})]})]})}P.displayName="TkxPlayground",exports.AmplitudeAmplifier=c,exports.QuantumAI=x,exports.QuantumAnnealer=s,exports.QuantumBoltzmannMachine=d,exports.QuantumRegister=l,exports.Qubit=a,exports.TkxPlayground=P,exports.TkxQuantumForm=C,exports.TkxThemeBuilder=function({onThemeChange:e,initialHue:i=210,initialMode:a="dark"}){const l=t.useTheme(),[s,d]=(0,r.useState)(a),[c,p]=(0,r.useState)(i),[h,u]=(0,r.useState)(()=>M("dark"===a)),[g,m]=(0,r.useState)(!1),[f,y]=(0,r.useState)([]),[b,v]=(0,r.useState)(!1),k=(0,r.useRef)(null),w="dark"===s,S=(0,r.useCallback)((t,n)=>{u(r=>{const o={...r,[t]:n};return e?.(o),o})},[e]),C=(0,r.useCallback)(()=>{if(g)return;m(!0),y([]);let t=0;const n=[],r=()=>{t+=60,x.optimizeTheme(c,w,t);const o=t/600,i=50*(1-o)+2,a=8*(Math.random()-.5)*(1-.8*o);if(n.push({iteration:t,energy:Math.max(0,i+a)}),y([...n]),t<600)k.current=window.setTimeout(r,40);else{const t=x.optimizeTheme(c,w,1e3);u(t),e?.(t),m(!1)}};k.current=window.setTimeout(r,16)},[c,w,g,e]),A=(0,r.useCallback)(()=>{const t="dark"===s?"light":"dark";d(t);const n=M("dark"===t);u(n),e?.(n)},[s,e]),W=(0,r.useCallback)(()=>{const e=`export const myTheme = {\n${Object.entries(h).map(([e,t])=>` ${e}: '${t}',`).join("\n")}\n};`;"undefined"!=typeof navigator&&navigator.clipboard&&navigator.clipboard.writeText(e).then(()=>{v(!0),setTimeout(()=>v(!1),2e3)})},[h]),R=[{label:"Text on Background",fg:h.text,bg:h.background},{label:"Text on Surface",fg:h.text,bg:h.surface},{label:"Primary on Background",fg:h.primary,bg:h.background},{label:"TextMuted on Background",fg:h.textMuted,bg:h.background}],B="linear-gradient(to right,"+["hsl(0,80%,55%)","hsl(30,80%,55%)","hsl(60,80%,55%)","hsl(90,80%,55%)","hsl(120,80%,55%)","hsl(150,80%,55%)","hsl(180,80%,55%)","hsl(210,80%,55%)","hsl(240,80%,55%)","hsl(270,80%,55%)","hsl(300,80%,55%)","hsl(330,80%,55%)","hsl(360,80%,55%)"].join(",")+")",F={fontFamily:"system-ui, -apple-system, sans-serif",background:h.background,color:h.text,border:`1px solid ${h.border}`,borderRadius:12,padding:20,maxWidth:900,display:"grid",gridTemplateColumns:"1fr 1fr",gap:20},L={background:h.surface,border:`1px solid ${h.border}`,borderRadius:8,padding:16},I={fontSize:13,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:h.primary,marginBottom:12,marginTop:0},P={padding:"8px 16px",borderRadius:8,border:"none",cursor:"pointer",fontWeight:600,fontSize:13,transition:"opacity 0.15s"},q=n.tkx;return(0,o.jsxs)("div",{style:F,children:[(0,o.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gridColumn:"1/-1"},children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:700},children:"Theme Builder"}),(0,o.jsx)("p",{style:{margin:"2px 0 0",fontSize:12,color:h.textMuted},children:"Quantum-powered color optimization"})]}),(0,o.jsx)("button",{onClick:A,style:{...P,background:h.surface,color:h.text,border:`1px solid ${h.border}`},children:w?"☀ Light":"🌙 Dark"})]}),(0,o.jsxs)("div",{style:L,children:[(0,o.jsx)("p",{style:I,children:"Base Hue"}),(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,o.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",background:`hsl(${c},70%,55%)`,border:`2px solid ${h.border}`,flexShrink:0}}),(0,o.jsx)("input",{type:"range",min:0,max:360,value:c,onChange:e=>p(Number(e.target.value)),style:{flex:1,height:16,borderRadius:8,background:B,outline:"none",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"}}),(0,o.jsxs)("span",{style:{fontSize:13,fontFamily:"monospace",minWidth:32},children:[c,"°"]})]})]}),(0,o.jsxs)("div",{style:L,children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10},children:[(0,o.jsx)("button",{onClick:C,disabled:g,style:{...P,background:g?h.border:h.primary,color:w?"#000":"#fff",opacity:g?.7:1,flex:1},children:g?"⟳ Optimizing...":"⚛ Generate with Quantum Annealing"}),(0,o.jsx)("div",{style:{padding:"3px 8px",background:h.primary+"22",border:`1px solid ${h.primary}44`,borderRadius:20,fontSize:10,color:h.primary,fontWeight:700,whiteSpace:"nowrap"},children:"⚛ Quantum Annealing"})]}),(g||f.length>0)&&(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{style:{fontSize:11,color:h.textMuted,margin:"0 0 4px"},children:"Energy landscape (lower = better palette)"}),(0,o.jsx)(z,{points:f,primary:h.primary})]})]}),(0,o.jsxs)("div",{style:L,children:[(0,o.jsx)("p",{style:I,children:"Color Tokens"}),Object.keys(h).map(e=>(0,o.jsx)(T,{label:e,value:h[e],onChange:t=>S(e,t),text:h.text,border:h.border},e))]}),(0,o.jsx)("button",{onClick:W,style:{...P,background:h.accent,color:"#fff",width:"100%"},children:b?"✓ Copied to Clipboard!":"⬇ Export Theme"})]}),(0,o.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,o.jsxs)("div",{style:L,children:[(0,o.jsx)("p",{style:I,children:"Live Preview"}),(0,o.jsxs)("div",{style:{marginBottom:12},children:[(0,o.jsx)("p",{style:{fontSize:11,color:h.textMuted,margin:"0 0 6px"},children:"Buttons"}),(0,o.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,o.jsx)("button",{style:{padding:"8px 16px",borderRadius:8,border:"none",background:h.primary,color:w?"#000":"#fff",fontWeight:600,fontSize:13,cursor:"pointer"},children:"Primary"}),(0,o.jsx)("button",{style:{padding:"8px 16px",borderRadius:8,border:"none",background:h.secondary,color:"#fff",fontWeight:600,fontSize:13,cursor:"pointer"},children:"Secondary"}),(0,o.jsx)("button",{style:{padding:"8px 16px",borderRadius:8,border:`1px solid ${h.border}`,background:"transparent",color:h.text,fontWeight:600,fontSize:13,cursor:"pointer"},children:"Outline"})]})]}),(0,o.jsxs)("div",{style:{marginBottom:12},children:[(0,o.jsx)("p",{style:{fontSize:11,color:h.textMuted,margin:"0 0 6px"},children:"Card"}),(0,o.jsxs)("div",{style:{background:h.surface,border:`1px solid ${h.border}`,borderRadius:8,padding:12},children:[(0,o.jsx)("div",{style:{fontSize:14,fontWeight:700,marginBottom:4},children:"Card Title"}),(0,o.jsx)("div",{style:{fontSize:12,color:h.textMuted,lineHeight:1.4},children:"Sample card with surface background and muted text content."}),(0,o.jsxs)("div",{style:{marginTop:8,display:"flex",gap:6},children:[(0,o.jsx)("span",{style:{padding:"2px 8px",borderRadius:20,background:h.primary+"33",color:h.primary,fontSize:11,fontWeight:600},children:"Tag"}),(0,o.jsx)("span",{style:{padding:"2px 8px",borderRadius:20,background:h.accent+"33",color:h.accent,fontSize:11,fontWeight:600},children:"Accent"})]})]})]}),(0,o.jsxs)("div",{style:{marginBottom:12},children:[(0,o.jsx)("p",{style:{fontSize:11,color:h.textMuted,margin:"0 0 6px"},children:"Input"}),(0,o.jsx)("input",{type:"text",placeholder:"Type something...",readOnly:!0,style:{width:"100%",padding:"8px 12px",borderRadius:8,border:`1px solid ${h.border}`,background:h.background,color:h.text,fontSize:13,outline:"none",boxSizing:"border-box"}})]}),(0,o.jsxs)("div",{style:{marginBottom:12},children:[(0,o.jsx)("p",{style:{fontSize:11,color:h.textMuted,margin:"0 0 6px"},children:"Progress"}),(0,o.jsx)("div",{style:{height:8,borderRadius:4,background:h.border,overflow:"hidden"},children:(0,o.jsx)("div",{style:{height:"100%",width:"68%",background:`linear-gradient(to right, ${h.primary}, ${h.accent})`,borderRadius:4,transition:"width 0.4s ease"}})})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{style:{fontSize:11,color:h.textMuted,margin:"0 0 6px"},children:"Status Badges"}),(0,o.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[{label:"Error",color:h.error},{label:"Warning",color:h.warning},{label:"Success",color:h.success}].map(({label:e,color:t})=>(0,o.jsx)("span",{style:{padding:"3px 10px",borderRadius:4,background:t+"22",color:t,border:`1px solid ${t}44`,fontSize:11,fontWeight:700},children:e},e))})]})]}),(0,o.jsxs)("div",{style:L,children:[(0,o.jsx)("p",{style:I,children:"WCAG Contrast Check"}),R.map(e=>(0,o.jsx)($,{label:e.label,ratio:x.contrast(e.fg,e.bg)},e.label)),(0,o.jsx)("p",{style:{fontSize:10,color:h.textMuted,marginTop:8,marginBottom:0},children:"AA requires 4.5:1 (normal text). AAA requires 7:1."})]}),(0,o.jsxs)("div",{style:L,children:[(0,o.jsx)("p",{style:I,children:"Color Palette"}),(0,o.jsx)("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:Object.entries(h).map(([e,t])=>(0,o.jsx)("div",{title:`${e}: ${t}`,style:{width:36,height:36,borderRadius:6,background:t,border:`2px solid ${h.border}`,cursor:"default",flexShrink:0}},e))})]})]}),"function"==typeof q&&null,"string"==typeof l.bg&&null]})},exports.hslToHex=u,exports.inferFieldIntelligence=h,exports.optimizeThemeColors=y;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty;let a=require("react");var l,s;s=null!=(l=a)?e(o(l)):{},a=((e,o,a,l)=>{if(o&&"object"==typeof o||"function"==typeof o)for(var s,d=n(o),c=0,u=d.length;c<u;c++)s=d[c],i.call(e,s)||void 0===s||t(e,s,{get:(e=>o[e]).bind(null,s),enumerable:!(l=r(o,s))||l.enumerable});return e})(t(s,"default",{value:l,enumerable:!0}),l);let d=require("react/jsx-runtime");new class{constructor(e=512){this.cache=new Map,this.hits=0,this.misses=0,this.ceiling=Math.min(e,512)}get(e){if(!this.cache.has(e))return void this.misses++;this.hits++;const t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size>=this.ceiling&&this.cache.delete(this.cache.keys().next().value),this.cache.set(e,t)}has(e){return this.cache.has(e)}invalidate(e){void 0!==e?this.cache.delete(e):this.cache.clear()}get size(){return this.cache.size}get cacheHitRate(){const e=this.hits+this.misses;return 0===e?0:this.hits/e*100}}(512);var c=(0,a.createContext)({bg:"#0a0a0f",surface:"#12121a",surfaceAlt:"#1a1a2e",border:"#2a2a3e",text:"#e8e8f4",textMuted:"#8888aa",primary:"#00f5d4",secondary:"#7b2ff7",danger:"#f72585",warning:"#ffbe0b",success:"#06d6a0",info:"#3a86ff"});function u(){return(0,a.useContext)(c)}var f=class e{constructor(e,t){this.re=e,this.im=t}add(t){return new e(this.re+t.re,this.im+t.im)}sub(t){return new e(this.re-t.re,this.im-t.im)}mul(t){return new e(this.re*t.re-this.im*t.im,this.re*t.im+this.im*t.re)}scale(t){return new e(this.re*t,this.im*t)}conjugate(){return new e(this.re,-this.im)}magnitudeSquared(){return this.re*this.re+this.im*this.im}magnitude(){return Math.sqrt(this.magnitudeSquared())}static fromPolar(t,r){return new e(t*Math.cos(r),t*Math.sin(r))}static zero(){return new e(0,0)}static one(){return new e(1,0)}},p=class e{constructor(e=f.one(),t=f.zero()){this.alpha=e,this.beta=t,this.normalize()}normalize(){const e=Math.sqrt(this.alpha.magnitudeSquared()+this.beta.magnitudeSquared());e>0&&(this.alpha=this.alpha.scale(1/e),this.beta=this.beta.scale(1/e))}hadamard(){const t=1/Math.SQRT2;return new e(this.alpha.add(this.beta).scale(t),this.alpha.sub(this.beta).scale(t))}ry(t){const r=Math.cos(t/2),n=Math.sin(t/2);return new e(this.alpha.scale(r).sub(this.beta.scale(n)),this.alpha.scale(n).add(this.beta.scale(r)))}phase(t){const r=f.fromPolar(1,t);return new e(this.alpha,this.beta.mul(r))}measure(){const e=this.beta.magnitudeSquared();return Math.random()<e?1:0}expectation(){return this.beta.magnitudeSquared()}getAlpha(){return this.alpha}getBeta(){return this.beta}},h=class{constructor(e){this.qubits=Array.from({length:e},()=>new p)}get size(){return this.qubits.length}getQubit(e){return this.qubits[e]}superpose(){this.qubits=this.qubits.map(e=>e.hadamard())}cnot(e,t){const r=this.qubits[e],n=this.qubits[t],o=r.expectation();this.qubits[t]=n.ry(Math.PI*o)}rotate(e,t){this.qubits[e]=this.qubits[e].ry(t)}measure(){return this.qubits.map(e=>e.measure())}probs(){return this.qubits.map(e=>e.expectation())}},g=class{constructor(e=1,t=.995,r=.3,n=1e-6){this.temperature=e,this.coolingRate=t,this.tunnelingStrength=r,this.minTemp=n}anneal(e,t,r,n=1e3){let o=e,i=t(o),a=o,l=i,s=this.temperature,d=0,c=0;for(let u=0;u<n&&s>this.minTemp;u++){const e=r(o),n=t(e),u=n-i;let f=!1;if(u<=0)f=!0;else{const e=Math.exp(-u/s),t=Math.sqrt(2*Math.abs(u)),r=Math.abs(u),n=Math.exp(-2*t*Math.sqrt(r)*this.tunnelingStrength);Math.random()<e+n&&(f=!0,Math.random()<n/(e+n+1e-10)&&c++)}f&&(o=e,i=n,d++,i<l&&(a=o,l=i)),s*=this.coolingRate}return{state:a,energy:l,iterations:n,accepted:d,tunnels:c}}},m=class{constructor(e,t){const r=Math.sqrt(2/(e+t));this.weights=Array.from({length:e},()=>Array.from({length:t},()=>(2*Math.random()-1)*r)),this.visibleBias=Array.from({length:e},()=>0),this.hiddenBias=Array.from({length:t},()=>0)}sigmoid(e){const t=.1*(Math.random()-.5);return 1/(1+Math.exp(-(e+t)))}sample(e){return Math.random()<e?1:0}energy(e,t){const r=this.visibleBias.reduce((t,r,n)=>t+r*e[n],0),n=this.hiddenBias.reduce((e,r,n)=>e+r*t[n],0);let o=0;for(let i=0;i<e.length;i++)for(let r=0;r<t.length;r++)o+=e[i]*this.weights[i][r]*t[r];return-(r+n+o)}hiddenProbs(e){return this.hiddenBias.map((t,r)=>{const n=t+e.reduce((e,t,n)=>e+this.weights[n][r]*t,0);return this.sigmoid(n)})}visibleProbs(e){return this.visibleBias.map((t,r)=>{const n=t+e.reduce((e,t,n)=>e+this.weights[r][n]*t,0);return this.sigmoid(n)})}gibbs(e,t=1){let r=[...e],n=[];for(let o=0;o<t;o++)n=this.hiddenProbs(r).map(e=>this.sample(e)),r=this.visibleProbs(n).map(e=>this.sample(e));return{visible:r,hidden:n}}trainCD1(e,t=.01){const r=this.visibleBias.length,n=this.hiddenBias.length,o=Array.from({length:r},()=>Array(n).fill(0)),i=Array(r).fill(0),a=Array(n).fill(0);for(const s of e){const e=this.hiddenProbs(s),t=e.map(e=>this.sample(e)),l=this.visibleProbs(t).map(e=>this.sample(e)),d=this.hiddenProbs(l);for(let a=0;a<r;a++){for(let t=0;t<n;t++)o[a][t]+=s[a]*e[t]-l[a]*d[t];i[a]+=s[a]-l[a]}for(let r=0;r<n;r++)a[r]+=e[r]-d[r]}const l=e.length;for(let s=0;s<r;s++){for(let e=0;e<n;e++)this.weights[s][e]+=t*o[s][e]/l;this.visibleBias[s]+=t*i[s]/l}for(let s=0;s<n;s++)this.hiddenBias[s]+=t*a[s]/l}infer(e){const t=this.hiddenProbs(e),r=t.map(e=>this.sample(e));return{hidden:t,visible:this.visibleProbs(r),energy:this.energy(e,r),iterations:1}}},x=class{amplify(e,t,r=.5){const n=e.length;if(0===n)return[];const o=e.map(t),i=o.filter(e=>e>r).length,a=Math.max(1,i);let l=Array(n).fill(1/Math.sqrt(n));const s=Math.max(1,Math.floor(Math.PI/4*Math.sqrt(n/a)));for(let d=0;d<s;d++){for(let t=0;t<n;t++)o[t]>r&&(l[t]=-l[t]);const e=l.reduce((e,t)=>e+t,0)/n;l=l.map(t=>2*e-t)}return e.map((e,t)=>({index:t,amplitude:l[t],probability:l[t]*l[t],classicalSimilarity:o[t],combined:l[t]*l[t]*.6+.4*o[t]})).sort((e,t)=>t.combined-e.combined)}},b=[{keywords:["email","e-mail","mail"],type:"email",validations:[{rule:"required",message:"Email is required"},{rule:"pattern",value:"^[^@]+@[^@]+\\.[^@]+$",message:"Enter a valid email address"},{rule:"maxLength",value:254,message:"Email too long"}],placeholder:"you@example.com",label:"Email Address",confidence:.98},{keywords:["password","passwd","pwd","pass"],type:"password",validations:[{rule:"required",message:"Password is required"},{rule:"minLength",value:8,message:"Password must be at least 8 characters"},{rule:"pattern",value:"(?=.*[A-Z])(?=.*[0-9])",message:"Include uppercase and a number"}],placeholder:"••••••••",label:"Password",confidence:.97},{keywords:["confirm_password","confirmpassword","confirm_pass","repassword","password2","repeat_password"],type:"password",validations:[{rule:"required",message:"Please confirm your password"},{rule:"match",value:"password",message:"Passwords do not match"}],placeholder:"••••••••",label:"Confirm Password",confidence:.95},{keywords:["phone","mobile","cell","tel","telephone","contact_number"],type:"tel",validations:[{rule:"pattern",value:"^[+]?[(]?[0-9]{3}[)]?[-\\s.]?[0-9]{3}[-\\s.]?[0-9]{4,6}$",message:"Enter a valid phone number"}],placeholder:"+1 (555) 000-0000",label:"Phone Number",confidence:.93},{keywords:["age"],type:"number",validations:[{rule:"min",value:0,message:"Age cannot be negative"},{rule:"max",value:150,message:"Enter a valid age"},{rule:"integer",message:"Age must be a whole number"}],placeholder:"25",label:"Age",confidence:.9},{keywords:["price","amount","cost","fee","payment","salary","wage","total"],type:"number",validations:[{rule:"min",value:0,message:"Amount cannot be negative"},{rule:"pattern",value:"^\\d+(\\.\\d{1,2})?$",message:"Enter a valid amount (e.g. 9.99)"}],placeholder:"0.00",label:"Amount",confidence:.88},{keywords:["url","website","site","link","homepage","web"],type:"url",validations:[{rule:"pattern",value:"https?://.+",message:"Enter a valid URL starting with http:// or https://"}],placeholder:"https://example.com",label:"Website URL",confidence:.92},{keywords:["zip","zipcode","postal","postcode","pin_code"],type:"text",validations:[{rule:"pattern",value:"^[0-9]{5}(-[0-9]{4})?$",message:"Enter a valid ZIP code (e.g. 12345)"}],placeholder:"12345",label:"ZIP / Postal Code",confidence:.91},{keywords:["date","dob","birthday","birth_date","birthdate","born"],type:"date",validations:[{rule:"required",message:"Date is required"}],placeholder:"YYYY-MM-DD",label:"Date of Birth",confidence:.89},{keywords:["first_name","firstname","fname","given_name"],type:"text",validations:[{rule:"minLength",value:2,message:"First name too short"},{rule:"maxLength",value:50,message:"First name too long"}],placeholder:"Jane",label:"First Name",confidence:.9},{keywords:["last_name","lastname","lname","surname","family_name"],type:"text",validations:[{rule:"minLength",value:2,message:"Last name too short"},{rule:"maxLength",value:50,message:"Last name too long"}],placeholder:"Doe",label:"Last Name",confidence:.9},{keywords:["name","full_name","fullname","display_name"],type:"text",validations:[{rule:"minLength",value:2,message:"Name too short"},{rule:"maxLength",value:100,message:"Name too long"}],placeholder:"Jane Doe",label:"Full Name",confidence:.85},{keywords:["username","user_name","handle","login","loginname"],type:"text",validations:[{rule:"minLength",value:3,message:"Username must be at least 3 characters"},{rule:"maxLength",value:32,message:"Username too long"},{rule:"pattern",value:"^[a-zA-Z0-9_.-]+$",message:"Only letters, numbers, _, - and . allowed"}],placeholder:"cooluser42",label:"Username",confidence:.94},{keywords:["bio","biography","about","description","summary","details"],type:"textarea",validations:[{rule:"maxLength",value:500,message:"Bio must be under 500 characters"}],placeholder:"Tell us about yourself...",label:"Bio",confidence:.87},{keywords:["message","comment","feedback","note","notes","remarks","body"],type:"textarea",validations:[{rule:"minLength",value:10,message:"Message too short"},{rule:"maxLength",value:2e3,message:"Message too long"}],placeholder:"Write your message here...",label:"Message",confidence:.86},{keywords:["search","query","q","keyword","find"],type:"search",validations:[],placeholder:"Search...",label:"Search",confidence:.9},{keywords:["otp","one_time_password","verification_code","pin","code"],type:"text",validations:[{rule:"minLength",value:4,message:"Code too short"},{rule:"maxLength",value:8,message:"Code too long"},{rule:"pattern",value:"^[0-9]+$",message:"Code must be numeric"}],placeholder:"123456",label:"Verification Code",confidence:.92},{keywords:["color","colour","hex_color","brand_color"],type:"color",validations:[],placeholder:"#3b82f6",label:"Color",confidence:.95},{keywords:["address","street","street_address","addr"],type:"text",validations:[{rule:"maxLength",value:200,message:"Address too long"}],placeholder:"123 Main Street",label:"Street Address",confidence:.87},{keywords:["city","town","municipality"],type:"text",validations:[{rule:"maxLength",value:100,message:"City name too long"}],placeholder:"San Francisco",label:"City",confidence:.89},{keywords:["country","nation","country_code"],type:"text",validations:[],placeholder:"United States",label:"Country",confidence:.88},{keywords:["company","organization","org","employer","company_name"],type:"text",validations:[{rule:"maxLength",value:200,message:"Company name too long"}],placeholder:"Acme Inc.",label:"Company",confidence:.87}];function y(e){const t=e.toLowerCase().replace(/[\s-]/g,"_"),r=(new x).amplify(b,e=>{let r=0;for(const n of e.keywords)t===n?r=Math.max(r,1):t.includes(n)||n.includes(t)?r=Math.max(r,.8):n.split("_").some(e=>t.includes(e))&&(r=Math.max(r,.5));return r},.3);if(r.length>0&&r[0].combined>.1){const e=b[r[0].index];return{type:e.type,validations:e.validations,placeholder:e.placeholder,confidence:Math.min(e.confidence*r[0].combined*2,.99),label:e.label}}return{type:"text",validations:[{rule:"maxLength",value:255,message:"Input too long"}],placeholder:e.replace(/_/g," "),confidence:.3,label:e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}}function w(e,t,r){const n=r/100,o=t/100*Math.min(n,1-n),i=t=>{const r=(t+e/30)%12,i=n-o*Math.max(Math.min(r-3,9-r,1),-1);return Math.round(255*i).toString(16).padStart(2,"0")};return`#${i(0)}${i(8)}${i(4)}`}function v(e){const[t,r,n]=function(e){const t=e.replace("#",""),r=3===t.length?t.split("").map(e=>e+e).join(""):t;return[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16)]}(e).map(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*t+.7152*r+.0722*n}function k(e,t){const r=v(e),n=v(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function $(e,t,r){return Math.max(t,Math.min(r,e))}function S(e,t,r=800){const n=t?{primary:{h:e,s:70,l:55},secondary:{h:(e+137.5)%360,s:65,l:50},bg:{h:e,s:10,l:8},surface:{h:e,s:10,l:13},text:{h:e,s:15,l:90},border:{h:e,s:15,l:22},accent:{h:(e+120)%360,s:75,l:60}}:{primary:{h:e,s:65,l:40},secondary:{h:(e+137.5)%360,s:55,l:38},bg:{h:e,s:15,l:97},surface:{h:e,s:12,l:100},text:{h:e,s:15,l:12},border:{h:e,s:12,l:85},accent:{h:(e+120)%360,s:70,l:42}};return function(e,t){const r=e=>w(e.h,e.s,e.l),n=t?e.text.l-20:e.text.l+15;return{primary:r(e.primary),secondary:r(e.secondary),background:r(e.bg),surface:r(e.surface),text:r(e.text),textMuted:w(e.text.h,Math.max(0,e.text.s-10),Math.max(20,Math.min(85,n))),border:r(e.border),error:t?"#f87171":"#dc2626",warning:t?"#fbbf24":"#d97706",success:t?"#34d399":"#059669",accent:r(e.accent)}}(new g(1.5,.994,.35,1e-5).anneal(n,e=>function(e,t){let r=0;const n=e=>w(e.h,e.s,e.l),o=n(e.text),i=n(e.bg),a=n(e.surface),l=n(e.primary),s=k(o,i),d=k(o,a),c=k(l,i);s<4.5&&(r+=10*(4.5-s)),d<4.5&&(r+=8*(4.5-d)),c<3&&(r+=5*(3-c)),r+=.05*Math.abs((e.secondary.h-e.primary.h+360)%360-137.508),r+=.03*Math.abs((e.accent.h-e.primary.h+360)%360-120);const u=(e.primary.s+e.secondary.s)/2;u<20&&(r+=.5*(20-u)),u>90&&(r+=.5*(u-90));const f=e.bg.l;t?(f>25&&(r+=2*(f-25)),f<3&&(r+=2*(3-f)),e.text.l<70&&(r+=1.5*(70-e.text.l))):(f<90&&(r+=2*(90-f)),f>100&&(r+=2*(f-100)),e.text.l>30&&(r+=1.5*(e.text.l-30)));const p=Math.abs(e.surface.l-e.bg.l);return p<2&&(r+=2*(2-p)),p>12&&(r+=1*(p-12)),r}(e,t),e=>{const t=["primary","secondary","bg","surface","text","border","accent"],r=t[Math.floor(Math.random()*t.length)],n=["h","s","l"],o=n[Math.floor(Math.random()*n.length)],i=(Math.random()-.5)*("h"===o?30:15),a={...e,[r]:{...e[r]}};return a[r]="h"===o?{...a[r],h:(e[r].h+i+360)%360}:"s"===o?{...a[r],s:$(e[r].s+i,0,100)}:{...a[r],l:$(e[r].l+i,0,100)},a},r).state,t)}var z={qubit:()=>new p,register:e=>new h(e),annealer:(e,t,r)=>new g(e,t,r),qbm:(e,t)=>new m(e,t),amplifier:()=>new x,inferField:y,optimizeTheme:S,contrast:k,hslToHex:w},C={0:"0",px:"1px",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px",auto:"auto",full:"100%",screen:"100vw",svh:"100svh",dvh:"100dvh",fit:"fit-content",max:"max-content",min:"min-content"},M={...C,screen:"100vh"},T={"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","5/6":"83.333333%","1/12":"8.333333%","5/12":"41.666667%","7/12":"58.333333%","11/12":"91.666667%"},A={none:"0",sm:"2px","":"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px","3xl":"24px",full:"9999px"},j={sm:"0 1px 2px 0 rgba(0,0,0,.05)","":"0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1)",md:"0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)",lg:"0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1)",xl:"0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1)","2xl":"0 25px 50px -12px rgba(0,0,0,.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,.05)",none:"none"},R={xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},W={thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},B={none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},F={tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},L={none:"0",sm:"4px","":"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},P=Object.fromEntries([0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100].map(e=>[String(e),String(e/100)])),_=new Set(["bg","surface","surfaceAlt","border","text","textMuted","primary","secondary","danger","warning","success","info"]),E={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},I=/javascript\s*:|vbscript\s*:|data\s*:\s*text\/html|data\s*:\s*text\/javascript|expression\s*\(|[\r\n\x00]/i,D=new Set(["behavior","-moz-binding","-webkit-binding","src"]),O=new Set(["width","min-width","max-width","height","min-height","max-height","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","position","top","right","bottom","left","z-index","inset","flex","flex-grow","flex-shrink","flex-basis","flex-direction","flex-wrap","align-items","align-self","align-content","justify-content","justify-items","justify-self","gap","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-column","grid-row","grid-area","grid-template-areas","font-size","font-weight","font-family","font-style","line-height","letter-spacing","text-align","text-decoration","text-transform","text-overflow","white-space","word-break","word-wrap","overflow-wrap","color","background","background-color","background-image","background-position","background-size","background-repeat","opacity","border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-radius","outline","outline-offset","box-shadow","text-shadow","filter","backdrop-filter","transform","transition","animation","display","overflow","overflow-x","overflow-y","visibility","pointer-events","cursor","user-select","aspect-ratio","object-fit","object-position","list-style","vertical-align","float","clear","resize","scroll-behavior","content"]);function q(e){return I.test(e)||e.includes("}")||e.includes("{")||e.includes("<")||e.includes(">")?null:e}function H(e){const t=e.match(/^\[(.+)]$/);return t?q(t[1]):null}function Z(e){return _.has(e)?`var(--tkx-${e})`:"transparent"===e?"transparent":"current"===e?"currentColor":"white"===e?"#ffffff":"black"===e?"#000000":"inherit"===e?"inherit":H(e)||(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e),e)}function N(e){const t=e.match(/^\[(--[a-zA-Z0-9_-]+):(.+)]$/);if(t){const e=q(t[2]);return e?{[t[1]]:e}:null}const r=e.match(/^\[([a-zA-Z-]+):(.+)]$/);if(r){const e=function(e){const t=e.toLowerCase().trim();return D.has(t)?null:O.has(t)?t:null}(r[1]),t=q(r[2]);return e&&t?{[e]:t}:null}const n={flex:"flex","inline-flex":"inline-flex",grid:"grid","inline-grid":"inline-grid",block:"block","inline-block":"inline-block",inline:"inline",hidden:"none",contents:"contents","flow-root":"flow-root",table:"table","table-row":"table-row","table-cell":"table-cell","table-caption":"table-caption","list-item":"list-item"};if(n[e])return{display:n[e]};const o={"flex-row":"row","flex-col":"column","flex-row-reverse":"row-reverse","flex-col-reverse":"column-reverse"};if(o[e])return{"flex-direction":o[e]};const i={"flex-wrap":"wrap","flex-nowrap":"nowrap","flex-wrap-reverse":"wrap-reverse"};if(i[e])return{"flex-wrap":i[e]};const a={"flex-1":"1 1 0%","flex-auto":"1 1 auto","flex-none":"none","flex-initial":"0 1 auto"};if(a[e])return{flex:a[e]};if("grow"===e||"flex-grow"===e)return{"flex-grow":"1"};if("grow-0"===e)return{"flex-grow":"0"};if("shrink"===e||"flex-shrink"===e)return{"flex-shrink":"1"};if("shrink-0"===e||"flex-shrink-0"===e)return{"flex-shrink":"0"};const l={"items-start":"flex-start","items-end":"flex-end","items-center":"center","items-stretch":"stretch","items-baseline":"baseline"};if(l[e])return{"align-items":l[e]};const s={"justify-start":"flex-start","justify-end":"flex-end","justify-center":"center","justify-between":"space-between","justify-around":"space-around","justify-evenly":"space-evenly","justify-stretch":"stretch","justify-normal":"normal"};if(s[e])return{"justify-content":s[e]};const d={"self-auto":"auto","self-start":"flex-start","self-end":"flex-end","self-center":"center","self-stretch":"stretch","self-baseline":"baseline"};if(d[e])return{"align-self":d[e]};const c={"content-start":"flex-start","content-end":"flex-end","content-center":"center","content-between":"space-between","content-around":"space-around","content-evenly":"space-evenly","content-stretch":"stretch"};if(c[e])return{"align-content":c[e]};let u;if(u=e.match(/^grid-cols-(\d+|none|subgrid)$/))return{"grid-template-columns":"none"===u[1]?"none":"subgrid"===u[1]?"subgrid":`repeat(${u[1]},minmax(0,1fr))`};if(u=e.match(/^grid-rows-(\d+|none|subgrid)$/))return{"grid-template-rows":"none"===u[1]?"none":"subgrid"===u[1]?"subgrid":`repeat(${u[1]},minmax(0,1fr))`};if(u=e.match(/^col-span-(full|\d+)$/))return{"grid-column":"full"===u[1]?"1 / -1":`span ${u[1]} / span ${u[1]}`};if(u=e.match(/^col-start-(\d+|auto)$/))return{"grid-column-start":u[1]};if(u=e.match(/^col-end-(\d+|auto)$/))return{"grid-column-end":u[1]};if(u=e.match(/^row-span-(full|\d+)$/))return{"grid-row":"full"===u[1]?"1 / -1":`span ${u[1]} / span ${u[1]}`};if(u=e.match(/^row-start-(\d+|auto)$/))return{"grid-row-start":u[1]};if(u=e.match(/^row-end-(\d+|auto)$/))return{"grid-row-end":u[1]};if("grid-flow-row"===e)return{"grid-auto-flow":"row"};if("grid-flow-col"===e)return{"grid-auto-flow":"column"};if("grid-flow-dense"===e)return{"grid-auto-flow":"dense"};if("grid-flow-row-dense"===e)return{"grid-auto-flow":"row dense"};if("grid-flow-col-dense"===e)return{"grid-auto-flow":"column dense"};if(u=e.match(/^p-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{padding:e}}if(u=e.match(/^px-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{"padding-left":e,"padding-right":e}}if(u=e.match(/^py-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{"padding-top":e,"padding-bottom":e}}if(u=e.match(/^pt-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{"padding-top":e}}if(u=e.match(/^pr-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{"padding-right":e}}if(u=e.match(/^pb-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{"padding-bottom":e}}if(u=e.match(/^pl-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{"padding-left":e}}if(u=e.match(/^-?m-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??H(u[1]);if(r)return{margin:t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?mx-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??H(u[1]);if(r){const e=t&&"0"!==r?`-${r}`:r;return{"margin-left":e,"margin-right":e}}}if(u=e.match(/^-?my-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??H(u[1]);if(r){const e=t&&"0"!==r?`-${r}`:r;return{"margin-top":e,"margin-bottom":e}}}if(u=e.match(/^-?mt-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??H(u[1]);if(r)return{"margin-top":t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?mr-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??H(u[1]);if(r)return{"margin-right":t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?mb-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??H(u[1]);if(r)return{"margin-bottom":t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?ml-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??H(u[1]);if(r)return{"margin-left":t&&"0"!==r?`-${r}`:r}}if("mx-auto"===e)return{"margin-left":"auto","margin-right":"auto"};if("my-auto"===e)return{"margin-top":"auto","margin-bottom":"auto"};if(u=e.match(/^gap-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{gap:e}}if(u=e.match(/^gap-x-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{"column-gap":e}}if(u=e.match(/^gap-y-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{"row-gap":e}}if(u=e.match(/^w-(.+)$/)){const e=u[1],t=C[e]??T[e]??H(e);if(t)return{width:t}}if(u=e.match(/^min-w-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{"min-width":e}}if(u=e.match(/^max-w-(.+)$/)){const e={none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",screen:"100vw",min:"min-content",max:"max-content",fit:"fit-content"}[u[1]]??C[u[1]]??H(u[1]);if(e)return{"max-width":e}}if(u=e.match(/^h-(.+)$/)){const e=u[1],t=M[e]??T[e]??H(e);if(t)return{height:t}}if(u=e.match(/^min-h-(.+)$/)){const e={0:"0",full:"100%",screen:"100vh",svh:"100svh",dvh:"100dvh"}[u[1]]??C[u[1]]??H(u[1]);if(e)return{"min-height":e}}if(u=e.match(/^max-h-(.+)$/)){const e=M[u[1]]??H(u[1]);if(e)return{"max-height":e}}if(u=e.match(/^size-(.+)$/)){const e=C[u[1]]??T[u[1]]??H(u[1]);if(e)return{width:e,height:e}}if(u=e.match(/^text-(xs|sm|base|lg|[2-9]xl|\d+xl)$/)){const[e,t]=R[u[1]]??["1rem","1.5rem"];return{"font-size":e,"line-height":t}}if(u=e.match(/^font-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black|\d+)$/))return{"font-weight":W[u[1]]??u[1]};if(u=e.match(/^leading-(.+)$/)){const e=B[u[1]]??H(u[1]);if(e)return{"line-height":e}}if(u=e.match(/^tracking-(.+)$/)){const e=F[u[1]]??H(u[1]);if(e)return{"letter-spacing":e}}const f={"text-left":"left","text-center":"center","text-right":"right","text-justify":"justify","text-start":"start","text-end":"end"};if(f[e])return{"text-align":f[e]};if("italic"===e)return{"font-style":"italic"};if("not-italic"===e)return{"font-style":"normal"};if("uppercase"===e)return{"text-transform":"uppercase"};if("lowercase"===e)return{"text-transform":"lowercase"};if("capitalize"===e)return{"text-transform":"capitalize"};if("normal-case"===e)return{"text-transform":"none"};if("underline"===e)return{"text-decoration-line":"underline"};if("overline"===e)return{"text-decoration-line":"overline"};if("line-through"===e)return{"text-decoration-line":"line-through"};if("no-underline"===e)return{"text-decoration-line":"none"};if("truncate"===e)return{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"};if("text-ellipsis"===e)return{"text-overflow":"ellipsis"};if("text-clip"===e)return{"text-overflow":"clip"};if("whitespace-normal"===e)return{"white-space":"normal"};if("whitespace-nowrap"===e)return{"white-space":"nowrap"};if("whitespace-pre"===e)return{"white-space":"pre"};if("whitespace-pre-wrap"===e)return{"white-space":"pre-wrap"};if("whitespace-pre-line"===e)return{"white-space":"pre-line"};if("break-words"===e)return{"overflow-wrap":"break-word"};if("break-all"===e)return{"word-break":"break-all"};if("break-keep"===e)return{"word-break":"keep-all"};if("font-mono"===e)return{"font-family":"var(--tkx-font-mono,monospace)"};if("font-sans"===e)return{"font-family":"var(--tkx-font-family,system-ui,sans-serif)"};if("font-serif"===e)return{"font-family":"ui-serif,Georgia,serif"};if("antialiased"===e)return{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"};if(u=e.match(/^indent-(.+)$/)){const e=C[u[1]]??H(u[1]);if(e)return{"text-indent":e}}if(u=e.match(/^line-clamp-(\d+)$/))return{overflow:"hidden",display:"-webkit-box","-webkit-line-clamp":u[1],"-webkit-box-orient":"vertical"};if(u=e.match(/^text-(.+)$/)){const[e,t]=u[1].split("/"),r=Z(e);if(!["left","center","right","justify","start","end","xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl","9xl"].includes(e)){if(t){const e=parseInt(t)/100;return{color:r,opacity:String(e)}}return{color:r}}}if(u=e.match(/^bg-(.+)$/)){const[e,t]=u[1].split("/"),r=Z(e);return t?{"background-color":r,opacity:String(parseInt(t)/100)}:"none"===e?{background:"none"}:{"background-color":r}}if(u=e.match(/^border-color-(.+)$/))return{"border-color":Z(u[1])};if(u=e.match(/^fill-(.+)$/))return{fill:Z(u[1])};if(u=e.match(/^stroke-(.+)$/))return{stroke:Z(u[1])};if(u=e.match(/^shadow-color-(.+)$/))return{"--tkx-shadow-color":Z(u[1])};if(u=e.match(/^ring-color-(.+)$/))return{"--tkx-ring-color":Z(u[1])};if(u=e.match(/^accent-(.+)$/))return{"accent-color":Z(u[1])};if(u=e.match(/^caret-(.+)$/))return{"caret-color":Z(u[1])};if(u=e.match(/^outline-color-(.+)$/))return{"outline-color":Z(u[1])};if("border"===e)return{"border-width":"1px"};if(u=e.match(/^border-(\d+)$/))return{"border-width":`${u[1]}px`};if("border-t"===e)return{"border-top-width":"1px"};if(u=e.match(/^border-t-(\d+)$/))return{"border-top-width":`${u[1]}px`};if("border-r"===e)return{"border-right-width":"1px"};if(u=e.match(/^border-r-(\d+)$/))return{"border-right-width":`${u[1]}px`};if("border-b"===e)return{"border-bottom-width":"1px"};if(u=e.match(/^border-b-(\d+)$/))return{"border-bottom-width":`${u[1]}px`};if("border-l"===e)return{"border-left-width":"1px"};if(u=e.match(/^border-l-(\d+)$/))return{"border-left-width":`${u[1]}px`};if("border-x"===e)return{"border-left-width":"1px","border-right-width":"1px"};if("border-y"===e)return{"border-top-width":"1px","border-bottom-width":"1px"};if("border-none"===e)return{"border-style":"none"};if("border-solid"===e)return{"border-style":"solid"};if("border-dashed"===e)return{"border-style":"dashed"};if("border-dotted"===e)return{"border-style":"dotted"};if("border-double"===e)return{"border-style":"double"};if((u=e.match(/^border-([a-zA-Z].*)$/))&&_.has(u[1]))return{"border-color":`var(--tkx-${u[1]})`};if(u=e.match(/^border-\[(.+)]$/))return{"border-color":u[1]};if("border-0"===e)return{"border-width":"0"};if("rounded"===e)return{"border-radius":A[""]};if(u=e.match(/^rounded-(none|sm|md|lg|xl|2xl|3xl|full|\[.+])$/))return{"border-radius":A[u[1]]??H(u[1])??u[1]};if(u=e.match(/^rounded-(t|r|b|l|tl|tr|br|bl)(?:-(none|sm|md|lg|xl|2xl|3xl|full))?$/)){const e=u[1],t=A[u[2]??""]??A[""];return{t:{"border-top-left-radius":t,"border-top-right-radius":t},r:{"border-top-right-radius":t,"border-bottom-right-radius":t},b:{"border-bottom-left-radius":t,"border-bottom-right-radius":t},l:{"border-top-left-radius":t,"border-bottom-left-radius":t},tl:{"border-top-left-radius":t},tr:{"border-top-right-radius":t},br:{"border-bottom-right-radius":t},bl:{"border-bottom-left-radius":t}}[e]??{}}const p={0:"0",1:"1px",2:"2px",ring:"3px",4:"4px",8:"8px"};if("ring"===e)return{"box-shadow":"0 0 0 3px var(--tkx-ring-color,var(--tkx-primary))"};if((u=e.match(/^ring-(\d+)$/))&&p[u[1]])return{"box-shadow":`0 0 0 ${p[u[1]]} var(--tkx-ring-color,var(--tkx-primary))`};if("ring-inset"===e)return{"--tkx-ring-offset":"inset"};if(u=e.match(/^ring-offset-(\d+)$/))return{"--tkx-ring-offset-width":`${u[1]}px`,"box-shadow":`0 0 0 ${u[1]}px var(--tkx-bg)`};if("shadow"===e)return{"box-shadow":j[""]};if(u=e.match(/^shadow-(sm|md|lg|xl|2xl|inner|none)$/))return{"box-shadow":j[u[1]]};if(u=e.match(/^opacity-(\d+)$/)){const e=P[u[1]];if(void 0!==e)return{opacity:e}}if("bg-none"===e)return{background:"none"};const h={"bg-auto":"auto","bg-cover":"cover","bg-contain":"contain"};if(h[e])return{"background-size":h[e]};const g={"bg-center":"center","bg-top":"top","bg-bottom":"bottom","bg-left":"left","bg-right":"right"};if(g[e])return{"background-position":g[e]};const m={"bg-repeat":"repeat","bg-no-repeat":"no-repeat","bg-repeat-x":"repeat-x","bg-repeat-y":"repeat-y"};if(m[e])return{"background-repeat":m[e]};if("backdrop-blur"===e)return{"backdrop-filter":`blur(${L[""]})`};if(u=e.match(/^backdrop-blur-(none|sm|md|lg|xl|2xl|3xl)$/))return{"backdrop-filter":`blur(${L[u[1]]})`};if("blur"===e)return{filter:`blur(${L[""]})`};if(u=e.match(/^blur-(none|sm|md|lg|xl|2xl|3xl)$/))return{filter:`blur(${L[u[1]]})`};if("grayscale"===e)return{filter:"grayscale(100%)"};if("grayscale-0"===e)return{filter:"grayscale(0)"};if("invert"===e)return{filter:"invert(100%)"};if("invert-0"===e)return{filter:"invert(0)"};const x={static:"static",relative:"relative",absolute:"absolute",fixed:"fixed",sticky:"sticky"};if(x[e])return{position:x[e]};if("inset-0"===e)return{top:"0",right:"0",bottom:"0",left:"0"};if("inset-auto"===e)return{top:"auto",right:"auto",bottom:"auto",left:"auto"};if("inset-full"===e)return{top:"100%",right:"100%",bottom:"100%",left:"100%"};if("inset-x-0"===e)return{left:"0",right:"0"};if("inset-y-0"===e)return{top:"0",bottom:"0"};if(u=e.match(/^-?top-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??T[u[1]]??H(u[1]);if(r)return{top:t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?right-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??T[u[1]]??H(u[1]);if(r)return{right:t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?bottom-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??T[u[1]]??H(u[1]);if(r)return{bottom:t&&"0"!==r?`-${r}`:r}}if(u=e.match(/^-?left-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??T[u[1]]??H(u[1]);if(r)return{left:t&&"0"!==r?`-${r}`:r}}const b={0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",100:"100",1e3:"1000",9e3:"9000",auto:"auto"};if(u=e.match(/^z-(.+)$/)){const e=b[u[1]]??H(u[1]);if(e)return{"z-index":e}}const y={"overflow-auto":"auto","overflow-hidden":"hidden","overflow-visible":"visible","overflow-scroll":"scroll","overflow-clip":"clip"};if(y[e])return{overflow:y[e]};if(u=e.match(/^overflow-(x|y)-(auto|hidden|visible|scroll|clip)$/))return{[`overflow-${u[1]}`]:u[2]};if("scrollbar-hide"===e)return{"-ms-overflow-style":"none","scrollbar-width":"none"};if("visible"===e)return{visibility:"visible"};if("invisible"===e)return{visibility:"hidden"};if("collapse"===e)return{visibility:"collapse"};const w={"cursor-auto":"auto","cursor-default":"default","cursor-pointer":"pointer","cursor-wait":"wait","cursor-text":"text","cursor-move":"move","cursor-help":"help","cursor-not-allowed":"not-allowed","cursor-none":"none","cursor-grab":"grab","cursor-grabbing":"grabbing","cursor-zoom-in":"zoom-in","cursor-zoom-out":"zoom-out","cursor-crosshair":"crosshair"};if(w[e])return{cursor:w[e]};if("select-none"===e)return{"user-select":"none"};if("select-text"===e)return{"user-select":"text"};if("select-all"===e)return{"user-select":"all"};if("select-auto"===e)return{"user-select":"auto"};if("pointer-events-none"===e)return{"pointer-events":"none"};if("pointer-events-auto"===e)return{"pointer-events":"auto"};const v={0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"};if(u=e.match(/^scale-(.+)$/)){const e=v[u[1]]??H(u[1]);if(e)return{transform:`scale(${e})`}}if(u=e.match(/^scale-x-(.+)$/)){const e=v[u[1]]??H(u[1]);if(e)return{transform:`scaleX(${e})`}}if(u=e.match(/^scale-y-(.+)$/)){const e=v[u[1]]??H(u[1]);if(e)return{transform:`scaleY(${e})`}}const k={0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"};if(u=e.match(/^-?rotate-(.+)$/)){const t=e.startsWith("-"),r=k[u[1]]??H(u[1]);if(r)return{transform:t?`rotate(-${r})`:`rotate(${r})`}}if(u=e.match(/^-?translate-x-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??T[u[1]]??H(u[1]);if(r)return{transform:`translateX(${t&&"0"!==r?`-${r}`:r})`}}if(u=e.match(/^-?translate-y-(.+)$/)){const t=e.startsWith("-"),r=C[u[1]]??T[u[1]]??H(u[1]);if(r)return{transform:`translateY(${t&&"0"!==r?`-${r}`:r})`}}if(u=e.match(/^-?skew-x-(.+)$/)){const t=e.startsWith("-"),r=H(u[1])??`${u[1]}deg`;return{transform:t?`skewX(-${r})`:`skewX(${r})`}}if(u=e.match(/^-?skew-y-(.+)$/)){const t=e.startsWith("-"),r=H(u[1])??`${u[1]}deg`;return{transform:t?`skewY(-${r})`:`skewY(${r})`}}const $={"origin-center":"center","origin-top":"top","origin-top-right":"top right","origin-right":"right","origin-bottom-right":"bottom right","origin-bottom":"bottom","origin-bottom-left":"bottom left","origin-left":"left","origin-top-left":"top left"};if($[e])return{"transform-origin":$[e]};const S={transition:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter","transition-all":"all","transition-colors":"color,background-color,border-color,text-decoration-color,fill,stroke","transition-opacity":"opacity","transition-shadow":"box-shadow","transition-transform":"transform","transition-none":"none"};if(S[e])return{"transition-property":S[e],"transition-timing-function":"cubic-bezier(0.4,0,0.2,1)","transition-duration":"150ms"};const z={75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"};if(u=e.match(/^duration-(.+)$/)){const e=z[u[1]]??H(u[1]);if(e)return{"transition-duration":e}}if(u=e.match(/^delay-(.+)$/)){const e=z[u[1]]??H(u[1]);if(e)return{"transition-delay":e}}const E={"ease-linear":"linear","ease-in":"cubic-bezier(0.4,0,1,1)","ease-out":"cubic-bezier(0,0,0.2,1)","ease-in-out":"cubic-bezier(0.4,0,0.2,1)"};if(E[e])return{"transition-timing-function":E[e]};const I={"animate-none":"none","animate-spin":"tkx-spin 1s linear infinite","animate-ping":"tkx-ping 1s cubic-bezier(0,0,0.2,1) infinite","animate-pulse":"tkx-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite","animate-bounce":"tkx-bounce 1s infinite","animate-fade-in":"tkx-fade-in 200ms ease both","animate-slide-up":"tkx-slide-up 200ms ease both","animate-shimmer":"tkx-shimmer 1.5s infinite"};if(I[e])return{animation:I[e]};const N={"object-contain":"contain","object-cover":"cover","object-fill":"fill","object-none":"none","object-scale-down":"scale-down"};return N[e]?{"object-fit":N[e]}:"aspect-square"===e?{"aspect-ratio":"1 / 1"}:"aspect-video"===e?{"aspect-ratio":"16 / 9"}:"aspect-auto"===e?{"aspect-ratio":"auto"}:(u=e.match(/^aspect-\[(.+)]$/))?{"aspect-ratio":u[1]}:"list-none"===e?{"list-style-type":"none"}:"list-disc"===e?{"list-style-type":"disc"}:"list-decimal"===e?{"list-style-type":"decimal"}:"list-inside"===e?{"list-style-position":"inside"}:"list-outside"===e?{"list-style-position":"outside"}:(u=e.match(/^columns-(\d+)$/))?{columns:u[1]}:"resize"===e?{resize:"both"}:"resize-none"===e?{resize:"none"}:"resize-x"===e?{resize:"horizontal"}:"resize-y"===e?{resize:"vertical"}:"sr-only"===e?{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)","white-space":"nowrap",border:"0"}:"not-sr-only"===e?{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",clip:"auto","white-space":"normal"}:"focus-ring"===e?{outline:"2px solid var(--tkx-primary)","outline-offset":"2px","border-radius":"2px"}:"appearance-none"===e?{appearance:"none"}:"outline-none"===e?{outline:"none"}:"outline"===e?{outline:"2px solid currentColor","outline-offset":"2px"}:"float-left"===e?{float:"left"}:"float-right"===e?{float:"right"}:"float-none"===e?{float:"none"}:"clear-both"===e?{clear:"both"}:"isolate"===e?{isolation:"isolate"}:"isolation-auto"===e?{isolation:"auto"}:(u=e.match(/^will-change-(.+)$/))?{"will-change":u[1]}:"touch-manipulation"===e?{"touch-action":"manipulation"}:"touch-none"===e?{"touch-action":"none"}:"touch-pan-x"===e?{"touch-action":"pan-x"}:"touch-pan-y"===e?{"touch-action":"pan-y"}:"scroll-smooth"===e?{"scroll-behavior":"smooth"}:"scroll-auto"===e?{"scroll-behavior":"auto"}:(u=e.match(/^\[(--[a-zA-Z0-9-]+):(.+)]$/))?{[u[1]]:u[2]}:function(e){for(const t of te.values())if(t[e])return t[e];return null}(e)||null}function Y(e){let t=0,r=-1;for(let n=0;n<e.length;n++)if("["===e[n])t++;else if("]"===e[n])t--;else if(":"===e[n]&&0===t){r=n;break}return-1===r?{variant:null,utility:e}:{variant:e.slice(0,r),utility:e.slice(r+1)}}function Q(e,t){for(const[r,n]of Object.entries(t))e[r]=n}function U(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}var X=new Map,G=null,J=null;function V(){return G&&G.isConnected||(G=document.getElementById("tkx-atomic"))||((G=document.createElement("style")).id="tkx-atomic",document.head.appendChild(G)),G}function K(e){const t=[];for(const r of e)if(r)if("string"==typeof r)t.push(...r.split(/\s+/).filter(Boolean));else if(Array.isArray(r))t.push(...K(r));else if("object"==typeof r)for(const[e,n]of Object.entries(r))n&&t.push(e);return t}function ee(...e){const t=K(e);if(0===t.length)return"";const r={base:{},variants:{}};for(const l of t){const{variant:e,utility:t}=Y(l),n=N(t);n&&(e?(r.variants[e]||(r.variants[e]={}),Q(r.variants[e],n)):Q(r.base,n))}const n=[],o=U(r.base),i=function(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619)>>>0;return t.toString(16).padStart(8,"0")}([o,...Object.entries(r.variants).map(([e,t])=>`${e}{${U(t)}}`)].join("|")),a=`tkx-${i}`;o&&n.push(`.${a}{${o}}`);for(const[l,s]of Object.entries(r.variants)){const e=U(s);if(e)if(l.startsWith("@")){const t=E[l.slice(1)];t&&n.push(`@media(min-width:${t}){.${a}{${e}}}`)}else if("motion-safe"===l)n.push(`@media(prefers-reduced-motion:no-preference){.${a}{${e}}}`);else if("motion-reduce"===l)n.push(`@media(prefers-reduced-motion:reduce){.${a}{${e}}}`);else if("contrast-more"===l)n.push(`@media(prefers-contrast:more){.${a}{${e}}}`);else if("forced-colors"===l)n.push(`@media(forced-colors:active){.${a}{${e}}}`);else if("dark"===l)n.push(`@media(prefers-color-scheme:dark){.${a}{${e}}}`);else if("print"===l)n.push(`@media print{.${a}{${e}}}`);else if("group-hover"===l)n.push(`.group:hover .${a}{${e}}`);else if("group-focus"===l)n.push(`.group:focus-within .${a}{${e}}`);else if("peer-hover"===l)n.push(`.peer:hover~.${a}{${e}}`);else{const t={hover:":hover",focus:":focus","focus-visible":":focus-visible","focus-within":":focus-within",active:":active",disabled:":disabled",checked:":checked",required:":required",valid:":valid",invalid:":invalid",first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)","first-of-type":":first-of-type","last-of-type":":last-of-type","only-child":":only-child","only-of-type":":only-of-type",empty:":empty",visited:":visited",target:":target","placeholder-shown":":placeholder-shown","read-only":":read-only",before:"::before",after:"::after",placeholder:"::placeholder",selection:"::selection","file-selector":"::file-selector-button",marker:"::marker"}[l]??`:${l}`;n.push(`.${a}${t}{${e}}`)}}return n.length>0&&function(e,t){if(X.has(e))return;if(X.set(e,t),"undefined"==typeof document)return;const r=function(){if(J)return J;try{const e=new CSSStyleSheet;return document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],J=e,e}catch{return null}}();if(r){const e=function(e){const t=[];let r=0,n=0;for(let o=0;o<e.length;o++)if("{"===e[o])r++;else if("}"===e[o]&&(r--,0===r)){const r=e.slice(n,o+1).trim();r&&t.push(r),n=o+1}return t}(t);for(const t of e)try{r.insertRule(t,r.cssRules.length)}catch{V().textContent+=t+"\n"}}else V().textContent+=t+"\n"}(i,n.join("")),a}var te=new Map;function re(e){return e?{primary:"#00f5d4",secondary:"#7b2ff7",background:"#0a0a0f",surface:"#12121a",text:"#e8e8f4",textMuted:"#8888aa",border:"#2a2a3e",error:"#f87171",warning:"#fbbf24",success:"#34d399",accent:"#ff6b6b"}:{primary:"#0d7c5f",secondary:"#6930c3",background:"#f8f6f1",surface:"#ffffff",text:"#1a1815",textMuted:"#6b6560",border:"#ddd8cc",error:"#dc2626",warning:"#d97706",success:"#059669",accent:"#e05a00"}}function ne({points:e,primary:t}){if(e.length<2)return(0,d.jsx)("div",{style:{height:48,display:"flex",alignItems:"center",justifyContent:"center",color:"#888",fontSize:12},children:"Waiting for data..."});const r=Math.max(...e.map(e=>e.energy)),n=Math.min(...e.map(e=>e.energy)),o=r-n||1,i=e[e.length-1].iteration||1;return(0,d.jsxs)("svg",{width:280,height:48,style:{display:"block"},children:[(0,d.jsx)("polyline",{points:e.map(e=>{const t=e.iteration/i*280,r=48-(e.energy-n)/o*44-2;return`${t.toFixed(1)},${r.toFixed(1)}`}).join(" "),fill:"none",stroke:t,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",opacity:.9}),(0,d.jsxs)("text",{x:2,y:10,fontSize:9,fill:"#888",children:["E=",r.toFixed(1)]}),(0,d.jsxs)("text",{x:2,y:46,fontSize:9,fill:"#888",children:["E=",n.toFixed(1)]})]})}function oe({label:e,value:t,onChange:r,text:n,border:o}){return(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[(0,d.jsx)("input",{type:"color",value:t,onChange:e=>r(e.target.value),style:{width:32,height:32,border:`1px solid ${o}`,borderRadius:6,padding:2,cursor:"pointer",background:"transparent"}}),(0,d.jsx)("div",{style:{width:60,height:28,borderRadius:6,background:t,border:`1px solid ${o}`}}),(0,d.jsx)("span",{style:{flex:1,fontSize:13,color:n,fontFamily:"monospace"},children:e}),(0,d.jsx)("code",{style:{fontSize:12,color:n,opacity:.7,fontFamily:"monospace"},children:t})]})}function ie({label:e,ratio:t}){const r=t>=4.5,n=t>=4.5,o=t>=7;return(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,d.jsx)("span",{style:{fontSize:11,opacity:.8,minWidth:140},children:e}),(0,d.jsxs)("span",{style:{fontSize:12,fontWeight:600},children:[t.toFixed(2),":1"]}),(0,d.jsx)("span",{style:{fontSize:11,color:n?"#22c55e":"#ef4444"},children:n?"✓ AA":"✗ AA"}),(0,d.jsx)("span",{style:{fontSize:11,color:o?"#22c55e":"#888"},children:o?"✓ AAA":"— AAA"}),(0,d.jsx)("span",{style:{fontSize:13},children:r?"✅":"❌"})]})}var ae=["fetch(","XMLHttpRequest","navigator.sendBeacon","document.cookie","localStorage","sessionStorage","indexedDB","WebSocket","EventSource","import(","eval(","new Function(","postMessage","window.open","location.href","location.replace","location.assign","document.write","crypto.subtle"],le=[{label:"Hello World",code:"<div style={{ padding: 24, fontFamily: 'sans-serif', color: '#e8e8f4' }}>\n <h2 style={{ margin: 0 }}>👋 Hello, TkxPlayground!</h2>\n <p style={{ marginTop: 8, opacity: 0.7 }}>Edit the code on the left to see live updates.</p>\n</div>"},{label:"Button Styles",code:"<div style={{ display: 'flex', gap: 12, flexWrap: 'wrap', padding: 24 }}>\n {['primary', 'success', 'danger', 'warning', 'info'].map(color => (\n <button\n key={color}\n style={{\n padding: '8px 18px',\n borderRadius: 8,\n border: 'none',\n background: color === 'primary' ? '#00f5d4' : color === 'success' ? '#06d6a0' : color === 'danger' ? '#f72585' : color === 'warning' ? '#ffbe0b' : '#3a86ff',\n color: '#0a0a0f',\n fontWeight: 700,\n cursor: 'pointer',\n textTransform: 'capitalize',\n }}\n >\n {color}\n </button>\n ))}\n</div>"},{label:"Card Grid",code:"<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 16, padding: 24 }}>\n {['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Zeta'].map(name => (\n <div key={name} style={{\n background: '#1a1a2e',\n borderRadius: 10,\n border: '1px solid #2a2a3e',\n padding: '16px',\n }}>\n <div style={{ fontWeight: 700, color: '#00f5d4', marginBottom: 4 }}>{name}</div>\n <div style={{ fontSize: 12, color: '#8888aa' }}>Quantum module {name.toLowerCase()}</div>\n </div>\n ))}\n</div>"},{label:"Animated Counter",code:"(() => {\n const [count, setCount] = React.useState(0);\n return (\n <div style={{ padding: 32, textAlign: 'center', fontFamily: 'sans-serif' }}>\n <div style={{ fontSize: 64, fontWeight: 900, color: '#00f5d4', marginBottom: 16 }}>\n {count}\n </div>\n <div style={{ display: 'flex', gap: 12, justifyContent: 'center' }}>\n <button onClick={() => setCount(c => c - 1)} style={{ padding: '8px 20px', borderRadius: 8, border: '1px solid #2a2a3e', background: '#1a1a2e', color: '#e8e8f4', fontSize: 20, cursor: 'pointer' }}>−</button>\n <button onClick={() => setCount(0)} style={{ padding: '8px 20px', borderRadius: 8, border: '1px solid #2a2a3e', background: '#1a1a2e', color: '#8888aa', cursor: 'pointer' }}>Reset</button>\n <button onClick={() => setCount(c => c + 1)} style={{ padding: '8px 20px', borderRadius: 8, border: '1px solid #2a2a3e', background: '#1a1a2e', color: '#e8e8f4', fontSize: 20, cursor: 'pointer' }}>+</button>\n </div>\n </div>\n );\n})()"},{label:"Data Table",code:"(() => {\n const rows = [\n { id: 1, name: 'Hydrogen', symbol: 'H', mass: 1.008 },\n { id: 2, name: 'Helium', symbol: 'He', mass: 4.003 },\n { id: 3, name: 'Lithium', symbol: 'Li', mass: 6.941 },\n { id: 4, name: 'Carbon', symbol: 'C', mass: 12.011 },\n { id: 5, name: 'Nitrogen', symbol: 'N', mass: 14.007 },\n ];\n const cell = { padding: '8px 14px', borderBottom: '1px solid #2a2a3e', color: '#e8e8f4', fontSize: 13 };\n const hcell = { ...cell, color: '#8888aa', fontWeight: 600, fontSize: 11, textTransform: 'uppercase', letterSpacing: '0.06em' };\n return (\n <div style={{ padding: 16 }}>\n <table style={{ width: '100%', borderCollapse: 'collapse', fontFamily: 'sans-serif' }}>\n <thead>\n <tr>{['ID','Element','Symbol','Atomic Mass'].map(h => <th key={h} style={hcell}>{h}</th>)}</tr>\n </thead>\n <tbody>\n {rows.map(r => (\n <tr key={r.id} style={{ transition: 'background 0.15s' }}>\n <td style={cell}>{r.id}</td>\n <td style={cell}>{r.name}</td>\n <td style={{ ...cell, color: '#00f5d4', fontWeight: 700 }}>{r.symbol}</td>\n <td style={cell}>{r.mass}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n})()"}],se=class extends a.default.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){this.props.onError(e.message)}componentDidUpdate(e){e.children!==this.props.children&&this.state.hasError&&this.setState({hasError:!1})}render(){return this.state.hasError?null:this.props.children}};function de({code:e,lineHeight:t}){const r=e.split("\n");return(0,d.jsx)("div",{"aria-hidden":"true",style:{position:"absolute",top:0,left:0,width:"36px",padding:"12px 0",textAlign:"right",paddingRight:"8px",userSelect:"none",pointerEvents:"none",fontSize:"12px",lineHeight:`${t}px`,color:"#555577",fontFamily:'"Fira Code", "Cascadia Code", "Consolas", monospace',boxSizing:"border-box"},children:r.map((e,t)=>(0,d.jsx)("div",{children:t+1},t))})}var ce=["TkxButton","TkxInput","TkxCard","TkxModal","TkxTable","TkxSelect","TkxCheckbox","TkxRadio","TkxSwitch","TkxSlider","TkxBadge","TkxAlert","TkxToast","TkxTooltip","TkxPopover","TkxTabs","TkxAccordion","TkxDrawer","TkxDropdown","TkxMenu","TkxForm","TkxDataGrid","TkxChart","TkxSpinner","TkxSkeleton","TkxAvatar","TkxTag","TkxDivider","TkxProgress","TkxStatistic","TkxQuantumForm","TkxPlayground"],ue=new x;function fe(e){const t=e.match(/([A-Z][a-zA-Z0-9]*)$/);return t?t[1]:""}function pe({defaultCode:e,examples:t,height:r=480,imports:n={},strictMode:o=!0,forbiddenTokens:i}){const l=u(),s=[...le,...t??[]],c=e??le[0].code,[f,p]=(0,a.useState)(c),[h,g]=(0,a.useState)({element:null,error:null,renderMs:0}),[m,x]=(0,a.useState)(null),[b,y]=(0,a.useState)([]),[w,v]=(0,a.useState)(!1),[k,$]=(0,a.useState)(0),S=(0,a.useRef)(null),z=(0,a.useRef)(null),C=(0,a.useCallback)(e=>{x(null),g(function(e,t,r){const n=performance.now();try{const o=e.trim();if(!1!==r?.strictMode){const e=function(e,t){const r=[...ae,...t??[]],n=e.toLowerCase();for(const o of r)if(n.includes(o.toLowerCase()))return o;return null}(o,r?.forbiddenTokens);if(e)return{element:null,error:`Blocked by playground strictMode: code contains "${e}". This token is disallowed because playground snippets run in the page's JavaScript context. If you trust the source, pass strictMode={false} to <TkxPlayground>.`,renderMs:parseFloat((performance.now()-n).toFixed(2))}}let i=`\n function PlaygroundRoot() {\n ${o.startsWith("<")||o.startsWith("(")?`return (${o});`:o}\n }\n `;const l="undefined"==typeof window?null:window.Babel??null;l&&(i=l.transform(i,{presets:["react"],filename:"playground.jsx"}).code??i);const s=new Function("React","imports",`\n "use strict";\n const { ${Object.keys(t).join(", ")} } = imports;\n ${i}\n return PlaygroundRoot;\n `)(a.default,t);return{element:a.default.createElement(s),error:null,renderMs:parseFloat((performance.now()-n).toFixed(2))}}catch(o){const e=parseFloat((performance.now()-n).toFixed(2));return{element:null,error:o instanceof Error?o.message:String(o),renderMs:e}}}(e,n,{strictMode:o,forbiddenTokens:i}))},[n,o,i]);(0,a.useEffect)(()=>(z.current&&clearTimeout(z.current),z.current=setTimeout(()=>C(f),300),()=>{z.current&&clearTimeout(z.current)}),[f,C]),(0,a.useEffect)(()=>{C(c)},[]);const M=(0,a.useCallback)(e=>{const t=e.target.value;p(t);const r=fe(t);r.length>=2?y(function(e,t=4){if(!e||e.length<2)return[];const r=e.toLowerCase();return ue.amplify(ce,e=>{const t=e.toLowerCase();if(t.startsWith(r))return 1;if(t.includes(r))return.7;let n=0;for(let o=0;o<r.length-1;o++)t.includes(r.slice(o,o+2))&&(n+=.15);return Math.min(n,.5)},.1).slice(0,t).map(e=>({name:ce[e.index]??"",amplitude:parseFloat(e.combined.toFixed(3))})).filter(e=>""!==e.name)}(r,4)):y([])},[]),T=(0,a.useCallback)(e=>{const t=s[e];t&&($(e),p(t.code),y([]))},[s]),A=(0,a.useCallback)(async()=>{try{await navigator.clipboard.writeText(f),v(!0),setTimeout(()=>v(!1),1500)}catch{}},[f]),j=(0,a.useCallback)(()=>{p(c),$(0),y([])},[c]),R=(0,a.useCallback)(e=>{const t=fe(f);t&&p(r=>r.slice(0,r.lastIndexOf(t))+e),y([])},[f]),W=null!==h.error||null!==m,B=h.error??m??"",F=l.bg,L=l.surfaceAlt,P=l.border,_=l.surface,E={width:"50%",display:"flex",flexDirection:"column",borderRight:`1px solid ${P}`,position:"relative"},I={display:"flex",alignItems:"center",gap:"6px",padding:"6px 10px",borderBottom:`1px solid ${P}`,backgroundColor:l.surface,flexWrap:"wrap"},D={padding:"3px 10px",borderRadius:"6px",border:`1px solid ${P}`,backgroundColor:"transparent",color:l.textMuted,fontSize:"11px",fontWeight:600,cursor:"pointer",fontFamily:"inherit",transition:"color 0.15s, border-color 0.15s"};return(0,d.jsxs)("div",{style:{display:"flex",flexDirection:"column",border:`1px solid ${P}`,borderRadius:"12px",overflow:"hidden",backgroundColor:F,fontFamily:"inherit",boxSizing:"border-box",position:"relative"},children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",borderBottom:`1px solid ${P}`,backgroundColor:l.surface},children:[(0,d.jsx)("span",{style:{fontSize:"12px",fontWeight:700,color:l.primary,letterSpacing:"0.05em"},children:"⚛ TkxPlayground"}),(0,d.jsx)("span",{style:{fontSize:"10px",color:l.textMuted},children:"Live JSX Preview"})]}),(0,d.jsx)("div",{style:{display:"flex",gap:"4px",padding:"6px 10px",borderBottom:`1px solid ${P}`,backgroundColor:l.surface,overflowX:"auto"},children:s.map((e,t)=>(0,d.jsx)("button",{onClick:()=>T(t),style:{padding:"3px 10px",borderRadius:"6px",border:`1px solid ${t===k?l.primary:P}`,backgroundColor:t===k?`${l.primary}20`:"transparent",color:t===k?l.primary:l.textMuted,fontSize:"11px",fontWeight:t===k?700:400,cursor:"pointer",whiteSpace:"nowrap",fontFamily:"inherit",transition:"all 0.15s"},children:e.label},t))}),(0,d.jsxs)("div",{style:{display:"flex",height:`${r}px`},children:[(0,d.jsxs)("div",{style:E,children:[(0,d.jsxs)("div",{style:I,children:[(0,d.jsx)("span",{style:{fontSize:"11px",color:l.textMuted,marginRight:"auto"},children:"editor.tsx"}),(0,d.jsx)("button",{onClick:A,style:D,title:"Copy code",children:w?"✓ Copied":"⎘ Copy"}),(0,d.jsx)("button",{onClick:j,style:D,title:"Reset to default",children:"↺ Reset"})]}),(0,d.jsxs)("div",{style:{position:"relative",flex:1,overflow:"hidden"},children:[(0,d.jsx)(de,{code:f,lineHeight:18}),(0,d.jsx)("textarea",{ref:S,value:f,onChange:M,spellCheck:!1,autoCorrect:"off",autoCapitalize:"off",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",padding:"12px 12px 12px 44px",margin:0,border:"none",outline:"none",resize:"none",backgroundColor:F,color:l.text,fontSize:"12px",lineHeight:"18px",fontFamily:'"Fira Code", "Cascadia Code", "Consolas", "Courier New", monospace',boxSizing:"border-box",overflowY:"auto",tabSize:2}})]}),b.length>0&&(0,d.jsxs)("div",{style:{position:"absolute",bottom:"40px",left:"44px",zIndex:10,backgroundColor:l.surface,border:`1px solid ${l.primary}44`,borderRadius:"8px",overflow:"hidden",boxShadow:"0 4px 16px rgba(0,0,0,0.3)",minWidth:"180px"},children:[(0,d.jsx)("div",{style:{padding:"4px 10px 4px",fontSize:"10px",color:l.primary,fontWeight:700,borderBottom:`1px solid ${P}`,letterSpacing:"0.05em"},children:"⚛ Quantum Suggestions"}),b.map(e=>(0,d.jsxs)("button",{onClick:()=>R(e.name),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"6px 10px",border:"none",backgroundColor:"transparent",color:l.text,fontSize:"12px",fontFamily:'"Fira Code", monospace',cursor:"pointer",textAlign:"left",gap:"12px"},children:[(0,d.jsx)("span",{children:e.name}),(0,d.jsxs)("span",{style:{fontSize:"10px",color:l.textMuted,flexShrink:0},children:[Math.round(100*e.amplitude),"%"]})]},e.name))]})]}),(0,d.jsxs)("div",{style:{width:"50%",display:"flex",flexDirection:"column"},children:[(0,d.jsx)("div",{style:{padding:"6px 10px",borderBottom:`1px solid ${P}`,backgroundColor:l.surface,fontSize:"11px",color:l.textMuted,fontWeight:600},children:"Preview"}),(0,d.jsx)("div",{style:{flex:1,overflow:"auto",backgroundColor:L,position:"relative"},children:W?(0,d.jsxs)("div",{style:{padding:"16px",color:l.danger,fontFamily:'"Fira Code", monospace',fontSize:"12px",lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[(0,d.jsxs)("div",{style:{marginBottom:"8px",fontWeight:700,display:"flex",alignItems:"center",gap:"6px"},children:[(0,d.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),"Runtime Error"]}),B]}):(0,d.jsx)(se,{onError:x,children:(0,d.jsx)("div",{style:{minHeight:"100%"},children:h.element})})})]})]}),(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"16px",padding:"4px 12px",backgroundColor:_,borderTop:`1px solid ${P}`,fontSize:"11px",color:l.textMuted},children:[(0,d.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"4px",color:W?l.danger:l.success,fontWeight:600},children:[(0,d.jsx)("span",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:W?l.danger:l.success,display:"inline-block"}}),W?"Error":"OK"]}),(0,d.jsxs)("span",{children:["⏱ ",h.renderMs," ms"]}),(0,d.jsxs)("span",{children:[f.split("\n").length," lines"]}),(0,d.jsxs)("span",{children:[f.length," chars"]}),b.length>0&&(0,d.jsxs)("span",{style:{marginLeft:"auto",color:l.primary,fontWeight:600},children:["⚛ ",b.length," suggestion",b.length>1?"s":""]})]})]})}pe.displayName="TkxPlayground",exports.AmplitudeAmplifier=x,exports.QuantumAI=z,exports.QuantumAnnealer=g,exports.QuantumBoltzmannMachine=m,exports.QuantumRegister=h,exports.Qubit=p,exports.TkxPlayground=pe,exports.TkxThemeBuilder=function({onThemeChange:e,initialHue:t=210,initialMode:r="dark"}){const n=u(),[o,i]=(0,a.useState)(r),[l,s]=(0,a.useState)(t),[c,f]=(0,a.useState)(()=>re("dark"===r)),[p,h]=(0,a.useState)(!1),[g,m]=(0,a.useState)([]),[x,b]=(0,a.useState)(!1),y=(0,a.useRef)(null),w="dark"===o,v=(0,a.useCallback)((t,r)=>{f(n=>{const o={...n,[t]:r};return e?.(o),o})},[e]),k=(0,a.useCallback)(()=>{if(p)return;h(!0),m([]);let t=0;const r=[],n=()=>{t+=60,z.optimizeTheme(l,w,t);const o=t/600,i=50*(1-o)+2,a=8*(Math.random()-.5)*(1-.8*o);if(r.push({iteration:t,energy:Math.max(0,i+a)}),m([...r]),t<600)y.current=window.setTimeout(n,40);else{const t=z.optimizeTheme(l,w,1e3);f(t),e?.(t),h(!1)}};y.current=window.setTimeout(n,16)},[l,w,p,e]),$=(0,a.useCallback)(()=>{const t="dark"===o?"light":"dark";i(t);const r=re("dark"===t);f(r),e?.(r)},[o,e]),S=(0,a.useCallback)(()=>{const e=`export const myTheme = {\n${Object.entries(c).map(([e,t])=>` ${e}: '${t}',`).join("\n")}\n};`;"undefined"!=typeof navigator&&navigator.clipboard&&navigator.clipboard.writeText(e).then(()=>{b(!0),setTimeout(()=>b(!1),2e3)})},[c]),C=[{label:"Text on Background",fg:c.text,bg:c.background},{label:"Text on Surface",fg:c.text,bg:c.surface},{label:"Primary on Background",fg:c.primary,bg:c.background},{label:"TextMuted on Background",fg:c.textMuted,bg:c.background}],M="linear-gradient(to right,"+["hsl(0,80%,55%)","hsl(30,80%,55%)","hsl(60,80%,55%)","hsl(90,80%,55%)","hsl(120,80%,55%)","hsl(150,80%,55%)","hsl(180,80%,55%)","hsl(210,80%,55%)","hsl(240,80%,55%)","hsl(270,80%,55%)","hsl(300,80%,55%)","hsl(330,80%,55%)","hsl(360,80%,55%)"].join(",")+")",T={fontFamily:"system-ui, -apple-system, sans-serif",background:c.background,color:c.text,border:`1px solid ${c.border}`,borderRadius:12,padding:20,maxWidth:900,display:"grid",gridTemplateColumns:"1fr 1fr",gap:20},A={background:c.surface,border:`1px solid ${c.border}`,borderRadius:8,padding:16},j={fontSize:13,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.08em",color:c.primary,marginBottom:12,marginTop:0},R={padding:"8px 16px",borderRadius:8,border:"none",cursor:"pointer",fontWeight:600,fontSize:13,transition:"opacity 0.15s"},W=ee;return(0,d.jsxs)("div",{style:T,children:[(0,d.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gridColumn:"1/-1"},children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:700},children:"Theme Builder"}),(0,d.jsx)("p",{style:{margin:"2px 0 0",fontSize:12,color:c.textMuted},children:"Quantum-powered color optimization"})]}),(0,d.jsx)("button",{onClick:$,style:{...R,background:c.surface,color:c.text,border:`1px solid ${c.border}`},children:w?"☀ Light":"🌙 Dark"})]}),(0,d.jsxs)("div",{style:A,children:[(0,d.jsx)("p",{style:j,children:"Base Hue"}),(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,d.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",background:`hsl(${l},70%,55%)`,border:`2px solid ${c.border}`,flexShrink:0}}),(0,d.jsx)("input",{type:"range",min:0,max:360,value:l,onChange:e=>s(Number(e.target.value)),style:{flex:1,height:16,borderRadius:8,background:M,outline:"none",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"}}),(0,d.jsxs)("span",{style:{fontSize:13,fontFamily:"monospace",minWidth:32},children:[l,"°"]})]})]}),(0,d.jsxs)("div",{style:A,children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10},children:[(0,d.jsx)("button",{onClick:k,disabled:p,style:{...R,background:p?c.border:c.primary,color:w?"#000":"#fff",opacity:p?.7:1,flex:1},children:p?"⟳ Optimizing...":"⚛ Generate with Quantum Annealing"}),(0,d.jsx)("div",{style:{padding:"3px 8px",background:c.primary+"22",border:`1px solid ${c.primary}44`,borderRadius:20,fontSize:10,color:c.primary,fontWeight:700,whiteSpace:"nowrap"},children:"⚛ Quantum Annealing"})]}),(p||g.length>0)&&(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{style:{fontSize:11,color:c.textMuted,margin:"0 0 4px"},children:"Energy landscape (lower = better palette)"}),(0,d.jsx)(ne,{points:g,primary:c.primary})]})]}),(0,d.jsxs)("div",{style:A,children:[(0,d.jsx)("p",{style:j,children:"Color Tokens"}),Object.keys(c).map(e=>(0,d.jsx)(oe,{label:e,value:c[e],onChange:t=>v(e,t),text:c.text,border:c.border},e))]}),(0,d.jsx)("button",{onClick:S,style:{...R,background:c.accent,color:"#fff",width:"100%"},children:x?"✓ Copied to Clipboard!":"⬇ Export Theme"})]}),(0,d.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,d.jsxs)("div",{style:A,children:[(0,d.jsx)("p",{style:j,children:"Live Preview"}),(0,d.jsxs)("div",{style:{marginBottom:12},children:[(0,d.jsx)("p",{style:{fontSize:11,color:c.textMuted,margin:"0 0 6px"},children:"Buttons"}),(0,d.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,d.jsx)("button",{style:{padding:"8px 16px",borderRadius:8,border:"none",background:c.primary,color:w?"#000":"#fff",fontWeight:600,fontSize:13,cursor:"pointer"},children:"Primary"}),(0,d.jsx)("button",{style:{padding:"8px 16px",borderRadius:8,border:"none",background:c.secondary,color:"#fff",fontWeight:600,fontSize:13,cursor:"pointer"},children:"Secondary"}),(0,d.jsx)("button",{style:{padding:"8px 16px",borderRadius:8,border:`1px solid ${c.border}`,background:"transparent",color:c.text,fontWeight:600,fontSize:13,cursor:"pointer"},children:"Outline"})]})]}),(0,d.jsxs)("div",{style:{marginBottom:12},children:[(0,d.jsx)("p",{style:{fontSize:11,color:c.textMuted,margin:"0 0 6px"},children:"Card"}),(0,d.jsxs)("div",{style:{background:c.surface,border:`1px solid ${c.border}`,borderRadius:8,padding:12},children:[(0,d.jsx)("div",{style:{fontSize:14,fontWeight:700,marginBottom:4},children:"Card Title"}),(0,d.jsx)("div",{style:{fontSize:12,color:c.textMuted,lineHeight:1.4},children:"Sample card with surface background and muted text content."}),(0,d.jsxs)("div",{style:{marginTop:8,display:"flex",gap:6},children:[(0,d.jsx)("span",{style:{padding:"2px 8px",borderRadius:20,background:c.primary+"33",color:c.primary,fontSize:11,fontWeight:600},children:"Tag"}),(0,d.jsx)("span",{style:{padding:"2px 8px",borderRadius:20,background:c.accent+"33",color:c.accent,fontSize:11,fontWeight:600},children:"Accent"})]})]})]}),(0,d.jsxs)("div",{style:{marginBottom:12},children:[(0,d.jsx)("p",{style:{fontSize:11,color:c.textMuted,margin:"0 0 6px"},children:"Input"}),(0,d.jsx)("input",{type:"text",placeholder:"Type something...",readOnly:!0,style:{width:"100%",padding:"8px 12px",borderRadius:8,border:`1px solid ${c.border}`,background:c.background,color:c.text,fontSize:13,outline:"none",boxSizing:"border-box"}})]}),(0,d.jsxs)("div",{style:{marginBottom:12},children:[(0,d.jsx)("p",{style:{fontSize:11,color:c.textMuted,margin:"0 0 6px"},children:"Progress"}),(0,d.jsx)("div",{style:{height:8,borderRadius:4,background:c.border,overflow:"hidden"},children:(0,d.jsx)("div",{style:{height:"100%",width:"68%",background:`linear-gradient(to right, ${c.primary}, ${c.accent})`,borderRadius:4,transition:"width 0.4s ease"}})})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{style:{fontSize:11,color:c.textMuted,margin:"0 0 6px"},children:"Status Badges"}),(0,d.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[{label:"Error",color:c.error},{label:"Warning",color:c.warning},{label:"Success",color:c.success}].map(({label:e,color:t})=>(0,d.jsx)("span",{style:{padding:"3px 10px",borderRadius:4,background:t+"22",color:t,border:`1px solid ${t}44`,fontSize:11,fontWeight:700},children:e},e))})]})]}),(0,d.jsxs)("div",{style:A,children:[(0,d.jsx)("p",{style:j,children:"WCAG Contrast Check"}),C.map(e=>(0,d.jsx)(ie,{label:e.label,ratio:z.contrast(e.fg,e.bg)},e.label)),(0,d.jsx)("p",{style:{fontSize:10,color:c.textMuted,marginTop:8,marginBottom:0},children:"AA requires 4.5:1 (normal text). AAA requires 7:1."})]}),(0,d.jsxs)("div",{style:A,children:[(0,d.jsx)("p",{style:j,children:"Color Palette"}),(0,d.jsx)("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:Object.entries(c).map(([e,t])=>(0,d.jsx)("div",{title:`${e}: ${t}`,style:{width:36,height:36,borderRadius:6,background:t,border:`2px solid ${c.border}`,cursor:"default",flexShrink:0}},e))})]})]}),"function"==typeof W&&null,"string"==typeof n.bg&&null]})},exports.hslToHex=w,exports.inferFieldIntelligence=y,exports.optimizeThemeColors=S;
|