@uicopilot/storybook-addon 0.5.2 → 0.5.3

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.
Files changed (2) hide show
  1. package/dist/manager.mjs +3 -3
  2. package/package.json +1 -1
package/dist/manager.mjs CHANGED
@@ -9,9 +9,9 @@ var yF=Object.create;var Ea=Object.defineProperty;var bF=Object.getOwnPropertyDe
9
9
  value: `+(i||"<empty string>")+`
10
10
  --------`+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,u),o.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:u,end:c},o}});function ol(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===nl&&e.charCodeAt(t+1)===nl}function ab(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===nl&&e.charCodeAt(t+1)!==nl){let n=e.indexOf("-",t+2);if(n!==-1)return e.substring(t,n+1)}return""}function HE(e){if(tl.has(e))return tl.get(e);let t=e.toLowerCase(),n=tl.get(t);if(n===void 0){let r=ol(t,0),o=r?"":ab(t,0);n=Object.freeze({basename:t.substr(o.length),name:t,prefix:o,vendor:o,custom:r})}return tl.set(e,n),n}function WE(e){if(fi.has(e))return fi.get(e);let t=e,n=e[0];n==="/"?n=e[1]==="/"?"//":"/":n!=="_"&&n!=="*"&&n!=="$"&&n!=="#"&&n!=="+"&&n!=="&"&&(n="");let r=ol(t,n.length);if(!r&&(t=t.toLowerCase(),fi.has(t))){let a=fi.get(t);return fi.set(e,a),a}let o=r?"":ab(t,n.length),i=t.substr(0,n.length+o.length),s=Object.freeze({basename:t.substr(i.length),name:t.substr(n.length),hack:n,vendor:o,prefix:i,custom:r});return fi.set(e,s),s}var tl,fi,nl,rl,Iu,il=$(()=>{"use strict";tl=new Map,fi=new Map,nl=45,rl=HE,Iu=WE});var gi,sl=$(()=>{"use strict";gi=["initial","inherit","unset","revert","revert-layer"]});function Au(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function hs(e,t,n){for(;e!==null&&(e.type===13||e.type===25);)e=n(++t);return t}function co(e,t,n,r){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===xs||o===Pr){if(n)return 0;t++}for(;t<e.value.length;t++)if(!_t(e.value.charCodeAt(t)))return 0;return r+1}function Eu(e,t,n){let r=!1,o=hs(e,t,n);if(e=n(o),e===null)return t;if(e.type!==10)if(Au(e,xs)||Au(e,Pr)){if(r=!0,o=hs(n(++o),o,n),e=n(o),e===null||e.type!==10)return 0}else return t;if(!r){let i=e.value.charCodeAt(0);if(i!==xs&&i!==Pr)return 0}return co(e,r?0:1,r,o)}function Pu(e,t){let n=0;if(!e)return 0;if(e.type===10)return co(e,0,GE,n);if(e.type===1&&e.value.charCodeAt(0)===Pr){if(!_r(e.value,1,Fu))return 0;switch(e.value.length){case 2:return Eu(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==Pr?0:(n=hs(t(++n),n,t),e=t(n),co(e,0,mi,n));default:return e.value.charCodeAt(2)!==Pr?0:co(e,3,mi,n)}}else if(e.type===1||Au(e,xs)&&t(n+1).type===1){if(e.type!==1&&(e=t(++n)),e===null||!_r(e.value,0,Fu))return 0;switch(e.value.length){case 1:return Eu(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==Pr?0:(n=hs(t(++n),n,t),e=t(n),co(e,0,mi,n));default:return e.value.charCodeAt(1)!==Pr?0:co(e,2,mi,n)}}else if(e.type===12){let r=e.value.charCodeAt(0),o=r===xs||r===Pr?1:0,i=o;for(;i<e.value.length&&_t(e.value.charCodeAt(i));i++);return i===o||!_r(e.value,i,Fu)?0:i+1===e.value.length?Eu(t(++n),n,t):e.value.charCodeAt(i+1)!==Pr?0:i+2===e.value.length?(n=hs(t(++n),n,t),e=t(n),co(e,0,mi,n)):co(e,i+2,mi,n)}return 0}var xs,Pr,Fu,mi,GE,lb=$(()=>{"use strict";nr();xs=43,Pr=45,Fu=110,mi=!0,GE=!1});function Lu(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function KE(e,t){return e.value.charCodeAt(0)===t}function ys(e,t,n){let r=0;for(let o=t;o<e.value.length;o++){let i=e.value.charCodeAt(o);if(i===cb&&n&&r!==0)return ys(e,t+r+1,!1),6;if(!Pn(i)||++r>6)return 0}return r}function al(e,t,n){if(!e)return 0;for(;Lu(n(t),ub);){if(++e>6)return 0;t++}return t}function Mu(e,t){let n=0;if(e===null||e.type!==1||!_r(e.value,0,YE)||(e=t(++n),e===null))return 0;if(Lu(e,qE))return e=t(++n),e===null?0:e.type===1?al(ys(e,0,!0),++n,t):Lu(e,ub)?al(1,++n,t):0;if(e.type===10){let r=ys(e,1,!0);return r===0?0:(e=t(++n),e===null?n:e.type===12||e.type===10?!KE(e,cb)||!ys(e,1,!1)?0:n+1:al(r,n,t))}return e.type===12?al(ys(e,1,!0),++n,t):0}var qE,cb,ub,YE,pb=$(()=>{"use strict";nr();qE=43,cb=45,ub=63,YE=117});function yr(e,t){return t<e.length?e.charCodeAt(t):0}function fb(e,t){return $r(e,0,e.length,t)}function gb(e,t){for(let n=0;n<t.length;n++)if(fb(e,t[n]))return!0;return!1}function mb(e,t){return t!==e.length-2?!1:yr(e,t)===92&&_t(yr(e,t+1))}function ll(e,t,n){if(e&&e.type==="Range"){let r=Number(n!==void 0&&n!==t.length?t.substr(0,n):t);if(isNaN(r)||e.min!==null&&r<e.min&&typeof e.min!="string"||e.max!==null&&r>e.max&&typeof e.max!="string")return!0}return!1}function eA(e,t){let n=0,r=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==n)break e;if(n=r.pop(),r.length===0){o++;break e}break;case 2:case 21:case 19:case 23:r.push(n),n=Ou.get(e.type);break}o++}while(e=t(o));return o}function or(e,t){return function(n,r,o){return n===null?0:n.type===2&&gb(n.value,t)?eA(n,r):e(n,r,o)}}function Ft(e){return function(t){return t===null||t.type!==e?0:1}}function tA(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return gb(t,gi)||fb(t,"default")?0:1}function hb(e){return e===null||e.type!==1||yr(e.value,0)!==45||yr(e.value,1)!==45?0:1}function nA(e){return!hb(e)||e.value==="--"?0:1}function rA(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let n=1;n<t;n++)if(!Pn(yr(e.value,n)))return 0;return 1}function oA(e){return e===null||e.type!==4||!oi(yr(e.value,1),yr(e.value,2),yr(e.value,3))?0:1}function iA(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 17:if(n===0)break e;break;case 9:if(n===0&&e.value==="!")break e;break;case 2:case 21:case 19:case 23:r.push(n),n=Ou.get(e.type);break}o++}while(e=t(o));return o}function sA(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 2:case 21:case 19:case 23:r.push(n),n=Ou.get(e.type);break}o++}while(e=t(o));return o}function Vr(e){return e&&(e=new Set(e)),function(t,n,r){if(t===null||t.type!==12)return 0;let o=Do(t.value,0);if(e!==null){let i=t.value.indexOf("\\",o),s=i===-1||!mb(t.value,i)?t.value.substr(o):t.value.substring(o,i);if(e.has(s.toLowerCase())===!1)return 0}return ll(r,t.value,o)?0:1}}function aA(e,t,n){return e===null||e.type!==11||ll(n,e.value,e.value.length-1)?0:1}function xb(e){return typeof e!="function"&&(e=function(){return 0}),function(t,n,r){return t!==null&&t.type===10&&Number(t.value)===0?1:e(t,n,r)}}function lA(e,t,n){if(e===null)return 0;let r=Do(e.value,0);return!(r===e.value.length)&&!mb(e.value,r)||ll(n,e.value,r)?0:1}function cA(e,t,n){if(e===null||e.type!==10)return 0;let r=yr(e.value,0)===43||yr(e.value,0)===45?1:0;for(;r<e.value.length;r++)if(!_t(yr(e.value,r)))return 0;return ll(n,e.value,r)?0:1}function fA(e){let{angle:t,decibel:n,frequency:r,flex:o,length:i,resolution:s,semitones:a,time:u}=e||{};return{dimension:or(Vr(null),Wr),angle:or(Vr(t),Wr),decibel:or(Vr(n),Wr),frequency:or(Vr(r),Wr),flex:or(Vr(o),Wr),length:or(xb(Vr(i)),Wr),resolution:or(Vr(s),Wr),semitones:or(Vr(a),Wr),time:or(Vr(u),Wr)}}function gA(e){let t=new Set;for(let n of dA)if(Array.isArray(e[n]))for(let r of e[n])t.add(r.toLowerCase());return function(r){return r===null?0:r.type===9&&r.value==="%"||r.type===1&&t.has(r.value.toLowerCase())?1:0}}function yb(e){return{...uA,...pA,...fA(e),"attr-unit":gA(e)}}var Bu,Du,Ru,XE,QE,JE,zu,Nu,db,ZE,Wr,Ou,uA,pA,dA,bb=$(()=>{"use strict";sl();lb();pb();nr();Bu=["calc(","-moz-calc(","-webkit-calc("],Du=["min(","max(","clamp("],Ru=["round(","mod(","rem("],XE=["sin(","cos(","tan("],QE=["asin(","acos(","atan(","atan2("],JE=["pow(","sqrt(","log(","exp(","sign("],zu=["hypot("],Nu=["abs("],db=[...Bu,...Du,...Ru,...XE,...JE,...zu,...Nu],ZE=[...Bu,...Du,...Ru,...zu,...Nu],Wr=[...Bu,...Du,...Ru,...QE,...zu,...Nu],Ou=new Map([[2,22],[21,22],[19,20],[23,24]]);uA={"ident-token":Ft(1),"function-token":Ft(2),"at-keyword-token":Ft(3),"hash-token":Ft(4),"string-token":Ft(5),"bad-string-token":Ft(6),"url-token":Ft(7),"bad-url-token":Ft(8),"delim-token":Ft(9),"number-token":Ft(10),"percentage-token":Ft(11),"dimension-token":Ft(12),"whitespace-token":Ft(13),"CDO-token":Ft(14),"CDC-token":Ft(15),"colon-token":Ft(16),"semicolon-token":Ft(17),"comma-token":Ft(18),"[-token":Ft(19),"]-token":Ft(20),"(-token":Ft(21),")-token":Ft(22),"{-token":Ft(23),"}-token":Ft(24)},pA={string:Ft(5),ident:Ft(1),percentage:or(aA,ZE),zero:xb(),number:or(lA,db),integer:or(cA,db),"custom-ident":tA,"dashed-ident":hb,"custom-property-name":nA,"hex-color":rA,"id-selector":oA,"an-plus-b":Pu,urange:Mu,"declaration-value":iA,"any-value":sA},dA=["length","angle","time","frequency","resolution","flex","decibel","semitones"]});var cl={};ye(cl,{angle:()=>hA,decibel:()=>wA,flex:()=>SA,frequency:()=>yA,length:()=>mA,resolution:()=>bA,semitones:()=>vA,time:()=>xA});var mA,hA,xA,yA,bA,SA,wA,vA,Sb=$(()=>{"use strict";mA=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],hA=["deg","grad","rad","turn"],xA=["s","ms"],yA=["hz","khz"],bA=["dpi","dpcm","dppx","x"],SA=["fr"],wA=["db"],vA=["st"]});function wb(e,t,n){return Object.assign(zo("SyntaxError",e),{input:t,offset:n,rawMessage:e,message:e+`
11
11
  `+t+`
12
- --`+new Array((n||t.length)+1).join("-")+"^"})}var vb=$(()=>{"use strict";Ya()});var kA,CA,TA,IA,FA,kb,ul,Cb=$(()=>{"use strict";vb();kA=9,CA=10,TA=12,IA=13,FA=32,kb=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),ul=class{constructor(t){this.str=t,this.pos=0}charCodeAt(t){return t<this.str.length?this.str.charCodeAt(t):0}charCode(){return this.charCodeAt(this.pos)}isNameCharCode(t=this.charCode()){return t<128&&kb[t]===1}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(t){return this.charCodeAt(this.findWsEnd(t))}skipWs(){this.pos=this.findWsEnd(this.pos)}findWsEnd(t){for(;t<this.str.length;t++){let n=this.str.charCodeAt(t);if(n!==IA&&n!==CA&&n!==TA&&n!==FA&&n!==kA)break}return t}substringToPos(t){return this.str.substring(this.pos,this.pos=t)}eat(t){this.charCode()!==t&&this.error("Expect `"+String.fromCharCode(t)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(t){throw new wb(t,this.str,this.pos)}scanSpaces(){return this.substringToPos(this.findWsEnd(this.pos))}scanWord(){let t=this.pos;for(;t<this.str.length;t++){let n=this.str.charCodeAt(t);if(n>=128||kb[n]===0)break}return this.pos===t&&this.error("Expect a keyword"),this.substringToPos(t)}scanNumber(){let t=this.pos;for(;t<this.str.length;t++){let n=this.str.charCodeAt(t);if(n<48||n>57)break}return this.pos===t&&this.error("Expect a number"),this.substringToPos(t)}scanString(){let t=this.str.indexOf("'",this.pos+1);return t===-1&&(this.pos=this.str.length,this.error("Expect an apostrophe")),this.substringToPos(t+1)}}});function Pb(e){let t=null,n=null;return e.eat(fl),e.skipWs(),t=e.scanNumber(e),e.skipWs(),e.charCode()===Wu?(e.pos++,e.skipWs(),e.charCode()!==Uu&&(n=e.scanNumber(e),e.skipWs())):n=t,e.eat(Uu),{min:Number(t),max:n?Number(n):0}}function DA(e){let t=null,n=!1;switch(e.charCode()){case Db:e.pos++,t={min:0,max:0};break;case Hu:e.pos++,t={min:1,max:0};break;case dl:e.pos++,t={min:0,max:1};break;case ju:e.pos++,n=!0,e.charCode()===fl?t=Pb(e):e.charCode()===dl?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case fl:t=Pb(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}function Gr(e,t){let n=DA(e);return n!==null?(n.term=t,e.charCode()===ju&&e.charCodeAt(e.pos-1)===Hu||e.charCode()===dl&&e.charCodeAt(e.pos-1)===Uu?Gr(e,n):n):t}function _u(e){let t=e.peek();return t===""?null:Gr(e,{type:"Token",value:t})}function RA(e){let t;return e.eat(Vu),e.eat(pl),t=e.scanWord(),e.eat(pl),e.eat($u),Gr(e,{type:"Property",name:t})}function zA(e){let t=null,n=null,r=1;return e.eat(bs),e.charCode()===Ib&&(e.peek(),r=-1),r==-1&&e.charCode()===Eb?e.peek():(t=r*Number(e.scanNumber(e)),e.isNameCharCode()&&(t+=e.scanWord())),e.skipWs(),e.eat(Wu),e.skipWs(),e.charCode()===Eb?e.peek():(r=1,e.charCode()===Ib&&(e.peek(),r=-1),n=r*Number(e.scanNumber(e)),e.isNameCharCode()&&(n+=e.scanWord())),e.eat(hi),{type:"Range",min:t,max:n}}function NA(e){let t,n=null;if(e.eat(Vu),t=e.scanWord(),t==="boolean-expr"){e.eat(bs);let r=gl(e,hi);return e.eat(hi),e.eat($u),Gr(e,{type:"Boolean",term:r.terms.length===1?r.terms[0]:r})}return e.charCode()===Mb&&e.nextCharCode()===Bb&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===bs&&(e.skipWs(),n=zA(e)),e.eat($u),Gr(e,{type:"Type",name:t,opts:n})}function OA(e){let t=e.scanWord();return e.charCode()===Mb?(e.pos++,{type:"Function",name:t}):Gr(e,{type:"Keyword",name:t})}function _A(e,t){function n(o,i){return{type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort((o,i)=>Ab[o]-Ab[i]);t.length>0;){r=t.shift();let o=0,i=0;for(;o<e.length;o++){let s=e[o];s.type==="Combinator"&&(s.value===r?(i===-1&&(i=o-1),e.splice(o,1),o--):(i!==-1&&o-i>1&&(e.splice(i,o-i,n(e.slice(i,o),r)),o=i+1),i=-1))}i!==-1&&t.length&&e.splice(i,o-i,n(e.slice(i,o),r))}return r}function gl(e,t=-1){let n=Object.create(null),r=[],o=null,i=e.pos,s=!1;for(;e.charCode()!==t;){let a=s?gl(e,Bb):UA(e);if(!a)break;if(a.type!=="Spaces"){if(s){if(a.terms.length===0){s=!1;continue}if(a.combinator===" "){for(;a.terms.length>1;)n[" "]=!0,r.push({type:"Combinator",value:" "},a.terms.shift());a=a.terms[0]}}a.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),n[a.value]=!0):o!==null&&o.type!=="Combinator"&&(n[" "]=!0,r.push({type:"Combinator",value:" "})),r.push(a),o=a,i=e.pos,s=a.type==="Function"}}return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:r,combinator:_A(r,n)||" ",disallowEmpty:!1,explicit:!1}}function $A(e){let t;return e.eat(bs),t=gl(e,hi),e.eat(hi),t.explicit=!0,e.charCode()===Lb&&(e.pos++,t.disallowEmpty=!0),t}function UA(e){let t=e.charCode();switch(t){case hi:break;case bs:return Gr(e,$A(e));case Vu:return e.nextCharCode()===pl?RA(e):NA(e);case Fb:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===Fb?2:1))};case Tb:return e.pos++,e.eat(Tb),{type:"Combinator",value:"&&"};case Wu:return e.pos++,{type:"Comma"};case pl:return Gr(e,{type:"String",value:e.scanString()});case MA:case EA:case AA:case LA:case PA:return{type:"Spaces",value:e.scanSpaces()};case BA:return t=e.nextCharCode(),e.isNameCharCode(t)?(e.pos++,{type:"AtKeyword",name:e.scanWord()}):_u(e);case Db:case Hu:case dl:case ju:case Lb:break;case fl:if(t=e.nextCharCode(),t<48||t>57)return _u(e);break;default:return e.isNameCharCode(t)?OA(e):_u(e)}}function Ss(e){let t=new ul(e),n=gl(t);return t.pos!==e.length&&t.error("Unexpected input"),n.terms.length===1&&n.terms[0].type==="Group"?n.terms[0]:n}var EA,AA,PA,LA,MA,Lb,ju,Tb,pl,Mb,Bb,Db,Hu,Wu,Ib,Vu,$u,dl,BA,bs,hi,fl,Fb,Uu,Eb,Ab,Gu=$(()=>{"use strict";Cb();EA=9,AA=10,PA=12,LA=13,MA=32,Lb=33,ju=35,Tb=38,pl=39,Mb=40,Bb=41,Db=42,Hu=43,Wu=44,Ib=45,Vu=60,$u=62,dl=63,BA=64,bs=91,hi=93,fl=123,Fb=124,Uu=125,Eb=8734,Ab={" ":1,"&&":2,"||":3,"|":4}});function Rb(e){return typeof e=="function"?e:ws}function qu(e,t,n){function r(s){switch(o.call(n,s),s.type){case"Group":s.terms.forEach(r);break;case"Multiplier":case"Boolean":r(s.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+s.type)}i.call(n,s)}let o=ws,i=ws;if(typeof t=="function"?o=t:t&&(o=Rb(t.enter),i=Rb(t.leave)),o===ws&&i===ws)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");r(e,n)}var ws,zb=$(()=>{"use strict";ws=function(){}});var Yu=$(()=>{"use strict";Tu();Gu();zb()});function WA(e){let t=[];return lo(e,(n,r,o)=>t.push({type:n,value:e.slice(r,o),node:null})),t}function Nb(e,t){return typeof e=="string"?WA(e):t.generate(e,HA)}var HA,Ob=$(()=>{"use strict";nr();HA={decorator(e){let t=[],n=null;return{...e,node(r){let o=n;n=r,e.node.call(this,r),n=o},emit(r,o,i){t.push({type:o,value:r,node:i?null:n})},result(){return t}}}}});function xn(e,t,n){return t===ut&&n===bt||e===ut&&t===ut&&n===ut?e:(e.type==="If"&&e.else===bt&&t===ut&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function $b(e){return e.length>2&&e.charCodeAt(e.length-2)===VA&&e.charCodeAt(e.length-1)===GA}function _b(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&$b(e.name)}function uo(e,t=" ",n=!1){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:n}}function vs(e,t,n=new Set){if(!n.has(e))switch(n.add(e),e.type){case"If":e.match=vs(e.match,t,n),e.then=vs(e.then,t,n),e.else=vs(e.else,t,n);break;case"Type":return t[e.name]||e}return e}function Ku(e,t,n){switch(e){case" ":{let r=ut;for(let o=t.length-1;o>=0;o--){let i=t[o];r=xn(i,r,bt)}return r}case"|":{let r=bt,o=null;for(let i=t.length-1;i>=0;i--){let s=t[i];if(_b(s)&&(o===null&&i>0&&_b(t[i-1])&&(o=Object.create(null),r=xn({type:"Enum",map:o},ut,r)),o!==null)){let a=($b(s.name)?s.name.slice(0,-1):s.name).toLowerCase();if(!(a in o)){o[a]=s;continue}}o=null,r=xn(s,ut,r)}return r}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=bt;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=Ku(e,t.filter(function(a){return a!==i}),!1):s=ut,r=xn(i,s,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?ut:bt;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=Ku(e,t.filter(function(a){return a!==i}),!0):s=ut,r=xn(i,s,r)}return r}}}function qA(e){let t=ut,n=xi(e.term);if(e.max===0)n=xn(n,ml,bt),t=xn(n,null,bt),t.then=xn(ut,ut,t),e.comma&&(t.then.else=xn({type:"Comma",syntax:e},t,bt));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==ut&&(t=xn({type:"Comma",syntax:e},t,bt)),t=xn(n,xn(ut,ut,t),bt);if(e.min===0)t=xn(ut,ut,t);else for(let r=0;r<e.min-1;r++)e.comma&&t!==ut&&(t=xn({type:"Comma",syntax:e},t,bt)),t=xn(n,t,bt);return t}function xi(e){if(typeof e=="function")return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=Ku(e.combinator,e.terms.map(xi),!1);return e.disallowEmpty&&(t=xn(t,ml,bt)),t}case"Multiplier":return qA(e);case"Boolean":{let t=xi(e.term),n=xi(uo([uo([{type:"Keyword",name:"not"},{type:"Type",name:"!boolean-group"}]),uo([{type:"Type",name:"!boolean-group"},uo([{type:"Multiplier",comma:!1,min:0,max:0,term:uo([{type:"Keyword",name:"and"},{type:"Type",name:"!boolean-group"}])},{type:"Multiplier",comma:!1,min:0,max:0,term:uo([{type:"Keyword",name:"or"},{type:"Type",name:"!boolean-group"}])}],"|")])],"|")),r=xi(uo([{type:"Type",name:"!term"},uo([{type:"Token",value:"("},{type:"Type",name:"!self"},{type:"Token",value:")"}]),{type:"Type",name:"general-enclosed"}],"|"));return vs(r,{"!term":t,"!self":n}),vs(n,{"!boolean-group":r}),n}case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return e.value.length===3?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function ks(e,t){return typeof e=="string"&&(e=Ss(e)),{type:"MatchGraph",match:xi(e),syntax:t||null,source:e}}var ut,bt,ml,VA,GA,Xu=$(()=>{"use strict";Gu();ut={type:"Match"},bt={type:"Mismatch"},ml={type:"DisallowEmpty"},VA=40,GA=41});function ZA(e){let t=null,n=null,r=e;for(;r!==null;)n=r.prev,r.prev=t,t=r,r=n;return t}function Qu(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=t.charCodeAt(n),o=e.charCodeAt(n);if(o>=65&&o<=90&&(o=o|32),o!==r)return!1}return!0}function eP(e){return e.type!==9?!1:e.value!=="?"}function Wb(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||eP(e)}function Vb(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function tP(e,t,n){function r(){do k++,F=k<e.length?e[k]:null;while(F!==null&&(F.type===13||F.type===25))}function o(_){let M=k+_;return M<e.length?e[M]:null}function i(_,M){return{nextState:_,matchStack:z,syntaxStack:d,thenStack:f,tokenIndex:k,prev:M}}function s(_){f={nextState:_,matchStack:z,syntaxStack:d,prev:f}}function a(_){p=i(_,p)}function u(){z={type:KA,syntax:t.syntax,token:F,prev:z},r(),g=null,k>R&&(R=k)}function c(){d={syntax:t.syntax,opts:t.syntax.opts||d!==null&&d.opts||null,prev:d},z={type:Ju,syntax:t.syntax,token:z.token,prev:z}}function l(){z.type===Ju?z=z.prev:z={type:Gb,syntax:d.syntax,token:z.token,prev:z},d=d.prev}let d=null,f=null,p=null,g=null,S=0,C=null,F=null,k=-1,R=0,z={type:YA,syntax:null,token:null,prev:null};for(r();C===null&&++S<Hb;)switch(t.type){case"Match":if(f===null){if(F!==null&&(k!==e.length-1||F.value!=="\\0"&&F.value!=="\\9")){t=bt;break}C=jb;break}if(t=f.nextState,t===ml)if(f.matchStack===z){t=bt;break}else t=ut;for(;f.syntaxStack!==d;)l();f=f.prev;break;case"Mismatch":if(g!==null&&g!==!1)(p===null||k>p.tokenIndex)&&(p=g,g=!1);else if(p===null){C=XA;break}t=p.nextState,f=p.thenStack,d=p.syntaxStack,z=p.matchStack,k=p.tokenIndex,F=k<e.length?e[k]:null,p=p.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==bt&&a(t.else),t.then!==ut&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let B=t.syntax.terms;if(t.index===B.length){if(t.mask===0||t.syntax.all){t=bt;break}t=ut;break}if(t.mask===(1<<B.length)-1){t=ut;break}for(;t.index<B.length;t.index++){let m=1<<t.index;if((t.mask&m)===0){a(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|m}),t=B[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(F!==null){let B=F.value.toLowerCase();if(B.indexOf("\\")!==-1&&(B=B.replace(/\\[09].*$/,"")),Ub.call(t.map,B)){t=t.map[B];break}}t=bt;break;case"Generic":{let B=d!==null?d.opts:null,m=k+Math.floor(t.fn(F,o,B));if(!isNaN(m)&&m>k){for(;k<m;)u();t=ut}else t=bt;break}case"Type":case"Property":{let B=t.type==="Type"?"types":"properties",m=Ub.call(n,B)?n[B][t.name]:null;if(!m||!m.match)throw new Error("Bad syntax reference: "+(t.type==="Type"?"<"+t.name+">":"<'"+t.name+"'>"));if(g!==!1&&F!==null&&t.type==="Type"&&(t.name==="custom-ident"&&F.type===1||t.name==="length"&&F.value==="0")){g===null&&(g=i(t,p)),t=bt;break}c(),t=m.matchRef||m.match;break}case"Keyword":{let B=t.name;if(F!==null){let m=F.value;if(m.indexOf("\\")!==-1&&(m=m.replace(/\\[09].*$/,"")),Qu(m,B)){u(),t=ut;break}}t=bt;break}case"AtKeyword":case"Function":if(F!==null&&Qu(F.value,t.name)){u(),t=ut;break}t=bt;break;case"Token":if(F!==null&&F.value===t.value){u(),t=ut;break}t=bt;break;case"Comma":F!==null&&F.type===18?Wb(z.token)?t=bt:(u(),t=Vb(F)?bt:ut):t=Wb(z.token)||Vb(F)?ut:bt;break;case"String":let _="",M=k;for(;M<e.length&&_.length<t.value.length;M++)_+=e[M].value;if(Qu(_,t.value)){for(;k<M;)u();t=ut}else t=bt;break;default:throw new Error("Unknown node type: "+t.type)}switch(JA+=S,C){case null:console.warn("[csstree-match] BREAK after "+Hb+" iterations"),C=QA,z=null;break;case jb:for(;d!==null;)l();break;default:z=null}return{tokens:e,reason:C,iterations:S,match:z,longestMatch:R}}function Zu(e,t,n){let r=tP(e,t,n||{});if(r.match===null)return r;let o=r.match,i=r.match={syntax:t.syntax||null,match:[]},s=[i];for(o=ZA(o).prev;o!==null;){switch(o.type){case Ju:i.match.push(i={syntax:o.syntax,match:[]}),s.push(i);break;case Gb:s.pop(),i=s[s.length-1];break;default:i.match.push({syntax:o.syntax||null,token:o.token.value,node:o.token.node})}o=o.prev}return r}var Ub,YA,KA,Ju,Gb,jb,XA,QA,Hb,JA,qb=$(()=>{"use strict";Xu();({hasOwnProperty:Ub}=Object.prototype),YA=0,KA=1,Ju=2,Gb=3,jb="Match",XA="Mismatch",QA="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",Hb=15e3,JA=0});var tp={};ye(tp,{getTrace:()=>Yb,isKeyword:()=>oP,isProperty:()=>rP,isType:()=>nP});function Yb(e){function t(o){return o===null?!1:o.type==="Type"||o.type==="Property"||o.type==="Keyword"}function n(o){if(Array.isArray(o.match)){for(let i=0;i<o.match.length;i++)if(n(o.match[i]))return t(o.syntax)&&r.unshift(o.syntax),!0}else if(o.node===e)return r=t(o.syntax)?[o.syntax]:[],!0;return!1}let r=null;return this.matched!==null&&n(this.matched),r}function nP(e,t){return ep(this,e,n=>n.type==="Type"&&n.name===t)}function rP(e,t){return ep(this,e,n=>n.type==="Property"&&n.name===t)}function oP(e){return ep(this,e,t=>t.type==="Keyword")}function ep(e,t,n){let r=Yb.call(e,t);return r===null?!1:r.some(n)}var Kb=$(()=>{"use strict"});function Xb(e){return"node"in e?e.node:Xb(e.match[0])}function Qb(e){return"node"in e?e.node:Qb(e.match[e.match.length-1])}function np(e,t,n,r,o){function i(a){if(a.syntax!==null&&a.syntax.type===r&&a.syntax.name===o){let u=Xb(a),c=Qb(a);e.syntax.walk(t,function(l,d,f){if(l===u){let p=new Vn;do{if(p.appendData(d.data),d.data===c)break;d=d.next}while(d!==null);s.push({parent:f,nodes:p})}})}Array.isArray(a.match)&&a.match.forEach(i)}let s=[];return n.matched!==null&&i(n.matched),s}var Jb=$(()=>{"use strict";ps()});function rp(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function Zb(e){return!!e&&rp(e.offset)&&rp(e.line)&&rp(e.column)}function iP(e,t){return function(r,o){if(!r||r.constructor!==Object)return o(r,"Type of node should be an Object");for(let i in r){let s=!0;if(Cs.call(r,i)!==!1){if(i==="type")r.type!==e&&o(r,"Wrong node type `"+r.type+"`, expected `"+e+"`");else if(i==="loc"){if(r.loc===null)continue;if(r.loc&&r.loc.constructor===Object)if(typeof r.loc.source!="string")i+=".source";else if(!Zb(r.loc.start))i+=".start";else if(!Zb(r.loc.end))i+=".end";else continue;s=!1}else if(t.hasOwnProperty(i)){s=!1;for(let a=0;!s&&a<t[i].length;a++){let u=t[i][a];switch(u){case String:s=typeof r[i]=="string";break;case Boolean:s=typeof r[i]=="boolean";break;case null:s=r[i]===null;break;default:typeof u=="string"?s=r[i]&&r[i].type===u:Array.isArray(u)&&(s=r[i]instanceof Vn)}}}else o(r,"Unknown field `"+i+"` for "+e+" node type");s||o(r,"Bad value for `"+e+"."+i+"`")}}for(let i in t)Cs.call(t,i)&&Cs.call(r,i)===!1&&o(r,"Field `"+e+"."+i+"` is missed")}}function e0(e,t){let n=[];for(let r=0;r<e.length;r++){let o=e[r];if(o===String||o===Boolean)n.push(o.name.toLowerCase());else if(o===null)n.push("null");else if(typeof o=="string")n.push(o);else if(Array.isArray(o))n.push("List<"+(e0(o,t)||"any")+">");else throw new Error("Wrong value `"+o+"` in `"+t+"` structure definition")}return n.join(" | ")}function sP(e,t){let n=t.structure,r={type:String,loc:!0},o={type:'"'+e+'"'};for(let i in n){if(Cs.call(n,i)===!1)continue;let s=r[i]=Array.isArray(n[i])?n[i].slice():[n[i]];o[i]=e0(s,e+"."+i)}return{docs:o,check:iP(e,r)}}function t0(e){let t={};if(e.node){for(let n in e.node)if(Cs.call(e.node,n)){let r=e.node[n];if(r.structure)t[n]=sP(n,r);else throw new Error("Missed `structure` field in `"+n+"` node type definition")}}return t}var Cs,n0=$(()=>{"use strict";ps();({hasOwnProperty:Cs}=Object.prototype)});function op(e,t,n){let r={};for(let o in e)e[o].syntax&&(r[o]=n?e[o].syntax:pi(e[o].syntax,{compact:t}));return r}function aP(e,t,n){let r={};for(let[o,i]of Object.entries(e))r[o]={prelude:i.prelude&&(n?i.prelude.syntax:pi(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&op(i.descriptors,t,n)};return r}function lP(e){for(let t=0;t<e.length;t++)if(e[t].value.toLowerCase()==="var(")return!0;return!1}function cP(e){let t=e.terms[0];return e.explicit===!1&&e.terms.length===1&&t.type==="Multiplier"&&t.comma===!0}function br(e,t,n){return{matched:e,iterations:n,error:t,...tp}}function yi(e,t,n,r){let o=Nb(n,e.syntax),i;return lP(o)?br(null,new Error("Matching for a tree with var() is not supported")):(r&&(i=Zu(o,e.cssWideKeywordsSyntax,e)),(!r||!i.match)&&(i=Zu(o,t.match,e),!i.match)?br(null,new ib(i.reason,t.syntax,n,i),i.iterations):br(i.match,null,i.iterations))}var Ts,r0=$(()=>{"use strict";sb();il();sl();bb();Sb();Yu();Ob();Xu();qb();Kb();Jb();n0();Ts=class{constructor(t,n,r){if(this.cssWideKeywords=gi,this.syntax=n,this.generic=!1,this.units={...cl},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=r||t0(t),t){if(t.cssWideKeywords&&(this.cssWideKeywords=t.cssWideKeywords),t.units)for(let o of Object.keys(cl))Array.isArray(t.units[o])&&(this.units[o]=t.units[o]);if(t.types)for(let[o,i]of Object.entries(t.types))this.addType_(o,i);if(t.generic){this.generic=!0;for(let[o,i]of Object.entries(yb(this.units)))this.addType_(o,i)}if(t.atrules)for(let[o,i]of Object.entries(t.atrules))this.addAtrule_(o,i);if(t.properties)for(let[o,i]of Object.entries(t.properties))this.addProperty_(o,i)}this.cssWideKeywordsSyntax=ks(this.cssWideKeywords.join(" | "))}checkStructure(t){function n(i,s){o.push({node:i,message:s})}let r=this.structure,o=[];return this.syntax.walk(t,function(i){r.hasOwnProperty(i.type)?r[i.type].check(i,n):n(i,"Unknown node type `"+i.type+"`")}),o.length?o:!1}createDescriptor(t,n,r,o=null){let i={type:n,name:r},s={type:n,name:r,parent:o,serializable:typeof t=="string"||t&&typeof t.type=="string",syntax:null,match:null,matchRef:null};return typeof t=="function"?s.match=ks(t,i):(typeof t=="string"?Object.defineProperty(s,"syntax",{get(){return Object.defineProperty(s,"syntax",{value:Ss(t)}),s.syntax}}):s.syntax=t,Object.defineProperty(s,"match",{get(){return Object.defineProperty(s,"match",{value:ks(s.syntax,i)}),s.match}}),n==="Property"&&Object.defineProperty(s,"matchRef",{get(){let a=s.syntax,u=cP(a)?ks({...a,terms:[a.terms[0].term]},i):null;return Object.defineProperty(s,"matchRef",{value:u}),u}})),s}addAtrule_(t,n){n&&(this.atrules[t]={type:"Atrule",name:t,prelude:n.prelude?this.createDescriptor(n.prelude,"AtrulePrelude",t):null,descriptors:n.descriptors?Object.keys(n.descriptors).reduce((r,o)=>(r[o]=this.createDescriptor(n.descriptors[o],"AtruleDescriptor",o,t),r),Object.create(null)):null})}addProperty_(t,n){n&&(this.properties[t]=this.createDescriptor(n,"Property",t))}addType_(t,n){n&&(this.types[t]=this.createDescriptor(n,"Type",t))}checkAtruleName(t){if(!this.getAtrule(t))return new di("Unknown at-rule","@"+t)}checkAtrulePrelude(t,n){let r=this.checkAtruleName(t);if(r)return r;let o=this.getAtrule(t);if(!o.prelude&&n)return new SyntaxError("At-rule `@"+t+"` should not contain a prelude");if(o.prelude&&!n&&!yi(this,o.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+t+"` should contain a prelude")}checkAtruleDescriptorName(t,n){let r=this.checkAtruleName(t);if(r)return r;let o=this.getAtrule(t),i=rl(n);if(!o.descriptors)return new SyntaxError("At-rule `@"+t+"` has no known descriptors");if(!o.descriptors[i.name]&&!o.descriptors[i.basename])return new di("Unknown at-rule descriptor",n)}checkPropertyName(t){if(!this.getProperty(t))return new di("Unknown property",t)}matchAtrulePrelude(t,n){let r=this.checkAtrulePrelude(t,n);if(r)return br(null,r);let o=this.getAtrule(t);return o.prelude?yi(this,o.prelude,n||"",!1):br(null,null)}matchAtruleDescriptor(t,n,r){let o=this.checkAtruleDescriptorName(t,n);if(o)return br(null,o);let i=this.getAtrule(t),s=rl(n);return yi(this,i.descriptors[s.name]||i.descriptors[s.basename],r,!1)}matchDeclaration(t){return t.type!=="Declaration"?br(null,new Error("Not a Declaration node")):this.matchProperty(t.property,t.value)}matchProperty(t,n){if(Iu(t).custom)return br(null,new Error("Lexer matching doesn't applicable for custom properties"));let r=this.checkPropertyName(t);return r?br(null,r):yi(this,this.getProperty(t),n,!0)}matchType(t,n){let r=this.getType(t);return r?yi(this,r,n,!1):br(null,new di("Unknown type",t))}match(t,n){return typeof t!="string"&&(!t||!t.type)?br(null,new di("Bad syntax")):((typeof t=="string"||!t.match)&&(t=this.createDescriptor(t,"Type","anonymous")),yi(this,t,n,!1))}findValueFragments(t,n,r,o){return np(this,n,this.matchProperty(t,n),r,o)}findDeclarationValueFragments(t,n,r){return np(this,t.value,this.matchDeclaration(t),n,r)}findAllFragments(t,n,r){let o=[];return this.syntax.walk(t,{visit:"Declaration",enter:i=>{o.push.apply(o,this.findDeclarationValueFragments(i,n,r))}}),o}getAtrule(t,n=!0){let r=rl(t);return(r.vendor&&n?this.atrules[r.name]||this.atrules[r.basename]:this.atrules[r.name])||null}getAtrulePrelude(t,n=!0){let r=this.getAtrule(t,n);return r&&r.prelude||null}getAtruleDescriptor(t,n){return this.atrules.hasOwnProperty(t)&&this.atrules.declarators&&this.atrules[t].declarators[n]||null}getProperty(t,n=!0){let r=Iu(t);return(r.vendor&&n?this.properties[r.name]||this.properties[r.basename]:this.properties[r.name])||null}getType(t){return hasOwnProperty.call(this.types,t)?this.types[t]:null}validate(){function t(u,c){return c?`<${u}>`:`<'${u}'>`}function n(u,c,l,d){if(l.has(c))return l.get(c);l.set(c,!1),d.syntax!==null&&qu(d.syntax,function(f){if(f.type!=="Type"&&f.type!=="Property")return;let p=f.type==="Type"?u.types:u.properties,g=f.type==="Type"?o:i;hasOwnProperty.call(p,f.name)?n(u,f.name,g,p[f.name])&&(r.push(`${t(c,l===o)} used broken syntax definition ${t(f.name,f.type==="Type")}`),l.set(c,!0)):(r.push(`${t(c,l===o)} used missed syntax definition ${t(f.name,f.type==="Type")}`),l.set(c,!0))},this)}let r=[],o=new Map,i=new Map;for(let u in this.types)n(this,u,o,this.types[u]);for(let u in this.properties)n(this,u,i,this.properties[u]);let s=[...o.keys()].filter(u=>o.get(u)),a=[...i.keys()].filter(u=>i.get(u));return s.length||a.length?{errors:r,types:s,properties:a}:null}dump(t,n){return{generic:this.generic,cssWideKeywords:this.cssWideKeywords,units:this.units,types:op(this.types,!n,t),properties:op(this.properties,!n,t),atrules:aP(this.atrules,!n,t)}}toString(){return JSON.stringify(this.dump())}}});function ip(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function uP(e,t){let n=Object.create(null);for(let r of Object.keys(e))t.includes(r)&&(n[r]=e[r]);return n}function sp(e,t,n){let r={...e};for(let[o,i]of Object.entries(t))r[o]={...r[o],...n?uP(i,n):i};return r}function Is(e,t){let n={...e};for(let[r,o]of Object.entries(t))switch(r){case"generic":n[r]=!!o;break;case"cssWideKeywords":n[r]=e[r]?[...e[r],...o]:o||[];break;case"units":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=Array.isArray(s)?s:[];break;case"atrules":n[r]={...e[r]};for(let[i,s]of Object.entries(o)){let a=n[r][i]||{},u=n[r][i]={prelude:a.prelude||null,descriptors:{...a.descriptors}};if(s){u.prelude=s.prelude?ip(u.prelude,s.prelude):u.prelude||null;for(let[c,l]of Object.entries(s.descriptors||{}))u.descriptors[c]=l?ip(u.descriptors[c],l):null;Object.keys(u.descriptors).length||(u.descriptors=null)}}break;case"types":case"properties":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=ip(n[r][i],s);break;case"parseContext":n[r]={...e[r],...o};break;case"scope":case"features":n[r]=sp(e[r],o);break;case"atrule":case"pseudo":n[r]=sp(e[r],o,["parse"]);break;case"node":n[r]=sp(e[r],o,["name","structure","parse","generate","walkContext"]);break}return n}var o0=$(()=>{"use strict"});function i0(e){let t=Sy(e),n=nb(e),r=Yy(e),{fromPlainObject:o,toPlainObject:i}=Xy(n),s={lexer:null,createLexer:a=>new Ts(a,s,s.lexer.structure),tokenize:lo,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:o,toPlainObject:i,fork(a){let u=Is({},e);return i0(typeof a=="function"?a(u):Is(u,a))}};return s.lexer=new Ts({generic:e.generic,cssWideKeywords:e.cssWideKeywords,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var s0,a0=$(()=>{"use strict";nr();wy();Ky();Qy();rb();r0();o0();s0=e=>i0(Is({},e))});var l0,c0=$(()=>{"use strict";l0={generic:!0,cssWideKeywords:["initial","inherit","unset","revert","revert-layer"],units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","alpha-value":"<number>|<percentage>","an+b":"odd|even|<integer>|<n-dimension>|'+'? \u2020 n|-n|<ndashdigit-dimension>|'+'? \u2020 <ndashdigit-ident>|<dashndashdigit-ident>|<n-dimension> <signed-integer>|'+'? \u2020 n <signed-integer>|-n <signed-integer>|<ndash-dimension> <signless-integer>|'+'? \u2020 n- <signless-integer>|-n- <signless-integer>|<n-dimension> ['+'|'-'] <signless-integer>|'+'? \u2020 n ['+'|'-'] <signless-integer>|-n ['+'|'-'] <signless-integer>","anchor()":"anchor( <anchor-name>?&&<anchor-side> , <length-percentage>? )","anchor-name":"<dashed-ident>","anchor-side":"inside|outside|top|left|right|bottom|start|end|self-start|self-end|<percentage>|center","anchor-size":"width|height|block|inline|self-block|self-inline","anchor-size()":"anchor-size( [<anchor-name>||<anchor-size>]? , <length-percentage>? )","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>|<zero>","angular-color-stop":"<color> <color-stop-angle>?","angular-color-stop-list":"<angular-color-stop> , [<angular-color-hint>? , <angular-color-stop>]#?","animateable-feature":"scroll-position|contents|<custom-ident>","animation-action":"none|play|play-once|play-forwards|play-backwards|pause|reset|replay","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <attr-type>? , <declaration-value>? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attr-type":"type( <syntax> )|raw-string|number|<attr-unit>","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",axis:"block|inline|x|y","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<xywh()>|<rect()>|<circle()>|<ellipse()>|<polygon()>|<path()>","basic-shape-rect":"<inset()>|<rect()>|<xywh()>","bg-clip":"<visual-box>|border-area|text","bg-image":"<image>|none","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<visual-box>||<visual-box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage [0,\u221E]>|auto]{1,2}|cover|contain","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity","blur()":"blur( <length>? )","brightness()":"brightness( [<number>|<percentage>]? )","calc()":"calc( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-size()":"calc-size( <calc-size-basis> , <calc-sum> )","calc-size-basis":"<intrinsic-size-keyword>|<calc-size()>|any|<calc-sum>","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-value":"<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( <radial-size>? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<color-base>|currentColor|<system-color>|<device-cmyk()>|<light-dark()>|<-non-standard-color>","color()":"color( <colorspace-params> [/ [<alpha-value>|none]]? )","color-base":"<hex-color>|<color-function>|<named-color>|<color-mix()>|transparent","color-function":"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<oklab()>|<oklch()>|<color()>","color-interpolation-method":"in [<rectangular-color-space>|<polar-color-space> <hue-interpolation-method>?|<custom-color-space>]","color-mix()":"color-mix( <color-interpolation-method> , [<color>&&<percentage [0,100]>?]#{2} )","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"[<angle-percentage>|<zero>]{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"<linear-color-stop> , [<linear-color-hint>? , <linear-color-stop>]#?","colorspace-params":"[<predefined-rgb-params>|<xyz-params>]",combinator:"'>'|'+'|'~'|['|' '|']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|checkbox|radio|menulist|listbox|meter|progress-bar|button","compat-special":"textfield|menulist-button","complex-selector":"<complex-selector-unit> [<combinator>? <complex-selector-unit>]*","complex-selector-list":"<complex-selector>#","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>*]!","compound-selector-list":"<compound-selector>#","conic-gradient()":"conic-gradient( [<conic-gradient-syntax>] )","conic-gradient-syntax":"[[[from [<angle>|<zero>]]? [at <position>]?]||<color-interpolation-method>]? , <angular-color-stop-list>","container-condition":"not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]","container-name":"<custom-ident>","container-query":"not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contextual-alt-values":"[contextual|no-contextual]","contrast()":"contrast( [<number>|<percentage>]? )","coord-box":"content-box|padding-box|border-box|fill-box|stroke-box|view-box","corner-shape-value":"round|scoop|bevel|notch|square|squircle|<superellipse()>","cos()":"cos( <calc-sum> )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier()":"cubic-bezier( [<number [0,1]> , <number>]#{2} )","cubic-bezier-easing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","cursor-predefined":"auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing","custom-color-space":"<dashed-ident>","custom-params":"<dashed-ident> [<number>|<percentage>|none]+",dasharray:"[[<length-percentage>|<number>]+]#","dashndashdigit-ident":"<ident-token>","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonHighlight|ButtonShadow|CaptionText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( [<color>?&&<length>{2,3}] )","dynamic-range-limit-mix()":"dynamic-range-limit-mix( [<'dynamic-range-limit'>&&<percentage [0,100]>]#{2,} )","easing-function":"<linear-easing-function>|<cubic-bezier-easing-function>|<step-easing-function>","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( <radial-size>? [at <position>]? )","env()":"env( <custom-ident> , <declaration-value>? )","exp()":"exp( <calc-sum> )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-value-list":"[<filter-function>|<url>]+","final-bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<visual-box>||<visual-box>||<'background-color'>","fit-content()":"fit-content( <length-percentage [0,\u221E]> )","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css2":"normal|small-caps","font-weight-absolute":"normal|bold|<number [1,1000]>","font-width-css3":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded","form-control-identifier":"select","frequency-percentage":"<frequency>|<percentage>","generic-complete":"serif|sans-serif|system-ui|cursive|fantasy|math|monospace","general-enclosed":"[<function-token> <any-value>? )]|[( <any-value>? )]","generic-family":"<generic-script-specific>|<generic-complete>|<generic-incomplete>|<-non-standard-generic-family>","generic-incomplete":"ui-serif|ui-sans-serif|ui-monospace|ui-rounded","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( [<number>|<percentage>]? )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )|hsl( [<hue>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","hsla()":"hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )|hsla( [<hue>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )",hue:"<number>|<angle>","hue-interpolation-method":"[shorter|longer|increasing|decreasing] hue","hue-rotate()":"hue-rotate( [<angle>|<zero>]? )","hwb()":"hwb( [<hue>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","hypot()":"hypot( <calc-sum># )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length-percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( [<number>|<percentage>]? )","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-selector":"from|to|<percentage [0,100]>|<timeline-range-name> <percentage>","keyframes-name":"<custom-ident>|<string>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","light-dark()":"light-dark( <color> , <color> )","line-name-list":"[<line-names>|<name-repeat>]+","line-names":"'[' <custom-ident>* ']'","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear()":"linear( [<number>&&<percentage>{0,2}]# )","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-easing-function":"linear|<linear()>","linear-gradient()":"linear-gradient( [<linear-gradient-syntax>] )","linear-gradient-syntax":"[[<angle>|<zero>|to <side-or-corner>]||<color-interpolation-method>]? , <color-stop-list>","log()":"log( <calc-sum> , <calc-sum>? )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )","mod()":"mod( <calc-sum> , <calc-sum> )","n-dimension":"<dimension-token>","name-repeat":"repeat( [<integer [1,\u221E]>|auto-fill] , <line-names>+ )","named-color":"aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen","namespace-prefix":"<ident>","ndash-dimension":"<dimension-token>","ndashdigit-dimension":"<dimension-token>","ndashdigit-ident":"<ident-token>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]","offset-path":"<ray()>|<url>|<basic-shape>","oklab()":"oklab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","oklch()":"oklch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","opacity()":"opacity( [<number>|<percentage>]? )","opacity-value":"<number>|<percentage>","outline-line-style":"none|dotted|dashed|solid|double|groove|ridge|inset|outset","outline-radius":"<length>|<percentage>","overflow-position":"unsafe|safe","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-selector-list":"[<page-selector>#]?","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke","paint()":"paint( <ident> , <declaration-value>? )","paint-box":"<visual-box>|fill-box|stroke-box","palette-identifier":"<dashed-ident>","palette-mix()":"palette-mix( <color-interpolation-method> , [[normal|light|dark|<palette-identifier>|<palette-mix()>]&&<percentage [0,100]>?]#{2} )","path()":"path( <'fill-rule'>? , <string> )","perspective()":"perspective( [<length [0,\u221E]>|none] )","polar-color-space":"hsl|hwb|lch|oklch","polygon()":"polygon( <'fill-rule'>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","position-area":"[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|center|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|center|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]","pow()":"pow( <calc-sum> , <calc-sum> )","predefined-rgb":"srgb|srgb-linear|display-p3|display-p3-linear|a98-rgb|prophoto-rgb|rec2020","predefined-rgb-params":"<predefined-rgb> [<number>|<percentage>|none]{3}","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>|<legacy-pseudo-element-selector>","pseudo-page":": [left|right|first|blank]","query-in-parens":"( <container-condition> )|( <size-feature> )|style( <style-query> )|<general-enclosed>",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-extent":"closest-corner|closest-side|farthest-corner|farthest-side","radial-gradient()":"radial-gradient( [<radial-gradient-syntax>] )","radial-gradient-syntax":"[[[<radial-shape>||<radial-size>]? [at <position>]?]||<color-interpolation-method>]? , <color-stop-list>","radial-shape":"circle|ellipse","radial-size":"<radial-extent>|<length [0,\u221E]>|<length-percentage [0,\u221E]>{2}",ratio:"<number [0,\u221E]> [/ <number [0,\u221E]>]?","ray()":"ray( <angle>&&<ray-size>?&&contain?&&[at <position>]? )","ray-size":"closest-side|closest-corner|farthest-side|farthest-corner|sides","rect()":"rect( [<length-percentage>|auto]{4} [round <'border-radius'>]? )","rectangular-color-space":"srgb|srgb-linear|display-p3|display-p3-linear|a98-rgb|prophoto-rgb|rec2020|lab|oklab|xyz|xyz-d50|xyz-d65","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [<conic-gradient-syntax>] )","repeating-linear-gradient()":"repeating-linear-gradient( [<linear-gradient-syntax>] )","repeating-radial-gradient()":"repeating-radial-gradient( [<radial-gradient-syntax>] )","reversed-counter-name":"reversed( <counter-name> )","rgb()":"rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )|rgb( [<number>|<percentage>|none]{3} [/ [<alpha-value>|none]]? )","rgba()":"rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )|rgba( [<number>|<percentage>|none]{3} [/ [<alpha-value>|none]]? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( [<number>|<percentage>]? )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )","scope-end":"<forgiving-selector-list>","scope-start":"<forgiving-selector-list>","scroll()":"scroll( [<scroller>||<axis>]? )",scroller:"root|nearest|self","scroll-state-feature":"<media-query-list>","scroll-state-in-parens":"( <scroll-state-query> )|( <scroll-state-feature> )|<general-enclosed>","scroll-state-query":"not <scroll-state-in-parens>|<scroll-state-in-parens> [[and <scroll-state-in-parens>]*|[or <scroll-state-in-parens>]*]|<scroll-state-feature>","selector-list":"<complex-selector-list>","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","sepia()":"sepia( [<number>|<percentage>]? )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<visual-box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","sign()":"sign( <calc-sum> )","signed-integer":"<number-token>","signless-integer":"<number-token>","sin()":"sin( <calc-sum> )","single-animation":"<'animation-duration'>||<easing-function>||<'animation-delay'>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]||<single-animation-timeline>","single-animation-composition":"replace|add|accumulate","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<dashed-ident>|<scroll()>|<view()>","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>||<transition-behavior-value>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","size-feature":"<mf-plain>|<mf-boolean>|<mf-range>","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sqrt()":"sqrt( <calc-sum> )","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-easing-function":"step-start|step-end|<steps()>","steps()":"steps( <integer> , <step-position>? )","style-feature":"<declaration>","style-in-parens":"( <style-condition> )|( <style-feature> )|<general-enclosed>","style-query":"<style-condition>|<style-feature>","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","superellipse()":"superellipse( [<number>|infinity|-infinity] )","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-decl":"( <declaration> )","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>","symbols()":"symbols( <symbols-type>? [<string>|<image>]+ )","symbols-type":"cyclic|numeric|alphabetic|symbolic|fixed","system-color":"AccentColor|AccentColorText|ActiveText|ButtonBorder|ButtonFace|ButtonText|Canvas|CanvasText|Field|FieldText|GrayText|Highlight|HighlightText|LinkText|Mark|MarkText|SelectedItem|SelectedItemText|VisitedText","system-family-name":"caption|icon|menu|message-box|small-caption|status-bar","tan()":"tan( <calc-sum> )",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","text-edge":"[text|cap|ex|ideographic|ideographic-ink] [text|alphabetic|ideographic|ideographic-ink]?","time-percentage":"<time>|<percentage>","timeline-range-name":"cover|contain|entry|exit|entry-crossing|exit-crossing","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","transition-behavior-value":"normal|allow-discrete","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","try-size":"most-width|most-height|most-block-size|most-inline-size","try-tactic":"flip-block||flip-inline||flip-start","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","view()":"view( [<axis>||<'view-timeline-inset'>]? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","xywh()":"xywh( <length-percentage>{2} <length-percentage [0,\u221E]>{2} [round <'border-radius'>]? )",xyz:"xyz|xyz-d50|xyz-d65","xyz-params":"<xyz-space> [<number>|<percentage>|none]{3}","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"overlay|-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-size":"intrinsic|min-intrinsic|-webkit-fill-available|-webkit-fit-content|-webkit-min-content|-webkit-max-content|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>",autospace:"no-autospace|[ideograph-alpha||ideograph-numeric||punctuation]||[insert|replace]",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral","generic-script-specific":"generic( kai )|generic( fangsong )|generic( nastaliq )","-non-standard-generic-family":"-apple-system|BlinkMacSystemFont","intrinsic-size-keyword":"min-content|max-content|fit-content",left:"<length>|auto","device-cmyk()":"<legacy-device-cmyk-syntax>|<modern-device-cmyk-syntax>","legacy-device-cmyk-syntax":"device-cmyk( <number>#{4} )","modern-device-cmyk-syntax":"device-cmyk( <cmyk-component>{4} [/ [<alpha-value>|none]]? )","cmyk-component":"<number>|<percentage>|none","color-space":"<rectangular-color-space>|<polar-color-space>|<custom-color-space>",right:"<length>|auto","forgiving-selector-list":"<complex-real-selector-list>","forgiving-relative-selector-list":"<relative-real-selector-list>","complex-real-selector-list":"<complex-real-selector>#","simple-selector-list":"<simple-selector>#","relative-real-selector-list":"<relative-real-selector>#","complex-selector-unit":"[<compound-selector>? <pseudo-compound-selector>*]!","complex-real-selector":"<compound-selector> [<combinator>? <compound-selector>]*","relative-real-selector":"<combinator>? <complex-real-selector>","pseudo-compound-selector":"<pseudo-element-selector> <pseudo-class-selector>*","simple-selector":"<type-selector>|<subclass-selector>","legacy-pseudo-element-selector":"':' [before|after|first-line|first-letter]","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,\u221E]>","xyz-space":"xyz|xyz-d50|xyz-d65","style-condition":"not <style-in-parens>|<style-in-parens> [[and <style-in-parens>]*|[or <style-in-parens>]*]","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box","inset-area":"[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]",syntax:"'*'|<syntax-component> [<syntax-combinator> <syntax-component>]*|<syntax-string>","syntax-component":"<syntax-single-component> <syntax-multiplier>?|'<' transform-list '>'","syntax-single-component":"'<' <syntax-type-name> '>'|<ident>","syntax-type-name":"angle|color|custom-ident|image|integer|length|length-percentage|number|percentage|resolution|string|time|url|transform-function","syntax-combinator":"'|'","syntax-multiplier":"'#'|'+'","syntax-string":"<string>"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-content-zooming":"none|zoom","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<visual-box>|border|padding|content|text]||[<visual-box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<coord-box>|no-clip|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<coord-box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","-webkit-user-select":"auto|none|text|all","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]|anchor-center","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>|anchor-center","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical",all:"initial|inherit|unset|revert|revert-layer","anchor-name":"none|<dashed-ident>#","anchor-scope":"none|all|<dashed-ident>#",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"[auto|<time [0s,\u221E]>]#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-range":"[<'animation-range-start'> <'animation-range-end'>?]#","animation-range-end":"[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","animation-range-start":"[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","animation-timeline":"<single-animation-timeline>#","animation-timing-function":"<easing-function>#","animation-trigger":"[none|[<dashed-ident> <animation-action>+]+]#",appearance:"none|auto|<compat-auto>|<compat-special>","aspect-ratio":"auto||<ratio>","backdrop-filter":"none|<filter-value-list>","backface-visibility":"visible|hidden",background:"<bg-layer>#? , <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<visual-box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","baseline-shift":"baseline|sub|super|<svg-length>","baseline-source":"auto|first|last","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-block-start'>","border-block-color":"<'border-top-color'>{1,2}","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-block-style":"<'border-top-style'>{1,2}","border-block-width":"<'border-top-width'>{1,2}","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage [0,\u221E]>{1,2}","border-bottom-right-radius":"<length-percentage [0,\u221E]>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"separate|collapse","border-color":"<color>{1,4}","border-end-end-radius":"<'border-top-left-radius'>","border-end-start-radius":"<'border-top-left-radius'>","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length [0,\u221E]>|<number [0,\u221E]>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"[<number [0,\u221E]>|<percentage [0,\u221E]>]{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage [0,\u221E]>|<number [0,\u221E]>|auto]{1,4}","border-inline":"<'border-block-start'>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-inline-style":"<'border-top-style'>{1,2}","border-inline-width":"<'border-top-width'>{1,2}","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage [0,\u221E]>{1,4} [/ <length-percentage [0,\u221E]>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length>{1,2}","border-start-end-radius":"<'border-top-left-radius'>","border-start-start-radius":"<'border-top-left-radius'>","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage [0,\u221E]>{1,2}","border-top-right-radius":"<length-percentage [0,\u221E]>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"auto|<length-percentage>|<anchor()>|<anchor-size()>","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom",caret:"<'caret-color'>||<'caret-animation'>||<'caret-shape'>","caret-animation":"auto|manual","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none","clip-rule":"nonzero|evenodd",color:"<color>","color-interpolation-filters":"auto|sRGB|linearRGB","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance","column-gap":"normal|<length-percentage>","column-height":"auto|<length [0,\u221E]>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"auto|<length [0,\u221E]>","column-wrap":"auto|nowrap|wrap",columns:"[<'column-width'>||<'column-count'>] [/ <'column-height'>]?",contain:"none|strict|content|[[size||inline-size]||layout||style||paint]","contain-intrinsic-block-size":"auto? [none|<length>]","contain-intrinsic-height":"auto? [none|<length>]","contain-intrinsic-inline-size":"auto? [none|<length>]","contain-intrinsic-size":"[auto? [none|<length>]]{1,2}","contain-intrinsic-width":"auto? [none|<length>]",container:"<'container-name'> [/ <'container-type'>]?","container-name":"none|<custom-ident>+","container-type":"normal||[size|inline-size]",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>|<attr()>]+]?","content-visibility":"visible|auto|hidden","corner-block-end-shape":"<corner-shape-value>{1,2}","corner-block-start-shape":"<corner-shape-value>{1,2}","corner-bottom-shape":"<corner-shape-value>{1,2}","corner-bottom-left-shape":"<corner-shape-value>","corner-bottom-right-shape":"<corner-shape-value>","corner-end-end-shape":"<corner-shape-value>","corner-end-start-shape":"<corner-shape-value>","corner-inline-end-shape":"<corner-shape-value>{1,2}","corner-inline-start-shape":"<corner-shape-value>{1,2}","corner-left-shape":"<corner-shape-value>{1,2}","corner-right-shape":"<corner-shape-value>{1,2}","corner-shape":"<corner-shape-value>{1,4}","corner-start-start-shape":"<corner-shape-value>","corner-start-end-shape":"<corner-shape-value>","corner-top-shape":"<corner-shape-value>{1,2}","corner-top-left-shape":"<corner-shape-value>","corner-top-right-shape":"<corner-shape-value>","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",cx:"<length>|<percentage>",cy:"<length>|<percentage>",d:"none|path( <string> )",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge","dynamic-range-limit":"standard|no-limit|constrained|<dynamic-range-limit-mix()>","empty-cells":"show|hide","field-sizing":"content|fixed",fill:"<paint>","fill-opacity":"<number-zero-one>|<percentage>","fill-rule":"nonzero|evenodd",filter:"none|<filter-value-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end","flood-color":"<color>","flood-opacity":"<'opacity'>",font:"[[<'font-style'>||<font-variant-css2>||<'font-weight'>||<font-width-css3>]? <'font-size'> [/ <'line-height'>]? <'font-family'>#]|<system-family-name>|<-non-standard-font>","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-palette":"normal|light|dark|<palette-identifier>|<palette-mix()>","font-size":"<absolute-size>|<relative-size>|<length-percentage [0,\u221E]>|math","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps||position]","font-synthesis-position":"auto|none","font-synthesis-small-caps":"auto|none","font-synthesis-style":"auto|none","font-synthesis-weight":"auto|none","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-emoji":"normal|text|emoji|unicode","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-variation-settings":"normal|[<string> <number>]#","font-weight":"<font-weight-absolute>|bolder|lighter","font-width":"normal|<percentage [0,\u221E]>|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded","forced-color-adjust":"auto|none|preserve-parent-color",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","hyphenate-character":"auto|<string>","hyphenate-limit-chars":"[auto|<integer>]{1,3}",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|smooth|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>","interpolate-size":"numeric-only|allow-keywords",isolation:"auto|isolate",interactivity:"auto|inert","interest-delay":"<'interest-delay-start'>{1,2}","interest-delay-end":"normal|<time>","interest-delay-start":"normal|<time>","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]|anchor-center","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|anchor-center","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"auto|<length-percentage>|<anchor()>|<anchor-size()>","letter-spacing":"normal|<length-percentage>","lighting-color":"<color>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"<'margin-top'>{1,4}","margin-block":"<'margin-top'>{1,2}","margin-block-end":"<'margin-top'>","margin-block-start":"<'margin-top'>","margin-bottom":"<length-percentage>|auto|<anchor-size()>","margin-inline":"<'margin-top'>{1,2}","margin-inline-end":"<'margin-top'>","margin-inline-start":"<'margin-top'>","margin-left":"<length-percentage>|auto|<anchor-size()>","margin-right":"<length-percentage>|auto|<anchor-size()>","margin-top":"<length-percentage>|auto|<anchor-size()>","margin-trim":"none|in-flow|all",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<coord-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<coord-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","min-block-size":"<'min-width'>","min-height":"auto|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","min-inline-size":"<'min-width'>","min-width":"auto|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","mix-blend-mode":"<blend-mode>|plus-darker|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>","object-view-box":"none|<basic-shape-rect>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|<offset-path>||<coord-box>","offset-position":"normal|auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<opacity-value>",order:"<integer>",orphans:"<integer>",outline:"<'outline-width'>||<'outline-style'>||<'outline-color'>","outline-color":"auto|<color>","outline-offset":"<length>","outline-style":"auto|<outline-line-style>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto|<-non-standard-overflow>","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,\u221E]>","overflow-inline":"visible|hidden|clip|scroll|auto|<-non-standard-overflow>","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto|<-non-standard-overflow>","overflow-y":"visible|hidden|clip|scroll|auto|<-non-standard-overflow>",overlay:"none|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"<'padding-top'>{1,4}","padding-block":"<'padding-top'>{1,2}","padding-block-end":"<'padding-top'>","padding-block-start":"<'padding-top'>","padding-bottom":"<length-percentage [0,\u221E]>","padding-inline":"<'padding-top'>{1,2}","padding-inline-end":"<'padding-top'>","padding-inline-start":"<'padding-top'>","padding-left":"<length-percentage [0,\u221E]>","padding-right":"<length-percentage [0,\u221E]>","padding-top":"<length-percentage [0,\u221E]>",page:"auto|<custom-ident>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky","position-anchor":"auto|none|<anchor-name>","position-area":"none|<position-area>","position-try":"<'position-try-order'>? <'position-try-fallbacks'>","position-try-fallbacks":"none|[[<dashed-ident>||<try-tactic>]|<'position-area'>]#","position-try-order":"normal|<try-size>","position-visibility":"always|[anchors-valid||anchors-visible||no-overflow]","print-color-adjust":"economy|exact",quotes:"none|auto|[<string> <string>]+",r:"<length>|<percentage>","reading-flow":"normal|source-order|flex-visual|flex-flow|grid-rows|grid-columns|grid-order","reading-order":"<integer>",resize:"none|both|horizontal|vertical|block|inline",right:"auto|<length-percentage>|<anchor()>|<anchor-size()>",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-overhang":"auto|none","ruby-position":"[alternate||[over|under]]|inter-character",rx:"<length>|<percentage>",ry:"<length>|<percentage>",scale:"none|[<number>|<percentage>]{1,3}","scroll-behavior":"auto|smooth","scroll-initial-target":"none|nearest","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-end":"<length>","scroll-margin-block-start":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-end":"<length>","scroll-margin-inline-start":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-marker-group":"none|before|after","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","scroll-target-group":"none|auto","scroll-timeline":"[<'scroll-timeline-name'> <'scroll-timeline-axis'>?]#","scroll-timeline-axis":"[block|inline|x|y]#","scroll-timeline-name":"[none|<dashed-ident>]#","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","shape-image-threshold":"<opacity-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]","stop-color":"<'color'>","stop-opacity":"<'opacity'>",stroke:"<paint>","stroke-color":"<color>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<'opacity'>","stroke-width":"<svg-length>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-anchor":"start|middle|end","text-autospace":"normal|<autospace>|auto","text-box":"normal|<'text-box-trim'>||<'text-box-edge'>","text-box-edge":"auto|<text-edge>","text-box-trim":"none|trim-start|trim-end|trim-both","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-inset":"<length>{1,2}|auto","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"auto|[over|under]&&[right|left]?","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-spacing-trim":"space-all|normal|space-first|trim-start","text-transform":"none|[capitalize|uppercase|lowercase]||full-width||full-size-kana|math-auto","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]","text-wrap":"<'text-wrap-mode'>||<'text-wrap-style'>","text-wrap-mode":"wrap|nowrap","text-wrap-style":"auto|balance|stable|pretty","timeline-scope":"none|<dashed-ident>#","timeline-trigger":"none|[<'timeline-trigger-name'> <'timeline-trigger-source'> <'timeline-trigger-range'> ['/' <'timeline-trigger-exit-range'>]?]#","timeline-trigger-name":"none|<dashed-ident>#","timeline-trigger-exit-range":"[<'timeline-trigger-exit-range-start'> <'timeline-trigger-exit-range-end'>?]#","timeline-trigger-exit-range-end":"[auto|normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","timeline-trigger-exit-range-start":"[auto|normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","timeline-trigger-range":"[<'timeline-trigger-range-start'> <'timeline-trigger-range-end'>?]#","timeline-trigger-range-end":"[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","timeline-trigger-range-start":"[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","timeline-trigger-source":"<single-animation-timeline>#",top:"auto|<length-percentage>|<anchor()>|<anchor-size()>","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-behavior":"<transition-behavior-value>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","trigger-scope":"none|all|<dashed-ident>#","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|all","vector-effect":"none|non-scaling-stroke|non-scaling-size|non-rotation|fixed-position","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>","view-timeline":"[<'view-timeline-name'> [<'view-timeline-axis'>||<'view-timeline-inset'>]?]#","view-timeline-axis":"[block|inline|x|y]#","view-timeline-inset":"[[auto|<length-percentage>]{1,2}]#","view-timeline-name":"[none|<dashed-ident>]#","view-transition-class":"none|<custom-ident>+","view-transition-name":"none|<custom-ident>|match-element",visibility:"visible|hidden|collapse","white-space":"normal|pre|pre-wrap|pre-line|<'white-space-collapse'>||<'text-wrap-mode'>","white-space-collapse":"collapse|preserve|preserve-breaks|preserve-spaces|break-spaces",widows:"<integer>",width:"auto|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word|auto-phrase","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>",x:"<length>|<percentage>",y:"<length>|<percentage>","z-index":"auto|<integer>",zoom:"normal|reset|<number [0,\u221E]>||<percentage [0,\u221E]>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<visual-box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto",behavior:"<url>+",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong","position-try-options":"<'position-try-fallbacks'>",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong",speak:"auto|never|always","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]","white-space-trim":"none|discard-before||discard-after||discard-inner"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer [0,\u221E]>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer [0,\u221E]>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},container:{prelude:"[<container-name>]? <container-condition>",descriptors:null},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"auto|block|swap|fallback|optional","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-variation-settings":"normal|[<string> <number>]#","font-weight":"<font-weight-absolute>{1,2}","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},"font-palette-values":{prelude:"<dashed-ident>",descriptors:{"base-palette":"light|dark|<integer [0,\u221E]>","font-family":"<family-name>#","override-colors":"[<integer [0,\u221E]> <color>]#"}},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]","page-orientation":"upright|rotate-left|rotate-right",size:"<length [0,\u221E]>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},"position-try":{prelude:"<dashed-ident>",descriptors:{top:"<'top'>",left:"<'left'>",bottom:"<'bottom'>",right:"<'right'>","inset-block-start":"<'inset-block-start'>","inset-block-end":"<'inset-block-end'>","inset-inline-start":"<'inset-inline-start'>","inset-inline-end":"<'inset-inline-end'>","inset-block":"<'inset-block'>","inset-inline":"<'inset-inline'>",inset:"<'inset'>","margin-top":"<'margin-top'>","margin-left":"<'margin-left'>","margin-bottom":"<'margin-bottom'>","margin-right":"<'margin-right'>","margin-block-start":"<'margin-block-start'>","margin-block-end":"<'margin-block-end'>","margin-inline-start":"<'margin-inline-start'>","margin-inline-end":"<'margin-inline-end'>",margin:"<'margin'>","margin-block":"<'margin-block'>","margin-inline":"<'margin-inline'>",width:"<'width'>",height:"<'height'>","min-width":"<'min-width'>","min-height":"<'min-height'>","max-width":"<'max-width'>","max-height":"<'max-height'>","block-size":"<'block-size'>","inline-size":"<'inline-size'>","min-block-size":"<'min-block-size'>","min-inline-size":"<'min-inline-size'>","max-block-size":"<'max-block-size'>","max-inline-size":"<'max-inline-size'>","align-self":"<'align-self'>|anchor-center","justify-self":"<'justify-self'>|anchor-center"}},property:{prelude:"<custom-property-name>",descriptors:{inherits:"true|false","initial-value":"<declaration-value>?",syntax:"<string>"}},scope:{prelude:"[( <scope-start> )]? [to ( <scope-end> )]?",descriptors:null},"starting-style":{prelude:null,descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},"view-transition":{prelude:null,descriptors:{navigation:"auto|none",types:"none|<custom-ident>+"}},"font-features-values":{prelude:"[<string>|<custom-ident>]+",descriptors:{"font-display":"auto|block|swap|fallback|optional"}}}}});var cp={};ye(cp,{generate:()=>gP,name:()=>dP,parse:()=>lp,structure:()=>fP});function xl(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===Lr||r===Gn)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)_t(this.charCodeAt(n))||this.error("Integer is expected",n)}function bi(e){return xl.call(this,0,e)}function po(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case hl:n="N is expected";break;case Gn:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+e)}}function ap(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10)if(this.isDelim(Lr,e)||this.isDelim(Gn,e)){t=this.isDelim(Lr,e)?Lr:Gn;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),bi.call(this,Oo))}else return null;return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==Lr&&n!==Gn&&this.error("Number sign is expected")),bi.call(this,t!==0),t===Gn?"-"+this.consume(10):this.consume(10)}function lp(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)bi.call(this,pP),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Gn))switch(t="-1",po.call(this,1,hl),this.tokenEnd-this.tokenStart){case 2:this.next(),n=ap.call(this);break;case 3:po.call(this,2,Gn),this.next(),this.skipSC(),bi.call(this,Oo),n="-"+this.consume(10);break;default:po.call(this,2,Gn),xl.call(this,3,Oo),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(Lr)&&this.lookupType(1)===1){let r=0;switch(t="1",this.isDelim(Lr)&&(r=1,this.next()),po.call(this,0,hl),this.tokenEnd-this.tokenStart){case 1:this.next(),n=ap.call(this);break;case 2:po.call(this,1,Gn),this.next(),this.skipSC(),bi.call(this,Oo),n="-"+this.consume(10);break;default:po.call(this,1,Gn),xl.call(this,2,Oo),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),o=r===Lr||r===Gn,i=this.tokenStart+o;for(;i<this.tokenEnd&&_t(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),po.call(this,i-this.tokenStart,hl),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),n=ap.call(this)):(po.call(this,i-this.tokenStart+1,Gn),i+2===this.tokenEnd?(this.next(),this.skipSC(),bi.call(this,Oo),n="-"+this.consume(10)):(xl.call(this,i-this.tokenStart+2,Oo),this.next(),n=this.substrToCursor(i+1)))}else this.error();return t!==null&&t.charCodeAt(0)===Lr&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===Lr&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function gP(e){if(e.a){let t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){let n=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}var Lr,Gn,hl,Oo,pP,dP,fP,up=$(()=>{"use strict";nr();Lr=43,Gn=45,hl=110,Oo=!0,pP=!1;dP="AnPlusB",fP={a:[String,null],b:[String,null]}});var dp={};ye(dp,{generate:()=>bP,name:()=>hP,parse:()=>pp,structure:()=>yP,walkContext:()=>xP});function u0(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function mP(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}function pp(e=!1){let t=this.tokenStart,n,r,o=null,i=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?o=this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),u0):o=u0.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block=="function"?i=this.atrule[r].block.call(this,e):i=this.Block(mP.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:o,block:i}}function bP(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var hP,xP,yP,fp=$(()=>{"use strict";hP="Atrule",xP="atrule",yP={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]}});var mp={};ye(mp,{generate:()=>kP,name:()=>SP,parse:()=>gp,structure:()=>vP,walkContext:()=>wP});function gp(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude=="function"?t=this.atrule[e].prelude.call(this):t=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function kP(e){this.children(e)}var SP,wP,vP,hp=$(()=>{"use strict";SP="AtrulePrelude",wP="atrulePrelude",vP={children:[[]]}});var bp={};ye(bp,{generate:()=>LP,name:()=>AP,parse:()=>yp,structure:()=>PP});function FP(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(p0)?(t=!0,this.next()):this.isDelim(xp)||this.eat(1),this.isDelim(xp)?this.charCodeAt(this.tokenStart+1)!==yl?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function EP(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==yl&&t!==IP&&t!==TP&&t!==CP&&t!==p0&&t!==xp&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==yl&&(this.isDelim(yl)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}function yp(){let e=this.tokenStart,t,n=null,r=null,o=null;return this.eat(19),this.skipSC(),t=FP.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=EP.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:o}}function LP(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]")}var CP,p0,yl,TP,xp,IP,AP,PP,Sp=$(()=>{"use strict";CP=36,p0=42,yl=61,TP=94,xp=124,IP=126;AP="AttributeSelector",PP={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]}});var vp={};ye(vp,{generate:()=>NP,name:()=>DP,parse:()=>wp,structure:()=>zP,walkContext:()=>RP});function g0(){return this.Raw(null,!0)}function d0(){return this.parseWithFallback(this.Rule,g0)}function f0(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function BP(){if(this.tokenType===17)return f0.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,f0);return this.tokenType===17&&this.next(),e}function wp(e){let t=e?BP:d0,n=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),g0));break;default:e&&this.isDelim(MP)?r.push(d0.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function NP(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}var MP,DP,RP,zP,kp=$(()=>{"use strict";MP=38;DP="Block",RP="block",zP={children:[["Atrule","Rule","Declaration"]]}});var Tp={};ye(Tp,{generate:()=>$P,name:()=>OP,parse:()=>Cp,structure:()=>_P});function Cp(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function $P(e){this.token(9,"["),this.children(e),this.token(9,"]")}var OP,_P,Ip=$(()=>{"use strict";OP="Brackets",_P={children:[[]]}});var Ep={};ye(Ep,{generate:()=>HP,name:()=>UP,parse:()=>Fp,structure:()=>jP});function Fp(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function HP(){this.token(15,"-->")}var UP,jP,Ap=$(()=>{"use strict";UP="CDC",jP=[]});var Lp={};ye(Lp,{generate:()=>GP,name:()=>WP,parse:()=>Pp,structure:()=>VP});function Pp(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function GP(){this.token(14,"<!--")}var WP,VP,Mp=$(()=>{"use strict";WP="CDO",VP=[]});var Dp={};ye(Dp,{generate:()=>XP,name:()=>YP,parse:()=>Bp,structure:()=>KP});function Bp(){return this.eatDelim(qP),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function XP(e){this.token(9,"."),this.token(1,e.name)}var qP,YP,KP,Rp=$(()=>{"use strict";qP=46,YP="ClassSelector",KP={name:String}});var Np={};ye(Np,{generate:()=>n2,name:()=>e2,parse:()=>zp,structure:()=>t2});function zp(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case JP:case QP:case ZP:this.next();break;case m0:this.next(),this.eatIdent("deep"),this.eatDelim(m0);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e);break}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function n2(e){this.tokenize(e.name)}var QP,m0,JP,ZP,e2,t2,Op=$(()=>{"use strict";QP=43,m0=47,JP=62,ZP=126,e2="Combinator",t2={name:String}});var $p={};ye($p,{generate:()=>a2,name:()=>i2,parse:()=>_p,structure:()=>s2});function _p(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===r2&&this.charCodeAt(t-1)===o2&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function a2(e){this.token(25,"/*"+e.value+"*/")}var r2,o2,i2,s2,Up=$(()=>{"use strict";r2=42,o2=47,i2="Comment",s2={value:String}});var Hp={};ye(Hp,{generate:()=>d2,name:()=>c2,parse:()=>jp,structure:()=>u2});function h0(e){return this.lookupTypeNonSC(1)===1&&l2.has(this.lookupTypeNonSC(2))?this.Feature(e):this.FeatureRange(e)}function jp(e="media"){let t=this.createList();e:for(;!this.eof;)switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t.push(this.Identifier());break;case 21:{let n=this.parseWithFallback(()=>p2[e].call(this,e),()=>null);n||(n=this.parseWithFallback(()=>{this.eat(21);let r=this.Condition(e);return this.eat(22),r},()=>this.GeneralEnclosed(e))),t.push(n);break}case 2:{let n=this.parseWithFallback(()=>this.FeatureFunction(e),()=>null);n||(n=this.GeneralEnclosed(e)),t.push(n);break}default:break e}return t.isEmpty&&this.error("Condition is expected"),{type:"Condition",loc:this.getLocationFromList(t),kind:e,children:t}}function d2(e){e.children.forEach(t=>{t.type==="Condition"?(this.token(21,"("),this.node(t),this.token(22,")")):this.node(t)})}var l2,c2,u2,p2,Wp=$(()=>{"use strict";l2=new Set([16,22,0]),c2="Condition",u2={kind:String,children:[["Identifier","Feature","FeatureFunction","FeatureRange","SupportsDeclaration"]]};p2={media:h0,container:h0,supports(){return this.SupportsDeclaration()}}});var Gp={};ye(Gp,{generate:()=>C2,name:()=>w2,parse:()=>Vp,structure:()=>k2,walkContext:()=>v2});function y2(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function b2(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function S2(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(y0)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}function Vp(){let e=this.tokenStart,t=this.tokenIndex,n=T2.call(this),r=ol(n),o=r?this.parseCustomProperty:this.parseValue,i=r?b2:y2,s=!1,a;this.skipSC(),this.eat(16);let u=this.tokenIndex;if(r||this.skipSC(),o?a=this.parseWithFallback(S2,i):a=i.call(this,this.tokenIndex),r&&a.type==="Value"&&a.children.isEmpty){for(let c=u-this.tokenIndex;c<=0;c++)if(this.lookupType(c)===13){a.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(y0)&&(s=I2.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:s,property:n,value:a}}function C2(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important))}function T2(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case h2:case g2:case x2:case f2:case m2:this.next();break;case x0:this.next(),this.isDelim(x0)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function I2(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"?!0:e}var y0,f2,g2,m2,h2,x2,x0,w2,v2,k2,qp=$(()=>{"use strict";il();y0=33,f2=35,g2=36,m2=38,h2=42,x2=43,x0=47;w2="Declaration",v2="declaration",k2={important:[Boolean,String],property:String,value:["Value","Raw"]}});var Xp={};ye(Xp,{generate:()=>P2,name:()=>E2,parse:()=>Kp,structure:()=>A2});function Yp(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function Kp(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Yp));break;default:this.isDelim(F2)?e.push(this.parseWithFallback(this.Rule,Yp)):e.push(this.parseWithFallback(this.Declaration,Yp))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function P2(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}var F2,E2,A2,Qp=$(()=>{"use strict";F2=38;E2="DeclarationList",A2={children:[["Declaration","Atrule","Rule"]]}});var Zp={};ye(Zp,{generate:()=>B2,name:()=>L2,parse:()=>Jp,structure:()=>M2});function Jp(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function B2(e){this.token(12,e.value+e.unit)}var L2,M2,ed=$(()=>{"use strict";L2="Dimension",M2={value:String,unit:String}});var nd={};ye(nd,{generate:()=>N2,name:()=>R2,parse:()=>td,structure:()=>z2});function td(e){let t=this.tokenStart,n,r=null;if(this.eat(21),this.skipSC(),n=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?r=this.Ratio():r=this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;case 2:r=this.parseWithFallback(()=>{let o=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(D2)&&this.error(),o},()=>this.Ratio());break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eof||this.eat(22),{type:"Feature",loc:this.getLocation(t,this.tokenStart),kind:e,name:n,value:r}}function N2(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var D2,R2,z2,rd=$(()=>{"use strict";D2=47,R2="Feature",z2={kind:String,name:String,value:["Identifier","Number","Dimension","Ratio","Function",null]}});var id={};ye(id,{generate:()=>U2,name:()=>O2,parse:()=>od,structure:()=>_2});function $2(e,t){let r=(this.features[e]||{})[t];return typeof r!="function"&&this.error(`Unknown feature ${t}()`),r}function od(e="unknown"){let t=this.tokenStart,n=this.consumeFunctionName(),r=$2.call(this,e,n.toLowerCase());this.skipSC();let o=this.parseWithFallback(()=>{let i=this.tokenIndex,s=r.call(this);return this.eof===!1&&this.isBalanceEdge(i)===!1&&this.error(),s},()=>this.Raw(null,!1));return this.eof||this.eat(22),{type:"FeatureFunction",loc:this.getLocation(t,this.tokenStart),kind:e,feature:n,value:o}}function U2(e){this.token(2,e.feature+"("),this.node(e.value),this.token(22,")")}var O2,_2,sd=$(()=>{"use strict";O2="FeatureFunction",_2={kind:String,feature:String,value:["Declaration","Selector"]}});var cd={};ye(cd,{generate:()=>G2,name:()=>W2,parse:()=>ld,structure:()=>V2});function ad(){switch(this.skipSC(),this.tokenType){case 10:return this.isDelim(b0,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case 12:return this.Dimension();case 1:return this.Identifier();case 2:return this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(b0)&&this.error(),e},()=>this.Ratio());default:this.error("Number, dimension, ratio or identifier is expected")}}function w0(e){if(this.skipSC(),this.isDelim(j2)||this.isDelim(H2)){let t=this.source[this.tokenStart];return this.next(),this.isDelim(S0)?(this.next(),t+"="):t}if(this.isDelim(S0))return"=";this.error(`Expected ${e?'":", ':""}"<", ">", "=" or ")"`)}function ld(e="unknown"){let t=this.tokenStart;this.skipSC(),this.eat(21);let n=ad.call(this),r=w0.call(this,n.type==="Identifier"),o=ad.call(this),i=null,s=null;return this.lookupNonWSType(0)!==22&&(i=w0.call(this),s=ad.call(this)),this.skipSC(),this.eat(22),{type:"FeatureRange",loc:this.getLocation(t,this.tokenStart),kind:e,left:n,leftComparison:r,middle:o,rightComparison:i,right:s}}function G2(e){this.token(21,"("),this.node(e.left),this.tokenize(e.leftComparison),this.node(e.middle),e.right&&(this.tokenize(e.rightComparison),this.node(e.right)),this.token(22,")")}var b0,j2,S0,H2,W2,V2,ud=$(()=>{"use strict";b0=47,j2=60,S0=61,H2=62,W2="FeatureRange",V2={kind:String,left:["Identifier","Number","Dimension","Ratio","Function"],leftComparison:String,middle:["Identifier","Number","Dimension","Ratio","Function"],rightComparison:[String,null],right:["Identifier","Number","Dimension","Ratio","Function",null]}});var dd={};ye(dd,{generate:()=>X2,name:()=>q2,parse:()=>pd,structure:()=>K2,walkContext:()=>Y2});function pd(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),o=r.toLowerCase(),i;return i=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:r,children:i}}function X2(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var q2,Y2,K2,fd=$(()=>{"use strict";q2="Function",Y2="function",K2={name:String,children:[[]]}});var md={};ye(md,{generate:()=>Z2,name:()=>Q2,parse:()=>gd,structure:()=>J2});function gd(e){let t=this.tokenStart,n=null;this.tokenType===2?n=this.consumeFunctionName():this.eat(21);let r=this.parseWithFallback(()=>{let o=this.tokenIndex,i=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(o)===!1&&this.error(),i},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(22),{type:"GeneralEnclosed",loc:this.getLocation(t,this.tokenStart),kind:e,function:n,children:r}}function Z2(e){e.function?this.token(2,e.function+"("):this.token(21,"("),this.children(e),this.token(22,")")}var Q2,J2,hd=$(()=>{"use strict";Q2="GeneralEnclosed",J2={kind:String,function:[String,null],children:[[]]}});var yd={};ye(yd,{generate:()=>rL,name:()=>tL,parse:()=>xd,structure:()=>nL,xxx:()=>eL});function xd(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function rL(e){this.token(4,"#"+e.value)}var eL,tL,nL,bd=$(()=>{"use strict";eL="XXX",tL="Hash",nL={value:String}});var wd={};ye(wd,{generate:()=>sL,name:()=>oL,parse:()=>Sd,structure:()=>iL});function Sd(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function sL(e){this.token(1,e.name)}var oL,iL,vd=$(()=>{"use strict";oL="Identifier",iL={name:String}});var Cd={};ye(Cd,{generate:()=>cL,name:()=>aL,parse:()=>kd,structure:()=>lL});function kd(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function cL(e){this.token(9,"#"+e.name)}var aL,lL,Td=$(()=>{"use strict";aL="IdSelector",lL={name:String}});var Fd={};ye(Fd,{generate:()=>fL,name:()=>pL,parse:()=>Id,structure:()=>dL});function Id(){let e=this.tokenStart,t=this.consume(1);for(;this.isDelim(uL);)this.eat(9),t+="."+this.consume(1);return{type:"Layer",loc:this.getLocation(e,this.tokenStart),name:t}}function fL(e){this.tokenize(e.name)}var uL,pL,dL,Ed=$(()=>{"use strict";uL=46,pL="Layer",dL={name:String}});var Pd={};ye(Pd,{generate:()=>hL,name:()=>gL,parse:()=>Ad,structure:()=>mL});function Ad(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.Layer()),this.lookupTypeNonSC(0)===18);)this.skipSC(),this.next(),this.skipSC();return{type:"LayerList",loc:this.getLocationFromList(e),children:e}}function hL(e){this.children(e,()=>this.token(18,","))}var gL,mL,Ld=$(()=>{"use strict";gL="LayerList",mL={children:[["Layer"]]}});var Bd={};ye(Bd,{generate:()=>bL,name:()=>xL,parse:()=>Md,structure:()=>yL});function Md(){let e=this.tokenStart,t=null,n=null,r=null;if(this.skipSC(),this.tokenType===1&&this.lookupTypeNonSC(1)!==21){let o=this.consume(1),i=o.toLowerCase();switch(i==="not"||i==="only"?(this.skipSC(),t=i,n=this.consume(1)):n=o,this.lookupTypeNonSC(0)){case 1:{this.skipSC(),this.eatIdent("and"),r=this.Condition("media");break}case 23:case 17:case 18:case 0:break;default:this.error("Identifier or parenthesis is expected")}}else switch(this.tokenType){case 1:case 21:case 2:{r=this.Condition("media");break}case 23:case 17:case 0:break;default:this.error("Identifier or parenthesis is expected")}return{type:"MediaQuery",loc:this.getLocation(e,this.tokenStart),modifier:t,mediaType:n,condition:r}}function bL(e){e.mediaType?(e.modifier&&this.token(1,e.modifier),this.token(1,e.mediaType),e.condition&&(this.token(1,"and"),this.node(e.condition))):e.condition&&this.node(e.condition)}var xL,yL,Dd=$(()=>{"use strict";xL="MediaQuery",yL={modifier:[String,null],mediaType:[String,null],condition:["Condition",null]}});var zd={};ye(zd,{generate:()=>vL,name:()=>SL,parse:()=>Rd,structure:()=>wL});function Rd(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function vL(e){this.children(e,()=>this.token(18,","))}var SL,wL,Nd=$(()=>{"use strict";SL="MediaQueryList",wL={children:[["MediaQuery"]]}});var _d={};ye(_d,{generate:()=>IL,name:()=>CL,parse:()=>Od,structure:()=>TL});function Od(){let e=this.tokenStart;return this.eatDelim(kL),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function IL(){this.token(9,"&")}var kL,CL,TL,$d=$(()=>{"use strict";kL=38,CL="NestingSelector",TL={}});var jd={};ye(jd,{generate:()=>AL,name:()=>FL,parse:()=>Ud,structure:()=>EL});function Ud(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:r,selector:n}}function AL(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}var FL,EL,Hd=$(()=>{"use strict";FL="Nth",EL={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]}});var Vd={};ye(Vd,{generate:()=>ML,name:()=>PL,parse:()=>Wd,structure:()=>LL});function Wd(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function ML(e){this.token(10,e.value)}var PL,LL,Gd=$(()=>{"use strict";PL="Number",LL={value:String}});var Yd={};ye(Yd,{generate:()=>RL,name:()=>BL,parse:()=>qd,structure:()=>DL});function qd(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function RL(e){this.tokenize(e.value)}var BL,DL,Kd=$(()=>{"use strict";BL="Operator",DL={value:String}});var Qd={};ye(Qd,{generate:()=>OL,name:()=>zL,parse:()=>Xd,structure:()=>NL});function Xd(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function OL(e){this.token(21,"("),this.children(e),this.token(22,")")}var zL,NL,Jd=$(()=>{"use strict";zL="Parentheses",NL={children:[[]]}});var ef={};ye(ef,{generate:()=>UL,name:()=>_L,parse:()=>Zd,structure:()=>$L});function Zd(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function UL(e){this.token(11,e.value+"%")}var _L,$L,tf=$(()=>{"use strict";_L="Percentage",$L={value:String}});var rf={};ye(rf,{generate:()=>VL,name:()=>jL,parse:()=>nf,structure:()=>WL,walkContext:()=>HL});function nf(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function VL(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var jL,HL,WL,of=$(()=>{"use strict";jL="PseudoClassSelector",HL="function",WL={name:String,children:[["Raw"],null]}});var af={};ye(af,{generate:()=>KL,name:()=>GL,parse:()=>sf,structure:()=>YL,walkContext:()=>qL});function sf(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function KL(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var GL,qL,YL,lf=$(()=>{"use strict";GL="PseudoElementSelector",qL="function",YL={name:String,children:[["Raw"],null]}});var uf={};ye(uf,{generate:()=>JL,name:()=>XL,parse:()=>cf,structure:()=>QL});function k0(){switch(this.skipSC(),this.tokenType){case 10:return this.Number();case 2:return this.Function(this.readSequence,this.scope.Value);default:this.error("Number of function is expected")}}function cf(){let e=this.tokenStart,t=k0.call(this),n=null;return this.skipSC(),this.isDelim(v0)&&(this.eatDelim(v0),n=k0.call(this)),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function JL(e){this.node(e.left),this.token(9,"/"),e.right?this.node(e.right):this.node(10,1)}var v0,XL,QL,pf=$(()=>{"use strict";v0=47;XL="Ratio",QL={left:["Number","Function"],right:["Number","Function",null]}});var ff={};ye(ff,{generate:()=>nM,name:()=>eM,parse:()=>df,structure:()=>tM});function ZL(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function df(e,t){let n=this.getTokenStart(this.tokenIndex),r;return this.skipUntilBalanced(this.tokenIndex,e||this.consumeUntilBalanceEnd),t&&this.tokenStart>n?r=ZL.call(this):r=this.tokenStart,{type:"Raw",loc:this.getLocation(n,r),value:this.substring(n,r)}}function nM(e){this.tokenize(e.value)}var eM,tM,gf=$(()=>{"use strict";eM="Raw",tM={value:String}});var hf={};ye(hf,{generate:()=>aM,name:()=>oM,parse:()=>mf,structure:()=>sM,walkContext:()=>iM});function C0(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function rM(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}function mf(){let e=this.tokenIndex,t=this.tokenStart,n,r;return this.parseRulePrelude?n=this.parseWithFallback(rM,C0):n=C0.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function aM(e){this.node(e.prelude),this.node(e.block)}var oM,iM,sM,xf=$(()=>{"use strict";oM="Rule",iM="rule",sM={prelude:["SelectorList","Raw"],block:["Block"]}});var bf={};ye(bf,{generate:()=>uM,name:()=>lM,parse:()=>yf,structure:()=>cM});function yf(){let e=null,t=null;this.skipSC();let n=this.tokenStart;return this.tokenType===21&&(this.next(),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),this.lookupNonWSType(0)===1&&(this.skipSC(),this.eatIdent("to"),this.skipSC(),this.eat(21),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),{type:"Scope",loc:this.getLocation(n,this.tokenStart),root:e,limit:t}}function uM(e){e.root&&(this.token(21,"("),this.node(e.root),this.token(22,")")),e.limit&&(this.token(1,"to"),this.token(21,"("),this.node(e.limit),this.token(22,")"))}var lM,cM,Sf=$(()=>{"use strict";lM="Scope",cM={root:["SelectorList","Raw",null],limit:["SelectorList","Raw",null]}});var vf={};ye(vf,{generate:()=>fM,name:()=>pM,parse:()=>wf,structure:()=>dM});function wf(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function fM(e){this.children(e)}var pM,dM,kf=$(()=>{"use strict";pM="Selector",dM={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator"]]}});var Tf={};ye(Tf,{generate:()=>xM,name:()=>gM,parse:()=>Cf,structure:()=>hM,walkContext:()=>mM});function Cf(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function xM(e){this.children(e,()=>this.token(18,","))}var gM,mM,hM,If=$(()=>{"use strict";gM="SelectorList",mM="selector",hM={children:[["Selector","Raw"]]}});function bl(e){let t=e.length,n=e.charCodeAt(0),r=n===T0||n===I0?1:0,o=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,i="";for(let s=r;s<=o;s++){let a=e.charCodeAt(s);if(a===Ff){if(s===o){s!==t-1&&(i=e.substr(s+1));break}if(a=e.charCodeAt(++s),An(Ff,a)){let u=s-1,c=Ur(e,u);s=c-1,i+=ja(e.substring(u+1,c))}else a===13&&e.charCodeAt(s+1)===10&&s++}else i+=e[s]}return i}function F0(e,t){let n=t?"'":'"',r=t?I0:T0,o="",i=!1;for(let s=0;s<e.length;s++){let a=e.charCodeAt(s);if(a===0){o+="\uFFFD";continue}if(a<=31||a===127){o+="\\"+a.toString(16),i=!0;continue}a===r||a===Ff?(o+="\\"+e.charAt(s),i=!1):(i&&(Pn(a)||Ar(a))&&(o+=" "),o+=e.charAt(s),i=!1)}return n+o+n}var Ff,T0,I0,Sl=$(()=>{"use strict";nr();Ff=92,T0=34,I0=39});var Af={};ye(Af,{generate:()=>SM,name:()=>yM,parse:()=>Ef,structure:()=>bM});function Ef(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:bl(this.consume(5))}}function SM(e){this.token(5,F0(e.value))}var yM,bM,Pf=$(()=>{"use strict";Sl();yM="String",bM={value:String}});var Mf={};ye(Mf,{generate:()=>TM,name:()=>vM,parse:()=>Lf,structure:()=>CM,walkContext:()=>kM});function A0(){return this.Raw(null,!1)}function Lf(){let e=this.tokenStart,t=this.createList(),n;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==wM){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,A0);break;default:n=this.parseWithFallback(this.Rule,A0)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function TM(e){this.children(e)}var wM,vM,kM,CM,Bf=$(()=>{"use strict";wM=33;vM="StyleSheet",kM="stylesheet",CM={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]}});var Rf={};ye(Rf,{generate:()=>EM,name:()=>IM,parse:()=>Df,structure:()=>FM});function Df(){let e=this.tokenStart;this.eat(21),this.skipSC();let t=this.Declaration();return this.eof||this.eat(22),{type:"SupportsDeclaration",loc:this.getLocation(e,this.tokenStart),declaration:t}}function EM(e){this.token(21,"("),this.node(e.declaration),this.token(22,")")}var IM,FM,zf=$(()=>{"use strict";IM="SupportsDeclaration",FM={declaration:"Declaration"}});var _f={};ye(_f,{generate:()=>MM,name:()=>PM,parse:()=>Of,structure:()=>LM});function Nf(){this.tokenType!==1&&this.isDelim(AM)===!1&&this.error("Identifier or asterisk is expected"),this.next()}function Of(){let e=this.tokenStart;return this.isDelim(P0)?(this.next(),Nf.call(this)):(Nf.call(this),this.isDelim(P0)&&(this.next(),Nf.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function MM(e){this.tokenize(e.name)}var AM,P0,PM,LM,$f=$(()=>{"use strict";AM=42,P0=124;PM="TypeSelector",LM={name:String}});var Hf={};ye(Hf,{generate:()=>NM,name:()=>RM,parse:()=>jf,structure:()=>zM});function Fs(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let o=this.charCodeAt(r);if(o===M0&&t&&n!==0)return Fs.call(this,e+n+1,!1),-1;Pn(o)||this.error(t&&n!==0?"Hyphen minus"+(n<6?" or hex digit":"")+" is expected":n<6?"Hex digit is expected":"Unexpected input",r),++n>6&&this.error("Too many hex digits",r)}return this.next(),n}function wl(e){let t=0;for(;this.isDelim(Uf);)++t>e&&this.error("Too many question marks"),this.next()}function BM(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===L0?"Plus sign":"Hyphen minus")+" is expected")}function DM(){let e=0;switch(this.tokenType){case 10:if(e=Fs.call(this,1,!0),this.isDelim(Uf)){wl.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){BM.call(this,M0),Fs.call(this,1,!1);break}break;case 12:e=Fs.call(this,1,!0),e>0&&wl.call(this,6-e);break;default:if(this.eatDelim(L0),this.tokenType===1){e=Fs.call(this,0,!0),e>0&&wl.call(this,6-e);break}if(this.isDelim(Uf)){this.next(),wl.call(this,5);break}this.error("Hex digit or question mark is expected")}}function jf(){let e=this.tokenStart;return this.eatIdent("u"),DM.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function NM(e){this.tokenize(e.value)}var L0,M0,Uf,RM,zM,Wf=$(()=>{"use strict";nr();L0=43,M0=45,Uf=63;RM="UnicodeRange",zM={value:String}});function D0(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===B0?t-2:t-1,o="";for(;n<r&&Ar(e.charCodeAt(n));)n++;for(;n<r&&Ar(e.charCodeAt(r));)r--;for(let i=n;i<=r;i++){let s=e.charCodeAt(i);if(s===Vf){if(i===r){i!==t-1&&(o=e.substr(i+1));break}if(s=e.charCodeAt(++i),An(Vf,s)){let a=i-1,u=Ur(e,a);i=u-1,o+=ja(e.substring(a+1,u))}else s===13&&e.charCodeAt(i+1)===10&&i++}else o+=e[i]}return o}function R0(e){let t="",n=!1;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===0){t+="\uFFFD";continue}if(o<=31||o===127){t+="\\"+o.toString(16),n=!0;continue}o===OM||o===Vf||o===_M||o===$M||o===UM||o===B0?(t+="\\"+e.charAt(r),n=!1):(n&&Pn(o)&&(t+=" "),t+=e.charAt(r),n=!1)}return"url("+t+")"}var OM,Vf,_M,$M,UM,B0,Gf=$(()=>{"use strict";nr();OM=32,Vf=92,_M=34,$M=39,UM=40,B0=41});var Yf={};ye(Yf,{generate:()=>WM,name:()=>jM,parse:()=>qf,structure:()=>HM});function qf(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=D0(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=bl(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function WM(e){this.token(7,R0(e.value))}var jM,HM,Kf=$(()=>{"use strict";Gf();Sl();jM="Url",HM={value:String}});var Qf={};ye(Qf,{generate:()=>qM,name:()=>VM,parse:()=>Xf,structure:()=>GM});function Xf(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function qM(e){this.children(e)}var VM,GM,Jf=$(()=>{"use strict";VM="Value",GM={children:[[]]}});var eg={};ye(eg,{generate:()=>QM,name:()=>KM,parse:()=>Zf,structure:()=>XM});function Zf(){return this.eat(13),YM}function QM(e){this.token(13,e.value)}var YM,KM,XM,tg=$(()=>{"use strict";YM=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),KM="WhiteSpace",XM={value:String}});var Es={};ye(Es,{AnPlusB:()=>cp,Atrule:()=>dp,AtrulePrelude:()=>mp,AttributeSelector:()=>bp,Block:()=>vp,Brackets:()=>Tp,CDC:()=>Ep,CDO:()=>Lp,ClassSelector:()=>Dp,Combinator:()=>Np,Comment:()=>$p,Condition:()=>Hp,Declaration:()=>Gp,DeclarationList:()=>Xp,Dimension:()=>Zp,Feature:()=>nd,FeatureFunction:()=>id,FeatureRange:()=>cd,Function:()=>dd,GeneralEnclosed:()=>md,Hash:()=>yd,IdSelector:()=>Cd,Identifier:()=>wd,Layer:()=>Fd,LayerList:()=>Pd,MediaQuery:()=>Bd,MediaQueryList:()=>zd,NestingSelector:()=>_d,Nth:()=>jd,Number:()=>Vd,Operator:()=>Yd,Parentheses:()=>Qd,Percentage:()=>ef,PseudoClassSelector:()=>rf,PseudoElementSelector:()=>af,Ratio:()=>uf,Raw:()=>ff,Rule:()=>hf,Scope:()=>bf,Selector:()=>vf,SelectorList:()=>Tf,String:()=>Af,StyleSheet:()=>Mf,SupportsDeclaration:()=>Rf,TypeSelector:()=>_f,UnicodeRange:()=>Hf,Url:()=>Yf,Value:()=>Qf,WhiteSpace:()=>eg});var ng=$(()=>{"use strict";up();fp();hp();Sp();kp();Ip();Ap();Mp();Rp();Op();Up();Wp();qp();Qp();ed();rd();sd();ud();fd();hd();bd();vd();Td();Ed();Ld();Dd();Nd();$d();Hd();Gd();Kd();Jd();tf();of();lf();pf();gf();xf();Sf();kf();If();Pf();Bf();zf();$f();Wf();Kf();Jf();tg()});var N0,O0=$(()=>{"use strict";sl();c0();ng();N0={generic:!0,cssWideKeywords:gi,...l0,node:Es}});function As(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,nB)&&this.cmpChar(this.tokenStart+1,_0)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===tB||t===ZM||t===_0||t===eB)return this.Operator();t===JM&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var JM,ZM,_0,eB,tB,nB,rg=$(()=>{"use strict";JM=35,ZM=42,_0=43,eB=45,tB=47,nB=117});var $0,U0=$(()=>{"use strict";rg();$0={getNode:As}});function pB(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function dB(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===j0&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case sB:case lB:case uB:case aB:return this.Combinator();case j0:return this.ClassSelector();case iB:case cB:return this.TypeSelector();case rB:return this.IdSelector();case oB:return this.NestingSelector()}break}}}var rB,oB,iB,sB,aB,j0,lB,cB,uB,H0,W0=$(()=>{"use strict";rB=35,oB=38,iB=42,sB=43,aB=47,j0=46,lB=62,cB=124,uB=126;H0={onWhiteSpace:pB,getNode:dB}});function V0(){return this.createSingleNodeList(this.Raw(null,!1))}var G0=$(()=>{"use strict"});function q0(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type==="Value"&&n.children.isEmpty){for(let r=t-this.tokenIndex;r<=0;r++)if(this.lookupType(r)===13){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}e.push(n)}return e}var Y0=$(()=>{"use strict"});function K0(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}var X0,Q0=$(()=>{"use strict";rg();G0();Y0();X0={getNode:As,onWhiteSpace(e,t){K0(e)&&(e.value=" "+e.value),K0(t.last)&&(t.last.value+=" ")},expression:V0,var:q0}});var og={};ye(og,{AtrulePrelude:()=>$0,Selector:()=>H0,Value:()=>X0});var J0=$(()=>{"use strict";U0();W0();Q0()});var fB,Z0,eS=$(()=>{"use strict";fB=new Set(["none","and","not","or"]),Z0={parse:{prelude(){let e=this.createList();if(this.tokenType===1){let t=this.substring(this.tokenStart,this.tokenEnd);fB.has(t.toLowerCase())||e.push(this.Identifier())}return e.push(this.Condition("container")),e},block(e=!1){return this.Block(e)}}}});var tS,nS=$(()=>{"use strict";tS={parse:{prelude:null,block(){return this.Block(!0)}}}});function ig(e,t){return this.parseWithFallback(()=>{try{return e.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==22&&this.error()}},t||(()=>this.Raw(null,!0)))}var rS,oS,iS=$(()=>{"use strict";rS={layer(){this.skipSC();let e=this.createList(),t=ig.call(this,this.Layer);return(t.type!=="Raw"||t.value!=="")&&e.push(t),e},supports(){this.skipSC();let e=this.createList(),t=ig.call(this,this.Declaration,()=>ig.call(this,()=>this.Condition("supports")));return(t.type!=="Raw"||t.value!=="")&&e.push(t),e}},oS={parse:{prelude(){let e=this.createList();switch(this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return this.skipSC(),this.tokenType===1&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer")?e.push(this.Identifier()):this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer(")&&e.push(this.Function(null,rS)),this.skipSC(),this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"supports(")&&e.push(this.Function(null,rS)),(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}}});var sS,aS=$(()=>{"use strict";sS={parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}}});var lS,cS=$(()=>{"use strict";lS={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}}});var uS,pS=$(()=>{"use strict";uS={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}}});var dS,fS=$(()=>{"use strict";dS={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}}});var gS,mS=$(()=>{"use strict";gS={parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(e=!1){return this.Block(e)}}}});var hS,xS=$(()=>{"use strict";hS={parse:{prelude:null,block(e=!1){return this.Block(e)}}}});var yS,bS=$(()=>{"use strict";yS={parse:{prelude(){return this.createSingleNodeList(this.Condition("supports"))},block(e=!1){return this.Block(e)}}}});var SS,wS=$(()=>{"use strict";eS();nS();iS();aS();cS();pS();fS();mS();xS();bS();SS={container:Z0,"font-face":tS,import:oS,layer:sS,media:lS,nest:uS,page:dS,scope:gS,"starting-style":hS,supports:yS}});function vS(){let e=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 1:e.push(this.Identifier());break;case 5:e.push(this.String());break;case 18:e.push(this.Operator());break;case 22:break e;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return e}var kS=$(()=>{"use strict"});var _o,sg,gB,mB,vl,CS,TS=$(()=>{"use strict";kS();_o={parse(){return this.createSingleNodeList(this.SelectorList())}},sg={parse(){return this.createSingleNodeList(this.Selector())}},gB={parse(){return this.createSingleNodeList(this.Identifier())}},mB={parse:vS},vl={parse(){return this.createSingleNodeList(this.Nth())}},CS={dir:gB,has:_o,lang:mB,matches:_o,is:_o,"-moz-any":_o,"-webkit-any":_o,where:_o,not:_o,"nth-child":vl,"nth-last-child":vl,"nth-last-of-type":vl,"nth-of-type":vl,slotted:sg,host:sg,"host-context":sg}});var ag={};ye(ag,{AnPlusB:()=>lp,Atrule:()=>pp,AtrulePrelude:()=>gp,AttributeSelector:()=>yp,Block:()=>wp,Brackets:()=>Cp,CDC:()=>Fp,CDO:()=>Pp,ClassSelector:()=>Bp,Combinator:()=>zp,Comment:()=>_p,Condition:()=>jp,Declaration:()=>Vp,DeclarationList:()=>Kp,Dimension:()=>Jp,Feature:()=>td,FeatureFunction:()=>od,FeatureRange:()=>ld,Function:()=>pd,GeneralEnclosed:()=>gd,Hash:()=>xd,IdSelector:()=>kd,Identifier:()=>Sd,Layer:()=>Id,LayerList:()=>Ad,MediaQuery:()=>Md,MediaQueryList:()=>Rd,NestingSelector:()=>Od,Nth:()=>Ud,Number:()=>Wd,Operator:()=>qd,Parentheses:()=>Xd,Percentage:()=>Zd,PseudoClassSelector:()=>nf,PseudoElementSelector:()=>sf,Ratio:()=>cf,Raw:()=>df,Rule:()=>mf,Scope:()=>yf,Selector:()=>wf,SelectorList:()=>Cf,String:()=>Ef,StyleSheet:()=>Lf,SupportsDeclaration:()=>Df,TypeSelector:()=>Of,UnicodeRange:()=>jf,Url:()=>qf,Value:()=>Xf,WhiteSpace:()=>Zf});var IS=$(()=>{"use strict";up();fp();hp();Sp();kp();Ip();Ap();Mp();Rp();Op();Up();Wp();qp();Qp();ed();rd();sd();ud();fd();hd();bd();vd();Td();Ed();Ld();Dd();Nd();$d();Hd();Gd();Kd();Jd();tf();of();lf();pf();gf();xf();Sf();kf();If();Pf();Bf();zf();$f();Wf();Kf();Jf();tg()});var FS,ES=$(()=>{"use strict";J0();wS();TS();IS();FS={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",condition(e){return this.Condition(e.kind)},rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},features:{supports:{selector(){return this.Selector()}},container:{style(){return this.Declaration()}}},scope:og,atrule:SS,pseudo:CS,node:ag}});var AS,PS=$(()=>{"use strict";ng();AS={node:Es}});var LS,MS=$(()=>{"use strict";a0();O0();ES();PS();LS=s0({...N0,...FS,...AS})});var BS=$(()=>{"use strict"});var DS=$(()=>{"use strict"});var rq,RS,oq,iq,sq,zS,aq,lq,cq,uq,pq,dq,NS=$(()=>{"use strict";MS();BS();Yu();il();DS();Sl();Gf();({tokenize:rq,parse:RS,generate:oq,lexer:iq,createLexer:sq,walk:zS,find:aq,findLast:lq,findAll:cq,toPlainObject:uq,fromPlainObject:pq,fork:dq}=LS)});function bB(e){return e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function _S(e){try{let t=RS(e.trim(),{context:"value"}),n=[];return zS(t,{enter(r){if(r.type==="Dimension"){let o=parseFloat(r.value);n.push(`${o}${r.unit}`)}else if(r.type==="Number"){let o=parseFloat(r.value);n.push(`${o}`)}else r.type==="Percentage"?n.push(`${parseFloat(r.value)}%`):r.type==="Identifier"?n.push(r.name.toLowerCase()):r.type==="Hash"?n.push(`#${r.value.toLowerCase()}`):r.type}}),n}catch{return[e.trim().toLowerCase()]}}function SB(e,t){let n=bB(e);if(!yB.has(n))return t;let r=_S(t);if(r.length<1||r.length>4)return t;let o=r.map(i=>i==="0"?"0px":i);return o.length===1?`${o[0]} ${o[0]} ${o[0]} ${o[0]}`:o.length===2?`${o[0]} ${o[1]} ${o[0]} ${o[1]}`:o.length===3?`${o[0]} ${o[1]} ${o[2]} ${o[1]}`:o.join(" ")}function OS(e,t){let n=t.trim();if(!n)return"";let r=SB(e,n);return _S(r).map(i=>i==="0"?"0px":i).join(" ")}function $S(e,t,n){let r=OS(e,t),o=OS(e,n);return r!==""&&o!==""&&r===o}var yB,US=$(()=>{"use strict";NS();yB=new Set(["padding","margin","border-radius","borderradius","inset","border-width","borderwidth"])});function wB(e){let t=e.toLowerCase();return t.length===4?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function vB(e){let t=e.match(/rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*[\d.]+)?\s*\)/);if(!t)return null;let n=parseInt(t[1],10).toString(16).padStart(2,"0"),r=parseInt(t[2],10).toString(16).padStart(2,"0"),o=parseInt(t[3],10).toString(16).padStart(2,"0");return`#${n}${r}${o}`}function jS(e){let t=typeof e=="string"?e:String(e??"");if(!t||t==="[object Object]")return"";let n=t.match(/rgba?\s*\(\s*\d+\s*,\s*\d+\s*,\s*\d+(?:\s*,\s*[\d.]+)?\s*\)/);if(n){let i=vB(n[0]);if(i)return i}let r=t.match(/#([0-9a-fA-F]{3,8})/);if(r)return wB(r[0]);let o=t.match(/(-?\d+\.?\d*)(px|em|rem|%|pt|vw|vh)?/g);return o&&o.length>1?o.join(" ").toLowerCase():o&&o.length===1?o[0].toLowerCase():t.toLowerCase().trim().replace(/\s+/g," ")}function $o(e,t,n){if(!e||!t)return!1;let r=String(e),o=String(t),i=r.toLowerCase(),s=o.toLowerCase(),a=i.includes("none"),u=s.includes("none");if(a!==u)return!1;let c=/\b(fill|stroke)\s*:/i,l=c.test(r),d=c.test(o);if(l!==d)return!1;let f=jS(r),p=jS(o);return!!(f===p||n&&$S(n,r,o))}var lg=$(()=>{"use strict";US()});function FB(e){let t=String(e.property||"").toLowerCase(),n=String(e.description||"").toLowerCase(),r=String(e.expected||e.suggestedValue||"").toLowerCase(),o=String(e.actual||e.currentValue||"").toLowerCase();if(t.includes("color")||t.includes("fill")||t.includes("background")||n.includes("color")||n.includes("fill"))return!0;let i=s=>/^#[0-9a-f]{3,8}$/i.test(s)||s.includes("rgb")||["white","black","red","blue","green","orange","yellow","transparent"].includes(s);return!!(i(r)||i(o)||e.relatedProperties?.some(s=>{let a=s.property?.toLowerCase()||"";return a.includes("color")||a.includes("fill")||a.includes("background")}))}function HS(e){if(e.includes("\xD7")||/\d+px\s*x\s*\d+px/i.test(e))return!1;let t=e.match(/\d+px/g);return t?t.length>1:!1}function EB(e){let t=String(e.expected||e.suggestedValue||"").toLowerCase(),n=String(e.actual||e.currentValue||"").toLowerCase(),r=String(e.property||"").toLowerCase(),o=String(e.description||"").toLowerCase(),i=n.includes("margin")||t.includes("margin")||r==="margin",s=t.includes("gap")||o.includes("gap");return i&&s}function AB(e,t,n){if(!e||!t)return!1;let r=typeof e=="string"?e:String(e??""),o=typeof t=="string"?t:String(t??"");if(!r||!o||r==="[object Object]"||o==="[object Object]"||n&&FB(n)||HS(r)||HS(o)||n&&EB(n))return!1;let i=parseFloat(r),s=parseFloat(o);if(isNaN(i)||isNaN(s))return!1;let a=Math.abs(i-s);if(r.includes("px")||o.includes("px")){let u=n?.property?.toLowerCase()||"";return u==="width"||u==="height"||u.includes("width")||u.includes("height")?a<VS:a<WS}return r.includes("%")||o.includes("%")?a<1:!1}function PB(e){let t=`${e.description||""} ${e.title||""} ${e.suggestedFix||""}`.toLowerCase();if(IB.some(s=>t.includes(s))||!CB.some(s=>t.includes(s)))return!1;let o=e.expected||e.suggestedValue,i=e.actual||e.currentValue;return!(o&&i&&!$o(o,i,e.property))}function LB(e){let t=(e.expected!==void 0?"fill":"").toLowerCase(),n=e.actual!==void 0||e.currentValue!==void 0?"fill":"";if(!(t==="fill"||n==="fill"||e.description?.toLowerCase().includes("fill")||e.title?.toLowerCase().includes("fill")))return!1;let o=String(e.expected||e.suggestedValue||"").toLowerCase();if(!(o==="none"||o==="transparent"||o.includes("no fills")||o.includes("transparent")))return!1;let s=`${e.description||""} ${e.title||""}`.toLowerCase();return s.includes("container")||s.includes("svg ")||s.includes("<svg")||s.includes("wrapper")}function MB(e){let t=`${e.description||""} ${e.title||""}`.toLowerCase(),n=e.property?.toLowerCase()||"";if(!(t.includes("text ")||t.includes("text layer")||t.includes("text span")||t.includes("span ")||t.includes("label "))||!(n==="width"||n==="height"||n.includes("width")||n.includes("height")||t.includes("width")||t.includes("height")))return!1;let i=e.expected||e.suggestedValue||"",s=e.actual||e.currentValue||"",a=parseFloat(i),u=parseFloat(s);return isNaN(a)||isNaN(u)?!1:Math.abs(a-u)<GS}function BB(e){let t=`${e.description||""} ${e.title||""} ${e.suggestedFix||""}`.toLowerCase(),n=String(e.expected||e.suggestedValue||"").toLowerCase(),r=String(e.actual||e.currentValue||"").toLowerCase();if(!TB.some(d=>t.includes(d)||n.includes(d)))return!1;let i=`${t} ${n} ${r}`;if(i.includes("min-width")||i.includes("max-width")||i.includes("min-height")||i.includes("max-height")||i.includes("explicit")||i.includes("constraint")||i.includes("forced"))return!1;let a=n.includes("hug")||n.includes("auto"),u=/\d+\.?\d*px/.test(r);if(!a||!u)return!1;let c=n.match(/(\d+\.?\d*)px/),l=r.match(/(\d+\.?\d*)px/);return!(c&&l&&Math.abs(parseFloat(c[1])-parseFloat(l[1]))>kB)}function DB(e){let t=String(e.expected||e.suggestedValue||"").toLowerCase(),n=String(e.actual||e.currentValue||"").toLowerCase();return(!n||!t||n.includes("see ")||t.includes("see ")||n.includes("image")||t.includes("image"))&&e.type==="visual"}function Ps(e){if(e.programmaticallyVerified)return{dismissed:!1};let t=e.expected||e.suggestedValue,n=e.actual||e.currentValue;if(e.fixRequired===!1)return{dismissed:!0,dismissReason:"Auto-dismissed: FixRequired is false (no code change needed)",dismissedBy:"post-ai-validation"};if($o(t,n,e.property))return{dismissed:!0,dismissReason:"Auto-dismissed: expected equals actual (identical values)",dismissedBy:"post-ai-validation"};if(e.fixRequired===!0)return{dismissed:!1};if(MB(e))return{dismissed:!0,dismissReason:`Auto-dismissed: text dimension variance (<${GS}px) - font rendering difference, not actionable`,dismissedBy:"post-ai-validation"};if(AB(t,n,e)){let r=e.property?.toLowerCase()||"";return{dismissed:!0,dismissReason:`Auto-dismissed: negligible difference (<${r==="width"||r==="height"||r.includes("width")||r.includes("height")?VS:WS}px)`,dismissedBy:"post-ai-validation"}}return DB(e)?{dismissed:!0,dismissReason:"Auto-dismissed: no measurable values to compare",dismissedBy:"post-ai-validation"}:PB(e)?{dismissed:!0,dismissReason:"Auto-dismissed: no fix needed",dismissedBy:"post-ai-validation"}:BB(e)?{dismissed:!0,dismissReason:"Auto-dismissed: HUG sizing - CSS auto-sizes content without explicit dimensions",dismissedBy:"post-ai-validation"}:LB(e)?{dismissed:!0,dismissReason:"Auto-dismissed: SVG container fill - child elements use their own fills",dismissedBy:"post-ai-validation"}:{dismissed:!1}}var WS,VS,GS,kB,CB,TB,IB,qS=$(()=>{"use strict";lg();WS=.5,VS=2,GS=2,kB=5,CB=["values match","values already match","already correct","correctly implemented","implementation is correct","css matches","matches figma","identical","same value","no difference","none - ","no changes needed","no fix needed"],TB=["hug","auto (hug)","should be hug","fixed pixel values are being rendered","fixed values are being rendered"],IB=["duplicate","extra","missing","additional","removed","should not exist","does not exist","not in figma","not in storybook","renders 2","renders two","has 1","has one"]});function Si(e,t,n){let r=100-n*1-t*3-e*10;return Math.max(0,Math.min(100,r))}var YS=$(()=>{"use strict"});var KS=$(()=>{"use strict"});var XS=$(()=>{"use strict"});var cg=$(()=>{"use strict";lg();qS();YS();KS();XS()});var HB,WB,Aq,ug=$(()=>{"use strict";HB=["flex","inline-flex"],WB=["grid","inline-grid"],Aq=[...HB,...WB]});var JS=$(()=>{"use strict";cg();ug()});var ZS=$(()=>{"use strict"});var Ls=$(()=>{"use strict";oy();cg();ug();JS();ZS()});function GB(e){let{aiPrompt:t,aiResponse:n,...r}=e;return r}function qn(e){try{let t=e.map(GB),n=JSON.stringify(t,qB);sessionStorage.setItem(pg,n)}catch(t){y.error("[SessionStorage] Failed to save review history:",t)}}function dg(){try{let e=sessionStorage.getItem(pg);if(!e)return[];let t=JSON.parse(e,YB);return Array.isArray(t)?t:[]}catch(e){return y.error("[SessionStorage] Failed to load review history:",e),[]}}function ew(){try{let e=dg();if(e.length===0)return;let t=!1,n=e.map(r=>{if(r.aiPrompt!==void 0||r.aiResponse!==void 0){t=!0;let{aiPrompt:o,aiResponse:i,...s}=r;return s}return r});t&&(qn(n),y.debug("[SessionStorage] Stripped aiPrompt/aiResponse from existing review history"))}catch(e){y.error("[SessionStorage] Failed to strip sensitive fields:",e)}}function tw(){try{sessionStorage.removeItem(pg),y.debug("[SessionStorage] Review history cleared")}catch(e){y.error("[SessionStorage] Failed to clear review history:",e)}}function qB(e,t){return t instanceof Date?{__type:"Date",value:t.toISOString()}:t}function YB(e,t){return t&&t.__type==="Date"?new Date(t.value):t}var pg,fg=$(()=>{"use strict";De();pg="uicopilot_review_history"});import KB,{createContext as XB,useContext as QB,useReducer as JB,useMemo as nw,useRef as ZB,useEffect as eD}from"react";function tD(e,t){switch(t.type){case"SET_STATE":return{...e,...t.payload};case"ADD_STREAMING_MESSAGE":return{...e,streamingMessages:[...e.streamingMessages,t.payload]};case"UPDATE_STREAMING_MESSAGE":return{...e,streamingMessages:e.streamingMessages.map((n,r)=>r===t.payload.index?{...n,content:t.payload.content}:n)};case"CLEAR_STREAMING_MESSAGES":return{...e,streamingMessages:[]};case"TOGGLE_MODEL":{let n=e.selectedModels.includes(t.payload);return n&&e.selectedModels.length===1?e:{...e,selectedModels:n?e.selectedModels.filter(r=>r!==t.payload):[...e.selectedModels,t.payload]}}case"SET_REVIEW_RESULTS":{if(!t.payload)return{...e,reviewResults:null,currentReviewId:null};let n=e.userRole==="admin",r={id:t.payload.id,componentId:t.payload.componentId,storyId:t.payload.storyId,modelId:t.payload.modelId,complianceScore:t.payload.complianceScore,issuesCount:t.payload.issuesCount,issues:t.payload.issues,createdAt:t.payload.createdAt,visualSimilarity:t.payload.visualSimilarity,storybookImageData:e.storybookImageUrl||void 0,figmaImageData:e.figmaImageUrl||void 0,aiPrompt:n&&e.fullPrompt||void 0,aiResponse:n&&e.fullResponse||void 0,costUsd:t.payload.costUsd,inputTokens:t.payload.inputTokens,outputTokens:t.payload.outputTokens},o=e.reviewHistory.findIndex(s=>s.id===t.payload.id),i;return o>=0?i=e.reviewHistory.map((s,a)=>a===o?r:s):i=[...e.reviewHistory,r],qn(i),{...e,reviewResults:t.payload,reviewHistory:i,currentReviewId:t.payload.id}}case"UPDATE_MULTI_MODEL_STREAMING":return e.multiModelResults?{...e,multiModelResults:{...e.multiModelResults,byModel:{...e.multiModelResults.byModel,[t.payload.modelId]:{...e.multiModelResults.byModel[t.payload.modelId],streamingMessages:t.payload.messages}}}}:{...e,multiModelResults:{byModel:{[t.payload.modelId]:{streamingMessages:t.payload.messages}},activeModelId:t.payload.modelId}};case"SET_MODEL_COMPLETED":return e.multiModelResults?{...e,multiModelResults:{...e.multiModelResults,byModel:{...e.multiModelResults.byModel,[t.payload]:{...e.multiModelResults.byModel[t.payload],completed:!0}}}}:e;case"BULK_ADD_REVIEWS":{let n=new Set(e.reviewHistory.map(i=>i.id)),r=t.payload.filter(i=>!n.has(i.id));if(r.length===0)return e;let o=[...e.reviewHistory,...r];return qn(o),{...e,reviewHistory:o}}case"ADD_REVIEW":{let n=[...e.reviewHistory,t.payload];return qn(n),{...e,reviewHistory:n,currentReviewId:t.payload.id}}case"TOGGLE_ISSUE_SELECTION":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>r.id!==e.currentReviewId?r:{...r,issues:r.issues.map(o=>o.id===t.payload?{...o,selectedForFix:!o.selectedForFix}:o)});return qn(n),{...e,reviewHistory:n}}case"UPDATE_ISSUE_STATUS":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>r.id!==e.currentReviewId?r:{...r,issues:r.issues.map(o=>o.id===t.payload.issueId?{...o,status:t.payload.status,error:t.payload.error}:o)});return qn(n),{...e,reviewHistory:n}}case"UPDATE_ISSUE_GENERATED_FIX":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>r.id!==e.currentReviewId?r:{...r,issues:r.issues.map(o=>o.id===t.payload.issueId?{...o,generatedFix:o.generatedFix?{...o.generatedFix,...t.payload.generatedFix}:t.payload.generatedFix,selectedForFix:t.payload.generatedFix?.status==="failed"?!1:o.selectedForFix}:o)});return qn(n),{...e,reviewHistory:n}}case"BATCH_UPDATE_ISSUE_GENERATED_FIXES":{if(!e.currentReviewId)return e;let n=new Map(t.payload.map(o=>[o.issueId,o.generatedFix])),r=e.reviewHistory.map(o=>o.id!==e.currentReviewId?o:{...o,issues:o.issues.map(i=>{let s=n.get(i.id);return s?{...i,generatedFix:i.generatedFix?{...i.generatedFix,...s}:s,selectedForFix:s?.status==="failed"?!1:i.selectedForFix}:i})});return qn(r),{...e,reviewHistory:r}}case"DISMISS_ISSUE":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>r.id!==e.currentReviewId?r:{...r,issues:r.issues.map(o=>o.id===t.payload.issueId?{...o,dismissed:!0,dismissReason:t.payload.reason,dismissedAt:new Date,dismissedBy:t.payload.dismissedBy}:o)});return qn(n),{...e,reviewHistory:n}}case"UNDISMISS_ISSUE":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>r.id!==e.currentReviewId?r:{...r,issues:r.issues.map(o=>o.id===t.payload?{...o,dismissed:!1,dismissReason:void 0,dismissedAt:void 0}:o)});return qn(n),{...e,reviewHistory:n}}case"RECALCULATE_SCORE":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>{if(r.id!==e.currentReviewId)return r;let o=r.issues.filter(c=>!c.dismissed),i=o.filter(c=>c.severity==="critical").length,s=o.filter(c=>c.severity==="major").length,a=o.filter(c=>c.severity==="minor").length,u=Si(i,s,a);return y.debug(`[recalculateScore] Active: ${o.length}, score: ${u}`),{...r,complianceScore:u,issuesCount:o.length}});return qn(n),{...e,reviewHistory:n}}case"UPDATE_REVIEW_SCORE":{let n=e.reviewHistory.map(r=>r.id!==t.payload.reviewId?r:{...r,complianceScore:t.payload.newScore});return qn(n),{...e,reviewHistory:n}}case"CLEAR_ALL_REVIEWS":return tw(),{...e,reviewHistory:[],currentReviewId:null};case"CLEAR_STALE_REVIEWS":return{...e,currentReviewId:null,reviewResults:null};case"RESET_REVIEW":{let n=e.isReviewing;return{...e,isReviewing:!1,reviewError:null,reviewResults:n?null:e.reviewResults,multiModelResults:null,streamingMessages:[],streamingProgress:0,streamingStatus:"",reviewDetailTab:n?"chat":e.reviewDetailTab,fullPrompt:"",fullResponse:"",figmaImageUrl:n?null:e.figmaImageUrl,storybookImageUrl:n?null:e.storybookImageUrl,currentReviewId:n?null:e.currentReviewId}}case"RESET_PROMPT":return{...e,isGenerating:!1,generatedPrompt:null,promptError:null};case"TRIGGER_SCREENSHOT_REFRESH":return{...e,screenshotRefreshKey:e.screenshotRefreshKey+1};default:return e}}function mg({children:e}){let[t,n]=JB(tD,sD),r=ZB(t);eD(()=>{r.current=t},[t]);let o=nw(()=>({setIsReviewing:s=>n({type:"SET_STATE",payload:{isReviewing:s}}),setReviewError:s=>n({type:"SET_STATE",payload:{reviewError:s}}),bulkAddReviews:s=>n({type:"BULK_ADD_REVIEWS",payload:s}),setReviewResults:s=>n({type:"SET_REVIEW_RESULTS",payload:s}),setMultiModelResults:s=>n({type:"SET_STATE",payload:{multiModelResults:s}}),updateMultiModelStreamingMessages:(s,a)=>n({type:"UPDATE_MULTI_MODEL_STREAMING",payload:{modelId:s,messages:a}}),setModelCompleted:s=>n({type:"SET_MODEL_COMPLETED",payload:s}),setActiveModelId:s=>{let a=r.current;a.multiModelResults&&n({type:"SET_STATE",payload:{multiModelResults:{...a.multiModelResults,activeModelId:s}}})},setShowReviewMenu:s=>n({type:"SET_STATE",payload:{showReviewMenu:s}}),setSeverityFilter:s=>n({type:"SET_STATE",payload:{severityFilter:s}}),setShowStreamingPanel:s=>n({type:"SET_STATE",payload:{showStreamingPanel:s}}),setStreamingPanelCollapsed:s=>n({type:"SET_STATE",payload:{streamingPanelCollapsed:s}}),addStreamingMessage:s=>n({type:"ADD_STREAMING_MESSAGE",payload:s}),updateStreamingMessage:(s,a)=>n({type:"UPDATE_STREAMING_MESSAGE",payload:{index:s,content:a}}),clearStreamingMessages:()=>n({type:"CLEAR_STREAMING_MESSAGES"}),setStreamingProgress:s=>n({type:"SET_STATE",payload:{streamingProgress:s}}),setStreamingStatus:s=>n({type:"SET_STATE",payload:{streamingStatus:s}}),setReviewDetailTab:s=>n({type:"SET_STATE",payload:{reviewDetailTab:s}}),setFullPrompt:s=>n({type:"SET_STATE",payload:{fullPrompt:s}}),setFullResponse:s=>n({type:"SET_STATE",payload:{fullResponse:s}}),setFigmaImageUrl:s=>n({type:"SET_STATE",payload:{figmaImageUrl:s}}),setStorybookImageUrl:s=>n({type:"SET_STATE",payload:{storybookImageUrl:s}}),setFigmaDimensions:s=>n({type:"SET_STATE",payload:{figmaDimensions:s}}),setSelectedModels:s=>n({type:"SET_STATE",payload:{selectedModels:s}}),toggleModel:s=>n({type:"TOGGLE_MODEL",payload:s}),setModelComparisonView:s=>n({type:"SET_STATE",payload:{modelComparisonView:s}}),resetReview:()=>n({type:"RESET_REVIEW"}),addReview:s=>n({type:"ADD_REVIEW",payload:s}),getCurrentReview:()=>{let s=r.current;return s.currentReviewId&&s.reviewHistory.find(a=>a.id===s.currentReviewId)||null},getReviewById:s=>r.current.reviewHistory.find(a=>a.id===s)||null,getParentReview:()=>{let s=r.current,a=s.reviewHistory.find(u=>u.id===s.currentReviewId);return a?.parentReviewId&&s.reviewHistory.find(u=>u.id===a.parentReviewId)||null},hasAppliedFixes:()=>{let s=r.current,a=s.reviewHistory.find(u=>u.id===s.currentReviewId);return!a||!Array.isArray(a.issues)||a.issues.length===0?!1:a.issues.some(u=>u.status==="applied"||u.generatedFix?.status==="applied")},toggleIssueSelection:s=>n({type:"TOGGLE_ISSUE_SELECTION",payload:s}),updateIssueStatus:(s,a,u)=>n({type:"UPDATE_ISSUE_STATUS",payload:{issueId:s,status:a,error:u}}),updateIssueGeneratedFix:(s,a)=>n({type:"UPDATE_ISSUE_GENERATED_FIX",payload:{issueId:s,generatedFix:a}}),batchUpdateIssueGeneratedFixes:s=>n({type:"BATCH_UPDATE_ISSUE_GENERATED_FIXES",payload:s}),dismissIssue:(s,a,u)=>n({type:"DISMISS_ISSUE",payload:{issueId:s,reason:a,dismissedBy:u}}),undismissIssue:s=>n({type:"UNDISMISS_ISSUE",payload:s}),recalculateScore:()=>n({type:"RECALCULATE_SCORE"}),updateReviewScore:(s,a)=>n({type:"UPDATE_REVIEW_SCORE",payload:{reviewId:s,newScore:a}}),clearAllReviews:()=>n({type:"CLEAR_ALL_REVIEWS"}),clearStaleReviewsForStory:s=>n({type:"CLEAR_STALE_REVIEWS",payload:s}),setIsApplying:s=>n({type:"SET_STATE",payload:{isApplying:s}}),setApplyFixesResult:s=>n({type:"SET_STATE",payload:{applyFixesResult:s}}),setIncludeComponentIssues:s=>n({type:"SET_STATE",payload:{includeComponentIssues:s}}),setIncludeTextComparison:s=>n({type:"SET_STATE",payload:{includeTextComparison:s}}),setUsePromptCache:s=>n({type:"SET_STATE",payload:{usePromptCache:s}}),setIsValidating:s=>n({type:"SET_STATE",payload:{isValidating:s}}),setValidationUsage:s=>n({type:"SET_STATE",payload:{validationUsage:s}}),setWorkspacePath:s=>n({type:"SET_STATE",payload:{workspacePath:s}}),triggerScreenshotRefresh:()=>n({type:"TRIGGER_SCREENSHOT_REFRESH"}),setHoveredIssueId:s=>n({type:"SET_STATE",payload:{hoveredIssueId:s}}),setFeatureFlags:s=>n({type:"SET_STATE",payload:{featureFlags:s}}),setUserRole:s=>n({type:"SET_STATE",payload:{userRole:s}}),setRoleOverride:s=>{try{s?localStorage.setItem("uicopilot_role_override",s):localStorage.removeItem("uicopilot_role_override")}catch{}n({type:"SET_STATE",payload:{roleOverride:s}})},setReviewAllConcurrency:s=>{let a=Math.max(1,Math.min(5,s));try{localStorage.setItem("uicopilot_review_all_concurrency",String(a))}catch{}n({type:"SET_STATE",payload:{reviewAllConcurrency:a}})},setIsGenerating:s=>n({type:"SET_STATE",payload:{isGenerating:s}}),setGeneratedPrompt:s=>n({type:"SET_STATE",payload:{generatedPrompt:s}}),setPromptError:s=>n({type:"SET_STATE",payload:{promptError:s}}),resetPrompt:()=>n({type:"RESET_PROMPT"})}),[]),i=nw(()=>({...t,...o}),[t,o]);return KB.createElement(rw.Provider,{value:i},e)}function ie(){let e=QB(rw);if(!e)throw new Error("useReviewStore must be used within a ReviewProvider");return e}var nD,rD,gg,oD,iD,sD,rw,hg=$(()=>{"use strict";Ls();fg();De();nD=()=>{if(typeof localStorage>"u")return 3;try{let e=localStorage.getItem("uicopilot_review_all_concurrency");if(e)return Math.max(1,Math.min(5,parseInt(e,10)))}catch{}return 3},rD=()=>{if(typeof localStorage>"u")return null;try{let e=localStorage.getItem("uicopilot_role_override");if(e==="admin"||e==="beta")return e}catch{}return null},gg={enableFixGeneration:!1,enableFixApply:!1,enableAutoMap:!1,enableReviewBadges:!1,showCosts:!1,enableParallelReview:!1,enableModelSelection:!1},oD=()=>{if(typeof localStorage>"u")return gg;try{let e=localStorage.getItem("uicopilot_feature_flags");if(!e)return gg;let t=JSON.parse(e);return{enableFixGeneration:!!t.enableFixGeneration,enableFixApply:!!t.enableFixApply,enableAutoMap:!!t.enableAutoMap,enableReviewBadges:!!t.enableReviewBadges,showCosts:!!t.showCosts,enableParallelReview:!!t.enableParallelReview,enableModelSelection:!!t.enableModelSelection}}catch{}return gg},iD=()=>{if(typeof localStorage>"u")return"beta";try{let e=localStorage.getItem("uicopilot_user_role");if(e==="admin"||e==="beta")return e}catch{}return"beta"},sD={isReviewing:!1,reviewError:null,reviewResults:null,multiModelResults:null,showReviewMenu:!1,severityFilter:"all",showStreamingPanel:!1,streamingPanelCollapsed:!1,streamingMessages:[],streamingProgress:0,streamingStatus:"",reviewDetailTab:"chat",fullPrompt:"",fullResponse:"",figmaImageUrl:null,storybookImageUrl:null,figmaDimensions:null,selectedModels:["claude-sonnet-4-5-20250929"],modelComparisonView:"side-by-side",reviewHistory:dg(),currentReviewId:null,includeComponentIssues:!0,includeTextComparison:!1,usePromptCache:!1,isApplying:!1,applyFixesResult:null,screenshotRefreshKey:0,isValidating:!1,validationUsage:null,lastAiCallTimestamp:null,aiRateLimitSeconds:0,isGenerating:!1,generatedPrompt:null,promptError:null,workspacePath:null,userRole:iD(),roleOverride:rD(),featureFlags:oD(),reviewAllConcurrency:nD(),hoveredIssueId:null},rw=XB(null)});import Ms,{useMemo as aD}from"react";function yg({children:e}){return Ms.createElement(Zc,null,Ms.createElement(tu,null,Ms.createElement(ru,null,Ms.createElement(mg,null,Ms.createElement(lD,null),e))))}function ow(e){let t=we(),n=Ze(),r=rt(),o=ie(),i=aD(()=>({...t,...n,...r,...o}),[t,n,r,o]);return e?e(i):i}function lD(){return xg=ow(),null}var xg,ht,iw=$(()=>{"use strict";eu();nu();ou();hg();xg=null,ht=Object.assign(ow,{getState:()=>{if(!xg)throw new Error("Store not initialized. Make sure StoreProvider is mounted.");return xg}})});var ve=$(()=>{"use strict";iw();eu();nu();ou();hg()});function q(){return(process.env.STORYBOOK_UICOPILOT_URL||cD).replace(/\/$/,"")}var cD,sw,je=$(()=>{"use strict";cD="https://uicopilot-dashboard.vercel.app",sw=3.6});async function oe(e,t,n=3e4){let r=new AbortController,o=setTimeout(()=>r.abort(),n);try{return await fetch(e,{...t,signal:r.signal})}catch(i){throw i instanceof DOMException&&i.name==="AbortError"?new Error(`Request timed out after ${n}ms: ${e}`):i}finally{clearTimeout(o)}}var pt=$(()=>{"use strict"});import{useEffect as zs,useState as Cl,useRef as ZD,useCallback as Sg}from"react";import{addons as wg}from"storybook/manager-api";async function eR(e,t,n){let r=`${e}:${t}`,o=vg.get(r);if(o)return y.debug("[useReviewScreenshots] Reusing in-flight Figma image fetch for",r),o;let i=(async()=>{let s=await oe(`${kw}/api/figma/image?projectId=${e}&nodeId=${t}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`}});return s.ok?s.json():{imageUrl:null}})().finally(()=>{vg.delete(r)});return vg.set(r,i),i}function tR(e,t,n){try{sessionStorage.setItem(`${Tl}${e}`,JSON.stringify({figmaNodeId:t,imageUrl:n,timestamp:Date.now()}))}catch{}}function nR(e,t){try{let n=sessionStorage.getItem(`${Tl}${e}`);if(!n)return null;let r=JSON.parse(n);if(r.figmaNodeId===t&&Date.now()-r.timestamp<1800*1e3)return r.imageUrl;sessionStorage.removeItem(`${Tl}${e}`)}catch{}return null}function rR(e){try{let t=sessionStorage.getItem(`${Tl}${e}`);if(!t)return null;let n=JSON.parse(t);if(n.imageUrl&&Date.now()-n.timestamp<300*1e3)return n.imageUrl}catch{}return null}var bw,Sw,ww,vw,Ci,kw,ir,kg,vg,Tl,Cw,Uo,Ns=$(()=>{"use strict";ve();Cg();De();je();pt();bw="storyArgsUpdated",Sw="storyRendered",ww="forceRemount",vw=null,Ci=()=>vw,kw=q(),ir=new Map,kg=null,vg=new Map;Tl="uicopilot-figma-image-";Cw=(e,t,n)=>{kg=t;let r=ir.get(e);r?r.figmaImageUrl=n:ir.set(e,{storybookImageUrl:null,figmaImageUrl:n}),y.debug("[useReviewScreenshots] Pre-set Figma image for mapping:",{storyId:e,figmaNodeId:t,imageUrl:n.substring(0,50)+"..."})},Uo=()=>{let[e,t]=Cl(!1),[n,r]=Cl(!1),[o,i]=Cl(!1),[s,a]=Cl(null),u=ZD(null),{screenshotRefreshKey:c,triggerScreenshotRefresh:l}=ie(),d=Sg(()=>{let z=ht.getState().currentStoryId;z&&(y.debug("[useReviewScreenshots] Refreshing screenshots for story:",z),ir.delete(z),u.current=null,i(!0),l())},[l]),f=Sg(()=>{let z=ht.getState().currentStoryId;if(z){y.debug("[useReviewScreenshots] Refreshing Storybook screenshot only for story:",z);let _=ir.get(z);_&&(_.storybookImageUrl=null),u.current=null,i(!0),l()}},[l]),{sessionToken:p}=we(),{selectedProjectId:g}=Ze(),{currentStoryId:S,currentMapping:C}=rt(),{setStorybookImageUrl:F,setFigmaImageUrl:k}=ie();zs(()=>{if(!S||ht.getState().figmaImageUrl)return;let _=rR(S);_&&(y.debug("[useReviewScreenshots] Quick-restored Figma image for:",S),k(_))},[S,k]),zs(()=>{(async()=>{if(!p||!g||!S){y.debug("[useReviewScreenshots] Missing required context, skipping auto-load");return}let _=ht.getState();if(_.storybookImageUrl&&_.figmaImageUrl){y.debug("[useReviewScreenshots] Screenshots already loaded from persisted review, skipping capture"),u.current=S;return}let M=C?.figmaNodeId??null;if(M!==kg){y.debug("[useReviewScreenshots] Figma mapping changed, invalidating Figma image only for story:",S);let I=ir.get(S);I&&(I.figmaImageUrl=null),kg=M,u.current=null}let B=C?.figmaNodeId;if(B&&!ir.get(S)?.figmaImageUrl){let I=nR(S,B);if(I){y.debug("[useReviewScreenshots] Hydrated Figma image from sessionStorage for story:",S),k(I);let v=ir.get(S);v?v.figmaImageUrl=I:ir.set(S,{storybookImageUrl:null,figmaImageUrl:I})}}let m=ir.get(S),x=m&&m.storybookImageUrl&&m.figmaImageUrl,b=m&&m.storybookImageUrl&&!m.figmaImageUrl,E=m&&!m.storybookImageUrl&&m.figmaImageUrl;if(x){y.debug("[useReviewScreenshots] Using fully cached screenshots for story:",S),F(m.storybookImageUrl),k(m.figmaImageUrl),u.current=S;return}let h=b&&C?.figmaNodeId;h&&(y.debug("[useReviewScreenshots] Using cached Storybook, fetching new Figma for story:",S),F(m.storybookImageUrl));let T=E;if(T&&(y.debug("[useReviewScreenshots] Using cached Figma, recapturing Storybook for story:",S),k(m.figmaImageUrl)),u.current===S&&C?.figmaNodeId){y.debug("[useReviewScreenshots] Screenshots already loaded for this story, skipping");return}try{a(null),h?r(!0):(T||(t(!0),r(!0)),i(!0)),u.current=S;let I=T?m.figmaImageUrl:null,v;if(T)y.debug("[useReviewScreenshots] Figma cached (storybookOnlyRefresh), skipping fetch"),r(!1);else if(B){y.debug("[useReviewScreenshots] Found Figma node ID from mapping:",B);let P=null;try{y.debug("[useReviewScreenshots] Fetching Figma image (with caching)...");let D=await eR(g,B,p);P=D.imageUrl||null;let N=D.cached?"(cached)":"(fresh)";y.debug(`[useReviewScreenshots] Figma image fetched ${N}:`,P?"success":"not found")}catch(D){y.warn("[useReviewScreenshots] Failed to fetch Figma image:",D)}if(P)if(P.includes(".azureedge.net")||P.includes(".blob.core.windows.net")||P.includes(".blob.vercel-storage.com")){y.debug("[useReviewScreenshots] Using cached CDN URL directly (fast)"),I=P,k(P);let N=new Image;N.crossOrigin="anonymous",await new Promise(w=>{N.onload=()=>{v={width:N.naturalWidth,height:N.naturalHeight},y.debug("[useReviewScreenshots] Figma dimensions:",v),w()},N.onerror=()=>w(),N.src=P})}else try{y.debug("[useReviewScreenshots] Converting Figma S3 URL to data URL via proxy...");let N=`${kw}/api/proxy/image?url=${encodeURIComponent(P)}`,w=await oe(N);if(w.ok){let j=await w.blob(),G=new FileReader,L=await new Promise((ee,re)=>{G.onloadend=()=>ee(G.result),G.onerror=re,G.readAsDataURL(j)});I=L,k(L),y.debug("[useReviewScreenshots] Figma thumbnail converted to data URL");let K=new Image;await new Promise(ee=>{K.onload=()=>{v={width:K.naturalWidth,height:K.naturalHeight},y.debug("[useReviewScreenshots] Figma dimensions:",v),ee()},K.onerror=()=>ee(),K.src=L})}else I=P,k(P),y.debug("[useReviewScreenshots] Figma thumbnail loaded (external URL)")}catch(N){y.warn("[useReviewScreenshots] Failed to convert to data URL, using external URL:",N),I=P,k(P)}else y.warn("[useReviewScreenshots] No thumbnail found for node:",B),k(null);I&&B&&tR(S,B,I),r(!1)}else y.debug("[useReviewScreenshots] No Figma mapping exists for this component"),k(null),r(!1);let A=m?.storybookImageUrl||null;if(A)y.debug("[useReviewScreenshots] Using cached Storybook screenshot"),i(!1);else{y.debug("[useReviewScreenshots] Capturing Storybook screenshot for story:",S);let P=await Il({storyId:S,sessionToken:p||void 0,...v&&{figmaWidth:v.width,figmaHeight:v.height}});P?(A=P,F(P),y.debug("[useReviewScreenshots] Storybook screenshot captured at dimensions:",v||"natural")):y.warn("[useReviewScreenshots] Failed to capture Storybook screenshot"),i(!1)}ir.set(S,{storybookImageUrl:A,figmaImageUrl:I}),y.debug("[useReviewScreenshots] Screenshots cached for story:",S)}catch(I){y.error("[useReviewScreenshots] Error loading screenshots:",I),a(I instanceof Error?I.message:"Failed to load screenshots"),u.current=null,r(!1),i(!1)}finally{t(!1)}})()},[p,g,S,C?.figmaNodeId,c]),zs(()=>{let z=wg.getChannel(),_=null,M=B=>{vw=B.args,y.debug("[useReviewScreenshots] Args updated for story:",B.storyId,"args:",B.args),_&&clearTimeout(_),_=setTimeout(()=>{y.debug("[useReviewScreenshots] Story args changed, refreshing screenshot"),d()},500)};return z.on(bw,M),()=>{z.off(bw,M),_&&clearTimeout(_)}},[d]),zs(()=>{let z=wg.getChannel(),_=!1,M=null,B=()=>{y.debug("[useReviewScreenshots] FORCE_REMOUNT detected, showing Storybook loader"),_=!0,i(!0)},m=()=>{_&&(y.debug("[useReviewScreenshots] STORY_RENDERED after remount, waiting for styles to settle..."),M&&clearTimeout(M),M=setTimeout(()=>{_=!1,y.debug("[useReviewScreenshots] Refreshing Storybook screenshot after HMR (preserving Figma)"),f()},500))};return z.on(ww,B),z.on(Sw,m),()=>{z.off(ww,B),z.off(Sw,m),M&&clearTimeout(M)}},[f]),zs(()=>{let z=wg.getChannel(),_=async M=>{if(!M?.snapshot?.html){y.debug("[useReviewScreenshots] DOM mutated but no snapshot available");return}y.debug("[useReviewScreenshots] DOM mutated, capturing snapshot screenshot"),i(!0);try{let B=ht.getState().currentStoryId,m=await fetch("/__uicopilot/screenshot-snapshot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...M.snapshot,storyId:B})});if(m.ok){let x=await m.json();if(x.screenshot){F(x.screenshot);let b=ht.getState().currentStoryId;if(b){let E=ir.get(b);E?E.storybookImageUrl=x.screenshot:ir.set(b,{storybookImageUrl:x.screenshot,figmaImageUrl:null})}}}else y.error("[useReviewScreenshots] Snapshot screenshot failed:",await m.text())}catch(B){y.error("[useReviewScreenshots] Snapshot screenshot error:",B)}finally{i(!1)}};return z.on("UICOPILOT/STORY_DOM_MUTATED",_),()=>{z.off("UICOPILOT/STORY_DOM_MUTATED",_)}},[]);let R=Sg((z,_,M)=>{y.debug("[useReviewScreenshots] setFigmaImageDirect called - bypassing load"),Cw(z,_,M),k(M),r(!1),u.current=z},[k]);return{isLoadingScreenshots:e,isLoadingFigma:n,isLoadingStorybook:o,screenshotError:s,refreshScreenshots:d,refreshStorybookOnly:f,setFigmaImageDirect:R}}});function iR(){return!q().startsWith("http://localhost")}function sR(e,t,n){let r=t.createElement("div");r.style.color=e,t.body.appendChild(r);let o=n.getComputedStyle(r).color;return r.remove(),o}function Tw(e,t,n){let r=new Map;return e.replace(/(?:color|oklch|oklab|lab|lch)\([^)]+\)/g,o=>{if(r.has(o))return r.get(o);let i=sR(o,t,n);return r.set(o,i),i})}async function aR(){let e=(await import("html2canvas")).default,t=document.getElementById("storybook-preview-iframe");if(!t?.contentDocument||!t.contentWindow)throw new Error("Storybook iframe not accessible");let n=t.contentDocument.querySelector("#storybook-root > *")||t.contentDocument.querySelector("#root > *");if(!n)throw new Error("Story element not found in iframe");let r=t.contentWindow,o=t.contentDocument;return(await e(n,{useCORS:!0,logging:!1,backgroundColor:null,onclone:s=>{s.querySelectorAll("style").forEach(u=>{let c=u.textContent||"";/(?:color|oklch|oklab|lab|lch)\(/.test(c)&&(u.textContent=Tw(c,o,r))});let a=Array.from(o.styleSheets);s.querySelectorAll('link[rel="stylesheet"]').forEach(u=>{let c=u.href,l=a.find(d=>d.href===c);if(l)try{let d="";for(let f of Array.from(l.cssRules))d+=f.cssText+`
12
+ --`+new Array((n||t.length)+1).join("-")+"^"})}var vb=$(()=>{"use strict";Ya()});var kA,CA,TA,IA,FA,kb,ul,Cb=$(()=>{"use strict";vb();kA=9,CA=10,TA=12,IA=13,FA=32,kb=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),ul=class{constructor(t){this.str=t,this.pos=0}charCodeAt(t){return t<this.str.length?this.str.charCodeAt(t):0}charCode(){return this.charCodeAt(this.pos)}isNameCharCode(t=this.charCode()){return t<128&&kb[t]===1}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(t){return this.charCodeAt(this.findWsEnd(t))}skipWs(){this.pos=this.findWsEnd(this.pos)}findWsEnd(t){for(;t<this.str.length;t++){let n=this.str.charCodeAt(t);if(n!==IA&&n!==CA&&n!==TA&&n!==FA&&n!==kA)break}return t}substringToPos(t){return this.str.substring(this.pos,this.pos=t)}eat(t){this.charCode()!==t&&this.error("Expect `"+String.fromCharCode(t)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(t){throw new wb(t,this.str,this.pos)}scanSpaces(){return this.substringToPos(this.findWsEnd(this.pos))}scanWord(){let t=this.pos;for(;t<this.str.length;t++){let n=this.str.charCodeAt(t);if(n>=128||kb[n]===0)break}return this.pos===t&&this.error("Expect a keyword"),this.substringToPos(t)}scanNumber(){let t=this.pos;for(;t<this.str.length;t++){let n=this.str.charCodeAt(t);if(n<48||n>57)break}return this.pos===t&&this.error("Expect a number"),this.substringToPos(t)}scanString(){let t=this.str.indexOf("'",this.pos+1);return t===-1&&(this.pos=this.str.length,this.error("Expect an apostrophe")),this.substringToPos(t+1)}}});function Pb(e){let t=null,n=null;return e.eat(fl),e.skipWs(),t=e.scanNumber(e),e.skipWs(),e.charCode()===Wu?(e.pos++,e.skipWs(),e.charCode()!==Uu&&(n=e.scanNumber(e),e.skipWs())):n=t,e.eat(Uu),{min:Number(t),max:n?Number(n):0}}function DA(e){let t=null,n=!1;switch(e.charCode()){case Db:e.pos++,t={min:0,max:0};break;case Hu:e.pos++,t={min:1,max:0};break;case dl:e.pos++,t={min:0,max:1};break;case ju:e.pos++,n=!0,e.charCode()===fl?t=Pb(e):e.charCode()===dl?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case fl:t=Pb(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}function Gr(e,t){let n=DA(e);return n!==null?(n.term=t,e.charCode()===ju&&e.charCodeAt(e.pos-1)===Hu||e.charCode()===dl&&e.charCodeAt(e.pos-1)===Uu?Gr(e,n):n):t}function _u(e){let t=e.peek();return t===""?null:Gr(e,{type:"Token",value:t})}function RA(e){let t;return e.eat(Vu),e.eat(pl),t=e.scanWord(),e.eat(pl),e.eat($u),Gr(e,{type:"Property",name:t})}function zA(e){let t=null,n=null,r=1;return e.eat(bs),e.charCode()===Ib&&(e.peek(),r=-1),r==-1&&e.charCode()===Eb?e.peek():(t=r*Number(e.scanNumber(e)),e.isNameCharCode()&&(t+=e.scanWord())),e.skipWs(),e.eat(Wu),e.skipWs(),e.charCode()===Eb?e.peek():(r=1,e.charCode()===Ib&&(e.peek(),r=-1),n=r*Number(e.scanNumber(e)),e.isNameCharCode()&&(n+=e.scanWord())),e.eat(hi),{type:"Range",min:t,max:n}}function NA(e){let t,n=null;if(e.eat(Vu),t=e.scanWord(),t==="boolean-expr"){e.eat(bs);let r=gl(e,hi);return e.eat(hi),e.eat($u),Gr(e,{type:"Boolean",term:r.terms.length===1?r.terms[0]:r})}return e.charCode()===Mb&&e.nextCharCode()===Bb&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===bs&&(e.skipWs(),n=zA(e)),e.eat($u),Gr(e,{type:"Type",name:t,opts:n})}function OA(e){let t=e.scanWord();return e.charCode()===Mb?(e.pos++,{type:"Function",name:t}):Gr(e,{type:"Keyword",name:t})}function _A(e,t){function n(o,i){return{type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort((o,i)=>Ab[o]-Ab[i]);t.length>0;){r=t.shift();let o=0,i=0;for(;o<e.length;o++){let s=e[o];s.type==="Combinator"&&(s.value===r?(i===-1&&(i=o-1),e.splice(o,1),o--):(i!==-1&&o-i>1&&(e.splice(i,o-i,n(e.slice(i,o),r)),o=i+1),i=-1))}i!==-1&&t.length&&e.splice(i,o-i,n(e.slice(i,o),r))}return r}function gl(e,t=-1){let n=Object.create(null),r=[],o=null,i=e.pos,s=!1;for(;e.charCode()!==t;){let a=s?gl(e,Bb):UA(e);if(!a)break;if(a.type!=="Spaces"){if(s){if(a.terms.length===0){s=!1;continue}if(a.combinator===" "){for(;a.terms.length>1;)n[" "]=!0,r.push({type:"Combinator",value:" "},a.terms.shift());a=a.terms[0]}}a.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),n[a.value]=!0):o!==null&&o.type!=="Combinator"&&(n[" "]=!0,r.push({type:"Combinator",value:" "})),r.push(a),o=a,i=e.pos,s=a.type==="Function"}}return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:r,combinator:_A(r,n)||" ",disallowEmpty:!1,explicit:!1}}function $A(e){let t;return e.eat(bs),t=gl(e,hi),e.eat(hi),t.explicit=!0,e.charCode()===Lb&&(e.pos++,t.disallowEmpty=!0),t}function UA(e){let t=e.charCode();switch(t){case hi:break;case bs:return Gr(e,$A(e));case Vu:return e.nextCharCode()===pl?RA(e):NA(e);case Fb:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===Fb?2:1))};case Tb:return e.pos++,e.eat(Tb),{type:"Combinator",value:"&&"};case Wu:return e.pos++,{type:"Comma"};case pl:return Gr(e,{type:"String",value:e.scanString()});case MA:case EA:case AA:case LA:case PA:return{type:"Spaces",value:e.scanSpaces()};case BA:return t=e.nextCharCode(),e.isNameCharCode(t)?(e.pos++,{type:"AtKeyword",name:e.scanWord()}):_u(e);case Db:case Hu:case dl:case ju:case Lb:break;case fl:if(t=e.nextCharCode(),t<48||t>57)return _u(e);break;default:return e.isNameCharCode(t)?OA(e):_u(e)}}function Ss(e){let t=new ul(e),n=gl(t);return t.pos!==e.length&&t.error("Unexpected input"),n.terms.length===1&&n.terms[0].type==="Group"?n.terms[0]:n}var EA,AA,PA,LA,MA,Lb,ju,Tb,pl,Mb,Bb,Db,Hu,Wu,Ib,Vu,$u,dl,BA,bs,hi,fl,Fb,Uu,Eb,Ab,Gu=$(()=>{"use strict";Cb();EA=9,AA=10,PA=12,LA=13,MA=32,Lb=33,ju=35,Tb=38,pl=39,Mb=40,Bb=41,Db=42,Hu=43,Wu=44,Ib=45,Vu=60,$u=62,dl=63,BA=64,bs=91,hi=93,fl=123,Fb=124,Uu=125,Eb=8734,Ab={" ":1,"&&":2,"||":3,"|":4}});function Rb(e){return typeof e=="function"?e:ws}function qu(e,t,n){function r(s){switch(o.call(n,s),s.type){case"Group":s.terms.forEach(r);break;case"Multiplier":case"Boolean":r(s.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+s.type)}i.call(n,s)}let o=ws,i=ws;if(typeof t=="function"?o=t:t&&(o=Rb(t.enter),i=Rb(t.leave)),o===ws&&i===ws)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");r(e,n)}var ws,zb=$(()=>{"use strict";ws=function(){}});var Yu=$(()=>{"use strict";Tu();Gu();zb()});function WA(e){let t=[];return lo(e,(n,r,o)=>t.push({type:n,value:e.slice(r,o),node:null})),t}function Nb(e,t){return typeof e=="string"?WA(e):t.generate(e,HA)}var HA,Ob=$(()=>{"use strict";nr();HA={decorator(e){let t=[],n=null;return{...e,node(r){let o=n;n=r,e.node.call(this,r),n=o},emit(r,o,i){t.push({type:o,value:r,node:i?null:n})},result(){return t}}}}});function xn(e,t,n){return t===ut&&n===bt||e===ut&&t===ut&&n===ut?e:(e.type==="If"&&e.else===bt&&t===ut&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function $b(e){return e.length>2&&e.charCodeAt(e.length-2)===VA&&e.charCodeAt(e.length-1)===GA}function _b(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&$b(e.name)}function uo(e,t=" ",n=!1){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:n}}function vs(e,t,n=new Set){if(!n.has(e))switch(n.add(e),e.type){case"If":e.match=vs(e.match,t,n),e.then=vs(e.then,t,n),e.else=vs(e.else,t,n);break;case"Type":return t[e.name]||e}return e}function Ku(e,t,n){switch(e){case" ":{let r=ut;for(let o=t.length-1;o>=0;o--){let i=t[o];r=xn(i,r,bt)}return r}case"|":{let r=bt,o=null;for(let i=t.length-1;i>=0;i--){let s=t[i];if(_b(s)&&(o===null&&i>0&&_b(t[i-1])&&(o=Object.create(null),r=xn({type:"Enum",map:o},ut,r)),o!==null)){let a=($b(s.name)?s.name.slice(0,-1):s.name).toLowerCase();if(!(a in o)){o[a]=s;continue}}o=null,r=xn(s,ut,r)}return r}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=bt;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=Ku(e,t.filter(function(a){return a!==i}),!1):s=ut,r=xn(i,s,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?ut:bt;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=Ku(e,t.filter(function(a){return a!==i}),!0):s=ut,r=xn(i,s,r)}return r}}}function qA(e){let t=ut,n=xi(e.term);if(e.max===0)n=xn(n,ml,bt),t=xn(n,null,bt),t.then=xn(ut,ut,t),e.comma&&(t.then.else=xn({type:"Comma",syntax:e},t,bt));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==ut&&(t=xn({type:"Comma",syntax:e},t,bt)),t=xn(n,xn(ut,ut,t),bt);if(e.min===0)t=xn(ut,ut,t);else for(let r=0;r<e.min-1;r++)e.comma&&t!==ut&&(t=xn({type:"Comma",syntax:e},t,bt)),t=xn(n,t,bt);return t}function xi(e){if(typeof e=="function")return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=Ku(e.combinator,e.terms.map(xi),!1);return e.disallowEmpty&&(t=xn(t,ml,bt)),t}case"Multiplier":return qA(e);case"Boolean":{let t=xi(e.term),n=xi(uo([uo([{type:"Keyword",name:"not"},{type:"Type",name:"!boolean-group"}]),uo([{type:"Type",name:"!boolean-group"},uo([{type:"Multiplier",comma:!1,min:0,max:0,term:uo([{type:"Keyword",name:"and"},{type:"Type",name:"!boolean-group"}])},{type:"Multiplier",comma:!1,min:0,max:0,term:uo([{type:"Keyword",name:"or"},{type:"Type",name:"!boolean-group"}])}],"|")])],"|")),r=xi(uo([{type:"Type",name:"!term"},uo([{type:"Token",value:"("},{type:"Type",name:"!self"},{type:"Token",value:")"}]),{type:"Type",name:"general-enclosed"}],"|"));return vs(r,{"!term":t,"!self":n}),vs(n,{"!boolean-group":r}),n}case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return e.value.length===3?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function ks(e,t){return typeof e=="string"&&(e=Ss(e)),{type:"MatchGraph",match:xi(e),syntax:t||null,source:e}}var ut,bt,ml,VA,GA,Xu=$(()=>{"use strict";Gu();ut={type:"Match"},bt={type:"Mismatch"},ml={type:"DisallowEmpty"},VA=40,GA=41});function ZA(e){let t=null,n=null,r=e;for(;r!==null;)n=r.prev,r.prev=t,t=r,r=n;return t}function Qu(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=t.charCodeAt(n),o=e.charCodeAt(n);if(o>=65&&o<=90&&(o=o|32),o!==r)return!1}return!0}function eP(e){return e.type!==9?!1:e.value!=="?"}function Wb(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||eP(e)}function Vb(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function tP(e,t,n){function r(){do k++,F=k<e.length?e[k]:null;while(F!==null&&(F.type===13||F.type===25))}function o(_){let M=k+_;return M<e.length?e[M]:null}function i(_,M){return{nextState:_,matchStack:z,syntaxStack:d,thenStack:f,tokenIndex:k,prev:M}}function s(_){f={nextState:_,matchStack:z,syntaxStack:d,prev:f}}function a(_){p=i(_,p)}function u(){z={type:KA,syntax:t.syntax,token:F,prev:z},r(),g=null,k>R&&(R=k)}function c(){d={syntax:t.syntax,opts:t.syntax.opts||d!==null&&d.opts||null,prev:d},z={type:Ju,syntax:t.syntax,token:z.token,prev:z}}function l(){z.type===Ju?z=z.prev:z={type:Gb,syntax:d.syntax,token:z.token,prev:z},d=d.prev}let d=null,f=null,p=null,g=null,S=0,C=null,F=null,k=-1,R=0,z={type:YA,syntax:null,token:null,prev:null};for(r();C===null&&++S<Hb;)switch(t.type){case"Match":if(f===null){if(F!==null&&(k!==e.length-1||F.value!=="\\0"&&F.value!=="\\9")){t=bt;break}C=jb;break}if(t=f.nextState,t===ml)if(f.matchStack===z){t=bt;break}else t=ut;for(;f.syntaxStack!==d;)l();f=f.prev;break;case"Mismatch":if(g!==null&&g!==!1)(p===null||k>p.tokenIndex)&&(p=g,g=!1);else if(p===null){C=XA;break}t=p.nextState,f=p.thenStack,d=p.syntaxStack,z=p.matchStack,k=p.tokenIndex,F=k<e.length?e[k]:null,p=p.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==bt&&a(t.else),t.then!==ut&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let B=t.syntax.terms;if(t.index===B.length){if(t.mask===0||t.syntax.all){t=bt;break}t=ut;break}if(t.mask===(1<<B.length)-1){t=ut;break}for(;t.index<B.length;t.index++){let m=1<<t.index;if((t.mask&m)===0){a(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|m}),t=B[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(F!==null){let B=F.value.toLowerCase();if(B.indexOf("\\")!==-1&&(B=B.replace(/\\[09].*$/,"")),Ub.call(t.map,B)){t=t.map[B];break}}t=bt;break;case"Generic":{let B=d!==null?d.opts:null,m=k+Math.floor(t.fn(F,o,B));if(!isNaN(m)&&m>k){for(;k<m;)u();t=ut}else t=bt;break}case"Type":case"Property":{let B=t.type==="Type"?"types":"properties",m=Ub.call(n,B)?n[B][t.name]:null;if(!m||!m.match)throw new Error("Bad syntax reference: "+(t.type==="Type"?"<"+t.name+">":"<'"+t.name+"'>"));if(g!==!1&&F!==null&&t.type==="Type"&&(t.name==="custom-ident"&&F.type===1||t.name==="length"&&F.value==="0")){g===null&&(g=i(t,p)),t=bt;break}c(),t=m.matchRef||m.match;break}case"Keyword":{let B=t.name;if(F!==null){let m=F.value;if(m.indexOf("\\")!==-1&&(m=m.replace(/\\[09].*$/,"")),Qu(m,B)){u(),t=ut;break}}t=bt;break}case"AtKeyword":case"Function":if(F!==null&&Qu(F.value,t.name)){u(),t=ut;break}t=bt;break;case"Token":if(F!==null&&F.value===t.value){u(),t=ut;break}t=bt;break;case"Comma":F!==null&&F.type===18?Wb(z.token)?t=bt:(u(),t=Vb(F)?bt:ut):t=Wb(z.token)||Vb(F)?ut:bt;break;case"String":let _="",M=k;for(;M<e.length&&_.length<t.value.length;M++)_+=e[M].value;if(Qu(_,t.value)){for(;k<M;)u();t=ut}else t=bt;break;default:throw new Error("Unknown node type: "+t.type)}switch(JA+=S,C){case null:console.warn("[csstree-match] BREAK after "+Hb+" iterations"),C=QA,z=null;break;case jb:for(;d!==null;)l();break;default:z=null}return{tokens:e,reason:C,iterations:S,match:z,longestMatch:R}}function Zu(e,t,n){let r=tP(e,t,n||{});if(r.match===null)return r;let o=r.match,i=r.match={syntax:t.syntax||null,match:[]},s=[i];for(o=ZA(o).prev;o!==null;){switch(o.type){case Ju:i.match.push(i={syntax:o.syntax,match:[]}),s.push(i);break;case Gb:s.pop(),i=s[s.length-1];break;default:i.match.push({syntax:o.syntax||null,token:o.token.value,node:o.token.node})}o=o.prev}return r}var Ub,YA,KA,Ju,Gb,jb,XA,QA,Hb,JA,qb=$(()=>{"use strict";Xu();({hasOwnProperty:Ub}=Object.prototype),YA=0,KA=1,Ju=2,Gb=3,jb="Match",XA="Mismatch",QA="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",Hb=15e3,JA=0});var tp={};ye(tp,{getTrace:()=>Yb,isKeyword:()=>oP,isProperty:()=>rP,isType:()=>nP});function Yb(e){function t(o){return o===null?!1:o.type==="Type"||o.type==="Property"||o.type==="Keyword"}function n(o){if(Array.isArray(o.match)){for(let i=0;i<o.match.length;i++)if(n(o.match[i]))return t(o.syntax)&&r.unshift(o.syntax),!0}else if(o.node===e)return r=t(o.syntax)?[o.syntax]:[],!0;return!1}let r=null;return this.matched!==null&&n(this.matched),r}function nP(e,t){return ep(this,e,n=>n.type==="Type"&&n.name===t)}function rP(e,t){return ep(this,e,n=>n.type==="Property"&&n.name===t)}function oP(e){return ep(this,e,t=>t.type==="Keyword")}function ep(e,t,n){let r=Yb.call(e,t);return r===null?!1:r.some(n)}var Kb=$(()=>{"use strict"});function Xb(e){return"node"in e?e.node:Xb(e.match[0])}function Qb(e){return"node"in e?e.node:Qb(e.match[e.match.length-1])}function np(e,t,n,r,o){function i(a){if(a.syntax!==null&&a.syntax.type===r&&a.syntax.name===o){let u=Xb(a),c=Qb(a);e.syntax.walk(t,function(l,d,f){if(l===u){let p=new Vn;do{if(p.appendData(d.data),d.data===c)break;d=d.next}while(d!==null);s.push({parent:f,nodes:p})}})}Array.isArray(a.match)&&a.match.forEach(i)}let s=[];return n.matched!==null&&i(n.matched),s}var Jb=$(()=>{"use strict";ps()});function rp(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function Zb(e){return!!e&&rp(e.offset)&&rp(e.line)&&rp(e.column)}function iP(e,t){return function(r,o){if(!r||r.constructor!==Object)return o(r,"Type of node should be an Object");for(let i in r){let s=!0;if(Cs.call(r,i)!==!1){if(i==="type")r.type!==e&&o(r,"Wrong node type `"+r.type+"`, expected `"+e+"`");else if(i==="loc"){if(r.loc===null)continue;if(r.loc&&r.loc.constructor===Object)if(typeof r.loc.source!="string")i+=".source";else if(!Zb(r.loc.start))i+=".start";else if(!Zb(r.loc.end))i+=".end";else continue;s=!1}else if(t.hasOwnProperty(i)){s=!1;for(let a=0;!s&&a<t[i].length;a++){let u=t[i][a];switch(u){case String:s=typeof r[i]=="string";break;case Boolean:s=typeof r[i]=="boolean";break;case null:s=r[i]===null;break;default:typeof u=="string"?s=r[i]&&r[i].type===u:Array.isArray(u)&&(s=r[i]instanceof Vn)}}}else o(r,"Unknown field `"+i+"` for "+e+" node type");s||o(r,"Bad value for `"+e+"."+i+"`")}}for(let i in t)Cs.call(t,i)&&Cs.call(r,i)===!1&&o(r,"Field `"+e+"."+i+"` is missed")}}function e0(e,t){let n=[];for(let r=0;r<e.length;r++){let o=e[r];if(o===String||o===Boolean)n.push(o.name.toLowerCase());else if(o===null)n.push("null");else if(typeof o=="string")n.push(o);else if(Array.isArray(o))n.push("List<"+(e0(o,t)||"any")+">");else throw new Error("Wrong value `"+o+"` in `"+t+"` structure definition")}return n.join(" | ")}function sP(e,t){let n=t.structure,r={type:String,loc:!0},o={type:'"'+e+'"'};for(let i in n){if(Cs.call(n,i)===!1)continue;let s=r[i]=Array.isArray(n[i])?n[i].slice():[n[i]];o[i]=e0(s,e+"."+i)}return{docs:o,check:iP(e,r)}}function t0(e){let t={};if(e.node){for(let n in e.node)if(Cs.call(e.node,n)){let r=e.node[n];if(r.structure)t[n]=sP(n,r);else throw new Error("Missed `structure` field in `"+n+"` node type definition")}}return t}var Cs,n0=$(()=>{"use strict";ps();({hasOwnProperty:Cs}=Object.prototype)});function op(e,t,n){let r={};for(let o in e)e[o].syntax&&(r[o]=n?e[o].syntax:pi(e[o].syntax,{compact:t}));return r}function aP(e,t,n){let r={};for(let[o,i]of Object.entries(e))r[o]={prelude:i.prelude&&(n?i.prelude.syntax:pi(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&op(i.descriptors,t,n)};return r}function lP(e){for(let t=0;t<e.length;t++)if(e[t].value.toLowerCase()==="var(")return!0;return!1}function cP(e){let t=e.terms[0];return e.explicit===!1&&e.terms.length===1&&t.type==="Multiplier"&&t.comma===!0}function br(e,t,n){return{matched:e,iterations:n,error:t,...tp}}function yi(e,t,n,r){let o=Nb(n,e.syntax),i;return lP(o)?br(null,new Error("Matching for a tree with var() is not supported")):(r&&(i=Zu(o,e.cssWideKeywordsSyntax,e)),(!r||!i.match)&&(i=Zu(o,t.match,e),!i.match)?br(null,new ib(i.reason,t.syntax,n,i),i.iterations):br(i.match,null,i.iterations))}var Ts,r0=$(()=>{"use strict";sb();il();sl();bb();Sb();Yu();Ob();Xu();qb();Kb();Jb();n0();Ts=class{constructor(t,n,r){if(this.cssWideKeywords=gi,this.syntax=n,this.generic=!1,this.units={...cl},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=r||t0(t),t){if(t.cssWideKeywords&&(this.cssWideKeywords=t.cssWideKeywords),t.units)for(let o of Object.keys(cl))Array.isArray(t.units[o])&&(this.units[o]=t.units[o]);if(t.types)for(let[o,i]of Object.entries(t.types))this.addType_(o,i);if(t.generic){this.generic=!0;for(let[o,i]of Object.entries(yb(this.units)))this.addType_(o,i)}if(t.atrules)for(let[o,i]of Object.entries(t.atrules))this.addAtrule_(o,i);if(t.properties)for(let[o,i]of Object.entries(t.properties))this.addProperty_(o,i)}this.cssWideKeywordsSyntax=ks(this.cssWideKeywords.join(" | "))}checkStructure(t){function n(i,s){o.push({node:i,message:s})}let r=this.structure,o=[];return this.syntax.walk(t,function(i){r.hasOwnProperty(i.type)?r[i.type].check(i,n):n(i,"Unknown node type `"+i.type+"`")}),o.length?o:!1}createDescriptor(t,n,r,o=null){let i={type:n,name:r},s={type:n,name:r,parent:o,serializable:typeof t=="string"||t&&typeof t.type=="string",syntax:null,match:null,matchRef:null};return typeof t=="function"?s.match=ks(t,i):(typeof t=="string"?Object.defineProperty(s,"syntax",{get(){return Object.defineProperty(s,"syntax",{value:Ss(t)}),s.syntax}}):s.syntax=t,Object.defineProperty(s,"match",{get(){return Object.defineProperty(s,"match",{value:ks(s.syntax,i)}),s.match}}),n==="Property"&&Object.defineProperty(s,"matchRef",{get(){let a=s.syntax,u=cP(a)?ks({...a,terms:[a.terms[0].term]},i):null;return Object.defineProperty(s,"matchRef",{value:u}),u}})),s}addAtrule_(t,n){n&&(this.atrules[t]={type:"Atrule",name:t,prelude:n.prelude?this.createDescriptor(n.prelude,"AtrulePrelude",t):null,descriptors:n.descriptors?Object.keys(n.descriptors).reduce((r,o)=>(r[o]=this.createDescriptor(n.descriptors[o],"AtruleDescriptor",o,t),r),Object.create(null)):null})}addProperty_(t,n){n&&(this.properties[t]=this.createDescriptor(n,"Property",t))}addType_(t,n){n&&(this.types[t]=this.createDescriptor(n,"Type",t))}checkAtruleName(t){if(!this.getAtrule(t))return new di("Unknown at-rule","@"+t)}checkAtrulePrelude(t,n){let r=this.checkAtruleName(t);if(r)return r;let o=this.getAtrule(t);if(!o.prelude&&n)return new SyntaxError("At-rule `@"+t+"` should not contain a prelude");if(o.prelude&&!n&&!yi(this,o.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+t+"` should contain a prelude")}checkAtruleDescriptorName(t,n){let r=this.checkAtruleName(t);if(r)return r;let o=this.getAtrule(t),i=rl(n);if(!o.descriptors)return new SyntaxError("At-rule `@"+t+"` has no known descriptors");if(!o.descriptors[i.name]&&!o.descriptors[i.basename])return new di("Unknown at-rule descriptor",n)}checkPropertyName(t){if(!this.getProperty(t))return new di("Unknown property",t)}matchAtrulePrelude(t,n){let r=this.checkAtrulePrelude(t,n);if(r)return br(null,r);let o=this.getAtrule(t);return o.prelude?yi(this,o.prelude,n||"",!1):br(null,null)}matchAtruleDescriptor(t,n,r){let o=this.checkAtruleDescriptorName(t,n);if(o)return br(null,o);let i=this.getAtrule(t),s=rl(n);return yi(this,i.descriptors[s.name]||i.descriptors[s.basename],r,!1)}matchDeclaration(t){return t.type!=="Declaration"?br(null,new Error("Not a Declaration node")):this.matchProperty(t.property,t.value)}matchProperty(t,n){if(Iu(t).custom)return br(null,new Error("Lexer matching doesn't applicable for custom properties"));let r=this.checkPropertyName(t);return r?br(null,r):yi(this,this.getProperty(t),n,!0)}matchType(t,n){let r=this.getType(t);return r?yi(this,r,n,!1):br(null,new di("Unknown type",t))}match(t,n){return typeof t!="string"&&(!t||!t.type)?br(null,new di("Bad syntax")):((typeof t=="string"||!t.match)&&(t=this.createDescriptor(t,"Type","anonymous")),yi(this,t,n,!1))}findValueFragments(t,n,r,o){return np(this,n,this.matchProperty(t,n),r,o)}findDeclarationValueFragments(t,n,r){return np(this,t.value,this.matchDeclaration(t),n,r)}findAllFragments(t,n,r){let o=[];return this.syntax.walk(t,{visit:"Declaration",enter:i=>{o.push.apply(o,this.findDeclarationValueFragments(i,n,r))}}),o}getAtrule(t,n=!0){let r=rl(t);return(r.vendor&&n?this.atrules[r.name]||this.atrules[r.basename]:this.atrules[r.name])||null}getAtrulePrelude(t,n=!0){let r=this.getAtrule(t,n);return r&&r.prelude||null}getAtruleDescriptor(t,n){return this.atrules.hasOwnProperty(t)&&this.atrules.declarators&&this.atrules[t].declarators[n]||null}getProperty(t,n=!0){let r=Iu(t);return(r.vendor&&n?this.properties[r.name]||this.properties[r.basename]:this.properties[r.name])||null}getType(t){return hasOwnProperty.call(this.types,t)?this.types[t]:null}validate(){function t(u,c){return c?`<${u}>`:`<'${u}'>`}function n(u,c,l,d){if(l.has(c))return l.get(c);l.set(c,!1),d.syntax!==null&&qu(d.syntax,function(f){if(f.type!=="Type"&&f.type!=="Property")return;let p=f.type==="Type"?u.types:u.properties,g=f.type==="Type"?o:i;hasOwnProperty.call(p,f.name)?n(u,f.name,g,p[f.name])&&(r.push(`${t(c,l===o)} used broken syntax definition ${t(f.name,f.type==="Type")}`),l.set(c,!0)):(r.push(`${t(c,l===o)} used missed syntax definition ${t(f.name,f.type==="Type")}`),l.set(c,!0))},this)}let r=[],o=new Map,i=new Map;for(let u in this.types)n(this,u,o,this.types[u]);for(let u in this.properties)n(this,u,i,this.properties[u]);let s=[...o.keys()].filter(u=>o.get(u)),a=[...i.keys()].filter(u=>i.get(u));return s.length||a.length?{errors:r,types:s,properties:a}:null}dump(t,n){return{generic:this.generic,cssWideKeywords:this.cssWideKeywords,units:this.units,types:op(this.types,!n,t),properties:op(this.properties,!n,t),atrules:aP(this.atrules,!n,t)}}toString(){return JSON.stringify(this.dump())}}});function ip(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function uP(e,t){let n=Object.create(null);for(let r of Object.keys(e))t.includes(r)&&(n[r]=e[r]);return n}function sp(e,t,n){let r={...e};for(let[o,i]of Object.entries(t))r[o]={...r[o],...n?uP(i,n):i};return r}function Is(e,t){let n={...e};for(let[r,o]of Object.entries(t))switch(r){case"generic":n[r]=!!o;break;case"cssWideKeywords":n[r]=e[r]?[...e[r],...o]:o||[];break;case"units":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=Array.isArray(s)?s:[];break;case"atrules":n[r]={...e[r]};for(let[i,s]of Object.entries(o)){let a=n[r][i]||{},u=n[r][i]={prelude:a.prelude||null,descriptors:{...a.descriptors}};if(s){u.prelude=s.prelude?ip(u.prelude,s.prelude):u.prelude||null;for(let[c,l]of Object.entries(s.descriptors||{}))u.descriptors[c]=l?ip(u.descriptors[c],l):null;Object.keys(u.descriptors).length||(u.descriptors=null)}}break;case"types":case"properties":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=ip(n[r][i],s);break;case"parseContext":n[r]={...e[r],...o};break;case"scope":case"features":n[r]=sp(e[r],o);break;case"atrule":case"pseudo":n[r]=sp(e[r],o,["parse"]);break;case"node":n[r]=sp(e[r],o,["name","structure","parse","generate","walkContext"]);break}return n}var o0=$(()=>{"use strict"});function i0(e){let t=Sy(e),n=nb(e),r=Yy(e),{fromPlainObject:o,toPlainObject:i}=Xy(n),s={lexer:null,createLexer:a=>new Ts(a,s,s.lexer.structure),tokenize:lo,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:o,toPlainObject:i,fork(a){let u=Is({},e);return i0(typeof a=="function"?a(u):Is(u,a))}};return s.lexer=new Ts({generic:e.generic,cssWideKeywords:e.cssWideKeywords,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var s0,a0=$(()=>{"use strict";nr();wy();Ky();Qy();rb();r0();o0();s0=e=>i0(Is({},e))});var l0,c0=$(()=>{"use strict";l0={generic:!0,cssWideKeywords:["initial","inherit","unset","revert","revert-layer"],units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","alpha-value":"<number>|<percentage>","an+b":"odd|even|<integer>|<n-dimension>|'+'? \u2020 n|-n|<ndashdigit-dimension>|'+'? \u2020 <ndashdigit-ident>|<dashndashdigit-ident>|<n-dimension> <signed-integer>|'+'? \u2020 n <signed-integer>|-n <signed-integer>|<ndash-dimension> <signless-integer>|'+'? \u2020 n- <signless-integer>|-n- <signless-integer>|<n-dimension> ['+'|'-'] <signless-integer>|'+'? \u2020 n ['+'|'-'] <signless-integer>|-n ['+'|'-'] <signless-integer>","anchor()":"anchor( <anchor-name>?&&<anchor-side> , <length-percentage>? )","anchor-name":"<dashed-ident>","anchor-side":"inside|outside|top|left|right|bottom|start|end|self-start|self-end|<percentage>|center","anchor-size":"width|height|block|inline|self-block|self-inline","anchor-size()":"anchor-size( [<anchor-name>||<anchor-size>]? , <length-percentage>? )","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>|<zero>","angular-color-stop":"<color> <color-stop-angle>?","angular-color-stop-list":"<angular-color-stop> , [<angular-color-hint>? , <angular-color-stop>]#?","animateable-feature":"scroll-position|contents|<custom-ident>","animation-action":"none|play|play-once|play-forwards|play-backwards|pause|reset|replay","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <attr-type>? , <declaration-value>? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attr-type":"type( <syntax> )|raw-string|number|<attr-unit>","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",axis:"block|inline|x|y","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<xywh()>|<rect()>|<circle()>|<ellipse()>|<polygon()>|<path()>","basic-shape-rect":"<inset()>|<rect()>|<xywh()>","bg-clip":"<visual-box>|border-area|text","bg-image":"<image>|none","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<visual-box>||<visual-box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage [0,\u221E]>|auto]{1,2}|cover|contain","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity","blur()":"blur( <length>? )","brightness()":"brightness( [<number>|<percentage>]? )","calc()":"calc( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-size()":"calc-size( <calc-size-basis> , <calc-sum> )","calc-size-basis":"<intrinsic-size-keyword>|<calc-size()>|any|<calc-sum>","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-value":"<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( <radial-size>? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<color-base>|currentColor|<system-color>|<device-cmyk()>|<light-dark()>|<-non-standard-color>","color()":"color( <colorspace-params> [/ [<alpha-value>|none]]? )","color-base":"<hex-color>|<color-function>|<named-color>|<color-mix()>|transparent","color-function":"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<oklab()>|<oklch()>|<color()>","color-interpolation-method":"in [<rectangular-color-space>|<polar-color-space> <hue-interpolation-method>?|<custom-color-space>]","color-mix()":"color-mix( <color-interpolation-method> , [<color>&&<percentage [0,100]>?]#{2} )","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"[<angle-percentage>|<zero>]{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"<linear-color-stop> , [<linear-color-hint>? , <linear-color-stop>]#?","colorspace-params":"[<predefined-rgb-params>|<xyz-params>]",combinator:"'>'|'+'|'~'|['|' '|']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|checkbox|radio|menulist|listbox|meter|progress-bar|button","compat-special":"textfield|menulist-button","complex-selector":"<complex-selector-unit> [<combinator>? <complex-selector-unit>]*","complex-selector-list":"<complex-selector>#","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>*]!","compound-selector-list":"<compound-selector>#","conic-gradient()":"conic-gradient( [<conic-gradient-syntax>] )","conic-gradient-syntax":"[[[from [<angle>|<zero>]]? [at <position>]?]||<color-interpolation-method>]? , <angular-color-stop-list>","container-condition":"not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]","container-name":"<custom-ident>","container-query":"not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contextual-alt-values":"[contextual|no-contextual]","contrast()":"contrast( [<number>|<percentage>]? )","coord-box":"content-box|padding-box|border-box|fill-box|stroke-box|view-box","corner-shape-value":"round|scoop|bevel|notch|square|squircle|<superellipse()>","cos()":"cos( <calc-sum> )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier()":"cubic-bezier( [<number [0,1]> , <number>]#{2} )","cubic-bezier-easing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","cursor-predefined":"auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing","custom-color-space":"<dashed-ident>","custom-params":"<dashed-ident> [<number>|<percentage>|none]+",dasharray:"[[<length-percentage>|<number>]+]#","dashndashdigit-ident":"<ident-token>","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonHighlight|ButtonShadow|CaptionText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( [<color>?&&<length>{2,3}] )","dynamic-range-limit-mix()":"dynamic-range-limit-mix( [<'dynamic-range-limit'>&&<percentage [0,100]>]#{2,} )","easing-function":"<linear-easing-function>|<cubic-bezier-easing-function>|<step-easing-function>","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( <radial-size>? [at <position>]? )","env()":"env( <custom-ident> , <declaration-value>? )","exp()":"exp( <calc-sum> )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-value-list":"[<filter-function>|<url>]+","final-bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<visual-box>||<visual-box>||<'background-color'>","fit-content()":"fit-content( <length-percentage [0,\u221E]> )","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css2":"normal|small-caps","font-weight-absolute":"normal|bold|<number [1,1000]>","font-width-css3":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded","form-control-identifier":"select","frequency-percentage":"<frequency>|<percentage>","generic-complete":"serif|sans-serif|system-ui|cursive|fantasy|math|monospace","general-enclosed":"[<function-token> <any-value>? )]|[( <any-value>? )]","generic-family":"<generic-script-specific>|<generic-complete>|<generic-incomplete>|<-non-standard-generic-family>","generic-incomplete":"ui-serif|ui-sans-serif|ui-monospace|ui-rounded","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( [<number>|<percentage>]? )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )|hsl( [<hue>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","hsla()":"hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )|hsla( [<hue>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )",hue:"<number>|<angle>","hue-interpolation-method":"[shorter|longer|increasing|decreasing] hue","hue-rotate()":"hue-rotate( [<angle>|<zero>]? )","hwb()":"hwb( [<hue>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","hypot()":"hypot( <calc-sum># )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length-percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( [<number>|<percentage>]? )","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-selector":"from|to|<percentage [0,100]>|<timeline-range-name> <percentage>","keyframes-name":"<custom-ident>|<string>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","light-dark()":"light-dark( <color> , <color> )","line-name-list":"[<line-names>|<name-repeat>]+","line-names":"'[' <custom-ident>* ']'","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear()":"linear( [<number>&&<percentage>{0,2}]# )","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-easing-function":"linear|<linear()>","linear-gradient()":"linear-gradient( [<linear-gradient-syntax>] )","linear-gradient-syntax":"[[<angle>|<zero>|to <side-or-corner>]||<color-interpolation-method>]? , <color-stop-list>","log()":"log( <calc-sum> , <calc-sum>? )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )","mod()":"mod( <calc-sum> , <calc-sum> )","n-dimension":"<dimension-token>","name-repeat":"repeat( [<integer [1,\u221E]>|auto-fill] , <line-names>+ )","named-color":"aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen","namespace-prefix":"<ident>","ndash-dimension":"<dimension-token>","ndashdigit-dimension":"<dimension-token>","ndashdigit-ident":"<ident-token>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]","offset-path":"<ray()>|<url>|<basic-shape>","oklab()":"oklab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","oklch()":"oklch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","opacity()":"opacity( [<number>|<percentage>]? )","opacity-value":"<number>|<percentage>","outline-line-style":"none|dotted|dashed|solid|double|groove|ridge|inset|outset","outline-radius":"<length>|<percentage>","overflow-position":"unsafe|safe","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-selector-list":"[<page-selector>#]?","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke","paint()":"paint( <ident> , <declaration-value>? )","paint-box":"<visual-box>|fill-box|stroke-box","palette-identifier":"<dashed-ident>","palette-mix()":"palette-mix( <color-interpolation-method> , [[normal|light|dark|<palette-identifier>|<palette-mix()>]&&<percentage [0,100]>?]#{2} )","path()":"path( <'fill-rule'>? , <string> )","perspective()":"perspective( [<length [0,\u221E]>|none] )","polar-color-space":"hsl|hwb|lch|oklch","polygon()":"polygon( <'fill-rule'>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","position-area":"[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|center|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|center|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]","pow()":"pow( <calc-sum> , <calc-sum> )","predefined-rgb":"srgb|srgb-linear|display-p3|display-p3-linear|a98-rgb|prophoto-rgb|rec2020","predefined-rgb-params":"<predefined-rgb> [<number>|<percentage>|none]{3}","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>|<legacy-pseudo-element-selector>","pseudo-page":": [left|right|first|blank]","query-in-parens":"( <container-condition> )|( <size-feature> )|style( <style-query> )|<general-enclosed>",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-extent":"closest-corner|closest-side|farthest-corner|farthest-side","radial-gradient()":"radial-gradient( [<radial-gradient-syntax>] )","radial-gradient-syntax":"[[[<radial-shape>||<radial-size>]? [at <position>]?]||<color-interpolation-method>]? , <color-stop-list>","radial-shape":"circle|ellipse","radial-size":"<radial-extent>|<length [0,\u221E]>|<length-percentage [0,\u221E]>{2}",ratio:"<number [0,\u221E]> [/ <number [0,\u221E]>]?","ray()":"ray( <angle>&&<ray-size>?&&contain?&&[at <position>]? )","ray-size":"closest-side|closest-corner|farthest-side|farthest-corner|sides","rect()":"rect( [<length-percentage>|auto]{4} [round <'border-radius'>]? )","rectangular-color-space":"srgb|srgb-linear|display-p3|display-p3-linear|a98-rgb|prophoto-rgb|rec2020|lab|oklab|xyz|xyz-d50|xyz-d65","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [<conic-gradient-syntax>] )","repeating-linear-gradient()":"repeating-linear-gradient( [<linear-gradient-syntax>] )","repeating-radial-gradient()":"repeating-radial-gradient( [<radial-gradient-syntax>] )","reversed-counter-name":"reversed( <counter-name> )","rgb()":"rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )|rgb( [<number>|<percentage>|none]{3} [/ [<alpha-value>|none]]? )","rgba()":"rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )|rgba( [<number>|<percentage>|none]{3} [/ [<alpha-value>|none]]? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( [<number>|<percentage>]? )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )","scope-end":"<forgiving-selector-list>","scope-start":"<forgiving-selector-list>","scroll()":"scroll( [<scroller>||<axis>]? )",scroller:"root|nearest|self","scroll-state-feature":"<media-query-list>","scroll-state-in-parens":"( <scroll-state-query> )|( <scroll-state-feature> )|<general-enclosed>","scroll-state-query":"not <scroll-state-in-parens>|<scroll-state-in-parens> [[and <scroll-state-in-parens>]*|[or <scroll-state-in-parens>]*]|<scroll-state-feature>","selector-list":"<complex-selector-list>","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","sepia()":"sepia( [<number>|<percentage>]? )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<visual-box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","sign()":"sign( <calc-sum> )","signed-integer":"<number-token>","signless-integer":"<number-token>","sin()":"sin( <calc-sum> )","single-animation":"<'animation-duration'>||<easing-function>||<'animation-delay'>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]||<single-animation-timeline>","single-animation-composition":"replace|add|accumulate","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<dashed-ident>|<scroll()>|<view()>","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>||<transition-behavior-value>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","size-feature":"<mf-plain>|<mf-boolean>|<mf-range>","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sqrt()":"sqrt( <calc-sum> )","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-easing-function":"step-start|step-end|<steps()>","steps()":"steps( <integer> , <step-position>? )","style-feature":"<declaration>","style-in-parens":"( <style-condition> )|( <style-feature> )|<general-enclosed>","style-query":"<style-condition>|<style-feature>","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","superellipse()":"superellipse( [<number>|infinity|-infinity] )","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-decl":"( <declaration> )","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>","symbols()":"symbols( <symbols-type>? [<string>|<image>]+ )","symbols-type":"cyclic|numeric|alphabetic|symbolic|fixed","system-color":"AccentColor|AccentColorText|ActiveText|ButtonBorder|ButtonFace|ButtonText|Canvas|CanvasText|Field|FieldText|GrayText|Highlight|HighlightText|LinkText|Mark|MarkText|SelectedItem|SelectedItemText|VisitedText","system-family-name":"caption|icon|menu|message-box|small-caption|status-bar","tan()":"tan( <calc-sum> )",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","text-edge":"[text|cap|ex|ideographic|ideographic-ink] [text|alphabetic|ideographic|ideographic-ink]?","time-percentage":"<time>|<percentage>","timeline-range-name":"cover|contain|entry|exit|entry-crossing|exit-crossing","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","transition-behavior-value":"normal|allow-discrete","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","try-size":"most-width|most-height|most-block-size|most-inline-size","try-tactic":"flip-block||flip-inline||flip-start","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","view()":"view( [<axis>||<'view-timeline-inset'>]? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","xywh()":"xywh( <length-percentage>{2} <length-percentage [0,\u221E]>{2} [round <'border-radius'>]? )",xyz:"xyz|xyz-d50|xyz-d65","xyz-params":"<xyz-space> [<number>|<percentage>|none]{3}","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"overlay|-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-size":"intrinsic|min-intrinsic|-webkit-fill-available|-webkit-fit-content|-webkit-min-content|-webkit-max-content|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>",autospace:"no-autospace|[ideograph-alpha||ideograph-numeric||punctuation]||[insert|replace]",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral","generic-script-specific":"generic( kai )|generic( fangsong )|generic( nastaliq )","-non-standard-generic-family":"-apple-system|BlinkMacSystemFont","intrinsic-size-keyword":"min-content|max-content|fit-content",left:"<length>|auto","device-cmyk()":"<legacy-device-cmyk-syntax>|<modern-device-cmyk-syntax>","legacy-device-cmyk-syntax":"device-cmyk( <number>#{4} )","modern-device-cmyk-syntax":"device-cmyk( <cmyk-component>{4} [/ [<alpha-value>|none]]? )","cmyk-component":"<number>|<percentage>|none","color-space":"<rectangular-color-space>|<polar-color-space>|<custom-color-space>",right:"<length>|auto","forgiving-selector-list":"<complex-real-selector-list>","forgiving-relative-selector-list":"<relative-real-selector-list>","complex-real-selector-list":"<complex-real-selector>#","simple-selector-list":"<simple-selector>#","relative-real-selector-list":"<relative-real-selector>#","complex-selector-unit":"[<compound-selector>? <pseudo-compound-selector>*]!","complex-real-selector":"<compound-selector> [<combinator>? <compound-selector>]*","relative-real-selector":"<combinator>? <complex-real-selector>","pseudo-compound-selector":"<pseudo-element-selector> <pseudo-class-selector>*","simple-selector":"<type-selector>|<subclass-selector>","legacy-pseudo-element-selector":"':' [before|after|first-line|first-letter]","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,\u221E]>","xyz-space":"xyz|xyz-d50|xyz-d65","style-condition":"not <style-in-parens>|<style-in-parens> [[and <style-in-parens>]*|[or <style-in-parens>]*]","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box","inset-area":"[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]",syntax:"'*'|<syntax-component> [<syntax-combinator> <syntax-component>]*|<syntax-string>","syntax-component":"<syntax-single-component> <syntax-multiplier>?|'<' transform-list '>'","syntax-single-component":"'<' <syntax-type-name> '>'|<ident>","syntax-type-name":"angle|color|custom-ident|image|integer|length|length-percentage|number|percentage|resolution|string|time|url|transform-function","syntax-combinator":"'|'","syntax-multiplier":"'#'|'+'","syntax-string":"<string>"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-content-zooming":"none|zoom","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<visual-box>|border|padding|content|text]||[<visual-box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<coord-box>|no-clip|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<coord-box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","-webkit-user-select":"auto|none|text|all","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]|anchor-center","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>|anchor-center","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical",all:"initial|inherit|unset|revert|revert-layer","anchor-name":"none|<dashed-ident>#","anchor-scope":"none|all|<dashed-ident>#",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"[auto|<time [0s,\u221E]>]#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-range":"[<'animation-range-start'> <'animation-range-end'>?]#","animation-range-end":"[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","animation-range-start":"[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","animation-timeline":"<single-animation-timeline>#","animation-timing-function":"<easing-function>#","animation-trigger":"[none|[<dashed-ident> <animation-action>+]+]#",appearance:"none|auto|<compat-auto>|<compat-special>","aspect-ratio":"auto||<ratio>","backdrop-filter":"none|<filter-value-list>","backface-visibility":"visible|hidden",background:"<bg-layer>#? , <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<visual-box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","baseline-shift":"baseline|sub|super|<svg-length>","baseline-source":"auto|first|last","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-block-start'>","border-block-color":"<'border-top-color'>{1,2}","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-block-style":"<'border-top-style'>{1,2}","border-block-width":"<'border-top-width'>{1,2}","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage [0,\u221E]>{1,2}","border-bottom-right-radius":"<length-percentage [0,\u221E]>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"separate|collapse","border-color":"<color>{1,4}","border-end-end-radius":"<'border-top-left-radius'>","border-end-start-radius":"<'border-top-left-radius'>","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length [0,\u221E]>|<number [0,\u221E]>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"[<number [0,\u221E]>|<percentage [0,\u221E]>]{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage [0,\u221E]>|<number [0,\u221E]>|auto]{1,4}","border-inline":"<'border-block-start'>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-inline-style":"<'border-top-style'>{1,2}","border-inline-width":"<'border-top-width'>{1,2}","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage [0,\u221E]>{1,4} [/ <length-percentage [0,\u221E]>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length>{1,2}","border-start-end-radius":"<'border-top-left-radius'>","border-start-start-radius":"<'border-top-left-radius'>","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage [0,\u221E]>{1,2}","border-top-right-radius":"<length-percentage [0,\u221E]>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"auto|<length-percentage>|<anchor()>|<anchor-size()>","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom",caret:"<'caret-color'>||<'caret-animation'>||<'caret-shape'>","caret-animation":"auto|manual","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none","clip-rule":"nonzero|evenodd",color:"<color>","color-interpolation-filters":"auto|sRGB|linearRGB","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance","column-gap":"normal|<length-percentage>","column-height":"auto|<length [0,\u221E]>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"auto|<length [0,\u221E]>","column-wrap":"auto|nowrap|wrap",columns:"[<'column-width'>||<'column-count'>] [/ <'column-height'>]?",contain:"none|strict|content|[[size||inline-size]||layout||style||paint]","contain-intrinsic-block-size":"auto? [none|<length>]","contain-intrinsic-height":"auto? [none|<length>]","contain-intrinsic-inline-size":"auto? [none|<length>]","contain-intrinsic-size":"[auto? [none|<length>]]{1,2}","contain-intrinsic-width":"auto? [none|<length>]",container:"<'container-name'> [/ <'container-type'>]?","container-name":"none|<custom-ident>+","container-type":"normal||[size|inline-size]",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>|<attr()>]+]?","content-visibility":"visible|auto|hidden","corner-block-end-shape":"<corner-shape-value>{1,2}","corner-block-start-shape":"<corner-shape-value>{1,2}","corner-bottom-shape":"<corner-shape-value>{1,2}","corner-bottom-left-shape":"<corner-shape-value>","corner-bottom-right-shape":"<corner-shape-value>","corner-end-end-shape":"<corner-shape-value>","corner-end-start-shape":"<corner-shape-value>","corner-inline-end-shape":"<corner-shape-value>{1,2}","corner-inline-start-shape":"<corner-shape-value>{1,2}","corner-left-shape":"<corner-shape-value>{1,2}","corner-right-shape":"<corner-shape-value>{1,2}","corner-shape":"<corner-shape-value>{1,4}","corner-start-start-shape":"<corner-shape-value>","corner-start-end-shape":"<corner-shape-value>","corner-top-shape":"<corner-shape-value>{1,2}","corner-top-left-shape":"<corner-shape-value>","corner-top-right-shape":"<corner-shape-value>","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",cx:"<length>|<percentage>",cy:"<length>|<percentage>",d:"none|path( <string> )",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge","dynamic-range-limit":"standard|no-limit|constrained|<dynamic-range-limit-mix()>","empty-cells":"show|hide","field-sizing":"content|fixed",fill:"<paint>","fill-opacity":"<number-zero-one>|<percentage>","fill-rule":"nonzero|evenodd",filter:"none|<filter-value-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end","flood-color":"<color>","flood-opacity":"<'opacity'>",font:"[[<'font-style'>||<font-variant-css2>||<'font-weight'>||<font-width-css3>]? <'font-size'> [/ <'line-height'>]? <'font-family'>#]|<system-family-name>|<-non-standard-font>","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-palette":"normal|light|dark|<palette-identifier>|<palette-mix()>","font-size":"<absolute-size>|<relative-size>|<length-percentage [0,\u221E]>|math","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps||position]","font-synthesis-position":"auto|none","font-synthesis-small-caps":"auto|none","font-synthesis-style":"auto|none","font-synthesis-weight":"auto|none","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-emoji":"normal|text|emoji|unicode","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-variation-settings":"normal|[<string> <number>]#","font-weight":"<font-weight-absolute>|bolder|lighter","font-width":"normal|<percentage [0,\u221E]>|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded","forced-color-adjust":"auto|none|preserve-parent-color",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","hyphenate-character":"auto|<string>","hyphenate-limit-chars":"[auto|<integer>]{1,3}",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|smooth|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>","interpolate-size":"numeric-only|allow-keywords",isolation:"auto|isolate",interactivity:"auto|inert","interest-delay":"<'interest-delay-start'>{1,2}","interest-delay-end":"normal|<time>","interest-delay-start":"normal|<time>","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]|anchor-center","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|anchor-center","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"auto|<length-percentage>|<anchor()>|<anchor-size()>","letter-spacing":"normal|<length-percentage>","lighting-color":"<color>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"<'margin-top'>{1,4}","margin-block":"<'margin-top'>{1,2}","margin-block-end":"<'margin-top'>","margin-block-start":"<'margin-top'>","margin-bottom":"<length-percentage>|auto|<anchor-size()>","margin-inline":"<'margin-top'>{1,2}","margin-inline-end":"<'margin-top'>","margin-inline-start":"<'margin-top'>","margin-left":"<length-percentage>|auto|<anchor-size()>","margin-right":"<length-percentage>|auto|<anchor-size()>","margin-top":"<length-percentage>|auto|<anchor-size()>","margin-trim":"none|in-flow|all",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<coord-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<coord-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","min-block-size":"<'min-width'>","min-height":"auto|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","min-inline-size":"<'min-width'>","min-width":"auto|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","mix-blend-mode":"<blend-mode>|plus-darker|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>","object-view-box":"none|<basic-shape-rect>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|<offset-path>||<coord-box>","offset-position":"normal|auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<opacity-value>",order:"<integer>",orphans:"<integer>",outline:"<'outline-width'>||<'outline-style'>||<'outline-color'>","outline-color":"auto|<color>","outline-offset":"<length>","outline-style":"auto|<outline-line-style>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto|<-non-standard-overflow>","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,\u221E]>","overflow-inline":"visible|hidden|clip|scroll|auto|<-non-standard-overflow>","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto|<-non-standard-overflow>","overflow-y":"visible|hidden|clip|scroll|auto|<-non-standard-overflow>",overlay:"none|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"<'padding-top'>{1,4}","padding-block":"<'padding-top'>{1,2}","padding-block-end":"<'padding-top'>","padding-block-start":"<'padding-top'>","padding-bottom":"<length-percentage [0,\u221E]>","padding-inline":"<'padding-top'>{1,2}","padding-inline-end":"<'padding-top'>","padding-inline-start":"<'padding-top'>","padding-left":"<length-percentage [0,\u221E]>","padding-right":"<length-percentage [0,\u221E]>","padding-top":"<length-percentage [0,\u221E]>",page:"auto|<custom-ident>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky","position-anchor":"auto|none|<anchor-name>","position-area":"none|<position-area>","position-try":"<'position-try-order'>? <'position-try-fallbacks'>","position-try-fallbacks":"none|[[<dashed-ident>||<try-tactic>]|<'position-area'>]#","position-try-order":"normal|<try-size>","position-visibility":"always|[anchors-valid||anchors-visible||no-overflow]","print-color-adjust":"economy|exact",quotes:"none|auto|[<string> <string>]+",r:"<length>|<percentage>","reading-flow":"normal|source-order|flex-visual|flex-flow|grid-rows|grid-columns|grid-order","reading-order":"<integer>",resize:"none|both|horizontal|vertical|block|inline",right:"auto|<length-percentage>|<anchor()>|<anchor-size()>",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-overhang":"auto|none","ruby-position":"[alternate||[over|under]]|inter-character",rx:"<length>|<percentage>",ry:"<length>|<percentage>",scale:"none|[<number>|<percentage>]{1,3}","scroll-behavior":"auto|smooth","scroll-initial-target":"none|nearest","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-end":"<length>","scroll-margin-block-start":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-end":"<length>","scroll-margin-inline-start":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-marker-group":"none|before|after","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","scroll-target-group":"none|auto","scroll-timeline":"[<'scroll-timeline-name'> <'scroll-timeline-axis'>?]#","scroll-timeline-axis":"[block|inline|x|y]#","scroll-timeline-name":"[none|<dashed-ident>]#","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","shape-image-threshold":"<opacity-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]","stop-color":"<'color'>","stop-opacity":"<'opacity'>",stroke:"<paint>","stroke-color":"<color>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<'opacity'>","stroke-width":"<svg-length>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-anchor":"start|middle|end","text-autospace":"normal|<autospace>|auto","text-box":"normal|<'text-box-trim'>||<'text-box-edge'>","text-box-edge":"auto|<text-edge>","text-box-trim":"none|trim-start|trim-end|trim-both","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-inset":"<length>{1,2}|auto","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"auto|[over|under]&&[right|left]?","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-spacing-trim":"space-all|normal|space-first|trim-start","text-transform":"none|[capitalize|uppercase|lowercase]||full-width||full-size-kana|math-auto","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]","text-wrap":"<'text-wrap-mode'>||<'text-wrap-style'>","text-wrap-mode":"wrap|nowrap","text-wrap-style":"auto|balance|stable|pretty","timeline-scope":"none|<dashed-ident>#","timeline-trigger":"none|[<'timeline-trigger-name'> <'timeline-trigger-source'> <'timeline-trigger-range'> ['/' <'timeline-trigger-exit-range'>]?]#","timeline-trigger-name":"none|<dashed-ident>#","timeline-trigger-exit-range":"[<'timeline-trigger-exit-range-start'> <'timeline-trigger-exit-range-end'>?]#","timeline-trigger-exit-range-end":"[auto|normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","timeline-trigger-exit-range-start":"[auto|normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","timeline-trigger-range":"[<'timeline-trigger-range-start'> <'timeline-trigger-range-end'>?]#","timeline-trigger-range-end":"[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","timeline-trigger-range-start":"[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","timeline-trigger-source":"<single-animation-timeline>#",top:"auto|<length-percentage>|<anchor()>|<anchor-size()>","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-behavior":"<transition-behavior-value>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","trigger-scope":"none|all|<dashed-ident>#","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|all","vector-effect":"none|non-scaling-stroke|non-scaling-size|non-rotation|fixed-position","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>","view-timeline":"[<'view-timeline-name'> [<'view-timeline-axis'>||<'view-timeline-inset'>]?]#","view-timeline-axis":"[block|inline|x|y]#","view-timeline-inset":"[[auto|<length-percentage>]{1,2}]#","view-timeline-name":"[none|<dashed-ident>]#","view-transition-class":"none|<custom-ident>+","view-transition-name":"none|<custom-ident>|match-element",visibility:"visible|hidden|collapse","white-space":"normal|pre|pre-wrap|pre-line|<'white-space-collapse'>||<'text-wrap-mode'>","white-space-collapse":"collapse|preserve|preserve-breaks|preserve-spaces|break-spaces",widows:"<integer>",width:"auto|<length-percentage [0,\u221E]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,\u221E]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word|auto-phrase","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>",x:"<length>|<percentage>",y:"<length>|<percentage>","z-index":"auto|<integer>",zoom:"normal|reset|<number [0,\u221E]>||<percentage [0,\u221E]>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<visual-box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto",behavior:"<url>+",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong","position-try-options":"<'position-try-fallbacks'>",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong",speak:"auto|never|always","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]","white-space-trim":"none|discard-before||discard-after||discard-inner"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer [0,\u221E]>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer [0,\u221E]>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},container:{prelude:"[<container-name>]? <container-condition>",descriptors:null},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"auto|block|swap|fallback|optional","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-variation-settings":"normal|[<string> <number>]#","font-weight":"<font-weight-absolute>{1,2}","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},"font-palette-values":{prelude:"<dashed-ident>",descriptors:{"base-palette":"light|dark|<integer [0,\u221E]>","font-family":"<family-name>#","override-colors":"[<integer [0,\u221E]> <color>]#"}},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]","page-orientation":"upright|rotate-left|rotate-right",size:"<length [0,\u221E]>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},"position-try":{prelude:"<dashed-ident>",descriptors:{top:"<'top'>",left:"<'left'>",bottom:"<'bottom'>",right:"<'right'>","inset-block-start":"<'inset-block-start'>","inset-block-end":"<'inset-block-end'>","inset-inline-start":"<'inset-inline-start'>","inset-inline-end":"<'inset-inline-end'>","inset-block":"<'inset-block'>","inset-inline":"<'inset-inline'>",inset:"<'inset'>","margin-top":"<'margin-top'>","margin-left":"<'margin-left'>","margin-bottom":"<'margin-bottom'>","margin-right":"<'margin-right'>","margin-block-start":"<'margin-block-start'>","margin-block-end":"<'margin-block-end'>","margin-inline-start":"<'margin-inline-start'>","margin-inline-end":"<'margin-inline-end'>",margin:"<'margin'>","margin-block":"<'margin-block'>","margin-inline":"<'margin-inline'>",width:"<'width'>",height:"<'height'>","min-width":"<'min-width'>","min-height":"<'min-height'>","max-width":"<'max-width'>","max-height":"<'max-height'>","block-size":"<'block-size'>","inline-size":"<'inline-size'>","min-block-size":"<'min-block-size'>","min-inline-size":"<'min-inline-size'>","max-block-size":"<'max-block-size'>","max-inline-size":"<'max-inline-size'>","align-self":"<'align-self'>|anchor-center","justify-self":"<'justify-self'>|anchor-center"}},property:{prelude:"<custom-property-name>",descriptors:{inherits:"true|false","initial-value":"<declaration-value>?",syntax:"<string>"}},scope:{prelude:"[( <scope-start> )]? [to ( <scope-end> )]?",descriptors:null},"starting-style":{prelude:null,descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},"view-transition":{prelude:null,descriptors:{navigation:"auto|none",types:"none|<custom-ident>+"}},"font-features-values":{prelude:"[<string>|<custom-ident>]+",descriptors:{"font-display":"auto|block|swap|fallback|optional"}}}}});var cp={};ye(cp,{generate:()=>gP,name:()=>dP,parse:()=>lp,structure:()=>fP});function xl(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===Lr||r===Gn)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)_t(this.charCodeAt(n))||this.error("Integer is expected",n)}function bi(e){return xl.call(this,0,e)}function po(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case hl:n="N is expected";break;case Gn:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+e)}}function ap(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10)if(this.isDelim(Lr,e)||this.isDelim(Gn,e)){t=this.isDelim(Lr,e)?Lr:Gn;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),bi.call(this,Oo))}else return null;return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==Lr&&n!==Gn&&this.error("Number sign is expected")),bi.call(this,t!==0),t===Gn?"-"+this.consume(10):this.consume(10)}function lp(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)bi.call(this,pP),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Gn))switch(t="-1",po.call(this,1,hl),this.tokenEnd-this.tokenStart){case 2:this.next(),n=ap.call(this);break;case 3:po.call(this,2,Gn),this.next(),this.skipSC(),bi.call(this,Oo),n="-"+this.consume(10);break;default:po.call(this,2,Gn),xl.call(this,3,Oo),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(Lr)&&this.lookupType(1)===1){let r=0;switch(t="1",this.isDelim(Lr)&&(r=1,this.next()),po.call(this,0,hl),this.tokenEnd-this.tokenStart){case 1:this.next(),n=ap.call(this);break;case 2:po.call(this,1,Gn),this.next(),this.skipSC(),bi.call(this,Oo),n="-"+this.consume(10);break;default:po.call(this,1,Gn),xl.call(this,2,Oo),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),o=r===Lr||r===Gn,i=this.tokenStart+o;for(;i<this.tokenEnd&&_t(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),po.call(this,i-this.tokenStart,hl),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),n=ap.call(this)):(po.call(this,i-this.tokenStart+1,Gn),i+2===this.tokenEnd?(this.next(),this.skipSC(),bi.call(this,Oo),n="-"+this.consume(10)):(xl.call(this,i-this.tokenStart+2,Oo),this.next(),n=this.substrToCursor(i+1)))}else this.error();return t!==null&&t.charCodeAt(0)===Lr&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===Lr&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function gP(e){if(e.a){let t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){let n=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}var Lr,Gn,hl,Oo,pP,dP,fP,up=$(()=>{"use strict";nr();Lr=43,Gn=45,hl=110,Oo=!0,pP=!1;dP="AnPlusB",fP={a:[String,null],b:[String,null]}});var dp={};ye(dp,{generate:()=>bP,name:()=>hP,parse:()=>pp,structure:()=>yP,walkContext:()=>xP});function u0(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function mP(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}function pp(e=!1){let t=this.tokenStart,n,r,o=null,i=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?o=this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),u0):o=u0.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block=="function"?i=this.atrule[r].block.call(this,e):i=this.Block(mP.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:o,block:i}}function bP(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var hP,xP,yP,fp=$(()=>{"use strict";hP="Atrule",xP="atrule",yP={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]}});var mp={};ye(mp,{generate:()=>kP,name:()=>SP,parse:()=>gp,structure:()=>vP,walkContext:()=>wP});function gp(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude=="function"?t=this.atrule[e].prelude.call(this):t=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function kP(e){this.children(e)}var SP,wP,vP,hp=$(()=>{"use strict";SP="AtrulePrelude",wP="atrulePrelude",vP={children:[[]]}});var bp={};ye(bp,{generate:()=>LP,name:()=>AP,parse:()=>yp,structure:()=>PP});function FP(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(p0)?(t=!0,this.next()):this.isDelim(xp)||this.eat(1),this.isDelim(xp)?this.charCodeAt(this.tokenStart+1)!==yl?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function EP(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==yl&&t!==IP&&t!==TP&&t!==CP&&t!==p0&&t!==xp&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==yl&&(this.isDelim(yl)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}function yp(){let e=this.tokenStart,t,n=null,r=null,o=null;return this.eat(19),this.skipSC(),t=FP.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=EP.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:o}}function LP(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]")}var CP,p0,yl,TP,xp,IP,AP,PP,Sp=$(()=>{"use strict";CP=36,p0=42,yl=61,TP=94,xp=124,IP=126;AP="AttributeSelector",PP={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]}});var vp={};ye(vp,{generate:()=>NP,name:()=>DP,parse:()=>wp,structure:()=>zP,walkContext:()=>RP});function g0(){return this.Raw(null,!0)}function d0(){return this.parseWithFallback(this.Rule,g0)}function f0(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function BP(){if(this.tokenType===17)return f0.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,f0);return this.tokenType===17&&this.next(),e}function wp(e){let t=e?BP:d0,n=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),g0));break;default:e&&this.isDelim(MP)?r.push(d0.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function NP(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}var MP,DP,RP,zP,kp=$(()=>{"use strict";MP=38;DP="Block",RP="block",zP={children:[["Atrule","Rule","Declaration"]]}});var Tp={};ye(Tp,{generate:()=>$P,name:()=>OP,parse:()=>Cp,structure:()=>_P});function Cp(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function $P(e){this.token(9,"["),this.children(e),this.token(9,"]")}var OP,_P,Ip=$(()=>{"use strict";OP="Brackets",_P={children:[[]]}});var Ep={};ye(Ep,{generate:()=>HP,name:()=>UP,parse:()=>Fp,structure:()=>jP});function Fp(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function HP(){this.token(15,"-->")}var UP,jP,Ap=$(()=>{"use strict";UP="CDC",jP=[]});var Lp={};ye(Lp,{generate:()=>GP,name:()=>WP,parse:()=>Pp,structure:()=>VP});function Pp(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function GP(){this.token(14,"<!--")}var WP,VP,Mp=$(()=>{"use strict";WP="CDO",VP=[]});var Dp={};ye(Dp,{generate:()=>XP,name:()=>YP,parse:()=>Bp,structure:()=>KP});function Bp(){return this.eatDelim(qP),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function XP(e){this.token(9,"."),this.token(1,e.name)}var qP,YP,KP,Rp=$(()=>{"use strict";qP=46,YP="ClassSelector",KP={name:String}});var Np={};ye(Np,{generate:()=>n2,name:()=>e2,parse:()=>zp,structure:()=>t2});function zp(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case JP:case QP:case ZP:this.next();break;case m0:this.next(),this.eatIdent("deep"),this.eatDelim(m0);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e);break}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function n2(e){this.tokenize(e.name)}var QP,m0,JP,ZP,e2,t2,Op=$(()=>{"use strict";QP=43,m0=47,JP=62,ZP=126,e2="Combinator",t2={name:String}});var $p={};ye($p,{generate:()=>a2,name:()=>i2,parse:()=>_p,structure:()=>s2});function _p(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===r2&&this.charCodeAt(t-1)===o2&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function a2(e){this.token(25,"/*"+e.value+"*/")}var r2,o2,i2,s2,Up=$(()=>{"use strict";r2=42,o2=47,i2="Comment",s2={value:String}});var Hp={};ye(Hp,{generate:()=>d2,name:()=>c2,parse:()=>jp,structure:()=>u2});function h0(e){return this.lookupTypeNonSC(1)===1&&l2.has(this.lookupTypeNonSC(2))?this.Feature(e):this.FeatureRange(e)}function jp(e="media"){let t=this.createList();e:for(;!this.eof;)switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t.push(this.Identifier());break;case 21:{let n=this.parseWithFallback(()=>p2[e].call(this,e),()=>null);n||(n=this.parseWithFallback(()=>{this.eat(21);let r=this.Condition(e);return this.eat(22),r},()=>this.GeneralEnclosed(e))),t.push(n);break}case 2:{let n=this.parseWithFallback(()=>this.FeatureFunction(e),()=>null);n||(n=this.GeneralEnclosed(e)),t.push(n);break}default:break e}return t.isEmpty&&this.error("Condition is expected"),{type:"Condition",loc:this.getLocationFromList(t),kind:e,children:t}}function d2(e){e.children.forEach(t=>{t.type==="Condition"?(this.token(21,"("),this.node(t),this.token(22,")")):this.node(t)})}var l2,c2,u2,p2,Wp=$(()=>{"use strict";l2=new Set([16,22,0]),c2="Condition",u2={kind:String,children:[["Identifier","Feature","FeatureFunction","FeatureRange","SupportsDeclaration"]]};p2={media:h0,container:h0,supports(){return this.SupportsDeclaration()}}});var Gp={};ye(Gp,{generate:()=>C2,name:()=>w2,parse:()=>Vp,structure:()=>k2,walkContext:()=>v2});function y2(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function b2(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function S2(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(y0)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}function Vp(){let e=this.tokenStart,t=this.tokenIndex,n=T2.call(this),r=ol(n),o=r?this.parseCustomProperty:this.parseValue,i=r?b2:y2,s=!1,a;this.skipSC(),this.eat(16);let u=this.tokenIndex;if(r||this.skipSC(),o?a=this.parseWithFallback(S2,i):a=i.call(this,this.tokenIndex),r&&a.type==="Value"&&a.children.isEmpty){for(let c=u-this.tokenIndex;c<=0;c++)if(this.lookupType(c)===13){a.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(y0)&&(s=I2.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:s,property:n,value:a}}function C2(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important))}function T2(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case h2:case g2:case x2:case f2:case m2:this.next();break;case x0:this.next(),this.isDelim(x0)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function I2(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"?!0:e}var y0,f2,g2,m2,h2,x2,x0,w2,v2,k2,qp=$(()=>{"use strict";il();y0=33,f2=35,g2=36,m2=38,h2=42,x2=43,x0=47;w2="Declaration",v2="declaration",k2={important:[Boolean,String],property:String,value:["Value","Raw"]}});var Xp={};ye(Xp,{generate:()=>P2,name:()=>E2,parse:()=>Kp,structure:()=>A2});function Yp(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function Kp(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Yp));break;default:this.isDelim(F2)?e.push(this.parseWithFallback(this.Rule,Yp)):e.push(this.parseWithFallback(this.Declaration,Yp))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function P2(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}var F2,E2,A2,Qp=$(()=>{"use strict";F2=38;E2="DeclarationList",A2={children:[["Declaration","Atrule","Rule"]]}});var Zp={};ye(Zp,{generate:()=>B2,name:()=>L2,parse:()=>Jp,structure:()=>M2});function Jp(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function B2(e){this.token(12,e.value+e.unit)}var L2,M2,ed=$(()=>{"use strict";L2="Dimension",M2={value:String,unit:String}});var nd={};ye(nd,{generate:()=>N2,name:()=>R2,parse:()=>td,structure:()=>z2});function td(e){let t=this.tokenStart,n,r=null;if(this.eat(21),this.skipSC(),n=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?r=this.Ratio():r=this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;case 2:r=this.parseWithFallback(()=>{let o=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(D2)&&this.error(),o},()=>this.Ratio());break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eof||this.eat(22),{type:"Feature",loc:this.getLocation(t,this.tokenStart),kind:e,name:n,value:r}}function N2(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var D2,R2,z2,rd=$(()=>{"use strict";D2=47,R2="Feature",z2={kind:String,name:String,value:["Identifier","Number","Dimension","Ratio","Function",null]}});var id={};ye(id,{generate:()=>U2,name:()=>O2,parse:()=>od,structure:()=>_2});function $2(e,t){let r=(this.features[e]||{})[t];return typeof r!="function"&&this.error(`Unknown feature ${t}()`),r}function od(e="unknown"){let t=this.tokenStart,n=this.consumeFunctionName(),r=$2.call(this,e,n.toLowerCase());this.skipSC();let o=this.parseWithFallback(()=>{let i=this.tokenIndex,s=r.call(this);return this.eof===!1&&this.isBalanceEdge(i)===!1&&this.error(),s},()=>this.Raw(null,!1));return this.eof||this.eat(22),{type:"FeatureFunction",loc:this.getLocation(t,this.tokenStart),kind:e,feature:n,value:o}}function U2(e){this.token(2,e.feature+"("),this.node(e.value),this.token(22,")")}var O2,_2,sd=$(()=>{"use strict";O2="FeatureFunction",_2={kind:String,feature:String,value:["Declaration","Selector"]}});var cd={};ye(cd,{generate:()=>G2,name:()=>W2,parse:()=>ld,structure:()=>V2});function ad(){switch(this.skipSC(),this.tokenType){case 10:return this.isDelim(b0,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case 12:return this.Dimension();case 1:return this.Identifier();case 2:return this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(b0)&&this.error(),e},()=>this.Ratio());default:this.error("Number, dimension, ratio or identifier is expected")}}function w0(e){if(this.skipSC(),this.isDelim(j2)||this.isDelim(H2)){let t=this.source[this.tokenStart];return this.next(),this.isDelim(S0)?(this.next(),t+"="):t}if(this.isDelim(S0))return"=";this.error(`Expected ${e?'":", ':""}"<", ">", "=" or ")"`)}function ld(e="unknown"){let t=this.tokenStart;this.skipSC(),this.eat(21);let n=ad.call(this),r=w0.call(this,n.type==="Identifier"),o=ad.call(this),i=null,s=null;return this.lookupNonWSType(0)!==22&&(i=w0.call(this),s=ad.call(this)),this.skipSC(),this.eat(22),{type:"FeatureRange",loc:this.getLocation(t,this.tokenStart),kind:e,left:n,leftComparison:r,middle:o,rightComparison:i,right:s}}function G2(e){this.token(21,"("),this.node(e.left),this.tokenize(e.leftComparison),this.node(e.middle),e.right&&(this.tokenize(e.rightComparison),this.node(e.right)),this.token(22,")")}var b0,j2,S0,H2,W2,V2,ud=$(()=>{"use strict";b0=47,j2=60,S0=61,H2=62,W2="FeatureRange",V2={kind:String,left:["Identifier","Number","Dimension","Ratio","Function"],leftComparison:String,middle:["Identifier","Number","Dimension","Ratio","Function"],rightComparison:[String,null],right:["Identifier","Number","Dimension","Ratio","Function",null]}});var dd={};ye(dd,{generate:()=>X2,name:()=>q2,parse:()=>pd,structure:()=>K2,walkContext:()=>Y2});function pd(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),o=r.toLowerCase(),i;return i=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:r,children:i}}function X2(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var q2,Y2,K2,fd=$(()=>{"use strict";q2="Function",Y2="function",K2={name:String,children:[[]]}});var md={};ye(md,{generate:()=>Z2,name:()=>Q2,parse:()=>gd,structure:()=>J2});function gd(e){let t=this.tokenStart,n=null;this.tokenType===2?n=this.consumeFunctionName():this.eat(21);let r=this.parseWithFallback(()=>{let o=this.tokenIndex,i=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(o)===!1&&this.error(),i},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(22),{type:"GeneralEnclosed",loc:this.getLocation(t,this.tokenStart),kind:e,function:n,children:r}}function Z2(e){e.function?this.token(2,e.function+"("):this.token(21,"("),this.children(e),this.token(22,")")}var Q2,J2,hd=$(()=>{"use strict";Q2="GeneralEnclosed",J2={kind:String,function:[String,null],children:[[]]}});var yd={};ye(yd,{generate:()=>rL,name:()=>tL,parse:()=>xd,structure:()=>nL,xxx:()=>eL});function xd(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function rL(e){this.token(4,"#"+e.value)}var eL,tL,nL,bd=$(()=>{"use strict";eL="XXX",tL="Hash",nL={value:String}});var wd={};ye(wd,{generate:()=>sL,name:()=>oL,parse:()=>Sd,structure:()=>iL});function Sd(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function sL(e){this.token(1,e.name)}var oL,iL,vd=$(()=>{"use strict";oL="Identifier",iL={name:String}});var Cd={};ye(Cd,{generate:()=>cL,name:()=>aL,parse:()=>kd,structure:()=>lL});function kd(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function cL(e){this.token(9,"#"+e.name)}var aL,lL,Td=$(()=>{"use strict";aL="IdSelector",lL={name:String}});var Fd={};ye(Fd,{generate:()=>fL,name:()=>pL,parse:()=>Id,structure:()=>dL});function Id(){let e=this.tokenStart,t=this.consume(1);for(;this.isDelim(uL);)this.eat(9),t+="."+this.consume(1);return{type:"Layer",loc:this.getLocation(e,this.tokenStart),name:t}}function fL(e){this.tokenize(e.name)}var uL,pL,dL,Ed=$(()=>{"use strict";uL=46,pL="Layer",dL={name:String}});var Pd={};ye(Pd,{generate:()=>hL,name:()=>gL,parse:()=>Ad,structure:()=>mL});function Ad(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.Layer()),this.lookupTypeNonSC(0)===18);)this.skipSC(),this.next(),this.skipSC();return{type:"LayerList",loc:this.getLocationFromList(e),children:e}}function hL(e){this.children(e,()=>this.token(18,","))}var gL,mL,Ld=$(()=>{"use strict";gL="LayerList",mL={children:[["Layer"]]}});var Bd={};ye(Bd,{generate:()=>bL,name:()=>xL,parse:()=>Md,structure:()=>yL});function Md(){let e=this.tokenStart,t=null,n=null,r=null;if(this.skipSC(),this.tokenType===1&&this.lookupTypeNonSC(1)!==21){let o=this.consume(1),i=o.toLowerCase();switch(i==="not"||i==="only"?(this.skipSC(),t=i,n=this.consume(1)):n=o,this.lookupTypeNonSC(0)){case 1:{this.skipSC(),this.eatIdent("and"),r=this.Condition("media");break}case 23:case 17:case 18:case 0:break;default:this.error("Identifier or parenthesis is expected")}}else switch(this.tokenType){case 1:case 21:case 2:{r=this.Condition("media");break}case 23:case 17:case 0:break;default:this.error("Identifier or parenthesis is expected")}return{type:"MediaQuery",loc:this.getLocation(e,this.tokenStart),modifier:t,mediaType:n,condition:r}}function bL(e){e.mediaType?(e.modifier&&this.token(1,e.modifier),this.token(1,e.mediaType),e.condition&&(this.token(1,"and"),this.node(e.condition))):e.condition&&this.node(e.condition)}var xL,yL,Dd=$(()=>{"use strict";xL="MediaQuery",yL={modifier:[String,null],mediaType:[String,null],condition:["Condition",null]}});var zd={};ye(zd,{generate:()=>vL,name:()=>SL,parse:()=>Rd,structure:()=>wL});function Rd(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function vL(e){this.children(e,()=>this.token(18,","))}var SL,wL,Nd=$(()=>{"use strict";SL="MediaQueryList",wL={children:[["MediaQuery"]]}});var _d={};ye(_d,{generate:()=>IL,name:()=>CL,parse:()=>Od,structure:()=>TL});function Od(){let e=this.tokenStart;return this.eatDelim(kL),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function IL(){this.token(9,"&")}var kL,CL,TL,$d=$(()=>{"use strict";kL=38,CL="NestingSelector",TL={}});var jd={};ye(jd,{generate:()=>AL,name:()=>FL,parse:()=>Ud,structure:()=>EL});function Ud(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:r,selector:n}}function AL(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}var FL,EL,Hd=$(()=>{"use strict";FL="Nth",EL={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]}});var Vd={};ye(Vd,{generate:()=>ML,name:()=>PL,parse:()=>Wd,structure:()=>LL});function Wd(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function ML(e){this.token(10,e.value)}var PL,LL,Gd=$(()=>{"use strict";PL="Number",LL={value:String}});var Yd={};ye(Yd,{generate:()=>RL,name:()=>BL,parse:()=>qd,structure:()=>DL});function qd(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function RL(e){this.tokenize(e.value)}var BL,DL,Kd=$(()=>{"use strict";BL="Operator",DL={value:String}});var Qd={};ye(Qd,{generate:()=>OL,name:()=>zL,parse:()=>Xd,structure:()=>NL});function Xd(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function OL(e){this.token(21,"("),this.children(e),this.token(22,")")}var zL,NL,Jd=$(()=>{"use strict";zL="Parentheses",NL={children:[[]]}});var ef={};ye(ef,{generate:()=>UL,name:()=>_L,parse:()=>Zd,structure:()=>$L});function Zd(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function UL(e){this.token(11,e.value+"%")}var _L,$L,tf=$(()=>{"use strict";_L="Percentage",$L={value:String}});var rf={};ye(rf,{generate:()=>VL,name:()=>jL,parse:()=>nf,structure:()=>WL,walkContext:()=>HL});function nf(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function VL(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var jL,HL,WL,of=$(()=>{"use strict";jL="PseudoClassSelector",HL="function",WL={name:String,children:[["Raw"],null]}});var af={};ye(af,{generate:()=>KL,name:()=>GL,parse:()=>sf,structure:()=>YL,walkContext:()=>qL});function sf(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function KL(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var GL,qL,YL,lf=$(()=>{"use strict";GL="PseudoElementSelector",qL="function",YL={name:String,children:[["Raw"],null]}});var uf={};ye(uf,{generate:()=>JL,name:()=>XL,parse:()=>cf,structure:()=>QL});function k0(){switch(this.skipSC(),this.tokenType){case 10:return this.Number();case 2:return this.Function(this.readSequence,this.scope.Value);default:this.error("Number of function is expected")}}function cf(){let e=this.tokenStart,t=k0.call(this),n=null;return this.skipSC(),this.isDelim(v0)&&(this.eatDelim(v0),n=k0.call(this)),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function JL(e){this.node(e.left),this.token(9,"/"),e.right?this.node(e.right):this.node(10,1)}var v0,XL,QL,pf=$(()=>{"use strict";v0=47;XL="Ratio",QL={left:["Number","Function"],right:["Number","Function",null]}});var ff={};ye(ff,{generate:()=>nM,name:()=>eM,parse:()=>df,structure:()=>tM});function ZL(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function df(e,t){let n=this.getTokenStart(this.tokenIndex),r;return this.skipUntilBalanced(this.tokenIndex,e||this.consumeUntilBalanceEnd),t&&this.tokenStart>n?r=ZL.call(this):r=this.tokenStart,{type:"Raw",loc:this.getLocation(n,r),value:this.substring(n,r)}}function nM(e){this.tokenize(e.value)}var eM,tM,gf=$(()=>{"use strict";eM="Raw",tM={value:String}});var hf={};ye(hf,{generate:()=>aM,name:()=>oM,parse:()=>mf,structure:()=>sM,walkContext:()=>iM});function C0(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function rM(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}function mf(){let e=this.tokenIndex,t=this.tokenStart,n,r;return this.parseRulePrelude?n=this.parseWithFallback(rM,C0):n=C0.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function aM(e){this.node(e.prelude),this.node(e.block)}var oM,iM,sM,xf=$(()=>{"use strict";oM="Rule",iM="rule",sM={prelude:["SelectorList","Raw"],block:["Block"]}});var bf={};ye(bf,{generate:()=>uM,name:()=>lM,parse:()=>yf,structure:()=>cM});function yf(){let e=null,t=null;this.skipSC();let n=this.tokenStart;return this.tokenType===21&&(this.next(),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),this.lookupNonWSType(0)===1&&(this.skipSC(),this.eatIdent("to"),this.skipSC(),this.eat(21),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),{type:"Scope",loc:this.getLocation(n,this.tokenStart),root:e,limit:t}}function uM(e){e.root&&(this.token(21,"("),this.node(e.root),this.token(22,")")),e.limit&&(this.token(1,"to"),this.token(21,"("),this.node(e.limit),this.token(22,")"))}var lM,cM,Sf=$(()=>{"use strict";lM="Scope",cM={root:["SelectorList","Raw",null],limit:["SelectorList","Raw",null]}});var vf={};ye(vf,{generate:()=>fM,name:()=>pM,parse:()=>wf,structure:()=>dM});function wf(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function fM(e){this.children(e)}var pM,dM,kf=$(()=>{"use strict";pM="Selector",dM={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator"]]}});var Tf={};ye(Tf,{generate:()=>xM,name:()=>gM,parse:()=>Cf,structure:()=>hM,walkContext:()=>mM});function Cf(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function xM(e){this.children(e,()=>this.token(18,","))}var gM,mM,hM,If=$(()=>{"use strict";gM="SelectorList",mM="selector",hM={children:[["Selector","Raw"]]}});function bl(e){let t=e.length,n=e.charCodeAt(0),r=n===T0||n===I0?1:0,o=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,i="";for(let s=r;s<=o;s++){let a=e.charCodeAt(s);if(a===Ff){if(s===o){s!==t-1&&(i=e.substr(s+1));break}if(a=e.charCodeAt(++s),An(Ff,a)){let u=s-1,c=Ur(e,u);s=c-1,i+=ja(e.substring(u+1,c))}else a===13&&e.charCodeAt(s+1)===10&&s++}else i+=e[s]}return i}function F0(e,t){let n=t?"'":'"',r=t?I0:T0,o="",i=!1;for(let s=0;s<e.length;s++){let a=e.charCodeAt(s);if(a===0){o+="\uFFFD";continue}if(a<=31||a===127){o+="\\"+a.toString(16),i=!0;continue}a===r||a===Ff?(o+="\\"+e.charAt(s),i=!1):(i&&(Pn(a)||Ar(a))&&(o+=" "),o+=e.charAt(s),i=!1)}return n+o+n}var Ff,T0,I0,Sl=$(()=>{"use strict";nr();Ff=92,T0=34,I0=39});var Af={};ye(Af,{generate:()=>SM,name:()=>yM,parse:()=>Ef,structure:()=>bM});function Ef(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:bl(this.consume(5))}}function SM(e){this.token(5,F0(e.value))}var yM,bM,Pf=$(()=>{"use strict";Sl();yM="String",bM={value:String}});var Mf={};ye(Mf,{generate:()=>TM,name:()=>vM,parse:()=>Lf,structure:()=>CM,walkContext:()=>kM});function A0(){return this.Raw(null,!1)}function Lf(){let e=this.tokenStart,t=this.createList(),n;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==wM){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,A0);break;default:n=this.parseWithFallback(this.Rule,A0)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function TM(e){this.children(e)}var wM,vM,kM,CM,Bf=$(()=>{"use strict";wM=33;vM="StyleSheet",kM="stylesheet",CM={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]}});var Rf={};ye(Rf,{generate:()=>EM,name:()=>IM,parse:()=>Df,structure:()=>FM});function Df(){let e=this.tokenStart;this.eat(21),this.skipSC();let t=this.Declaration();return this.eof||this.eat(22),{type:"SupportsDeclaration",loc:this.getLocation(e,this.tokenStart),declaration:t}}function EM(e){this.token(21,"("),this.node(e.declaration),this.token(22,")")}var IM,FM,zf=$(()=>{"use strict";IM="SupportsDeclaration",FM={declaration:"Declaration"}});var _f={};ye(_f,{generate:()=>MM,name:()=>PM,parse:()=>Of,structure:()=>LM});function Nf(){this.tokenType!==1&&this.isDelim(AM)===!1&&this.error("Identifier or asterisk is expected"),this.next()}function Of(){let e=this.tokenStart;return this.isDelim(P0)?(this.next(),Nf.call(this)):(Nf.call(this),this.isDelim(P0)&&(this.next(),Nf.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function MM(e){this.tokenize(e.name)}var AM,P0,PM,LM,$f=$(()=>{"use strict";AM=42,P0=124;PM="TypeSelector",LM={name:String}});var Hf={};ye(Hf,{generate:()=>NM,name:()=>RM,parse:()=>jf,structure:()=>zM});function Fs(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let o=this.charCodeAt(r);if(o===M0&&t&&n!==0)return Fs.call(this,e+n+1,!1),-1;Pn(o)||this.error(t&&n!==0?"Hyphen minus"+(n<6?" or hex digit":"")+" is expected":n<6?"Hex digit is expected":"Unexpected input",r),++n>6&&this.error("Too many hex digits",r)}return this.next(),n}function wl(e){let t=0;for(;this.isDelim(Uf);)++t>e&&this.error("Too many question marks"),this.next()}function BM(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===L0?"Plus sign":"Hyphen minus")+" is expected")}function DM(){let e=0;switch(this.tokenType){case 10:if(e=Fs.call(this,1,!0),this.isDelim(Uf)){wl.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){BM.call(this,M0),Fs.call(this,1,!1);break}break;case 12:e=Fs.call(this,1,!0),e>0&&wl.call(this,6-e);break;default:if(this.eatDelim(L0),this.tokenType===1){e=Fs.call(this,0,!0),e>0&&wl.call(this,6-e);break}if(this.isDelim(Uf)){this.next(),wl.call(this,5);break}this.error("Hex digit or question mark is expected")}}function jf(){let e=this.tokenStart;return this.eatIdent("u"),DM.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function NM(e){this.tokenize(e.value)}var L0,M0,Uf,RM,zM,Wf=$(()=>{"use strict";nr();L0=43,M0=45,Uf=63;RM="UnicodeRange",zM={value:String}});function D0(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===B0?t-2:t-1,o="";for(;n<r&&Ar(e.charCodeAt(n));)n++;for(;n<r&&Ar(e.charCodeAt(r));)r--;for(let i=n;i<=r;i++){let s=e.charCodeAt(i);if(s===Vf){if(i===r){i!==t-1&&(o=e.substr(i+1));break}if(s=e.charCodeAt(++i),An(Vf,s)){let a=i-1,u=Ur(e,a);i=u-1,o+=ja(e.substring(a+1,u))}else s===13&&e.charCodeAt(i+1)===10&&i++}else o+=e[i]}return o}function R0(e){let t="",n=!1;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===0){t+="\uFFFD";continue}if(o<=31||o===127){t+="\\"+o.toString(16),n=!0;continue}o===OM||o===Vf||o===_M||o===$M||o===UM||o===B0?(t+="\\"+e.charAt(r),n=!1):(n&&Pn(o)&&(t+=" "),t+=e.charAt(r),n=!1)}return"url("+t+")"}var OM,Vf,_M,$M,UM,B0,Gf=$(()=>{"use strict";nr();OM=32,Vf=92,_M=34,$M=39,UM=40,B0=41});var Yf={};ye(Yf,{generate:()=>WM,name:()=>jM,parse:()=>qf,structure:()=>HM});function qf(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=D0(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=bl(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function WM(e){this.token(7,R0(e.value))}var jM,HM,Kf=$(()=>{"use strict";Gf();Sl();jM="Url",HM={value:String}});var Qf={};ye(Qf,{generate:()=>qM,name:()=>VM,parse:()=>Xf,structure:()=>GM});function Xf(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function qM(e){this.children(e)}var VM,GM,Jf=$(()=>{"use strict";VM="Value",GM={children:[[]]}});var eg={};ye(eg,{generate:()=>QM,name:()=>KM,parse:()=>Zf,structure:()=>XM});function Zf(){return this.eat(13),YM}function QM(e){this.token(13,e.value)}var YM,KM,XM,tg=$(()=>{"use strict";YM=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),KM="WhiteSpace",XM={value:String}});var Es={};ye(Es,{AnPlusB:()=>cp,Atrule:()=>dp,AtrulePrelude:()=>mp,AttributeSelector:()=>bp,Block:()=>vp,Brackets:()=>Tp,CDC:()=>Ep,CDO:()=>Lp,ClassSelector:()=>Dp,Combinator:()=>Np,Comment:()=>$p,Condition:()=>Hp,Declaration:()=>Gp,DeclarationList:()=>Xp,Dimension:()=>Zp,Feature:()=>nd,FeatureFunction:()=>id,FeatureRange:()=>cd,Function:()=>dd,GeneralEnclosed:()=>md,Hash:()=>yd,IdSelector:()=>Cd,Identifier:()=>wd,Layer:()=>Fd,LayerList:()=>Pd,MediaQuery:()=>Bd,MediaQueryList:()=>zd,NestingSelector:()=>_d,Nth:()=>jd,Number:()=>Vd,Operator:()=>Yd,Parentheses:()=>Qd,Percentage:()=>ef,PseudoClassSelector:()=>rf,PseudoElementSelector:()=>af,Ratio:()=>uf,Raw:()=>ff,Rule:()=>hf,Scope:()=>bf,Selector:()=>vf,SelectorList:()=>Tf,String:()=>Af,StyleSheet:()=>Mf,SupportsDeclaration:()=>Rf,TypeSelector:()=>_f,UnicodeRange:()=>Hf,Url:()=>Yf,Value:()=>Qf,WhiteSpace:()=>eg});var ng=$(()=>{"use strict";up();fp();hp();Sp();kp();Ip();Ap();Mp();Rp();Op();Up();Wp();qp();Qp();ed();rd();sd();ud();fd();hd();bd();vd();Td();Ed();Ld();Dd();Nd();$d();Hd();Gd();Kd();Jd();tf();of();lf();pf();gf();xf();Sf();kf();If();Pf();Bf();zf();$f();Wf();Kf();Jf();tg()});var N0,O0=$(()=>{"use strict";sl();c0();ng();N0={generic:!0,cssWideKeywords:gi,...l0,node:Es}});function As(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,nB)&&this.cmpChar(this.tokenStart+1,_0)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===tB||t===ZM||t===_0||t===eB)return this.Operator();t===JM&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var JM,ZM,_0,eB,tB,nB,rg=$(()=>{"use strict";JM=35,ZM=42,_0=43,eB=45,tB=47,nB=117});var $0,U0=$(()=>{"use strict";rg();$0={getNode:As}});function pB(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function dB(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===j0&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case sB:case lB:case uB:case aB:return this.Combinator();case j0:return this.ClassSelector();case iB:case cB:return this.TypeSelector();case rB:return this.IdSelector();case oB:return this.NestingSelector()}break}}}var rB,oB,iB,sB,aB,j0,lB,cB,uB,H0,W0=$(()=>{"use strict";rB=35,oB=38,iB=42,sB=43,aB=47,j0=46,lB=62,cB=124,uB=126;H0={onWhiteSpace:pB,getNode:dB}});function V0(){return this.createSingleNodeList(this.Raw(null,!1))}var G0=$(()=>{"use strict"});function q0(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type==="Value"&&n.children.isEmpty){for(let r=t-this.tokenIndex;r<=0;r++)if(this.lookupType(r)===13){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}e.push(n)}return e}var Y0=$(()=>{"use strict"});function K0(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}var X0,Q0=$(()=>{"use strict";rg();G0();Y0();X0={getNode:As,onWhiteSpace(e,t){K0(e)&&(e.value=" "+e.value),K0(t.last)&&(t.last.value+=" ")},expression:V0,var:q0}});var og={};ye(og,{AtrulePrelude:()=>$0,Selector:()=>H0,Value:()=>X0});var J0=$(()=>{"use strict";U0();W0();Q0()});var fB,Z0,eS=$(()=>{"use strict";fB=new Set(["none","and","not","or"]),Z0={parse:{prelude(){let e=this.createList();if(this.tokenType===1){let t=this.substring(this.tokenStart,this.tokenEnd);fB.has(t.toLowerCase())||e.push(this.Identifier())}return e.push(this.Condition("container")),e},block(e=!1){return this.Block(e)}}}});var tS,nS=$(()=>{"use strict";tS={parse:{prelude:null,block(){return this.Block(!0)}}}});function ig(e,t){return this.parseWithFallback(()=>{try{return e.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==22&&this.error()}},t||(()=>this.Raw(null,!0)))}var rS,oS,iS=$(()=>{"use strict";rS={layer(){this.skipSC();let e=this.createList(),t=ig.call(this,this.Layer);return(t.type!=="Raw"||t.value!=="")&&e.push(t),e},supports(){this.skipSC();let e=this.createList(),t=ig.call(this,this.Declaration,()=>ig.call(this,()=>this.Condition("supports")));return(t.type!=="Raw"||t.value!=="")&&e.push(t),e}},oS={parse:{prelude(){let e=this.createList();switch(this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return this.skipSC(),this.tokenType===1&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer")?e.push(this.Identifier()):this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer(")&&e.push(this.Function(null,rS)),this.skipSC(),this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"supports(")&&e.push(this.Function(null,rS)),(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}}});var sS,aS=$(()=>{"use strict";sS={parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}}});var lS,cS=$(()=>{"use strict";lS={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}}});var uS,pS=$(()=>{"use strict";uS={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}}});var dS,fS=$(()=>{"use strict";dS={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}}});var gS,mS=$(()=>{"use strict";gS={parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(e=!1){return this.Block(e)}}}});var hS,xS=$(()=>{"use strict";hS={parse:{prelude:null,block(e=!1){return this.Block(e)}}}});var yS,bS=$(()=>{"use strict";yS={parse:{prelude(){return this.createSingleNodeList(this.Condition("supports"))},block(e=!1){return this.Block(e)}}}});var SS,wS=$(()=>{"use strict";eS();nS();iS();aS();cS();pS();fS();mS();xS();bS();SS={container:Z0,"font-face":tS,import:oS,layer:sS,media:lS,nest:uS,page:dS,scope:gS,"starting-style":hS,supports:yS}});function vS(){let e=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 1:e.push(this.Identifier());break;case 5:e.push(this.String());break;case 18:e.push(this.Operator());break;case 22:break e;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return e}var kS=$(()=>{"use strict"});var _o,sg,gB,mB,vl,CS,TS=$(()=>{"use strict";kS();_o={parse(){return this.createSingleNodeList(this.SelectorList())}},sg={parse(){return this.createSingleNodeList(this.Selector())}},gB={parse(){return this.createSingleNodeList(this.Identifier())}},mB={parse:vS},vl={parse(){return this.createSingleNodeList(this.Nth())}},CS={dir:gB,has:_o,lang:mB,matches:_o,is:_o,"-moz-any":_o,"-webkit-any":_o,where:_o,not:_o,"nth-child":vl,"nth-last-child":vl,"nth-last-of-type":vl,"nth-of-type":vl,slotted:sg,host:sg,"host-context":sg}});var ag={};ye(ag,{AnPlusB:()=>lp,Atrule:()=>pp,AtrulePrelude:()=>gp,AttributeSelector:()=>yp,Block:()=>wp,Brackets:()=>Cp,CDC:()=>Fp,CDO:()=>Pp,ClassSelector:()=>Bp,Combinator:()=>zp,Comment:()=>_p,Condition:()=>jp,Declaration:()=>Vp,DeclarationList:()=>Kp,Dimension:()=>Jp,Feature:()=>td,FeatureFunction:()=>od,FeatureRange:()=>ld,Function:()=>pd,GeneralEnclosed:()=>gd,Hash:()=>xd,IdSelector:()=>kd,Identifier:()=>Sd,Layer:()=>Id,LayerList:()=>Ad,MediaQuery:()=>Md,MediaQueryList:()=>Rd,NestingSelector:()=>Od,Nth:()=>Ud,Number:()=>Wd,Operator:()=>qd,Parentheses:()=>Xd,Percentage:()=>Zd,PseudoClassSelector:()=>nf,PseudoElementSelector:()=>sf,Ratio:()=>cf,Raw:()=>df,Rule:()=>mf,Scope:()=>yf,Selector:()=>wf,SelectorList:()=>Cf,String:()=>Ef,StyleSheet:()=>Lf,SupportsDeclaration:()=>Df,TypeSelector:()=>Of,UnicodeRange:()=>jf,Url:()=>qf,Value:()=>Xf,WhiteSpace:()=>Zf});var IS=$(()=>{"use strict";up();fp();hp();Sp();kp();Ip();Ap();Mp();Rp();Op();Up();Wp();qp();Qp();ed();rd();sd();ud();fd();hd();bd();vd();Td();Ed();Ld();Dd();Nd();$d();Hd();Gd();Kd();Jd();tf();of();lf();pf();gf();xf();Sf();kf();If();Pf();Bf();zf();$f();Wf();Kf();Jf();tg()});var FS,ES=$(()=>{"use strict";J0();wS();TS();IS();FS={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",condition(e){return this.Condition(e.kind)},rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},features:{supports:{selector(){return this.Selector()}},container:{style(){return this.Declaration()}}},scope:og,atrule:SS,pseudo:CS,node:ag}});var AS,PS=$(()=>{"use strict";ng();AS={node:Es}});var LS,MS=$(()=>{"use strict";a0();O0();ES();PS();LS=s0({...N0,...FS,...AS})});var BS=$(()=>{"use strict"});var DS=$(()=>{"use strict"});var rq,RS,oq,iq,sq,zS,aq,lq,cq,uq,pq,dq,NS=$(()=>{"use strict";MS();BS();Yu();il();DS();Sl();Gf();({tokenize:rq,parse:RS,generate:oq,lexer:iq,createLexer:sq,walk:zS,find:aq,findLast:lq,findAll:cq,toPlainObject:uq,fromPlainObject:pq,fork:dq}=LS)});function bB(e){return e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function _S(e){try{let t=RS(e.trim(),{context:"value"}),n=[];return zS(t,{enter(r){if(r.type==="Dimension"){let o=parseFloat(r.value);n.push(`${o}${r.unit}`)}else if(r.type==="Number"){let o=parseFloat(r.value);n.push(`${o}`)}else r.type==="Percentage"?n.push(`${parseFloat(r.value)}%`):r.type==="Identifier"?n.push(r.name.toLowerCase()):r.type==="Hash"?n.push(`#${r.value.toLowerCase()}`):r.type}}),n}catch{return[e.trim().toLowerCase()]}}function SB(e,t){let n=bB(e);if(!yB.has(n))return t;let r=_S(t);if(r.length<1||r.length>4)return t;let o=r.map(i=>i==="0"?"0px":i);return o.length===1?`${o[0]} ${o[0]} ${o[0]} ${o[0]}`:o.length===2?`${o[0]} ${o[1]} ${o[0]} ${o[1]}`:o.length===3?`${o[0]} ${o[1]} ${o[2]} ${o[1]}`:o.join(" ")}function OS(e,t){let n=t.trim();if(!n)return"";let r=SB(e,n);return _S(r).map(i=>i==="0"?"0px":i).join(" ")}function $S(e,t,n){let r=OS(e,t),o=OS(e,n);return r!==""&&o!==""&&r===o}var yB,US=$(()=>{"use strict";NS();yB=new Set(["padding","margin","border-radius","borderradius","inset","border-width","borderwidth"])});function wB(e){let t=e.toLowerCase();return t.length===4?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function vB(e){let t=e.match(/rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*[\d.]+)?\s*\)/);if(!t)return null;let n=parseInt(t[1],10).toString(16).padStart(2,"0"),r=parseInt(t[2],10).toString(16).padStart(2,"0"),o=parseInt(t[3],10).toString(16).padStart(2,"0");return`#${n}${r}${o}`}function jS(e){let t=typeof e=="string"?e:String(e??"");if(!t||t==="[object Object]")return"";let n=t.match(/rgba?\s*\(\s*\d+\s*,\s*\d+\s*,\s*\d+(?:\s*,\s*[\d.]+)?\s*\)/);if(n){let i=vB(n[0]);if(i)return i}let r=t.match(/#([0-9a-fA-F]{3,8})/);if(r)return wB(r[0]);let o=t.match(/(-?\d+\.?\d*)(px|em|rem|%|pt|vw|vh)?/g);return o&&o.length>1?o.join(" ").toLowerCase():o&&o.length===1?o[0].toLowerCase():t.toLowerCase().trim().replace(/\s+/g," ")}function $o(e,t,n){if(!e||!t)return!1;let r=String(e),o=String(t),i=r.toLowerCase(),s=o.toLowerCase(),a=i.includes("none"),u=s.includes("none");if(a!==u)return!1;let c=/\b(fill|stroke)\s*:/i,l=c.test(r),d=c.test(o);if(l!==d)return!1;let f=jS(r),p=jS(o);return!!(f===p||n&&$S(n,r,o))}var lg=$(()=>{"use strict";US()});function FB(e){let t=String(e.property||"").toLowerCase(),n=String(e.description||"").toLowerCase(),r=String(e.expected||e.suggestedValue||"").toLowerCase(),o=String(e.actual||e.currentValue||"").toLowerCase();if(t.includes("color")||t.includes("fill")||t.includes("background")||n.includes("color")||n.includes("fill"))return!0;let i=s=>/^#[0-9a-f]{3,8}$/i.test(s)||s.includes("rgb")||["white","black","red","blue","green","orange","yellow","transparent"].includes(s);return!!(i(r)||i(o)||e.relatedProperties?.some(s=>{let a=s.property?.toLowerCase()||"";return a.includes("color")||a.includes("fill")||a.includes("background")}))}function HS(e){if(e.includes("\xD7")||/\d+px\s*x\s*\d+px/i.test(e))return!1;let t=e.match(/\d+px/g);return t?t.length>1:!1}function EB(e){let t=String(e.expected||e.suggestedValue||"").toLowerCase(),n=String(e.actual||e.currentValue||"").toLowerCase(),r=String(e.property||"").toLowerCase(),o=String(e.description||"").toLowerCase(),i=n.includes("margin")||t.includes("margin")||r==="margin",s=t.includes("gap")||o.includes("gap");return i&&s}function AB(e,t,n){if(!e||!t)return!1;let r=typeof e=="string"?e:String(e??""),o=typeof t=="string"?t:String(t??"");if(!r||!o||r==="[object Object]"||o==="[object Object]"||n&&FB(n)||HS(r)||HS(o)||n&&EB(n))return!1;let i=parseFloat(r),s=parseFloat(o);if(isNaN(i)||isNaN(s))return!1;let a=Math.abs(i-s);if(r.includes("px")||o.includes("px")){let u=n?.property?.toLowerCase()||"";return u==="width"||u==="height"||u.includes("width")||u.includes("height")?a<VS:a<WS}return r.includes("%")||o.includes("%")?a<1:!1}function PB(e){let t=`${e.description||""} ${e.title||""} ${e.suggestedFix||""}`.toLowerCase();if(IB.some(s=>t.includes(s))||!CB.some(s=>t.includes(s)))return!1;let o=e.expected||e.suggestedValue,i=e.actual||e.currentValue;return!(o&&i&&!$o(o,i,e.property))}function LB(e){let t=(e.expected!==void 0?"fill":"").toLowerCase(),n=e.actual!==void 0||e.currentValue!==void 0?"fill":"";if(!(t==="fill"||n==="fill"||e.description?.toLowerCase().includes("fill")||e.title?.toLowerCase().includes("fill")))return!1;let o=String(e.expected||e.suggestedValue||"").toLowerCase();if(!(o==="none"||o==="transparent"||o.includes("no fills")||o.includes("transparent")))return!1;let s=`${e.description||""} ${e.title||""}`.toLowerCase();return s.includes("container")||s.includes("svg ")||s.includes("<svg")||s.includes("wrapper")}function MB(e){let t=`${e.description||""} ${e.title||""}`.toLowerCase(),n=e.property?.toLowerCase()||"";if(!(t.includes("text ")||t.includes("text layer")||t.includes("text span")||t.includes("span ")||t.includes("label "))||!(n==="width"||n==="height"||n.includes("width")||n.includes("height")||t.includes("width")||t.includes("height")))return!1;let i=e.expected||e.suggestedValue||"",s=e.actual||e.currentValue||"",a=parseFloat(i),u=parseFloat(s);return isNaN(a)||isNaN(u)?!1:Math.abs(a-u)<GS}function BB(e){let t=`${e.description||""} ${e.title||""} ${e.suggestedFix||""}`.toLowerCase(),n=String(e.expected||e.suggestedValue||"").toLowerCase(),r=String(e.actual||e.currentValue||"").toLowerCase();if(!TB.some(d=>t.includes(d)||n.includes(d)))return!1;let i=`${t} ${n} ${r}`;if(i.includes("min-width")||i.includes("max-width")||i.includes("min-height")||i.includes("max-height")||i.includes("explicit")||i.includes("constraint")||i.includes("forced"))return!1;let a=n.includes("hug")||n.includes("auto"),u=/\d+\.?\d*px/.test(r);if(!a||!u)return!1;let c=n.match(/(\d+\.?\d*)px/),l=r.match(/(\d+\.?\d*)px/);return!(c&&l&&Math.abs(parseFloat(c[1])-parseFloat(l[1]))>kB)}function DB(e){let t=String(e.expected||e.suggestedValue||"").toLowerCase(),n=String(e.actual||e.currentValue||"").toLowerCase();return(!n||!t||n.includes("see ")||t.includes("see ")||n.includes("image")||t.includes("image"))&&e.type==="visual"}function Ps(e){if(e.programmaticallyVerified)return{dismissed:!1};let t=e.expected||e.suggestedValue,n=e.actual||e.currentValue;if(e.fixRequired===!1)return{dismissed:!0,dismissReason:"Auto-dismissed: FixRequired is false (no code change needed)",dismissedBy:"post-ai-validation"};if($o(t,n,e.property))return{dismissed:!0,dismissReason:"Auto-dismissed: expected equals actual (identical values)",dismissedBy:"post-ai-validation"};if(e.fixRequired===!0)return{dismissed:!1};if(MB(e))return{dismissed:!0,dismissReason:`Auto-dismissed: text dimension variance (<${GS}px) - font rendering difference, not actionable`,dismissedBy:"post-ai-validation"};if(AB(t,n,e)){let r=e.property?.toLowerCase()||"";return{dismissed:!0,dismissReason:`Auto-dismissed: negligible difference (<${r==="width"||r==="height"||r.includes("width")||r.includes("height")?VS:WS}px)`,dismissedBy:"post-ai-validation"}}return DB(e)?{dismissed:!0,dismissReason:"Auto-dismissed: no measurable values to compare",dismissedBy:"post-ai-validation"}:PB(e)?{dismissed:!0,dismissReason:"Auto-dismissed: no fix needed",dismissedBy:"post-ai-validation"}:BB(e)?{dismissed:!0,dismissReason:"Auto-dismissed: HUG sizing - CSS auto-sizes content without explicit dimensions",dismissedBy:"post-ai-validation"}:LB(e)?{dismissed:!0,dismissReason:"Auto-dismissed: SVG container fill - child elements use their own fills",dismissedBy:"post-ai-validation"}:{dismissed:!1}}var WS,VS,GS,kB,CB,TB,IB,qS=$(()=>{"use strict";lg();WS=.5,VS=2,GS=2,kB=5,CB=["values match","values already match","already correct","correctly implemented","implementation is correct","css matches","matches figma","identical","same value","no difference","none - ","no changes needed","no fix needed"],TB=["hug","auto (hug)","should be hug","fixed pixel values are being rendered","fixed values are being rendered"],IB=["duplicate","extra","missing","additional","removed","should not exist","does not exist","not in figma","not in storybook","renders 2","renders two","has 1","has one"]});function Si(e,t,n){let r=100-n*1-t*3-e*10;return Math.max(0,Math.min(100,r))}var YS=$(()=>{"use strict"});var KS=$(()=>{"use strict"});var XS=$(()=>{"use strict"});var cg=$(()=>{"use strict";lg();qS();YS();KS();XS()});var HB,WB,Aq,ug=$(()=>{"use strict";HB=["flex","inline-flex"],WB=["grid","inline-grid"],Aq=[...HB,...WB]});var JS=$(()=>{"use strict";cg();ug()});var ZS=$(()=>{"use strict"});var Ls=$(()=>{"use strict";oy();cg();ug();JS();ZS()});function GB(e){let{aiPrompt:t,aiResponse:n,...r}=e;return r}function qn(e){try{let t=e.map(GB),n=JSON.stringify(t,qB);sessionStorage.setItem(pg,n)}catch(t){y.error("[SessionStorage] Failed to save review history:",t)}}function dg(){try{let e=sessionStorage.getItem(pg);if(!e)return[];let t=JSON.parse(e,YB);return Array.isArray(t)?t:[]}catch(e){return y.error("[SessionStorage] Failed to load review history:",e),[]}}function ew(){try{let e=dg();if(e.length===0)return;let t=!1,n=e.map(r=>{if(r.aiPrompt!==void 0||r.aiResponse!==void 0){t=!0;let{aiPrompt:o,aiResponse:i,...s}=r;return s}return r});t&&(qn(n),y.debug("[SessionStorage] Stripped aiPrompt/aiResponse from existing review history"))}catch(e){y.error("[SessionStorage] Failed to strip sensitive fields:",e)}}function tw(){try{sessionStorage.removeItem(pg),y.debug("[SessionStorage] Review history cleared")}catch(e){y.error("[SessionStorage] Failed to clear review history:",e)}}function qB(e,t){return t instanceof Date?{__type:"Date",value:t.toISOString()}:t}function YB(e,t){return t&&t.__type==="Date"?new Date(t.value):t}var pg,fg=$(()=>{"use strict";De();pg="uicopilot_review_history"});import KB,{createContext as XB,useContext as QB,useReducer as JB,useMemo as nw,useRef as ZB,useEffect as eD}from"react";function tD(e,t){switch(t.type){case"SET_STATE":return{...e,...t.payload};case"ADD_STREAMING_MESSAGE":return{...e,streamingMessages:[...e.streamingMessages,t.payload]};case"UPDATE_STREAMING_MESSAGE":return{...e,streamingMessages:e.streamingMessages.map((n,r)=>r===t.payload.index?{...n,content:t.payload.content}:n)};case"CLEAR_STREAMING_MESSAGES":return{...e,streamingMessages:[]};case"TOGGLE_MODEL":{let n=e.selectedModels.includes(t.payload);return n&&e.selectedModels.length===1?e:{...e,selectedModels:n?e.selectedModels.filter(r=>r!==t.payload):[...e.selectedModels,t.payload]}}case"SET_REVIEW_RESULTS":{if(!t.payload)return{...e,reviewResults:null,currentReviewId:null};let n=e.userRole==="admin",r={id:t.payload.id,componentId:t.payload.componentId,storyId:t.payload.storyId,modelId:t.payload.modelId,complianceScore:t.payload.complianceScore,issuesCount:t.payload.issuesCount,issues:t.payload.issues,createdAt:t.payload.createdAt,visualSimilarity:t.payload.visualSimilarity,storybookImageData:e.storybookImageUrl||void 0,figmaImageData:e.figmaImageUrl||void 0,aiPrompt:n&&e.fullPrompt||void 0,aiResponse:n&&e.fullResponse||void 0,costUsd:t.payload.costUsd,inputTokens:t.payload.inputTokens,outputTokens:t.payload.outputTokens},o=e.reviewHistory.findIndex(s=>s.id===t.payload.id),i;return o>=0?i=e.reviewHistory.map((s,a)=>a===o?r:s):i=[...e.reviewHistory,r],qn(i),{...e,reviewResults:t.payload,reviewHistory:i,currentReviewId:t.payload.id}}case"UPDATE_MULTI_MODEL_STREAMING":return e.multiModelResults?{...e,multiModelResults:{...e.multiModelResults,byModel:{...e.multiModelResults.byModel,[t.payload.modelId]:{...e.multiModelResults.byModel[t.payload.modelId],streamingMessages:t.payload.messages}}}}:{...e,multiModelResults:{byModel:{[t.payload.modelId]:{streamingMessages:t.payload.messages}},activeModelId:t.payload.modelId}};case"SET_MODEL_COMPLETED":return e.multiModelResults?{...e,multiModelResults:{...e.multiModelResults,byModel:{...e.multiModelResults.byModel,[t.payload]:{...e.multiModelResults.byModel[t.payload],completed:!0}}}}:e;case"BULK_ADD_REVIEWS":{let n=new Set(e.reviewHistory.map(i=>i.id)),r=t.payload.filter(i=>!n.has(i.id));if(r.length===0)return e;let o=[...e.reviewHistory,...r];return qn(o),{...e,reviewHistory:o}}case"ADD_REVIEW":{let n=[...e.reviewHistory,t.payload];return qn(n),{...e,reviewHistory:n,currentReviewId:t.payload.id}}case"TOGGLE_ISSUE_SELECTION":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>r.id!==e.currentReviewId?r:{...r,issues:r.issues.map(o=>o.id===t.payload?{...o,selectedForFix:!o.selectedForFix}:o)});return qn(n),{...e,reviewHistory:n}}case"UPDATE_ISSUE_STATUS":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>r.id!==e.currentReviewId?r:{...r,issues:r.issues.map(o=>o.id===t.payload.issueId?{...o,status:t.payload.status,error:t.payload.error}:o)});return qn(n),{...e,reviewHistory:n}}case"UPDATE_ISSUE_GENERATED_FIX":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>r.id!==e.currentReviewId?r:{...r,issues:r.issues.map(o=>o.id===t.payload.issueId?{...o,generatedFix:o.generatedFix?{...o.generatedFix,...t.payload.generatedFix}:t.payload.generatedFix,selectedForFix:t.payload.generatedFix?.status==="failed"?!1:o.selectedForFix}:o)});return qn(n),{...e,reviewHistory:n}}case"BATCH_UPDATE_ISSUE_GENERATED_FIXES":{if(!e.currentReviewId)return e;let n=new Map(t.payload.map(o=>[o.issueId,o.generatedFix])),r=e.reviewHistory.map(o=>o.id!==e.currentReviewId?o:{...o,issues:o.issues.map(i=>{let s=n.get(i.id);return s?{...i,generatedFix:i.generatedFix?{...i.generatedFix,...s}:s,selectedForFix:s?.status==="failed"?!1:i.selectedForFix}:i})});return qn(r),{...e,reviewHistory:r}}case"DISMISS_ISSUE":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>r.id!==e.currentReviewId?r:{...r,issues:r.issues.map(o=>o.id===t.payload.issueId?{...o,dismissed:!0,dismissReason:t.payload.reason,dismissedAt:new Date,dismissedBy:t.payload.dismissedBy}:o)});return qn(n),{...e,reviewHistory:n}}case"UNDISMISS_ISSUE":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>r.id!==e.currentReviewId?r:{...r,issues:r.issues.map(o=>o.id===t.payload?{...o,dismissed:!1,dismissReason:void 0,dismissedAt:void 0}:o)});return qn(n),{...e,reviewHistory:n}}case"RECALCULATE_SCORE":{if(!e.currentReviewId)return e;let n=e.reviewHistory.map(r=>{if(r.id!==e.currentReviewId)return r;let o=r.issues.filter(c=>!c.dismissed),i=o.filter(c=>c.severity==="critical").length,s=o.filter(c=>c.severity==="major").length,a=o.filter(c=>c.severity==="minor").length,u=Si(i,s,a);return y.debug(`[recalculateScore] Active: ${o.length}, score: ${u}`),{...r,complianceScore:u,issuesCount:o.length}});return qn(n),{...e,reviewHistory:n}}case"UPDATE_REVIEW_SCORE":{let n=e.reviewHistory.map(r=>r.id!==t.payload.reviewId?r:{...r,complianceScore:t.payload.newScore});return qn(n),{...e,reviewHistory:n}}case"CLEAR_ALL_REVIEWS":return tw(),{...e,reviewHistory:[],currentReviewId:null};case"CLEAR_STALE_REVIEWS":return{...e,currentReviewId:null,reviewResults:null};case"RESET_REVIEW":{let n=e.isReviewing;return{...e,isReviewing:!1,reviewError:null,reviewResults:n?null:e.reviewResults,multiModelResults:null,streamingMessages:[],streamingProgress:0,streamingStatus:"",reviewDetailTab:n?"chat":e.reviewDetailTab,fullPrompt:"",fullResponse:"",figmaImageUrl:n?null:e.figmaImageUrl,storybookImageUrl:n?null:e.storybookImageUrl,currentReviewId:n?null:e.currentReviewId}}case"RESET_PROMPT":return{...e,isGenerating:!1,generatedPrompt:null,promptError:null};case"TRIGGER_SCREENSHOT_REFRESH":return{...e,screenshotRefreshKey:e.screenshotRefreshKey+1};default:return e}}function mg({children:e}){let[t,n]=JB(tD,sD),r=ZB(t);eD(()=>{r.current=t},[t]);let o=nw(()=>({setIsReviewing:s=>n({type:"SET_STATE",payload:{isReviewing:s}}),setReviewError:s=>n({type:"SET_STATE",payload:{reviewError:s}}),bulkAddReviews:s=>n({type:"BULK_ADD_REVIEWS",payload:s}),setReviewResults:s=>n({type:"SET_REVIEW_RESULTS",payload:s}),setMultiModelResults:s=>n({type:"SET_STATE",payload:{multiModelResults:s}}),updateMultiModelStreamingMessages:(s,a)=>n({type:"UPDATE_MULTI_MODEL_STREAMING",payload:{modelId:s,messages:a}}),setModelCompleted:s=>n({type:"SET_MODEL_COMPLETED",payload:s}),setActiveModelId:s=>{let a=r.current;a.multiModelResults&&n({type:"SET_STATE",payload:{multiModelResults:{...a.multiModelResults,activeModelId:s}}})},setShowReviewMenu:s=>n({type:"SET_STATE",payload:{showReviewMenu:s}}),setSeverityFilter:s=>n({type:"SET_STATE",payload:{severityFilter:s}}),setShowStreamingPanel:s=>n({type:"SET_STATE",payload:{showStreamingPanel:s}}),setStreamingPanelCollapsed:s=>n({type:"SET_STATE",payload:{streamingPanelCollapsed:s}}),addStreamingMessage:s=>n({type:"ADD_STREAMING_MESSAGE",payload:s}),updateStreamingMessage:(s,a)=>n({type:"UPDATE_STREAMING_MESSAGE",payload:{index:s,content:a}}),clearStreamingMessages:()=>n({type:"CLEAR_STREAMING_MESSAGES"}),setStreamingProgress:s=>n({type:"SET_STATE",payload:{streamingProgress:s}}),setStreamingStatus:s=>n({type:"SET_STATE",payload:{streamingStatus:s}}),setReviewDetailTab:s=>n({type:"SET_STATE",payload:{reviewDetailTab:s}}),setFullPrompt:s=>n({type:"SET_STATE",payload:{fullPrompt:s}}),setFullResponse:s=>n({type:"SET_STATE",payload:{fullResponse:s}}),setFigmaImageUrl:s=>n({type:"SET_STATE",payload:{figmaImageUrl:s}}),setStorybookImageUrl:s=>n({type:"SET_STATE",payload:{storybookImageUrl:s}}),setFigmaDimensions:s=>n({type:"SET_STATE",payload:{figmaDimensions:s}}),setSelectedModels:s=>n({type:"SET_STATE",payload:{selectedModels:s}}),toggleModel:s=>n({type:"TOGGLE_MODEL",payload:s}),setModelComparisonView:s=>n({type:"SET_STATE",payload:{modelComparisonView:s}}),resetReview:()=>n({type:"RESET_REVIEW"}),addReview:s=>n({type:"ADD_REVIEW",payload:s}),getCurrentReview:()=>{let s=r.current;return s.currentReviewId&&s.reviewHistory.find(a=>a.id===s.currentReviewId)||null},getReviewById:s=>r.current.reviewHistory.find(a=>a.id===s)||null,getParentReview:()=>{let s=r.current,a=s.reviewHistory.find(u=>u.id===s.currentReviewId);return a?.parentReviewId&&s.reviewHistory.find(u=>u.id===a.parentReviewId)||null},hasAppliedFixes:()=>{let s=r.current,a=s.reviewHistory.find(u=>u.id===s.currentReviewId);return!a||!Array.isArray(a.issues)||a.issues.length===0?!1:a.issues.some(u=>u.status==="applied"||u.generatedFix?.status==="applied")},toggleIssueSelection:s=>n({type:"TOGGLE_ISSUE_SELECTION",payload:s}),updateIssueStatus:(s,a,u)=>n({type:"UPDATE_ISSUE_STATUS",payload:{issueId:s,status:a,error:u}}),updateIssueGeneratedFix:(s,a)=>n({type:"UPDATE_ISSUE_GENERATED_FIX",payload:{issueId:s,generatedFix:a}}),batchUpdateIssueGeneratedFixes:s=>n({type:"BATCH_UPDATE_ISSUE_GENERATED_FIXES",payload:s}),dismissIssue:(s,a,u)=>n({type:"DISMISS_ISSUE",payload:{issueId:s,reason:a,dismissedBy:u}}),undismissIssue:s=>n({type:"UNDISMISS_ISSUE",payload:s}),recalculateScore:()=>n({type:"RECALCULATE_SCORE"}),updateReviewScore:(s,a)=>n({type:"UPDATE_REVIEW_SCORE",payload:{reviewId:s,newScore:a}}),clearAllReviews:()=>n({type:"CLEAR_ALL_REVIEWS"}),clearStaleReviewsForStory:s=>n({type:"CLEAR_STALE_REVIEWS",payload:s}),setIsApplying:s=>n({type:"SET_STATE",payload:{isApplying:s}}),setApplyFixesResult:s=>n({type:"SET_STATE",payload:{applyFixesResult:s}}),setIncludeComponentIssues:s=>n({type:"SET_STATE",payload:{includeComponentIssues:s}}),setIncludeTextComparison:s=>n({type:"SET_STATE",payload:{includeTextComparison:s}}),setUsePromptCache:s=>n({type:"SET_STATE",payload:{usePromptCache:s}}),setIsValidating:s=>n({type:"SET_STATE",payload:{isValidating:s}}),setValidationUsage:s=>n({type:"SET_STATE",payload:{validationUsage:s}}),setWorkspacePath:s=>n({type:"SET_STATE",payload:{workspacePath:s}}),triggerScreenshotRefresh:()=>n({type:"TRIGGER_SCREENSHOT_REFRESH"}),setHoveredIssueId:s=>n({type:"SET_STATE",payload:{hoveredIssueId:s}}),setFeatureFlags:s=>n({type:"SET_STATE",payload:{featureFlags:s}}),setUserRole:s=>n({type:"SET_STATE",payload:{userRole:s}}),setRoleOverride:s=>{try{s?localStorage.setItem("uicopilot_role_override",s):localStorage.removeItem("uicopilot_role_override")}catch{}n({type:"SET_STATE",payload:{roleOverride:s}})},setReviewAllConcurrency:s=>{let a=Math.max(1,Math.min(5,s));try{localStorage.setItem("uicopilot_review_all_concurrency",String(a))}catch{}n({type:"SET_STATE",payload:{reviewAllConcurrency:a}})},setIsGenerating:s=>n({type:"SET_STATE",payload:{isGenerating:s}}),setGeneratedPrompt:s=>n({type:"SET_STATE",payload:{generatedPrompt:s}}),setPromptError:s=>n({type:"SET_STATE",payload:{promptError:s}}),resetPrompt:()=>n({type:"RESET_PROMPT"})}),[]),i=nw(()=>({...t,...o}),[t,o]);return KB.createElement(rw.Provider,{value:i},e)}function ie(){let e=QB(rw);if(!e)throw new Error("useReviewStore must be used within a ReviewProvider");return e}var nD,rD,gg,oD,iD,sD,rw,hg=$(()=>{"use strict";Ls();fg();De();nD=()=>{if(typeof localStorage>"u")return 3;try{let e=localStorage.getItem("uicopilot_review_all_concurrency");if(e)return Math.max(1,Math.min(5,parseInt(e,10)))}catch{}return 3},rD=()=>{if(typeof localStorage>"u")return null;try{let e=localStorage.getItem("uicopilot_role_override");if(e==="admin"||e==="beta")return e}catch{}return null},gg={enableFixGeneration:!1,enableFixApply:!1,enableAutoMap:!1,enableReviewBadges:!1,showCosts:!1,enableParallelReview:!1,enableModelSelection:!1},oD=()=>{if(typeof localStorage>"u")return gg;try{let e=localStorage.getItem("uicopilot_feature_flags");if(!e)return gg;let t=JSON.parse(e);return{enableFixGeneration:!!t.enableFixGeneration,enableFixApply:!!t.enableFixApply,enableAutoMap:!!t.enableAutoMap,enableReviewBadges:!!t.enableReviewBadges,showCosts:!!t.showCosts,enableParallelReview:!!t.enableParallelReview,enableModelSelection:!!t.enableModelSelection}}catch{}return gg},iD=()=>{if(typeof localStorage>"u")return"beta";try{let e=localStorage.getItem("uicopilot_user_role");if(e==="admin"||e==="beta")return e}catch{}return"beta"},sD={isReviewing:!1,reviewError:null,reviewResults:null,multiModelResults:null,showReviewMenu:!1,severityFilter:"all",showStreamingPanel:!1,streamingPanelCollapsed:!1,streamingMessages:[],streamingProgress:0,streamingStatus:"",reviewDetailTab:"chat",fullPrompt:"",fullResponse:"",figmaImageUrl:null,storybookImageUrl:null,figmaDimensions:null,selectedModels:["claude-sonnet-4-5-20250929"],modelComparisonView:"side-by-side",reviewHistory:dg(),currentReviewId:null,includeComponentIssues:!0,includeTextComparison:!1,usePromptCache:!1,isApplying:!1,applyFixesResult:null,screenshotRefreshKey:0,isValidating:!1,validationUsage:null,lastAiCallTimestamp:null,aiRateLimitSeconds:0,isGenerating:!1,generatedPrompt:null,promptError:null,workspacePath:null,userRole:iD(),roleOverride:rD(),featureFlags:oD(),reviewAllConcurrency:nD(),hoveredIssueId:null},rw=XB(null)});import Ms,{useMemo as aD}from"react";function yg({children:e}){return Ms.createElement(Zc,null,Ms.createElement(tu,null,Ms.createElement(ru,null,Ms.createElement(mg,null,Ms.createElement(lD,null),e))))}function ow(e){let t=we(),n=Ze(),r=rt(),o=ie(),i=aD(()=>({...t,...n,...r,...o}),[t,n,r,o]);return e?e(i):i}function lD(){return xg=ow(),null}var xg,ht,iw=$(()=>{"use strict";eu();nu();ou();hg();xg=null,ht=Object.assign(ow,{getState:()=>{if(!xg)throw new Error("Store not initialized. Make sure StoreProvider is mounted.");return xg}})});var ve=$(()=>{"use strict";iw();eu();nu();ou();hg()});function q(){return(process.env.STORYBOOK_UICOPILOT_URL||cD).replace(/\/$/,"")}var cD,sw,je=$(()=>{"use strict";cD="https://app.uicopilot.dev",sw=3.6});async function oe(e,t,n=3e4){let r=new AbortController,o=setTimeout(()=>r.abort(),n);try{return await fetch(e,{...t,signal:r.signal})}catch(i){throw i instanceof DOMException&&i.name==="AbortError"?new Error(`Request timed out after ${n}ms: ${e}`):i}finally{clearTimeout(o)}}var pt=$(()=>{"use strict"});import{useEffect as zs,useState as Cl,useRef as ZD,useCallback as Sg}from"react";import{addons as wg}from"storybook/manager-api";async function eR(e,t,n){let r=`${e}:${t}`,o=vg.get(r);if(o)return y.debug("[useReviewScreenshots] Reusing in-flight Figma image fetch for",r),o;let i=(async()=>{let s=await oe(`${kw}/api/figma/image?projectId=${e}&nodeId=${t}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`}});return s.ok?s.json():{imageUrl:null}})().finally(()=>{vg.delete(r)});return vg.set(r,i),i}function tR(e,t,n){try{sessionStorage.setItem(`${Tl}${e}`,JSON.stringify({figmaNodeId:t,imageUrl:n,timestamp:Date.now()}))}catch{}}function nR(e,t){try{let n=sessionStorage.getItem(`${Tl}${e}`);if(!n)return null;let r=JSON.parse(n);if(r.figmaNodeId===t&&Date.now()-r.timestamp<1800*1e3)return r.imageUrl;sessionStorage.removeItem(`${Tl}${e}`)}catch{}return null}function rR(e){try{let t=sessionStorage.getItem(`${Tl}${e}`);if(!t)return null;let n=JSON.parse(t);if(n.imageUrl&&Date.now()-n.timestamp<300*1e3)return n.imageUrl}catch{}return null}var bw,Sw,ww,vw,Ci,kw,ir,kg,vg,Tl,Cw,Uo,Ns=$(()=>{"use strict";ve();Cg();De();je();pt();bw="storyArgsUpdated",Sw="storyRendered",ww="forceRemount",vw=null,Ci=()=>vw,kw=q(),ir=new Map,kg=null,vg=new Map;Tl="uicopilot-figma-image-";Cw=(e,t,n)=>{kg=t;let r=ir.get(e);r?r.figmaImageUrl=n:ir.set(e,{storybookImageUrl:null,figmaImageUrl:n}),y.debug("[useReviewScreenshots] Pre-set Figma image for mapping:",{storyId:e,figmaNodeId:t,imageUrl:n.substring(0,50)+"..."})},Uo=()=>{let[e,t]=Cl(!1),[n,r]=Cl(!1),[o,i]=Cl(!1),[s,a]=Cl(null),u=ZD(null),{screenshotRefreshKey:c,triggerScreenshotRefresh:l}=ie(),d=Sg(()=>{let z=ht.getState().currentStoryId;z&&(y.debug("[useReviewScreenshots] Refreshing screenshots for story:",z),ir.delete(z),u.current=null,i(!0),l())},[l]),f=Sg(()=>{let z=ht.getState().currentStoryId;if(z){y.debug("[useReviewScreenshots] Refreshing Storybook screenshot only for story:",z);let _=ir.get(z);_&&(_.storybookImageUrl=null),u.current=null,i(!0),l()}},[l]),{sessionToken:p}=we(),{selectedProjectId:g}=Ze(),{currentStoryId:S,currentMapping:C}=rt(),{setStorybookImageUrl:F,setFigmaImageUrl:k}=ie();zs(()=>{if(!S||ht.getState().figmaImageUrl)return;let _=rR(S);_&&(y.debug("[useReviewScreenshots] Quick-restored Figma image for:",S),k(_))},[S,k]),zs(()=>{(async()=>{if(!p||!g||!S){y.debug("[useReviewScreenshots] Missing required context, skipping auto-load");return}let _=ht.getState();if(_.storybookImageUrl&&_.figmaImageUrl){y.debug("[useReviewScreenshots] Screenshots already loaded from persisted review, skipping capture"),u.current=S;return}let M=C?.figmaNodeId??null;if(M!==kg){y.debug("[useReviewScreenshots] Figma mapping changed, invalidating Figma image only for story:",S);let I=ir.get(S);I&&(I.figmaImageUrl=null),kg=M,u.current=null}let B=C?.figmaNodeId;if(B&&!ir.get(S)?.figmaImageUrl){let I=nR(S,B);if(I){y.debug("[useReviewScreenshots] Hydrated Figma image from sessionStorage for story:",S),k(I);let v=ir.get(S);v?v.figmaImageUrl=I:ir.set(S,{storybookImageUrl:null,figmaImageUrl:I})}}let m=ir.get(S),x=m&&m.storybookImageUrl&&m.figmaImageUrl,b=m&&m.storybookImageUrl&&!m.figmaImageUrl,E=m&&!m.storybookImageUrl&&m.figmaImageUrl;if(x){y.debug("[useReviewScreenshots] Using fully cached screenshots for story:",S),F(m.storybookImageUrl),k(m.figmaImageUrl),u.current=S;return}let h=b&&C?.figmaNodeId;h&&(y.debug("[useReviewScreenshots] Using cached Storybook, fetching new Figma for story:",S),F(m.storybookImageUrl));let T=E;if(T&&(y.debug("[useReviewScreenshots] Using cached Figma, recapturing Storybook for story:",S),k(m.figmaImageUrl)),u.current===S&&C?.figmaNodeId){y.debug("[useReviewScreenshots] Screenshots already loaded for this story, skipping");return}try{a(null),h?r(!0):(T||(t(!0),r(!0)),i(!0)),u.current=S;let I=T?m.figmaImageUrl:null,v;if(T)y.debug("[useReviewScreenshots] Figma cached (storybookOnlyRefresh), skipping fetch"),r(!1);else if(B){y.debug("[useReviewScreenshots] Found Figma node ID from mapping:",B);let P=null;try{y.debug("[useReviewScreenshots] Fetching Figma image (with caching)...");let D=await eR(g,B,p);P=D.imageUrl||null;let N=D.cached?"(cached)":"(fresh)";y.debug(`[useReviewScreenshots] Figma image fetched ${N}:`,P?"success":"not found")}catch(D){y.warn("[useReviewScreenshots] Failed to fetch Figma image:",D)}if(P)if(P.includes(".azureedge.net")||P.includes(".blob.core.windows.net")||P.includes(".blob.vercel-storage.com")){y.debug("[useReviewScreenshots] Using cached CDN URL directly (fast)"),I=P,k(P);let N=new Image;N.crossOrigin="anonymous",await new Promise(w=>{N.onload=()=>{v={width:N.naturalWidth,height:N.naturalHeight},y.debug("[useReviewScreenshots] Figma dimensions:",v),w()},N.onerror=()=>w(),N.src=P})}else try{y.debug("[useReviewScreenshots] Converting Figma S3 URL to data URL via proxy...");let N=`${kw}/api/proxy/image?url=${encodeURIComponent(P)}`,w=await oe(N);if(w.ok){let j=await w.blob(),G=new FileReader,L=await new Promise((ee,re)=>{G.onloadend=()=>ee(G.result),G.onerror=re,G.readAsDataURL(j)});I=L,k(L),y.debug("[useReviewScreenshots] Figma thumbnail converted to data URL");let K=new Image;await new Promise(ee=>{K.onload=()=>{v={width:K.naturalWidth,height:K.naturalHeight},y.debug("[useReviewScreenshots] Figma dimensions:",v),ee()},K.onerror=()=>ee(),K.src=L})}else I=P,k(P),y.debug("[useReviewScreenshots] Figma thumbnail loaded (external URL)")}catch(N){y.warn("[useReviewScreenshots] Failed to convert to data URL, using external URL:",N),I=P,k(P)}else y.warn("[useReviewScreenshots] No thumbnail found for node:",B),k(null);I&&B&&tR(S,B,I),r(!1)}else y.debug("[useReviewScreenshots] No Figma mapping exists for this component"),k(null),r(!1);let A=m?.storybookImageUrl||null;if(A)y.debug("[useReviewScreenshots] Using cached Storybook screenshot"),i(!1);else{y.debug("[useReviewScreenshots] Capturing Storybook screenshot for story:",S);let P=await Il({storyId:S,sessionToken:p||void 0,...v&&{figmaWidth:v.width,figmaHeight:v.height}});P?(A=P,F(P),y.debug("[useReviewScreenshots] Storybook screenshot captured at dimensions:",v||"natural")):y.warn("[useReviewScreenshots] Failed to capture Storybook screenshot"),i(!1)}ir.set(S,{storybookImageUrl:A,figmaImageUrl:I}),y.debug("[useReviewScreenshots] Screenshots cached for story:",S)}catch(I){y.error("[useReviewScreenshots] Error loading screenshots:",I),a(I instanceof Error?I.message:"Failed to load screenshots"),u.current=null,r(!1),i(!1)}finally{t(!1)}})()},[p,g,S,C?.figmaNodeId,c]),zs(()=>{let z=wg.getChannel(),_=null,M=B=>{vw=B.args,y.debug("[useReviewScreenshots] Args updated for story:",B.storyId,"args:",B.args),_&&clearTimeout(_),_=setTimeout(()=>{y.debug("[useReviewScreenshots] Story args changed, refreshing screenshot"),d()},500)};return z.on(bw,M),()=>{z.off(bw,M),_&&clearTimeout(_)}},[d]),zs(()=>{let z=wg.getChannel(),_=!1,M=null,B=()=>{y.debug("[useReviewScreenshots] FORCE_REMOUNT detected, showing Storybook loader"),_=!0,i(!0)},m=()=>{_&&(y.debug("[useReviewScreenshots] STORY_RENDERED after remount, waiting for styles to settle..."),M&&clearTimeout(M),M=setTimeout(()=>{_=!1,y.debug("[useReviewScreenshots] Refreshing Storybook screenshot after HMR (preserving Figma)"),f()},500))};return z.on(ww,B),z.on(Sw,m),()=>{z.off(ww,B),z.off(Sw,m),M&&clearTimeout(M)}},[f]),zs(()=>{let z=wg.getChannel(),_=async M=>{if(!M?.snapshot?.html){y.debug("[useReviewScreenshots] DOM mutated but no snapshot available");return}y.debug("[useReviewScreenshots] DOM mutated, capturing snapshot screenshot"),i(!0);try{let B=ht.getState().currentStoryId,m=await fetch("/__uicopilot/screenshot-snapshot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...M.snapshot,storyId:B})});if(m.ok){let x=await m.json();if(x.screenshot){F(x.screenshot);let b=ht.getState().currentStoryId;if(b){let E=ir.get(b);E?E.storybookImageUrl=x.screenshot:ir.set(b,{storybookImageUrl:x.screenshot,figmaImageUrl:null})}}}else y.error("[useReviewScreenshots] Snapshot screenshot failed:",await m.text())}catch(B){y.error("[useReviewScreenshots] Snapshot screenshot error:",B)}finally{i(!1)}};return z.on("UICOPILOT/STORY_DOM_MUTATED",_),()=>{z.off("UICOPILOT/STORY_DOM_MUTATED",_)}},[]);let R=Sg((z,_,M)=>{y.debug("[useReviewScreenshots] setFigmaImageDirect called - bypassing load"),Cw(z,_,M),k(M),r(!1),u.current=z},[k]);return{isLoadingScreenshots:e,isLoadingFigma:n,isLoadingStorybook:o,screenshotError:s,refreshScreenshots:d,refreshStorybookOnly:f,setFigmaImageDirect:R}}});function iR(){return!q().startsWith("http://localhost")}function sR(e,t,n){let r=t.createElement("div");r.style.color=e,t.body.appendChild(r);let o=n.getComputedStyle(r).color;return r.remove(),o}function Tw(e,t,n){let r=new Map;return e.replace(/(?:color|oklch|oklab|lab|lch)\([^)]+\)/g,o=>{if(r.has(o))return r.get(o);let i=sR(o,t,n);return r.set(o,i),i})}async function aR(){let e=(await import("html2canvas")).default,t=document.getElementById("storybook-preview-iframe");if(!t?.contentDocument||!t.contentWindow)throw new Error("Storybook iframe not accessible");let n=t.contentDocument.querySelector("#storybook-root > *")||t.contentDocument.querySelector("#root > *");if(!n)throw new Error("Story element not found in iframe");let r=t.contentWindow,o=t.contentDocument;return(await e(n,{useCORS:!0,logging:!1,backgroundColor:null,onclone:s=>{s.querySelectorAll("style").forEach(u=>{let c=u.textContent||"";/(?:color|oklch|oklab|lab|lch)\(/.test(c)&&(u.textContent=Tw(c,o,r))});let a=Array.from(o.styleSheets);s.querySelectorAll('link[rel="stylesheet"]').forEach(u=>{let c=u.href,l=a.find(d=>d.href===c);if(l)try{let d="";for(let f of Array.from(l.cssRules))d+=f.cssText+`
13
13
  `;if(/(?:color|oklch|oklab|lab|lch)\(/.test(d)){let f=s.createElement("style");f.textContent=Tw(d,o,r),u.replaceWith(f)}}catch{}})}})).toDataURL("image/png")}function lR(e){let t=[];for(let[n,r]of Object.entries(e)){if(r===void 0)continue;let o;typeof r=="boolean"?o=`!${r}`:typeof r=="number"?o=String(r):typeof r=="string"?o=encodeURIComponent(r).replace(/%20/g,"+"):o=encodeURIComponent(JSON.stringify(r)),t.push(`${n}:${o}`)}return t.join(";")}async function cR(e,t){y.debug("[Screenshot] Using server-side Chrome capture for:",e);let n={"Content-Type":"application/json"};t?.sessionToken&&(n.Authorization=`Bearer ${t.sessionToken}`);let r=await oe(`${oR}/api/screenshot`,{method:"POST",headers:n,body:JSON.stringify({url:e,selector:t?.selector,width:t?.width,height:t?.height,scale:t?.scale||1,figmaWidth:t?.figmaWidth,figmaHeight:t?.figmaHeight})});if(!r.ok){let i=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(i.error||`Screenshot failed: ${r.status}`)}return(await r.json()).screenshot}function uR(e){let t={};if(!e)return t;let n=e.split(";");for(let r of n){let o=r.indexOf(":");if(o===-1)continue;let i=r.slice(0,o),s=r.slice(o+1);typeof s=="string"&&(s==="!true"?s=!0:s==="!false"?s=!1:!isNaN(Number(s))&&s!==""?s=Number(s):s=decodeURIComponent(s.replace(/\+/g," "))),t[i]=s}return t}function pR(e){let t=new URLSearchParams(window.location.search),n=e;if(n||(n=(t.get("path")||"").replace("/story/","").replace("/docs/",""),y.debug("[Screenshot] Warning: Using story ID from URL (fallback):",n)),!n)throw new Error("Could not determine current story ID. Please select a story first.");let r=window.location.origin,o=Date.now(),i=`${r}/iframe.html?viewMode=story&id=${n}&globals=&_cb=${o}`,s=Ci();if(!s||Object.keys(s).length===0){let a=t.get("args");a&&(s=uR(a),y.debug("[Screenshot] Parsed args from URL:",s))}if(s&&Object.keys(s).length>0){let a=lR(s);i+=`&args=${a}`,y.debug("[Screenshot] Using URL with current args:",i)}else y.debug("[Screenshot] No current args, using default URL:",i);return i}async function dR(e){try{let t=await fetch(`/__uicopilot/screenshot?storyId=${encodeURIComponent(e)}`);if(t.status===501)return y.info("[Screenshot] Local Puppeteer not available, falling back"),null;if(!t.ok){let r=await t.json().catch(()=>({error:"Unknown"}));throw new Error(r.error||`Screenshot failed: ${t.status}`)}let n=await t.json();return y.info("[Screenshot] Captured via local Puppeteer (pixel-perfect)"),n.screenshot}catch(t){if(t instanceof TypeError&&t.message.includes("fetch"))return null;throw t}}async function Il(e){let t=e?.storyId||fR();if(t){let n=Tg.get(t);if(n)return y.debug("[Screenshot] Reusing in-flight capture for",t),n;let r=Iw(t,e).finally(()=>{Tg.delete(t)});return Tg.set(t,r),r}return Iw(void 0,e)}async function Iw(e,t){try{if(e){let n=await dR(e);if(n)return n}if(!iR()){let n=pR(t?.storyId);return await cR(n,{...t,selector:"#storybook-root > *"})}return y.info("[Screenshot] Using client-side capture (html2canvas fallback)"),await aR()}catch(n){throw y.error("Error capturing screenshot:",n),new Error(`Failed to capture screenshot: ${n instanceof Error?n.message:"Unknown error"}`)}}function fR(){return(new URLSearchParams(window.location.search).get("path")||"").replace("/story/","").replace("/docs/","")||void 0}var oR,Tg,Cg=$(()=>{"use strict";je();Ns();De();pt();oR=q();Tg=new Map});function vn(e){if(e==="transparent"||e==="rgba(0, 0, 0, 0)")return"transparent";let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(!t)return e;let[,n,r,o,i]=t,s=i?parseFloat(i):1;return s<1?`rgba(${n}, ${r}, ${o}, ${s})`:`#${[n,r,o].map(u=>parseInt(u).toString(16).padStart(2,"0")).join("")}`}function Dn(e,t){let r={backgroundColor:["transparent","rgba(0, 0, 0, 0)"],border:["none","0px none","0px none rgb(0, 0, 0)"],borderRadius:["0px"],boxShadow:["none"],opacity:["1"],gap:["normal","0px"],flexDirection:["row"],justifyContent:["normal","flex-start"],alignItems:["normal","stretch"],textAlign:["start","left"],letterSpacing:["normal","0px"],margin:["0px","0px 0px 0px 0px"],padding:["0px","0px 0px 0px 0px"]}[e];return r?r.includes(t):!1}function Os(e){return e.split(",").map(n=>n.trim().replace(/['"]/g,""))[0]||e}function Fw(e){let t=e.ownerDocument,r=(t.defaultView||window).getComputedStyle(e);if("fonts"in t){let C=r.fontSize||"16px",F=r.fontWeight||"400";if(r.fontFamily.includes("Roboto")){let k=t.fonts.check(`${F} ${C} Roboto`);if(y.debug("[computedStyles] Roboto check:",{cssFamily:r.fontFamily,robotoLoaded:k,fontWeight:F,fontSize:C,isIframe:t!==document,fontStatus:Array.from(t.fonts).map(R=>({family:R.family,status:R.status}))}),k)return"Roboto"}}let o="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",s=t.createElement("canvas").getContext("2d");if(!s)return"unknown";let a=r.fontSize,u=r.fontWeight,c=r.fontStyle,l=r.fontFamily.split(",").map(C=>C.trim().replace(/['"]/g,"")),d=["Arial","Helvetica","Helvetica Neue","Times New Roman","Georgia","Courier New","Verdana","Tahoma","Trebuchet MS","sans-serif","serif","monospace"],f=[...new Set([...l,...d])];s.font=`${c} ${u} ${a} monospace`;let p=s.measureText(o).width,g="unknown",S=new Map;for(let C of f){s.font=`${c} ${u} ${a} "${C}", monospace`;let F=s.measureText(o).width;if(S.set(C,F),F!==p){s.font=`${c} ${u} ${a} "${C}"`;let k=s.measureText(o).width;s.font=`${c} ${u} ${a} ${r.fontFamily}`;let R=s.measureText(o).width;if(Math.abs(k-R)<.1){g=C;break}}}return y.debug("[computedStyles] Font detection:",{declared:r.fontFamily,detected:g,declaredFonts:l,fontWidths:Array.from(S.entries()),isIframe:t!==document}),g}var _s=$(()=>{"use strict";De()});function Ti(e,t){if(!t)return e;let n=t.split(" ").filter(i=>i.trim()),r=n.find(i=>!i.includes("--")),o=n.filter(i=>i.includes("--"));return r&&o.length>0?`${e}.${r}.${o[0]}`:r?`${e}.${r}`:n[0]?`${e}.${n[0]}`:e}function Ig(e){let n=(e.ownerDocument.defaultView||window).getComputedStyle(e);return y.debug("[computedStyles] Extracting styles:",{fontFamily:n.fontFamily,fontWeight:n.fontWeight,borderRadius:n.borderRadius,backgroundColor:n.backgroundColor,padding:{top:n.paddingTop,right:n.paddingRight,bottom:n.paddingBottom,left:n.paddingLeft},isIframeContext:e.ownerDocument!==document}),{color:vn(n.color),backgroundColor:vn(n.backgroundColor),borderColor:vn(n.borderColor),padding:{top:n.paddingTop,right:n.paddingRight,bottom:n.paddingBottom,left:n.paddingLeft},margin:{top:n.marginTop,right:n.marginRight,bottom:n.marginBottom,left:n.marginLeft},gap:n.gap,fontFamily:n.fontFamily,renderedFont:Fw(e),fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing,textAlign:n.textAlign,textTransform:n.textTransform,width:n.width,height:n.height,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,borderWidth:n.borderWidth,borderStyle:n.borderStyle,borderRadius:n.borderRadius,boxShadow:n.boxShadow,textShadow:n.textShadow,display:n.display,flexDirection:n.display==="flex"?n.flexDirection:void 0,justifyContent:n.display==="flex"?n.justifyContent:void 0,alignItems:n.display==="flex"?n.alignItems:void 0,position:n.position,opacity:n.opacity,cursor:n.cursor}}function Fg(e,t){let n={width:null,height:null,minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,display:null,flexGrow:null,flexShrink:null,flexBasis:null};try{let r=Array.from(t.styleSheets);for(let i of r)try{let s=i.cssRules||i.rules;if(!s)continue;for(let a of Array.from(s))if(a.type===1){let u=a;try{if(e.matches(u.selectorText)){let c=u.style;c.width&&(n.width=c.width),c.height&&(n.height=c.height),c.minWidth&&(n.minWidth=c.minWidth),c.minHeight&&(n.minHeight=c.minHeight),c.maxWidth&&(n.maxWidth=c.maxWidth),c.maxHeight&&(n.maxHeight=c.maxHeight),c.display&&(n.display=c.display),c.flexGrow&&(n.flexGrow=c.flexGrow),c.flexShrink&&(n.flexShrink=c.flexShrink),c.flexBasis&&(n.flexBasis=c.flexBasis)}}catch{continue}}}catch{continue}let o=e.style;o.width&&(n.width=o.width),o.height&&(n.height=o.height),o.minWidth&&(n.minWidth=o.minWidth),o.minHeight&&(n.minHeight=o.minHeight),o.maxWidth&&(n.maxWidth=o.maxWidth),o.maxHeight&&(n.maxHeight=o.maxHeight),o.display&&(n.display=o.display),o.flexGrow&&(n.flexGrow=o.flexGrow),o.flexShrink&&(n.flexShrink=o.flexShrink),o.flexBasis&&(n.flexBasis=o.flexBasis)}catch(r){y.error("Error extracting declared styles:",r)}return n}var Fl=$(()=>{"use strict";De();_s()});function gR(e){let t=[],n=new Set,r=Ew.join(", "),o=e.querySelectorAll(r);for(let i of Array.from(o)){let s=`${i.tagName.toLowerCase()}.${i.className}`;n.has(s)||(n.add(s),t.push(i))}if(Ew.includes(e.tagName.toLowerCase())){let i=`${e.tagName.toLowerCase()}.${e.className}`;n.has(i)||t.unshift(e)}return t}function mR(e){let n=(e.ownerDocument.defaultView||window).getComputedStyle(e),r=e.tagName.toLowerCase(),o=e.className,i=typeof o=="string"?o:o?.baseVal||"";return{selector:Ti(r,i),tagName:r,className:i,styles:{fontSize:n.fontSize,fontFamily:Os(n.fontFamily),fontWeight:n.fontWeight,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing,color:vn(n.color),textAlign:n.textAlign,textTransform:n.textTransform}}}function hR(e,t=2){let n=[e],r=new Set,o=s=>{let a=s.className;return typeof a=="string"?a:a?.baseVal||""};r.add(`${e.tagName}.${o(e)}`);function i(s,a){if(a>=t)return;let u=Array.from(s.children);for(let c of u){let l=c.tagName.toLowerCase();if(["script","style","link","meta","br","hr"].includes(l))continue;let d=`${c.tagName}.${o(c)}`;r.has(d)||(r.add(d),n.push(c),i(c,a+1))}}return i(e,0),n}function xR(e){let n=(e.ownerDocument.defaultView||window).getComputedStyle(e),r=e.tagName.toLowerCase(),o=e.className,i=typeof o=="string"?o:o?.baseVal||"",s=n.borderWidth!=="0px",a=n.backgroundColor!=="transparent"&&n.backgroundColor!=="rgba(0, 0, 0, 0)",u=n.borderRadius!=="0px",c=n.gap!=="normal"&&n.gap!=="0px";if(!s&&!a&&!u&&!c)return null;let l=n.borderWidth,d=n.borderStyle,f=vn(n.borderColor),p=s?`${l} ${d} ${f}`:"none";return{selector:Ti(r,i),className:i,border:p,borderRadius:n.borderRadius,backgroundColor:vn(n.backgroundColor),gap:n.gap}}function $s(){y.debug("[computedStyles] extractStoryStyles called - FULL CONTEXT VERSION");try{let e=document.getElementById("storybook-preview-iframe");if(!e||!e.contentDocument)throw new Error("Storybook preview iframe not found");let t=e.contentDocument,n=t.getElementById("storybook-root");if(!n)throw new Error("Story root element not found");let r=n.firstElementChild;if(!r)throw new Error("Component element not found in story root");let o=hR(r,2),i=o.map(xR).filter(a=>a!==null);y.debug("[computedStyles] Extracted visual styles from nested elements:",{total:o.length,withVisuals:i.length,elements:i.map(a=>({selector:a.selector,border:a.border,background:a.backgroundColor,borderRadius:a.borderRadius}))});let s=[];try{let a=gR(r);s=a.map(mR),y.debug("[computedStyles] Text elements found:",{count:a.length,elements:s.map(u=>({selector:u.selector,fontSize:u.styles.fontSize,fontWeight:u.styles.fontWeight}))})}catch(a){y.error("[computedStyles] Error extracting text elements:",a)}return{computed:Ig(r),declared:Fg(r,t),markup:r.outerHTML,textElementStyles:s,nestedElementStyles:i}}catch(e){return y.error("Error extracting computed styles:",e),null}}var Ew,Aw=$(()=>{"use strict";De();_s();Fl();Ew=["input","textarea","button","select","label","span","a","p","h1","h2","h3","h4","h5","h6"]});function Eg(e,t,n,r){return e===t&&t===n&&n===r?e:e===n&&t===r?`${e} ${t}`:t===r?`${e} ${t} ${n}`:`${e} ${t} ${n} ${r}`}function bR(e,t,n){if(!(e==="0px"||t==="none"))return`${e} ${t} ${n}`}function SR(e){let n=(e.ownerDocument.defaultView||window).getComputedStyle(e),r={},o=vn(n.backgroundColor);Dn("backgroundColor",o)||(r.backgroundColor=o);let i=bR(n.borderWidth,n.borderStyle,vn(n.borderColor));i&&(r.border=i),Dn("borderRadius",n.borderRadius)||(r.borderRadius=n.borderRadius),Dn("boxShadow",n.boxShadow)||(r.boxShadow=n.boxShadow),Dn("opacity",n.opacity)||(r.opacity=n.opacity);let s=e.tagName.toLowerCase(),a=["svg","circle","rect","ellipse","line","polyline","polygon","path","text","tspan","g","use","defs","clipPath","mask"];if(e instanceof SVGElement||a.includes(s)){for(let C=0;C<e.attributes.length;C++){let F=e.attributes[C];if(["class","style","id","xmlns","xmlns:xlink"].includes(F.name))continue;let k=F.name.replace(/-([a-z])/g,(z,_)=>_.toUpperCase()),R=F.value.startsWith("rgb")?vn(F.value):F.value;k==="d"&&R.length>100?r[k]=R.substring(0,100)+"...":r[k]=R}let p=n.getPropertyValue("fill"),g=n.getPropertyValue("stroke");if(p&&p!=="none"&&(r.fill=p.startsWith("rgb")?vn(p):p),g&&g!=="none"&&(r.stroke=g.startsWith("rgb")?vn(g):g),["circle","ellipse","rect","path","line","polyline","polygon"].includes(s)){let C=e.getBoundingClientRect();C.width>0&&(r.width=`${Math.round(C.width*100)/100}px`),C.height>0&&(r.height=`${Math.round(C.height*100)/100}px`)}}let c=e.textContent&&e.textContent.trim().length>0,l=yR.includes(e.tagName.toLowerCase());(c||l)&&(r.fontSize=n.fontSize,r.fontFamily=Os(n.fontFamily),r.fontWeight=n.fontWeight,r.lineHeight=n.lineHeight,r.color=vn(n.color),Dn("letterSpacing",n.letterSpacing)||(r.letterSpacing=n.letterSpacing),Dn("textAlign",n.textAlign)||(r.textAlign=n.textAlign)),r.display=n.display;let d=Eg(n.paddingTop,n.paddingRight,n.paddingBottom,n.paddingLeft);Dn("padding",d)||(r.padding=d);let f=Eg(n.marginTop,n.marginRight,n.marginBottom,n.marginLeft);return Dn("margin",f)||(r.margin=f),Dn("gap",n.gap)||(r.gap=n.gap),(n.display==="flex"||n.display==="inline-flex")&&(Dn("flexDirection",n.flexDirection)||(r.flexDirection=n.flexDirection),Dn("justifyContent",n.justifyContent)||(r.justifyContent=n.justifyContent),Dn("alignItems",n.alignItems)||(r.alignItems=n.alignItems)),r.width||(r.width=n.width),r.height||(r.height=n.height),r}function Pw(e){let t=1;for(let n of e.children)t+=Pw(n);return t}function Lw(e,t=4){function n(o,i){let s=o.tagName.toLowerCase(),a=o.className,u=typeof a=="string"?a:a?.baseVal||"",c=o.id||void 0,l=o.getAttribute("role")||void 0,d;for(let S of Array.from(o.childNodes))if(S.nodeType===Node.TEXT_NODE){let C=S.textContent?.trim();if(C){d=C.length>50?C.substring(0,50)+"...":C;break}}let f=s;c?f=`${s}#${c}`:u&&(f=Ti(s,u));let p=SR(o),g=[];if(i<t){let S=Array.from(o.children);for(let C of S){let F=C.tagName.toLowerCase();if(["script","style","link","meta","br","hr","noscript"].includes(F))continue;let R=(C.ownerDocument.defaultView||window).getComputedStyle(C);R.display==="none"||R.visibility==="hidden"||g.push(n(C,i+1))}}return{selector:f,tagName:s,className:u,id:c,role:l,textContent:d,styles:p,children:g}}y.debug("[computedStyles] Extracting DOM tree with maxDepth:",t);let r=n(e,0);return y.debug("[computedStyles] DOM tree extracted:",{rootSelector:r.selector,childrenCount:r.children.length,totalNodes:Pw(r)}),r}function Ag(e=4){y.debug("[extractStoryDOMTree] Starting DOM tree extraction...");try{let t=document.getElementById("storybook-preview-iframe");if(y.debug("[extractStoryDOMTree] iframe found:",!!t),!t)throw new Error("Storybook preview iframe not found");if(y.debug("[extractStoryDOMTree] iframe.contentDocument:",!!t.contentDocument),!t.contentDocument)throw new Error("iframe.contentDocument is not accessible (possible cross-origin issue)");let n=t.contentDocument.getElementById("storybook-root");if(y.debug("[extractStoryDOMTree] storyRoot found:",!!n),!n)throw new Error("Story root element not found");let r=n.firstElementChild;if(y.debug("[extractStoryDOMTree] componentElement found:",!!r,r?.tagName),!r)throw new Error("Component element not found in story root");let o=Lw(r,e);return y.debug("[extractStoryDOMTree] DOM tree extracted successfully:",{selector:o.selector,childrenCount:o.children.length}),o}catch(t){return y.error("[extractStoryDOMTree] Error extracting DOM tree:",t),null}}var yR,Mw=$(()=>{"use strict";De();_s();Fl();yR=["input","textarea","button","select","label","span","a","p","h1","h2","h3","h4","h5","h6"]});var Pg=$(()=>{"use strict";_s();Fl();Aw();Mw()});var ov=Jn((nX,rv)=>{"use strict";rv.exports={compareTwoStrings:nv,findBestMatch:VR};function nv(e,t){if(e=e.replace(/\s+/g,""),t=t.replace(/\s+/g,""),e===t)return 1;if(e.length<2||t.length<2)return 0;let n=new Map;for(let o=0;o<e.length-1;o++){let i=e.substring(o,o+2),s=n.has(i)?n.get(i)+1:1;n.set(i,s)}let r=0;for(let o=0;o<t.length-1;o++){let i=t.substring(o,o+2),s=n.has(i)?n.get(i):0;s>0&&(n.set(i,s-1),r++)}return 2*r/(e.length+t.length-2)}function VR(e,t){if(!GR(e,t))throw new Error("Bad arguments: First argument should be a string, second should be an array of strings");let n=[],r=0;for(let i=0;i<t.length;i++){let s=t[i],a=nv(e,s);n.push({target:s,rating:a}),a>n[r].rating&&(r=i)}let o=n[r];return{ratings:n,bestMatch:o,bestMatchIndex:r}}function GR(e,t){return!(typeof e!="string"||!Array.isArray(t)||!t.length||t.find(function(n){return typeof n!="string"}))}});var KC=Jn((Joe,YC)=>{"use strict";var WC=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,O4=/\n/g,_4=/^\s*/,$4=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,U4=/^:\s*/,j4=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,H4=/^[;\s]*/,W4=/^\s+|\s+$/g,V4=`
14
- `,VC="/",GC="*",Qo="",G4="comment",q4="declaration";function Y4(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(g){var S=g.match(O4);S&&(n+=S.length);var C=g.lastIndexOf(V4);r=~C?g.length-C:r+g.length}function i(){var g={line:n,column:r};return function(S){return S.position=new s(g),c(),S}}function s(g){this.start=g,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function a(g){var S=new Error(t.source+":"+n+":"+r+": "+g);if(S.reason=g,S.filename=t.source,S.line=n,S.column=r,S.source=e,!t.silent)throw S}function u(g){var S=g.exec(e);if(S){var C=S[0];return o(C),e=e.slice(C.length),S}}function c(){u(_4)}function l(g){var S;for(g=g||[];S=d();)S!==!1&&g.push(S);return g}function d(){var g=i();if(!(VC!=e.charAt(0)||GC!=e.charAt(1))){for(var S=2;Qo!=e.charAt(S)&&(GC!=e.charAt(S)||VC!=e.charAt(S+1));)++S;if(S+=2,Qo===e.charAt(S-1))return a("End of comment missing");var C=e.slice(2,S-2);return r+=2,o(C),e=e.slice(S),r+=2,g({type:G4,comment:C})}}function f(){var g=i(),S=u($4);if(S){if(d(),!u(U4))return a("property missing ':'");var C=u(j4),F=g({type:q4,property:qC(S[0].replace(WC,Qo)),value:C?qC(C[0].replace(WC,Qo)):Qo});return u(H4),F}}function p(){var g=[];l(g);for(var S;S=f();)S!==!1&&(g.push(S),l(g));return g}return c(),p()}function qC(e){return e?e.replace(W4,Qo):Qo}YC.exports=Y4});var XC=Jn(oa=>{"use strict";var K4=oa&&oa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oa,"__esModule",{value:!0});oa.default=Q4;var X4=K4(KC());function Q4(e,t){let n=null;if(!e||typeof e!="string")return n;let r=(0,X4.default)(e),o=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;let{property:s,value:a}=i;o?t(s,a,i):a&&(n=n||{},n[s]=a)}),n}});var JC=Jn(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});uc.camelCase=void 0;var J4=/^--[a-zA-Z0-9_-]+$/,Z4=/-([a-z])/g,eU=/^[^-]+$/,tU=/^-(webkit|moz|ms|o|khtml)-/,nU=/^-(ms)-/,rU=function(e){return!e||eU.test(e)||J4.test(e)},oU=function(e,t){return t.toUpperCase()},QC=function(e,t){return"".concat(t,"-")},iU=function(e,t){return t===void 0&&(t={}),rU(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(nU,QC):e=e.replace(tU,QC),e.replace(Z4,oU))};uc.camelCase=iU});var e1=Jn((dh,ZC)=>{"use strict";var sU=dh&&dh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},aU=sU(XC()),lU=JC();function ph(e,t){var n={};return!e||typeof e!="string"||(0,aU.default)(e,function(r,o){r&&o&&(n[(0,lU.camelCase)(r,t)]=o)}),n}ph.default=ph;ZC.exports=ph});var FT=Jn((Fue,IT)=>{"use strict";var Bc=Object.prototype.hasOwnProperty,TT=Object.prototype.toString,bT=Object.defineProperty,ST=Object.getOwnPropertyDescriptor,wT=function(t){return typeof Array.isArray=="function"?Array.isArray(t):TT.call(t)==="[object Array]"},vT=function(t){if(!t||TT.call(t)!=="[object Object]")return!1;var n=Bc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Bc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||Bc.call(t,o)},kT=function(t,n){bT&&n.name==="__proto__"?bT(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},CT=function(t,n){if(n==="__proto__")if(Bc.call(t,n)){if(ST)return ST(t,n).value}else return;return t[n]};IT.exports=function e(){var t,n,r,o,i,s,a=arguments[0],u=1,c=arguments.length,l=!1;for(typeof a=="boolean"&&(l=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<c;++u)if(t=arguments[u],t!=null)for(n in t)r=CT(a,n),o=CT(t,n),a!==o&&(l&&o&&(vT(o)||(i=wT(o)))?(i?(i=!1,s=r&&wT(r)?r:[]):s=r&&vT(r)?r:{},kT(a,{name:n,newValue:e(l,s,o)})):typeof o<"u"&&kT(a,{name:n,newValue:o}));return a}});import Ia from"react";import{addons as Vc,types as _x,experimental_getStatusStore as hF}from"storybook/manager-api";import{AddonPanel as E8}from"storybook/internal/components";import Mt,{useState as qW,useEffect as YW}from"react";import{styled as fr}from"storybook/theming";import Yx from"react";import{styled as At}from"storybook/theming";var le="#ea580c",Yc="#c2410c",Pa="#ff6b35";var jx=At.div(({theme:e})=>({fontFamily:e.typography.fonts.base,height:"100%",display:"flex",flexDirection:"column",backgroundColor:e.background.content,color:e.color.defaultText})),Hx=At.div({flex:1,overflow:"auto",padding:"6px 20px 20px"}),ts=At.div({marginBottom:"20px"}),ns=At.label(({theme:e})=>({display:"block",marginBottom:`${e.layoutMargin*.6}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,fontWeight:e.typography.weight.bold,color:e.color.defaultText})),rs=At.input(({theme:e})=>({width:"100%",padding:`${e.layoutMargin*.8}px ${e.layoutMargin}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,border:`1px solid ${e.appBorderColor}`,borderRadius:e.appBorderRadius,backgroundColor:e.input.background,color:e.color.defaultText,"&:focus":{outline:"none",borderColor:e.color.secondary,boxShadow:`0 0 0 2px ${e.color.secondary}20`}})),En=At.select(({theme:e})=>({width:"100%",padding:`${e.layoutMargin*.8}px 32px ${e.layoutMargin*.8}px ${e.layoutMargin}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,border:`1px solid ${e.appBorderColor}`,borderRadius:e.appBorderRadius,backgroundColor:e.input.background,color:e.color.defaultText,cursor:"pointer",appearance:"none",backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 10px center",backgroundSize:"12px",transition:"border-color 0.15s, box-shadow 0.15s","&:focus":{outline:"none",borderColor:e.color.secondary,boxShadow:`0 0 0 2px ${e.color.secondary}20`},"&:hover":{borderColor:e.color.mediumdark},"&:disabled":{opacity:.6,cursor:"not-allowed"}})),Wx=At(En)(({theme:e})=>({width:"auto",padding:`${e.layoutMargin*.6}px 28px ${e.layoutMargin*.6}px ${e.layoutMargin}px`,fontSize:e.typography.size.s1})),La=e=>({padding:`${e.layoutMargin*.8}px ${e.layoutMargin*1.6}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,fontWeight:e.typography.weight.bold,border:"none",borderRadius:e.appBorderRadius,cursor:"pointer",transition:"all 0.15s","&:disabled":{opacity:.5,cursor:"not-allowed"}}),er=At.button(({theme:e})=>({...La(e),backgroundColor:e.color.secondary,color:e.color.inverseText,"&:hover:not(:disabled)":{opacity:.9}})),qt=At.button(({theme:e})=>({...La(e),backgroundColor:le,color:e.color.inverseText,boxShadow:`0 2px 4px ${le}4d`,"&:hover:not(:disabled)":{backgroundColor:Yc,transform:"translateY(-1px)",boxShadow:`0 4px 8px ${le}66`}})),Er=At.button(({theme:e})=>({...La(e),backgroundColor:"transparent",border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,"&:hover:not(:disabled)":{backgroundColor:e.background.hoverable}})),Vx=At.button(({theme:e})=>({...La(e),backgroundColor:e.color.negative,color:e.color.inverseText,"&:hover:not(:disabled)":{opacity:.9}})),wn=At.button(({theme:e})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",padding:`${e.layoutMargin*.4}px`,fontSize:e.typography.size.s2,color:e.color.mediumdark,backgroundColor:"transparent",border:"none",borderRadius:e.appBorderRadius,cursor:"pointer",transition:"all 0.15s","&:hover":{color:e.color.defaultText,backgroundColor:e.background.hoverable},"&:disabled":{opacity:.5,cursor:"not-allowed"}})),Kc=At.button(({theme:e})=>({padding:0,fontSize:e.typography.size.s1,fontFamily:e.typography.fonts.base,color:e.color.secondary,backgroundColor:"transparent",border:"none",cursor:"pointer",textDecoration:"none","&:hover":{textDecoration:"underline"},"&:disabled":{opacity:.5,cursor:"not-allowed"}})),io=At.button(({theme:e,active:t})=>({padding:`${e.layoutMargin*.6}px ${e.layoutMargin*1.2}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,fontWeight:t?e.typography.weight.bold:400,color:t?e.color.secondary:e.color.mediumdark,backgroundColor:"transparent",border:"none",borderBottom:t?`2px solid ${e.color.secondary}`:"2px solid transparent",cursor:"pointer",transition:"all 0.15s","&:hover":{color:t?e.color.secondary:e.color.defaultText}})),so=At(rs)(({theme:e})=>({paddingLeft:`${e.layoutMargin*3}px`,backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:`${e.layoutMargin}px center`,backgroundSize:"14px"})),z8=At.div(({theme:e})=>({padding:`${e.layoutMargin*1.6}px`,borderRadius:e.appBorderRadius,border:`1px solid ${e.appBorderColor}`,backgroundColor:e.background.content})),Gx=At.h2(({theme:e})=>({margin:`0 0 ${e.layoutMargin*1.6}px`,fontSize:e.typography.size.s3,fontFamily:e.typography.fonts.base,fontWeight:e.typography.weight.bold,color:e.color.defaultText})),N8=At.h3(({theme:e})=>({margin:`0 0 ${e.layoutMargin*1.2}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,fontWeight:e.typography.weight.bold,color:e.color.defaultText})),Xc=At.p(({theme:e})=>({margin:`0 0 ${e.layoutMargin*.8}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,color:e.color.defaultText,lineHeight:1.5})),O8=At.div(({theme:e,width:t="100%",height:n="40px"})=>({width:t,height:n,backgroundColor:e.background.hoverable,borderRadius:e.appBorderRadius,position:"relative",overflow:"hidden","&::after":{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"100%",background:`linear-gradient(90deg, transparent, ${e.color.mediumlight}33, transparent)`,animation:"shimmer 1.5s infinite"},"@keyframes shimmer":{"0%":{transform:"translateX(-100%)"},"100%":{transform:"translateX(100%)"}}})),qx=At.span(({theme:e,variant:t="default"})=>{let n={default:{bg:e.background.hoverable,color:e.color.defaultText},success:{bg:`${e.color.positive}40`,color:e.color.positive},warning:{bg:`${e.color.warning}40`,color:e.color.warning},error:{bg:`${e.color.negative}40`,color:e.color.negative}};return{display:"inline-block",padding:"2px 8px",fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,borderRadius:"3px",backgroundColor:n[t].bg,color:n[t].color}}),_8=At.div(({theme:e})=>({padding:"40px 20px",textAlign:"center",color:e.color.mediumdark})),$8=At.div(({theme:e})=>({fontSize:e.typography.size.s3,fontWeight:e.typography.weight.bold,marginBottom:`${e.layoutMargin*.8}px`,color:e.color.defaultText})),U8=At.div(({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.mediumdark}));var Qc=({header:e,children:t,footer:n})=>Yx.createElement(jx,null,e,Yx.createElement(Hx,null,t),n);import TF from"react";import{styled as IF}from"storybook/theming";var FF=IF.div(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"6px 12px",borderBottom:`1px solid ${e.appBorderColor}`,position:"sticky",top:0,zIndex:100,backgroundColor:e.background.content})),Jc=({toolbar:e})=>TF.createElement(FF,null,e);import Q8 from"react";import{styled as Ma}from"storybook/theming";var eV=Ma.div(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"6px 12px",borderBottom:`1px solid ${e.appBorderColor}`,position:"sticky",top:0,zIndex:100,backgroundColor:e.background.content})),tV=Ma.div({display:"flex",flex:1}),nV=Ma(io)(({theme:e,disabled:t})=>({padding:"6px 12px",...t?{color:e.color.mediumlight,cursor:"not-allowed",opacity:.5,"&:hover":{}}:{}})),rV=Ma.div({display:"flex",gap:"8px",alignItems:"center"});import pn,{useState as gw,useCallback as mw,useEffect as hw}from"react";import{styled as fo}from"storybook/theming";import Re,{useEffect as aw}from"react";import{styled as at}from"storybook/theming";ve();je();De();pt();var lw=at.div({position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e4}),cw=at.div(({theme:e})=>({position:"absolute",top:"100%",right:0,marginTop:"8px",backgroundColor:e.background.content,borderRadius:"12px",width:"360px",maxWidth:"90vw",boxShadow:"0 10px 40px rgba(0, 0, 0, 0.3)",overflow:"hidden",zIndex:10001})),uD=at.div({display:"flex",alignItems:"center",gap:"12px",padding:"16px 16px 12px"}),pD=at.div({width:"36px",height:"36px",borderRadius:"50%",backgroundColor:le,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontSize:"14px",fontWeight:700,flexShrink:0}),dD=at.div({display:"flex",flexDirection:"column",gap:"4px"}),fD=at.div(({theme:e})=>({fontSize:"15px",fontWeight:600,color:e.color.defaultText,lineHeight:1.2})),gD=at.span({display:"inline-block",alignSelf:"flex-start",padding:"2px 10px",borderRadius:"6px",fontSize:"11px",fontWeight:600,color:"#7c3aed",backgroundColor:"rgba(124, 58, 237, 0.1)",letterSpacing:"0.3px"}),mD=at.div(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px 8px",fontSize:"14px",color:e.color.defaultText})),hD=at.span(({theme:e})=>({color:e.textMutedColor,fontSize:"13px"})),xD=at.span(({theme:e})=>({color:e.color.defaultText,fontSize:"15px",fontWeight:600})),yD=at.div(({theme:e})=>({height:"8px",borderRadius:"4px",backgroundColor:e.base==="dark"?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.08)",margin:"0 16px 8px",overflow:"hidden"})),bD=at.div(({percent:e})=>({height:"100%",width:`${Math.min(100,Math.max(0,e))}%`,background:`linear-gradient(90deg, #f59e0b 0%, ${le} 100%)`,transition:"width 0.3s ease"})),SD=at.div(({theme:e})=>({padding:"0 16px 14px",fontSize:"12px",color:e.textMutedColor})),wD=at.div(({theme:e})=>({height:"1px",backgroundColor:e.appBorderColor})),vD=at.button({width:"100%",padding:"14px 16px",background:"transparent",border:"none",color:le,fontSize:"14px",fontWeight:500,textAlign:"left",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}),kD=at.button(({theme:e})=>({position:"absolute",top:"12px",right:"12px",width:"24px",height:"24px",borderRadius:"4px",border:"none",background:"transparent",color:e.textMutedColor,cursor:"pointer",fontSize:"16px",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:e.background.hoverable}})),CD=at.div(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px",borderBottom:`1px solid ${e.appBorderColor}`})),TD=at.div(({theme:e})=>({display:"flex",alignItems:"center",gap:"10px",color:e.color.defaultText,fontSize:"14px",fontWeight:500})),ID=at.div(({theme:e})=>({width:"32px",height:"32px",borderRadius:"50%",backgroundColor:le,display:"flex",alignItems:"center",justifyContent:"center",color:e.color.inverseText,fontSize:"14px",fontWeight:600})),FD=at.div({display:"flex",gap:"8px"}),uw=at(wn)({fontSize:"18px"}),ED=at.div({padding:"20px 16px"}),AD=at.div(({theme:e})=>({padding:"16px",borderRadius:"8px",background:"linear-gradient(135deg, #10B981 0%, #3B82F6 100%)",marginBottom:"16px",color:"#fff"})),PD=at.div({fontSize:"12px",fontWeight:500,opacity:.9,marginBottom:"4px"}),LD=at.div({fontSize:"28px",fontWeight:700}),MD=at.div({fontSize:"11px",opacity:.8,marginTop:"4px"}),BD=at.div(({theme:e})=>({padding:"16px",borderRadius:"8px",border:`1px solid ${e.appBorderColor}`,marginBottom:"16px"})),DD=at.div({display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"}),RD=at.div({display:"flex",alignItems:"center",gap:"8px"}),zD=at.span(({theme:e})=>({fontSize:"14px",fontWeight:600,color:e.color.defaultText})),ND=at.span(({theme:e})=>({fontSize:"10px",fontWeight:600,padding:"2px 6px",borderRadius:"4px",backgroundColor:le,color:e.color.inverseText})),OD=at.button(({theme:e})=>({background:"none",border:"none",color:le,fontSize:"12px",cursor:"pointer","&:hover":{textDecoration:"underline"}})),_D=at.div(({theme:e})=>({fontSize:"12px",color:e.color.mediumdark})),$D=at.button(({theme:e,variant:t="primary"})=>({width:"100%",padding:"12px",borderRadius:"6px",fontSize:"14px",fontWeight:600,cursor:"pointer",border:"none",marginBottom:"12px",backgroundColor:t==="primary"?le:e.background.hoverable,color:t==="primary"?e.color.inverseText:e.color.defaultText,"&:hover":{opacity:.9}})),UD=30*1e3,pw=({onClose:e})=>{let{sessionToken:t,resetAuth:n,usageData:r,usageLastFetched:o,setUsageData:i}=we(),{featureFlags:s}=ie(),a=s.showCosts,u=r,c=!r&&t,l=async(g=!1)=>{if(!t)return;let S=o&&Date.now()-o<UD;if(!(!g&&S&&r))try{let C=q(),F=await oe(`${C}/api/addon/account`,{headers:{Authorization:`Bearer ${t}`}});if(F.ok){let k=await F.json();i(k)}}catch(C){y.error("Failed to fetch usage:",C)}};aw(()=>{l()},[t]),aw(()=>{let g=()=>{document.visibilityState==="visible"&&(y.debug("[TokenUsageModal] Tab visible, refreshing balance..."),l(!0))};return document.addEventListener("visibilitychange",g),()=>document.removeEventListener("visibilitychange",g)},[t]);let d=()=>{n(),e()},f=()=>{let g=q();window.open(`${g}/pricing`,"_blank")},p=()=>{let g=q();window.open(`${g}/pricing#add-credits`,"_blank")};if(t&&!a&&!c){let g=Math.floor(u?.creditBalance??0),C=Math.max(g,10),F=Math.max(0,C-g),k=C>0?g/C*100:0;return Re.createElement(Re.Fragment,null,Re.createElement(lw,{onClick:e}),Re.createElement(cw,{onClick:R=>R.stopPropagation(),style:{width:"320px"}},Re.createElement(kD,{onClick:e,title:"Close"},"\xD7"),Re.createElement(uD,null,Re.createElement(pD,null,u?.email?u.email[0].toUpperCase():"U"),Re.createElement(dD,null,Re.createElement(fD,null,"UI Review"),Re.createElement(gD,null,(u?.plan||"BETA").toUpperCase()))),Re.createElement(mD,null,Re.createElement(hD,null,"Credits"),Re.createElement(xD,null,g," left")),Re.createElement(yD,null,Re.createElement(bD,{percent:k})),Re.createElement(SD,null,F," used \xB7 ",g," remaining"),Re.createElement(wD,null),Re.createElement(vD,{onClick:p},"Get free credits \u2192")))}return Re.createElement(Re.Fragment,null,Re.createElement(lw,{onClick:e}),Re.createElement(cw,{onClick:g=>g.stopPropagation()},Re.createElement(CD,null,Re.createElement(TD,null,Re.createElement(ID,null,u?.email?u.email[0].toUpperCase():"U"),Re.createElement("span",null,u?.email||"Loading...")),Re.createElement(FD,null,Re.createElement(uw,{onClick:d,title:"Sign out"},"\u2192"),Re.createElement(uw,{onClick:e,title:"Close"},"\xD7"))),Re.createElement(ED,null,c?Re.createElement("div",{style:{textAlign:"center",padding:"20px"}},"Loading..."):t?Re.createElement(Re.Fragment,null,Re.createElement(AD,null,Re.createElement(PD,null,"Credit Balance"),Re.createElement(LD,null,"$",(u?.creditBalance??0).toFixed(2)),Re.createElement(MD,null,(u?.creditBalance??0)<2?"Low balance - consider topping up":"Pay only for what you use")),Re.createElement(BD,null,Re.createElement(DD,null,Re.createElement(RD,null,Re.createElement(zD,null,"Current Plan"),Re.createElement(ND,null,u?.plan||"Free")),Re.createElement(OD,{onClick:f},"View detail >")),Re.createElement(_D,null,"~$0.02-0.05 per review depending on complexity"),Re.createElement($D,{onClick:p,style:{marginTop:"16px"}},"Add Credits"))):Re.createElement("div",{style:{textAlign:"center",padding:"20px"}},"Please sign in to view usage"))))};ve();import wi from"react";import{styled as dw}from"storybook/theming";je();ve();pt();De();var jD=dw.div({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}),HD=dw.span(({theme:e})=>({fontSize:e.typography.size.s1,color:e.color.mediumdark})),WD={admin:{enableFixGeneration:!0,enableFixApply:!0,enableAutoMap:!0,enableReviewBadges:!0,showCosts:!0,enableParallelReview:!0,enableModelSelection:!0},beta:{enableFixGeneration:!0,enableFixApply:!1,enableAutoMap:!0,enableReviewBadges:!1,showCosts:!1,enableParallelReview:!1,enableModelSelection:!1}},fw=()=>{let{userRole:e,roleOverride:t,setRoleOverride:n,setFeatureFlags:r}=ie(),{sessionToken:o}=we();return e!=="admin"?null:wi.createElement(jD,null,wi.createElement(HD,null,"View as:"),wi.createElement(Wx,{value:t??e,onChange:a=>{let u=a.target.value;if(u===e)n(null),o&&oe(`${q()}/api/addon/flags`,{headers:{Authorization:`Bearer ${o}`}}).then(c=>c.json()).then(c=>{let l={enableFixGeneration:!!c.enableFixGeneration,enableFixApply:!!c.enableFixApply,enableAutoMap:!!c.enableAutoMap,enableReviewBadges:!!c.enableReviewBadges,showCosts:!!c.showCosts,enableParallelReview:!!c.enableParallelReview,enableModelSelection:!!c.enableModelSelection};r(l);try{localStorage.setItem("uicopilot_feature_flags",JSON.stringify(l))}catch{}}).catch(c=>y.warn("[RoleSwitcher] Failed to re-fetch flags:",c.message));else{n(u);let c=WD[u];r(c);try{localStorage.setItem("uicopilot_feature_flags",JSON.stringify(c))}catch{}}},style:{width:"auto",minWidth:"100px"}},wi.createElement("option",{value:"admin"},"Admin"),wi.createElement("option",{value:"beta"},"Beta Tester")),t&&wi.createElement(qx,{variant:"warning"},"Previewing as ",t))};ve();je();pt();var VD=fo.div({display:"flex",alignItems:"center"}),vi=fo.div(({theme:e})=>({display:"flex",alignItems:"center",paddingLeft:"8px",borderLeft:`1px solid ${e.appBorderColor}`,"&:first-of-type":{paddingLeft:0,borderLeft:"none"}})),GD=fo.span(({theme:e})=>({fontSize:e.typography.size.s1,color:e.color.secondary,fontWeight:e.typography.weight.bold,paddingRight:"8px",opacity:.8})),qD=fo.div({position:"relative"}),YD=fo.button(({theme:e})=>({width:"26px",height:"26px",padding:0,background:`linear-gradient(135deg, ${e.color.secondary} 0%, ${e.color.secondary}cc 100%)`,border:"none",borderRadius:"50%",color:e.color.inverseText,cursor:"pointer",fontSize:e.typography.size.s2,fontWeight:e.typography.weight.bold,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s","&:hover":{transform:"scale(1.05)",boxShadow:`0 2px 8px ${e.color.secondary}66`}})),xw=fo.button(({isLow:e})=>({display:"flex",alignItems:"center",gap:"6px",padding:"4px 10px",background:e?"#FEF3C7":"linear-gradient(135deg, #10B981 0%, #3B82F6 100%)",border:"none",borderRadius:"12px",color:e?"#92400E":"#fff",cursor:"pointer",fontSize:"12px",fontWeight:600,transition:"all 0.2s",minWidth:"60px",justifyContent:"center","&:hover":{transform:"scale(1.02)",boxShadow:"0 2px 8px rgba(0,0,0,0.15)"}})),KD=fo.span({display:"inline-block",width:"12px",height:"12px",border:"2px solid rgba(255,255,255,0.3)",borderTopColor:"#fff",borderRadius:"50%",animation:"credit-spin 0.8s linear infinite","@keyframes credit-spin":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}}),XD=fo.button(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"4px",padding:"4px 10px",height:"28px",border:`1px solid ${e.appBorderColor}`,borderRadius:e.appBorderRadius,backgroundColor:"transparent",color:e.color.mediumdark,fontSize:"12px",fontWeight:500,cursor:"pointer",transition:"all 0.15s","&:hover":{backgroundColor:e.background.hoverable,color:e.color.defaultText,borderColor:e.color.mediumdark}})),QD=30*1e3,bg=({onOpenSettings:e})=>{let[t,n]=gw(!1),[r,o]=gw(!1),{usageData:i,usageLastFetched:s,setUsageData:a,sessionToken:u}=we(),{userRole:c,roleOverride:l,featureFlags:d}=ie(),f=l??c;hw(()=>{(async()=>{if(!(!u||s&&Date.now()-s<QD&&i)){o(!0);try{let R=q(),z=await oe(`${R}/api/addon/account`,{headers:{Authorization:`Bearer ${u}`}});if(z.ok){let _=await z.json();a(_)}}catch(R){console.error("Failed to fetch balance:",R)}finally{o(!1)}}})()},[u,s,i,a]),hw(()=>{let F=()=>{document.visibilityState==="visible"&&t&&n(!1)},k=()=>{t&&n(!1)};return document.addEventListener("visibilitychange",F),window.addEventListener("focus",k),()=>{document.removeEventListener("visibilitychange",F),window.removeEventListener("focus",k)}},[t]);let p=mw(()=>{n(!0)},[]),g=mw(()=>{n(!1)},[]),S=i?.creditBalance??0,C=S<2&&!r;return pn.createElement(VD,null,e&&pn.createElement(vi,null,pn.createElement(XD,{onClick:e,title:"Settings"},pn.createElement("span",{style:{fontSize:"14px"}},"\u2699"),"Settings")),u&&c==="admin"&&f==="admin"&&pn.createElement(vi,null,pn.createElement(fw,null)),pn.createElement(vi,null,pn.createElement(GD,null,"v","0.5.2")),u&&d.showCosts&&pn.createElement(vi,null,pn.createElement(xw,{onClick:p,isLow:C,title:r?"Loading...":i?C?"Low balance - click to top up":"Credit balance - click for details":"Click to load balance"},r?pn.createElement(KD,null):i?`$${S.toFixed(2)}`:"...")),u&&!d.showCosts&&i&&pn.createElement(vi,null,pn.createElement(xw,{onClick:p,isLow:Math.floor(S)<=3,title:`${Math.floor(S)} review credits remaining \u2014 click to manage`},"\u26A1 ",Math.floor(S))),pn.createElement(vi,null,pn.createElement(qD,null,pn.createElement(YD,{title:"Account & Usage",onClick:p},i?.email?i.email[0].toUpperCase():"?"),t&&pn.createElement(pw,{onClose:g}))))};import Et from"react";import{styled as cr}from"storybook/theming";import Lt from"react";ve();De();je();pt();import{useCallback as ki,useRef as yw,useEffect as JD}from"react";var go=q();y.debug("[useAuth] Module loaded, APP_URL:",go);var Bs=()=>{let e=yw(null),{sessionToken:t,apiKey:n,authMethod:r,deviceCode:o,userCode:i,verificationUri:s,isConnected:a,authError:u,setSessionToken:c,setApiKey:l,setAuthMethod:d,setDeviceCode:f,setUserCode:p,setVerificationUri:g,setPollingInterval:S,setAuthError:C,resetAuth:F}=we(),k=yw(null),R=ki(async()=>{try{y.debug("[useAuth] Starting OAuth flow, requesting poll_code...");let x;try{x=await oe(`${go}/api/addon/auth/oauth-poll`,{method:"POST"})}catch(A){let D=A instanceof Error&&A.message.includes("timed out")?`Cannot reach UI Copilot server at ${go}. Is the dashboard running?`:`Connection failed: ${go} is not responding.`;C(D),y.error("[useAuth]",D);return}if(!x.ok)throw new Error("Failed to create poll code");let{poll_code:b}=await x.json();y.debug("[useAuth] Got poll_code:",b.substring(0,15)+"...");let E=600,h=700,T=window.screenX+(window.outerWidth-E)/2,I=window.screenY+(window.outerHeight-h)/2;window.open(`${go}/addon/auth?poll_code=${b}`,"figma-auth",`width=${E},height=${h},left=${T},top=${I}`),y.debug("[useAuth] Starting OAuth poll for token..."),k.current&&clearInterval(k.current);let v=async()=>{try{let P=await(await fetch(`${go}/api/addon/auth/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({device_code:b})})).json();P.status==="authorized"&&P.session_token?(y.debug("[useAuth] \u2705 OAuth poll successful! Got token."),k.current&&(clearInterval(k.current),k.current=null),localStorage.setItem("uicopilot_session_token",P.session_token),c(P.session_token)):P.status==="expired"&&(y.debug("[useAuth] OAuth poll_code expired"),k.current&&(clearInterval(k.current),k.current=null))}catch(A){y.error("[useAuth] OAuth poll error:",A)}};k.current=setInterval(v,2e3),setTimeout(v,1e3)}catch(x){y.error("[useAuth] OAuth flow error:",x)}},[c]),z=ki(async()=>{try{let x=await fetch(`${go}/api/addon/auth/device`,{method:"POST"});if(!x.ok)throw new Error("Failed to start device code flow");let b=await x.json();f(b.device_code),p(b.user_code),g(b.verification_uri),window.open(b.verification_uri,"_blank"),_(b.device_code,b.interval*1e3)}catch(x){throw y.error("[useAuth] Device code flow error:",x),x}},[f,p,g]),_=ki((x,b)=>{y.debug("[useAuth] Starting polling. Device code:",x,"Interval:",b),e.current&&clearInterval(e.current);let E=async()=>{try{let T=await(await fetch(`${go}/api/addon/auth/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({device_code:x})})).json();T.status==="authorized"?(y.debug("[useAuth] Device code authorization successful!"),e.current&&(clearInterval(e.current),e.current=null),f(null),p(null),g(null),localStorage.setItem("uicopilot_session_token",T.session_token),c(T.session_token)):(T.status==="expired"||T.status==="denied")&&(y.debug("[useAuth] Device code expired or denied"),e.current&&(clearInterval(e.current),e.current=null),f(null),p(null),g(null))}catch(h){y.error("[useAuth] Polling error:",h)}};e.current=setInterval(E,b),S(b)},[f,p,g,c,S]),M=ki(()=>{e.current&&(clearInterval(e.current),e.current=null),f(null),p(null),g(null),S(null)},[f,p,g,S]),B=ki(x=>{l(x),localStorage.setItem("uicopilot_api_key",x)},[l]),m=ki(()=>{F(),e.current&&(clearInterval(e.current),e.current=null)},[F]);return JD(()=>()=>{e.current&&clearInterval(e.current),k.current&&clearInterval(k.current)},[]),{sessionToken:t,apiKey:n,authMethod:r,deviceCode:o,userCode:i,verificationUri:s,isConnected:a,authError:u,setAuthMethod:d,startOAuth:R,startDeviceCode:z,cancelDeviceCode:M,saveApiKey:B,logout:m}};ve();De();je();pt();import{useCallback as kl}from"react";var Ds=q(),qr=()=>{let{projects:e,selectedProjectId:t,loadingProjects:n,setProjects:r,setSelectedProjectId:o,setLoadingProjects:i,getSelectedProject:s}=Ze(),{sessionToken:a}=we(),u=kl(async()=>{if(!a){y.debug("[useProjects] No session token, skipping fetch");return}try{i(!0),y.debug("[useProjects] Fetching from:",`${Ds}/api/projects`);let f=await oe(`${Ds}/api/projects`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`}});if(f.ok){let p=await f.json();y.debug("[useProjects] Projects:",p.projects),r(p.projects||[])}else y.error("[useProjects] Failed to fetch projects:",f.status,f.statusText)}catch(f){y.error("[useProjects] Error fetching projects:",f)}finally{i(!1)}},[a,r,i]),c=kl(async f=>{if(!a)throw new Error("Not authenticated");let p=await oe(`${Ds}/api/projects`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify(f)});if(!p.ok)throw new Error("Failed to create project");let g=await p.json();return await u(),g.project},[a,u]),l=kl(async(f,p)=>{if(!a)throw new Error("Not authenticated");let g={};if(p.name!==void 0&&(g.name=p.name),p.description!==void 0&&(g.description=p.description),p.figmaFileUrl!==void 0&&(g.figmaFileId=p.figmaFileUrl||void 0),!(await oe(`${Ds}/api/projects/${f}`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify(g)})).ok)throw new Error("Failed to update project");await u()},[a,u]),d=kl(async f=>{if(!a)throw new Error("Not authenticated");if(!(await oe(`${Ds}/api/projects/${f}`,{method:"DELETE",headers:{Authorization:`Bearer ${a}`}})).ok)throw new Error("Failed to delete project");await u(),t===f&&o(null)},[a,t,u,o]);return{projects:e,selectedProjectId:t,selectedProject:s(),loadingProjects:n,setSelectedProjectId:o,fetchProjects:u,createProject:c,updateProject:l,deleteProject:d}};ve();var Rs=()=>{let{showComponentBrowser:e,figmaFileUrl:t,currentMapping:n,mappingSource:r,loadingMapping:o,showFigmaQuality:i,setShowComponentBrowser:s,setFigmaFileUrl:a,setCurrentMapping:u,setMappingSource:c,setLoadingMapping:l,setShowFigmaQuality:d}=rt();return{showComponentBrowser:e,figmaFileUrl:t,currentMapping:n,mappingSource:r,loadingMapping:o,showFigmaQuality:i,setShowComponentBrowser:s,setFigmaFileUrl:a,setCurrentMapping:u,setMappingSource:c,setLoadingMapping:l,setShowFigmaQuality:d,openComponentBrowser:()=>s(!0),closeComponentBrowser:()=>s(!1)}};ve();Cg();Pg();import{useCallback as Vs,useRef as Rl}from"react";De();function El(){return new Promise(e=>{let t=document.getElementById("storybook-preview-iframe");if(!t||!t.contentWindow){y.warn("[iframeReload] No preview iframe found"),e();return}let n=t.contentWindow.location.href,r=new URL(n);r.searchParams.set("_cb",Date.now().toString());let o=r.toString();y.debug("[iframeReload] Triggering cache-busted reload:",o);let i=setTimeout(()=>{y.warn("[iframeReload] Iframe reload timed out after 5s"),t.removeEventListener("load",s),e()},5e3),s=()=>{clearTimeout(i),t.removeEventListener("load",s),y.debug("[iframeReload] Iframe loaded, waiting for HMR and styles to settle..."),setTimeout(()=>{y.debug("[iframeReload] Iframe reloaded and styles should be fresh"),e()},2e3)};t.addEventListener("load",s),t.contentWindow.location.href=o})}var Al=BigInt(4294967295),Bw=BigInt(32);function wR(e,t=!1){return t?{h:Number(e&Al),l:Number(e>>Bw&Al)}:{h:Number(e>>Bw&Al)|0,l:Number(e&Al)|0}}function Dw(e,t=!1){let n=e.length,r=new Uint32Array(n),o=new Uint32Array(n);for(let i=0;i<n;i++){let{h:s,l:a}=wR(e[i],t);[r[i],o[i]]=[s,a]}return[r,o]}var Rw=(e,t,n)=>e<<n|t>>>32-n,zw=(e,t,n)=>t<<n|e>>>32-n,Nw=(e,t,n)=>t<<n-32|e>>>64-n,Ow=(e,t,n)=>e<<n-32|t>>>64-n;function vR(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Lg(e,t=""){if(!Number.isSafeInteger(e)||e<0){let n=t&&`"${t}" `;throw new Error(`${n}expected integer >= 0, got ${e}`)}}function Pl(e,t,n=""){let r=vR(e),o=e?.length,i=t!==void 0;if(!r||i&&o!==t){let s=n&&`"${n}" `,a=i?` of length ${t}`:"",u=r?`length=${o}`:`type=${typeof e}`;throw new Error(s+"expected Uint8Array"+a+", got "+u)}return e}function Mg(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function _w(e,t){Pl(e,void 0,"digestInto() output");let n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function $w(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Bg(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}var kR=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function CR(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function TR(e){for(let t=0;t<e.length;t++)e[t]=CR(e[t]);return e}var Dg=kR?e=>e:TR;function Uw(e,t={}){let n=(o,i)=>e(i).update(o).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=o=>e(o),Object.assign(n,t),Object.freeze(n)}var jw=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});var IR=BigInt(0),Us=BigInt(1),FR=BigInt(2),ER=BigInt(7),AR=BigInt(256),PR=BigInt(113),Vw=[],Gw=[],qw=[];for(let e=0,t=Us,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Vw.push(2*(5*r+n)),Gw.push((e+1)*(e+2)/2%64);let o=IR;for(let i=0;i<7;i++)t=(t<<Us^(t>>ER)*PR)%AR,t&FR&&(o^=Us<<(Us<<BigInt(i))-Us);qw.push(o)}var Yw=Dw(qw,!0),LR=Yw[0],MR=Yw[1],Hw=(e,t,n)=>n>32?Nw(e,t,n):Rw(e,t,n),Ww=(e,t,n)=>n>32?Ow(e,t,n):zw(e,t,n);function BR(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let s=0;s<10;s++)n[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,u=(s+2)%10,c=n[u],l=n[u+1],d=Hw(c,l,1)^n[a],f=Ww(c,l,1)^n[a+1];for(let p=0;p<50;p+=10)e[s+p]^=d,e[s+p+1]^=f}let o=e[2],i=e[3];for(let s=0;s<24;s++){let a=Gw[s],u=Hw(o,i,a),c=Ww(o,i,a),l=Vw[s];o=e[l],i=e[l+1],e[l]=u,e[l+1]=c}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)n[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=LR[r],e[1]^=MR[r]}Bg(n)}var Rg=class e{constructor(t,n,r,o=!1,i=24){Zn(this,"state");Zn(this,"pos",0);Zn(this,"posOut",0);Zn(this,"finished",!1);Zn(this,"state32");Zn(this,"destroyed",!1);Zn(this,"blockLen");Zn(this,"suffix");Zn(this,"outputLen");Zn(this,"enableXOF",!1);Zn(this,"rounds");if(this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=i,Lg(r,"outputLen"),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=$w(this.state)}clone(){return this._cloneInto()}keccak(){Dg(this.state32),BR(this.state32,this.rounds),Dg(this.state32),this.posOut=0,this.pos=0}update(t){Mg(this),Pl(t);let{blockLen:n,state:r}=this,o=t.length;for(let i=0;i<o;){let s=Math.min(n-this.pos,o-i);for(let a=0;a<s;a++)r[this.pos++]^=t[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,(n&128)!==0&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){Mg(this,!1),Pl(t),this.finish();let n=this.state,{blockLen:r}=this;for(let o=0,i=t.length;o<i;){this.posOut>=r&&this.keccak();let s=Math.min(r-this.posOut,i-o);t.set(n.subarray(this.posOut,this.posOut+s),o),this.posOut+=s,o+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Lg(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(_w(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Bg(this.state)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:o,rounds:i,enableXOF:s}=this;return t||(t=new e(n,r,o,s,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=o,t.enableXOF=s,t.destroyed=this.destroyed,t}},DR=(e,t,n,r={})=>Uw(()=>new Rg(t,e,n),r);var Kw=DR(6,72,64,jw(10));var RR=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,zg=Math.ceil,ar=Math.floor,Rn="[BigNumber Error] ",Xw=Rn+"Number primitive has more than 15 significant digits: ",Sr=1e14,He=14,Ng=9007199254740991,Og=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],mo=1e7,rn=1e9;function Qw(e){var t,n,r,o=k.prototype={constructor:k,toString:null,valueOf:null},i=new k(1),s=20,a=4,u=-7,c=21,l=-1e7,d=1e7,f=!1,p=1,g=0,S={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},C="0123456789abcdefghijklmnopqrstuvwxyz",F=!0;function k(m,x){var b,E,h,T,I,v,A,P,D=this;if(!(D instanceof k))return new k(m,x);if(x==null){if(m&&m._isBigNumber===!0){D.s=m.s,!m.c||m.e>d?D.c=D.e=null:m.e<l?D.c=[D.e=0]:(D.e=m.e,D.c=m.c.slice());return}if((v=typeof m=="number")&&m*0==0){if(D.s=1/m<0?(m=-m,-1):1,m===~~m){for(T=0,I=m;I>=10;I/=10,T++);T>d?D.c=D.e=null:(D.e=T,D.c=[m]);return}P=String(m)}else{if(!RR.test(P=String(m)))return r(D,P,v);D.s=P.charCodeAt(0)==45?(P=P.slice(1),-1):1}(T=P.indexOf("."))>-1&&(P=P.replace(".","")),(I=P.search(/e/i))>0?(T<0&&(T=I),T+=+P.slice(I+1),P=P.substring(0,I)):T<0&&(T=P.length)}else{if(Dt(x,2,C.length,"Base"),x==10&&F)return D=new k(m),M(D,s+D.e+1,a);if(P=String(m),v=typeof m=="number"){if(m*0!=0)return r(D,P,v,x);if(D.s=1/m<0?(P=P.slice(1),-1):1,k.DEBUG&&P.replace(/^0\.0*|\./,"").length>15)throw Error(Xw+m)}else D.s=P.charCodeAt(0)===45?(P=P.slice(1),-1):1;for(b=C.slice(0,x),T=I=0,A=P.length;I<A;I++)if(b.indexOf(E=P.charAt(I))<0){if(E=="."){if(I>T){T=A;continue}}else if(!h&&(P==P.toUpperCase()&&(P=P.toLowerCase())||P==P.toLowerCase()&&(P=P.toUpperCase()))){h=!0,I=-1,T=0;continue}return r(D,String(m),v,x)}v=!1,P=n(P,x,10,D.s),(T=P.indexOf("."))>-1?P=P.replace(".",""):T=P.length}for(I=0;P.charCodeAt(I)===48;I++);for(A=P.length;P.charCodeAt(--A)===48;);if(P=P.slice(I,++A)){if(A-=I,v&&k.DEBUG&&A>15&&(m>Ng||m!==ar(m)))throw Error(Xw+D.s*m);if((T=T-I-1)>d)D.c=D.e=null;else if(T<l)D.c=[D.e=0];else{if(D.e=T,D.c=[],I=(T+1)%He,T<0&&(I+=He),I<A){for(I&&D.c.push(+P.slice(0,I)),A-=He;I<A;)D.c.push(+P.slice(I,I+=He));I=He-(P=P.slice(I)).length}else I-=A;for(;I--;P+="0");D.c.push(+P)}}else D.c=[D.e=0]}k.clone=Qw,k.ROUND_UP=0,k.ROUND_DOWN=1,k.ROUND_CEIL=2,k.ROUND_FLOOR=3,k.ROUND_HALF_UP=4,k.ROUND_HALF_DOWN=5,k.ROUND_HALF_EVEN=6,k.ROUND_HALF_CEIL=7,k.ROUND_HALF_FLOOR=8,k.EUCLID=9,k.config=k.set=function(m){var x,b;if(m!=null)if(typeof m=="object"){if(m.hasOwnProperty(x="DECIMAL_PLACES")&&(b=m[x],Dt(b,0,rn,x),s=b),m.hasOwnProperty(x="ROUNDING_MODE")&&(b=m[x],Dt(b,0,8,x),a=b),m.hasOwnProperty(x="EXPONENTIAL_AT")&&(b=m[x],b&&b.pop?(Dt(b[0],-rn,0,x),Dt(b[1],0,rn,x),u=b[0],c=b[1]):(Dt(b,-rn,rn,x),u=-(c=b<0?-b:b))),m.hasOwnProperty(x="RANGE"))if(b=m[x],b&&b.pop)Dt(b[0],-rn,-1,x),Dt(b[1],1,rn,x),l=b[0],d=b[1];else if(Dt(b,-rn,rn,x),b)l=-(d=b<0?-b:b);else throw Error(Rn+x+" cannot be zero: "+b);if(m.hasOwnProperty(x="CRYPTO"))if(b=m[x],b===!!b)if(b)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=b;else throw f=!b,Error(Rn+"crypto unavailable");else f=b;else throw Error(Rn+x+" not true or false: "+b);if(m.hasOwnProperty(x="MODULO_MODE")&&(b=m[x],Dt(b,0,9,x),p=b),m.hasOwnProperty(x="POW_PRECISION")&&(b=m[x],Dt(b,0,rn,x),g=b),m.hasOwnProperty(x="FORMAT"))if(b=m[x],typeof b=="object")S=b;else throw Error(Rn+x+" not an object: "+b);if(m.hasOwnProperty(x="ALPHABET"))if(b=m[x],typeof b=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(b))F=b.slice(0,10)=="0123456789",C=b;else throw Error(Rn+x+" invalid: "+b)}else throw Error(Rn+"Object expected: "+m);return{DECIMAL_PLACES:s,ROUNDING_MODE:a,EXPONENTIAL_AT:[u,c],RANGE:[l,d],CRYPTO:f,MODULO_MODE:p,POW_PRECISION:g,FORMAT:S,ALPHABET:C}},k.isBigNumber=function(m){if(!m||m._isBigNumber!==!0)return!1;if(!k.DEBUG)return!0;var x,b,E=m.c,h=m.e,T=m.s;e:if({}.toString.call(E)=="[object Array]"){if((T===1||T===-1)&&h>=-rn&&h<=rn&&h===ar(h)){if(E[0]===0){if(h===0&&E.length===1)return!0;break e}if(x=(h+1)%He,x<1&&(x+=He),String(E[0]).length==x){for(x=0;x<E.length;x++)if(b=E[x],b<0||b>=Sr||b!==ar(b))break e;if(b!==0)return!0}}}else if(E===null&&h===null&&(T===null||T===1||T===-1))return!0;throw Error(Rn+"Invalid BigNumber: "+m)},k.maximum=k.max=function(){return z(arguments,-1)},k.minimum=k.min=function(){return z(arguments,1)},k.random=(function(){var m=9007199254740992,x=Math.random()*m&2097151?function(){return ar(Math.random()*m)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(b){var E,h,T,I,v,A=0,P=[],D=new k(i);if(b==null?b=s:Dt(b,0,rn),I=zg(b/He),f)if(crypto.getRandomValues){for(E=crypto.getRandomValues(new Uint32Array(I*=2));A<I;)v=E[A]*131072+(E[A+1]>>>11),v>=9e15?(h=crypto.getRandomValues(new Uint32Array(2)),E[A]=h[0],E[A+1]=h[1]):(P.push(v%1e14),A+=2);A=I/2}else if(crypto.randomBytes){for(E=crypto.randomBytes(I*=7);A<I;)v=(E[A]&31)*281474976710656+E[A+1]*1099511627776+E[A+2]*4294967296+E[A+3]*16777216+(E[A+4]<<16)+(E[A+5]<<8)+E[A+6],v>=9e15?crypto.randomBytes(7).copy(E,A):(P.push(v%1e14),A+=7);A=I/7}else throw f=!1,Error(Rn+"crypto unavailable");if(!f)for(;A<I;)v=x(),v<9e15&&(P[A++]=v%1e14);for(I=P[--A],b%=He,I&&b&&(v=Og[He-b],P[A]=ar(I/v)*v);P[A]===0;P.pop(),A--);if(A<0)P=[T=0];else{for(T=-1;P[0]===0;P.splice(0,1),T-=He);for(A=1,v=P[0];v>=10;v/=10,A++);A<He&&(T-=He-A)}return D.e=T,D.c=P,D}})(),k.sum=function(){for(var m=1,x=arguments,b=new k(x[0]);m<x.length;)b=b.plus(x[m++]);return b},n=(function(){var m="0123456789";function x(b,E,h,T){for(var I,v=[0],A,P=0,D=b.length;P<D;){for(A=v.length;A--;v[A]*=E);for(v[0]+=T.indexOf(b.charAt(P++)),I=0;I<v.length;I++)v[I]>h-1&&(v[I+1]==null&&(v[I+1]=0),v[I+1]+=v[I]/h|0,v[I]%=h)}return v.reverse()}return function(b,E,h,T,I){var v,A,P,D,N,w,j,G,L=b.indexOf("."),K=s,ee=a;for(L>=0&&(D=g,g=0,b=b.replace(".",""),G=new k(E),w=G.pow(b.length-L),g=D,G.c=x(Yr(sr(w.c),w.e,"0"),10,h,m),G.e=G.c.length),j=x(b,E,h,I?(v=C,m):(v=m,C)),P=D=j.length;j[--D]==0;j.pop());if(!j[0])return v.charAt(0);if(L<0?--P:(w.c=j,w.e=P,w.s=T,w=t(w,G,K,ee,h),j=w.c,N=w.r,P=w.e),A=P+K+1,L=j[A],D=h/2,N=N||A<0||j[A+1]!=null,N=ee<4?(L!=null||N)&&(ee==0||ee==(w.s<0?3:2)):L>D||L==D&&(ee==4||N||ee==6&&j[A-1]&1||ee==(w.s<0?8:7)),A<1||!j[0])b=N?Yr(v.charAt(1),-K,v.charAt(0)):v.charAt(0);else{if(j.length=A,N)for(--h;++j[--A]>h;)j[A]=0,A||(++P,j=[1].concat(j));for(D=j.length;!j[--D];);for(L=0,b="";L<=D;b+=v.charAt(j[L++]));b=Yr(b,P,v.charAt(0))}return b}})(),t=(function(){function m(E,h,T){var I,v,A,P,D=0,N=E.length,w=h%mo,j=h/mo|0;for(E=E.slice();N--;)A=E[N]%mo,P=E[N]/mo|0,I=j*A+P*w,v=w*A+I%mo*mo+D,D=(v/T|0)+(I/mo|0)+j*P,E[N]=v%T;return D&&(E=[D].concat(E)),E}function x(E,h,T,I){var v,A;if(T!=I)A=T>I?1:-1;else for(v=A=0;v<T;v++)if(E[v]!=h[v]){A=E[v]>h[v]?1:-1;break}return A}function b(E,h,T,I){for(var v=0;T--;)E[T]-=v,v=E[T]<h[T]?1:0,E[T]=v*I+E[T]-h[T];for(;!E[0]&&E.length>1;E.splice(0,1));}return function(E,h,T,I,v){var A,P,D,N,w,j,G,L,K,ee,re,de,ae,qe,tt,se,pe,Ie=E.s==h.s?1:-1,ze=E.c,me=h.c;if(!ze||!ze[0]||!me||!me[0])return new k(!E.s||!h.s||(ze?me&&ze[0]==me[0]:!me)?NaN:ze&&ze[0]==0||!me?Ie*0:Ie/0);for(L=new k(Ie),K=L.c=[],P=E.e-h.e,Ie=T+P+1,v||(v=Sr,P=lr(E.e/He)-lr(h.e/He),Ie=Ie/He|0),D=0;me[D]==(ze[D]||0);D++);if(me[D]>(ze[D]||0)&&P--,Ie<0)K.push(1),N=!0;else{for(qe=ze.length,se=me.length,D=0,Ie+=2,w=ar(v/(me[0]+1)),w>1&&(me=m(me,w,v),ze=m(ze,w,v),se=me.length,qe=ze.length),ae=se,ee=ze.slice(0,se),re=ee.length;re<se;ee[re++]=0);pe=me.slice(),pe=[0].concat(pe),tt=me[0],me[1]>=v/2&&tt++;do{if(w=0,A=x(me,ee,se,re),A<0){if(de=ee[0],se!=re&&(de=de*v+(ee[1]||0)),w=ar(de/tt),w>1)for(w>=v&&(w=v-1),j=m(me,w,v),G=j.length,re=ee.length;x(j,ee,G,re)==1;)w--,b(j,se<G?pe:me,G,v),G=j.length,A=1;else w==0&&(A=w=1),j=me.slice(),G=j.length;if(G<re&&(j=[0].concat(j)),b(ee,j,re,v),re=ee.length,A==-1)for(;x(me,ee,se,re)<1;)w++,b(ee,se<re?pe:me,re,v),re=ee.length}else A===0&&(w++,ee=[0]);K[D++]=w,ee[0]?ee[re++]=ze[ae]||0:(ee=[ze[ae]],re=1)}while((ae++<qe||ee[0]!=null)&&Ie--);N=ee[0]!=null,K[0]||K.splice(0,1)}if(v==Sr){for(D=1,Ie=K[0];Ie>=10;Ie/=10,D++);M(L,T+(L.e=D+P*He-1)+1,I,N)}else L.e=P,L.r=+N;return L}})();function R(m,x,b,E){var h,T,I,v,A;if(b==null?b=a:Dt(b,0,8),!m.c)return m.toString();if(h=m.c[0],I=m.e,x==null)A=sr(m.c),A=E==1||E==2&&(I<=u||I>=c)?Ml(A,I):Yr(A,I,"0");else if(m=M(new k(m),x,b),T=m.e,A=sr(m.c),v=A.length,E==1||E==2&&(x<=T||T<=u)){for(;v<x;A+="0",v++);A=Ml(A,T)}else if(x-=I+(E===2&&T>I),A=Yr(A,T,"0"),T+1>v){if(--x>0)for(A+=".";x--;A+="0");}else if(x+=T-v,x>0)for(T+1==v&&(A+=".");x--;A+="0");return m.s<0&&h?"-"+A:A}function z(m,x){for(var b,E,h=1,T=new k(m[0]);h<m.length;h++)E=new k(m[h]),(!E.s||(b=jo(T,E))===x||b===0&&T.s===x)&&(T=E);return T}function _(m,x,b){for(var E=1,h=x.length;!x[--h];x.pop());for(h=x[0];h>=10;h/=10,E++);return(b=E+b*He-1)>d?m.c=m.e=null:b<l?m.c=[m.e=0]:(m.e=b,m.c=x),m}r=(function(){var m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,b=/^\.([^.]+)$/,E=/^-?(Infinity|NaN)$/,h=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(T,I,v,A){var P,D=v?I:I.replace(h,"");if(E.test(D))T.s=isNaN(D)?null:D<0?-1:1;else{if(!v&&(D=D.replace(m,function(N,w,j){return P=(j=j.toLowerCase())=="x"?16:j=="b"?2:8,!A||A==P?w:N}),A&&(P=A,D=D.replace(x,"$1").replace(b,"0.$1")),I!=D))return new k(D,P);if(k.DEBUG)throw Error(Rn+"Not a"+(A?" base "+A:"")+" number: "+I);T.s=null}T.c=T.e=null}})();function M(m,x,b,E){var h,T,I,v,A,P,D,N=m.c,w=Og;if(N){e:{for(h=1,v=N[0];v>=10;v/=10,h++);if(T=x-h,T<0)T+=He,I=x,A=N[P=0],D=ar(A/w[h-I-1]%10);else if(P=zg((T+1)/He),P>=N.length)if(E){for(;N.length<=P;N.push(0));A=D=0,h=1,T%=He,I=T-He+1}else break e;else{for(A=v=N[P],h=1;v>=10;v/=10,h++);T%=He,I=T-He+h,D=I<0?0:ar(A/w[h-I-1]%10)}if(E=E||x<0||N[P+1]!=null||(I<0?A:A%w[h-I-1]),E=b<4?(D||E)&&(b==0||b==(m.s<0?3:2)):D>5||D==5&&(b==4||E||b==6&&(T>0?I>0?A/w[h-I]:0:N[P-1])%10&1||b==(m.s<0?8:7)),x<1||!N[0])return N.length=0,E?(x-=m.e+1,N[0]=w[(He-x%He)%He],m.e=-x||0):N[0]=m.e=0,m;if(T==0?(N.length=P,v=1,P--):(N.length=P+1,v=w[He-T],N[P]=I>0?ar(A/w[h-I]%w[I])*v:0),E)for(;;)if(P==0){for(T=1,I=N[0];I>=10;I/=10,T++);for(I=N[0]+=v,v=1;I>=10;I/=10,v++);T!=v&&(m.e++,N[0]==Sr&&(N[0]=1));break}else{if(N[P]+=v,N[P]!=Sr)break;N[P--]=0,v=1}for(T=N.length;N[--T]===0;N.pop());}m.e>d?m.c=m.e=null:m.e<l&&(m.c=[m.e=0])}return m}function B(m){var x,b=m.e;return b===null?m.toString():(x=sr(m.c),x=b<=u||b>=c?Ml(x,b):Yr(x,b,"0"),m.s<0?"-"+x:x)}return o.absoluteValue=o.abs=function(){var m=new k(this);return m.s<0&&(m.s=1),m},o.comparedTo=function(m,x){return jo(this,new k(m,x))},o.decimalPlaces=o.dp=function(m,x){var b,E,h,T=this;if(m!=null)return Dt(m,0,rn),x==null?x=a:Dt(x,0,8),M(new k(T),m+T.e+1,x);if(!(b=T.c))return null;if(E=((h=b.length-1)-lr(this.e/He))*He,h=b[h])for(;h%10==0;h/=10,E--);return E<0&&(E=0),E},o.dividedBy=o.div=function(m,x){return t(this,new k(m,x),s,a)},o.dividedToIntegerBy=o.idiv=function(m,x){return t(this,new k(m,x),0,1)},o.exponentiatedBy=o.pow=function(m,x){var b,E,h,T,I,v,A,P,D,N=this;if(m=new k(m),m.c&&!m.isInteger())throw Error(Rn+"Exponent not an integer: "+B(m));if(x!=null&&(x=new k(x)),v=m.e>14,!N.c||!N.c[0]||N.c[0]==1&&!N.e&&N.c.length==1||!m.c||!m.c[0])return D=new k(Math.pow(+B(N),v?m.s*(2-Ll(m)):+B(m))),x?D.mod(x):D;if(A=m.s<0,x){if(x.c?!x.c[0]:!x.s)return new k(NaN);E=!A&&N.isInteger()&&x.isInteger(),E&&(N=N.mod(x))}else{if(m.e>9&&(N.e>0||N.e<-1||(N.e==0?N.c[0]>1||v&&N.c[1]>=24e7:N.c[0]<8e13||v&&N.c[0]<=9999975e7)))return T=N.s<0&&Ll(m)?-0:0,N.e>-1&&(T=1/T),new k(A?1/T:T);g&&(T=zg(g/He+2))}for(v?(b=new k(.5),A&&(m.s=1),P=Ll(m)):(h=Math.abs(+B(m)),P=h%2),D=new k(i);;){if(P){if(D=D.times(N),!D.c)break;T?D.c.length>T&&(D.c.length=T):E&&(D=D.mod(x))}if(h){if(h=ar(h/2),h===0)break;P=h%2}else if(m=m.times(b),M(m,m.e+1,1),m.e>14)P=Ll(m);else{if(h=+B(m),h===0)break;P=h%2}N=N.times(N),T?N.c&&N.c.length>T&&(N.c.length=T):E&&(N=N.mod(x))}return E?D:(A&&(D=i.div(D)),x?D.mod(x):T?M(D,g,a,I):D)},o.integerValue=function(m){var x=new k(this);return m==null?m=a:Dt(m,0,8),M(x,x.e+1,m)},o.isEqualTo=o.eq=function(m,x){return jo(this,new k(m,x))===0},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(m,x){return jo(this,new k(m,x))>0},o.isGreaterThanOrEqualTo=o.gte=function(m,x){return(x=jo(this,new k(m,x)))===1||x===0},o.isInteger=function(){return!!this.c&&lr(this.e/He)>this.c.length-2},o.isLessThan=o.lt=function(m,x){return jo(this,new k(m,x))<0},o.isLessThanOrEqualTo=o.lte=function(m,x){return(x=jo(this,new k(m,x)))===-1||x===0},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&this.c[0]==0},o.minus=function(m,x){var b,E,h,T,I=this,v=I.s;if(m=new k(m,x),x=m.s,!v||!x)return new k(NaN);if(v!=x)return m.s=-x,I.plus(m);var A=I.e/He,P=m.e/He,D=I.c,N=m.c;if(!A||!P){if(!D||!N)return D?(m.s=-x,m):new k(N?I:NaN);if(!D[0]||!N[0])return N[0]?(m.s=-x,m):new k(D[0]?I:a==3?-0:0)}if(A=lr(A),P=lr(P),D=D.slice(),v=A-P){for((T=v<0)?(v=-v,h=D):(P=A,h=N),h.reverse(),x=v;x--;h.push(0));h.reverse()}else for(E=(T=(v=D.length)<(x=N.length))?v:x,v=x=0;x<E;x++)if(D[x]!=N[x]){T=D[x]<N[x];break}if(T&&(h=D,D=N,N=h,m.s=-m.s),x=(E=N.length)-(b=D.length),x>0)for(;x--;D[b++]=0);for(x=Sr-1;E>v;){if(D[--E]<N[E]){for(b=E;b&&!D[--b];D[b]=x);--D[b],D[E]+=Sr}D[E]-=N[E]}for(;D[0]==0;D.splice(0,1),--P);return D[0]?_(m,D,P):(m.s=a==3?-1:1,m.c=[m.e=0],m)},o.modulo=o.mod=function(m,x){var b,E,h=this;return m=new k(m,x),!h.c||!m.s||m.c&&!m.c[0]?new k(NaN):!m.c||h.c&&!h.c[0]?new k(h):(p==9?(E=m.s,m.s=1,b=t(h,m,0,3),m.s=E,b.s*=E):b=t(h,m,0,p),m=h.minus(b.times(m)),!m.c[0]&&p==1&&(m.s=h.s),m)},o.multipliedBy=o.times=function(m,x){var b,E,h,T,I,v,A,P,D,N,w,j,G,L,K,ee=this,re=ee.c,de=(m=new k(m,x)).c;if(!re||!de||!re[0]||!de[0])return!ee.s||!m.s||re&&!re[0]&&!de||de&&!de[0]&&!re?m.c=m.e=m.s=null:(m.s*=ee.s,!re||!de?m.c=m.e=null:(m.c=[0],m.e=0)),m;for(E=lr(ee.e/He)+lr(m.e/He),m.s*=ee.s,A=re.length,N=de.length,A<N&&(G=re,re=de,de=G,h=A,A=N,N=h),h=A+N,G=[];h--;G.push(0));for(L=Sr,K=mo,h=N;--h>=0;){for(b=0,w=de[h]%K,j=de[h]/K|0,I=A,T=h+I;T>h;)P=re[--I]%K,D=re[I]/K|0,v=j*P+D*w,P=w*P+v%K*K+G[T]+b,b=(P/L|0)+(v/K|0)+j*D,G[T--]=P%L;G[T]=b}return b?++E:G.splice(0,1),_(m,G,E)},o.negated=function(){var m=new k(this);return m.s=-m.s||null,m},o.plus=function(m,x){var b,E=this,h=E.s;if(m=new k(m,x),x=m.s,!h||!x)return new k(NaN);if(h!=x)return m.s=-x,E.minus(m);var T=E.e/He,I=m.e/He,v=E.c,A=m.c;if(!T||!I){if(!v||!A)return new k(h/0);if(!v[0]||!A[0])return A[0]?m:new k(v[0]?E:h*0)}if(T=lr(T),I=lr(I),v=v.slice(),h=T-I){for(h>0?(I=T,b=A):(h=-h,b=v),b.reverse();h--;b.push(0));b.reverse()}for(h=v.length,x=A.length,h-x<0&&(b=A,A=v,v=b,x=h),h=0;x;)h=(v[--x]=v[x]+A[x]+h)/Sr|0,v[x]=Sr===v[x]?0:v[x]%Sr;return h&&(v=[h].concat(v),++I),_(m,v,I)},o.precision=o.sd=function(m,x){var b,E,h,T=this;if(m!=null&&m!==!!m)return Dt(m,1,rn),x==null?x=a:Dt(x,0,8),M(new k(T),m,x);if(!(b=T.c))return null;if(h=b.length-1,E=h*He+1,h=b[h]){for(;h%10==0;h/=10,E--);for(h=b[0];h>=10;h/=10,E++);}return m&&T.e+1>E&&(E=T.e+1),E},o.shiftedBy=function(m){return Dt(m,-Ng,Ng),this.times("1e"+m)},o.squareRoot=o.sqrt=function(){var m,x,b,E,h,T=this,I=T.c,v=T.s,A=T.e,P=s+4,D=new k("0.5");if(v!==1||!I||!I[0])return new k(!v||v<0&&(!I||I[0])?NaN:I?T:1/0);if(v=Math.sqrt(+B(T)),v==0||v==1/0?(x=sr(I),(x.length+A)%2==0&&(x+="0"),v=Math.sqrt(+x),A=lr((A+1)/2)-(A<0||A%2),v==1/0?x="5e"+A:(x=v.toExponential(),x=x.slice(0,x.indexOf("e")+1)+A),b=new k(x)):b=new k(v+""),b.c[0]){for(A=b.e,v=A+P,v<3&&(v=0);;)if(h=b,b=D.times(h.plus(t(T,h,P,1))),sr(h.c).slice(0,v)===(x=sr(b.c)).slice(0,v))if(b.e<A&&--v,x=x.slice(v-3,v+1),x=="9999"||!E&&x=="4999"){if(!E&&(M(h,h.e+s+2,0),h.times(h).eq(T))){b=h;break}P+=4,v+=4,E=1}else{(!+x||!+x.slice(1)&&x.charAt(0)=="5")&&(M(b,b.e+s+2,1),m=!b.times(b).eq(T));break}}return M(b,b.e+s+1,a,m)},o.toExponential=function(m,x){return m!=null&&(Dt(m,0,rn),m++),R(this,m,x,1)},o.toFixed=function(m,x){return m!=null&&(Dt(m,0,rn),m=m+this.e+1),R(this,m,x)},o.toFormat=function(m,x,b){var E,h=this;if(b==null)m!=null&&x&&typeof x=="object"?(b=x,x=null):m&&typeof m=="object"?(b=m,m=x=null):b=S;else if(typeof b!="object")throw Error(Rn+"Argument not an object: "+b);if(E=h.toFixed(m,x),h.c){var T,I=E.split("."),v=+b.groupSize,A=+b.secondaryGroupSize,P=b.groupSeparator||"",D=I[0],N=I[1],w=h.s<0,j=w?D.slice(1):D,G=j.length;if(A&&(T=v,v=A,A=T,G-=T),v>0&&G>0){for(T=G%v||v,D=j.substr(0,T);T<G;T+=v)D+=P+j.substr(T,v);A>0&&(D+=P+j.slice(T)),w&&(D="-"+D)}E=N?D+(b.decimalSeparator||"")+((A=+b.fractionGroupSize)?N.replace(new RegExp("\\d{"+A+"}\\B","g"),"$&"+(b.fractionGroupSeparator||"")):N):D}return(b.prefix||"")+E+(b.suffix||"")},o.toFraction=function(m){var x,b,E,h,T,I,v,A,P,D,N,w,j=this,G=j.c;if(m!=null&&(v=new k(m),!v.isInteger()&&(v.c||v.s!==1)||v.lt(i)))throw Error(Rn+"Argument "+(v.isInteger()?"out of range: ":"not an integer: ")+B(v));if(!G)return new k(j);for(x=new k(i),P=b=new k(i),E=A=new k(i),w=sr(G),T=x.e=w.length-j.e-1,x.c[0]=Og[(I=T%He)<0?He+I:I],m=!m||v.comparedTo(x)>0?T>0?x:P:v,I=d,d=1/0,v=new k(w),A.c[0]=0;D=t(v,x,0,1),h=b.plus(D.times(E)),h.comparedTo(m)!=1;)b=E,E=h,P=A.plus(D.times(h=P)),A=h,x=v.minus(D.times(h=x)),v=h;return h=t(m.minus(b),E,0,1),A=A.plus(h.times(P)),b=b.plus(h.times(E)),A.s=P.s=j.s,T=T*2,N=t(P,E,T,a).minus(j).abs().comparedTo(t(A,b,T,a).minus(j).abs())<1?[P,E]:[A,b],d=I,N},o.toNumber=function(){return+B(this)},o.toPrecision=function(m,x){return m!=null&&Dt(m,1,rn),R(this,m,x,2)},o.toString=function(m){var x,b=this,E=b.s,h=b.e;return h===null?E?(x="Infinity",E<0&&(x="-"+x)):x="NaN":(m==null?x=h<=u||h>=c?Ml(sr(b.c),h):Yr(sr(b.c),h,"0"):m===10&&F?(b=M(new k(b),s+h+1,a),x=Yr(sr(b.c),b.e,"0")):(Dt(m,2,C.length,"Base"),x=n(Yr(sr(b.c),h,"0"),10,m,E,!0)),E<0&&b.c[0]&&(x="-"+x)),x},o.valueOf=o.toJSON=function(){return B(this)},o._isBigNumber=!0,o[Symbol.toStringTag]="BigNumber",o[Symbol.for("nodejs.util.inspect.custom")]=o.valueOf,e!=null&&k.set(e),k}function lr(e){var t=e|0;return e>0||e===t?t:t-1}function sr(e){for(var t,n,r=1,o=e.length,i=e[0]+"";r<o;){for(t=e[r++]+"",n=He-t.length;n--;t="0"+t);i+=t}for(o=i.length;i.charCodeAt(--o)===48;);return i.slice(0,o+1||1)}function jo(e,t){var n,r,o=e.c,i=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=u==c,!o||!i)return r?0:!o^n?1:-1;if(!r)return u>c^n?1:-1;for(a=(u=o.length)<(c=i.length)?u:c,s=0;s<a;s++)if(o[s]!=i[s])return o[s]>i[s]^n?1:-1;return u==c?0:u>c^n?1:-1}function Dt(e,t,n,r){if(e<t||e>n||e!==ar(e))throw Error(Rn+(r||"Argument")+(typeof e=="number"?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Ll(e){var t=e.c.length-1;return lr(e.e/He)==t&&e.c[t]%2!=0}function Ml(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Yr(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(r=e.length,++t>r){for(o=n,t-=r;--t;o+=n);e+=o}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var zR=Qw(),Jw=zR;var NR=24,js=32,OR=()=>typeof globalThis<"u"&&globalThis.crypto&&typeof globalThis.crypto.getRandomValues=="function"?()=>{let e=new Uint32Array(1);return globalThis.crypto.getRandomValues(e),e[0]/4294967296}:Math.random,$g=OR(),_g=(e=4,t=$g)=>{let n="";for(;n.length<e;)n=n+Math.floor(t()*36).toString(36);return n};function _R(e){let t=new Jw(0);for(let n of e.values())t=t.multipliedBy(256).plus(n);return t}var ev=(e="")=>{let t=new TextEncoder;return _R(Kw(t.encode(e))).toString(36).slice(1)},Zw=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),$R=e=>Zw[Math.floor(e()*Zw.length)],UR=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=$g}={})=>{let n=Object.keys(e).toString(),r=n.length?n+_g(js,t):_g(js,t);return ev(r).substring(0,js)},jR=e=>()=>e++,HR=476782367,tv=({random:e=$g,counter:t=jR(Math.floor(e()*HR)),length:n=NR,fingerprint:r=UR({random:e})}={})=>{if(n>js)throw new Error(`Length must be between 2 and ${js}. Received: ${n}`);return function(){let i=$R(e),s=Date.now().toString(36),a=t().toString(36),u=_g(n,e),c=`${s+u+a+r}`;return`${i+ev(c).substring(1,n)}`}},ho=WR(tv);function WR(e){let t;return()=>(t||(t=e()),t())}var qR=Aa(ov());Ls();De();var Bl=/\[([^\]]+)\]\s*\[([^\]]+)\]\s*\[([^\]]+)\]\s*-\s*(.+)/g;function YR(e){return e.replace(/\*\*/g,"").replace(/\*/g,"").replace(/__/g,"").replace(/_/g," ").trim()}function Ug(e,t){let n=[],r=e.split(`
14
+ `,VC="/",GC="*",Qo="",G4="comment",q4="declaration";function Y4(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(g){var S=g.match(O4);S&&(n+=S.length);var C=g.lastIndexOf(V4);r=~C?g.length-C:r+g.length}function i(){var g={line:n,column:r};return function(S){return S.position=new s(g),c(),S}}function s(g){this.start=g,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function a(g){var S=new Error(t.source+":"+n+":"+r+": "+g);if(S.reason=g,S.filename=t.source,S.line=n,S.column=r,S.source=e,!t.silent)throw S}function u(g){var S=g.exec(e);if(S){var C=S[0];return o(C),e=e.slice(C.length),S}}function c(){u(_4)}function l(g){var S;for(g=g||[];S=d();)S!==!1&&g.push(S);return g}function d(){var g=i();if(!(VC!=e.charAt(0)||GC!=e.charAt(1))){for(var S=2;Qo!=e.charAt(S)&&(GC!=e.charAt(S)||VC!=e.charAt(S+1));)++S;if(S+=2,Qo===e.charAt(S-1))return a("End of comment missing");var C=e.slice(2,S-2);return r+=2,o(C),e=e.slice(S),r+=2,g({type:G4,comment:C})}}function f(){var g=i(),S=u($4);if(S){if(d(),!u(U4))return a("property missing ':'");var C=u(j4),F=g({type:q4,property:qC(S[0].replace(WC,Qo)),value:C?qC(C[0].replace(WC,Qo)):Qo});return u(H4),F}}function p(){var g=[];l(g);for(var S;S=f();)S!==!1&&(g.push(S),l(g));return g}return c(),p()}function qC(e){return e?e.replace(W4,Qo):Qo}YC.exports=Y4});var XC=Jn(oa=>{"use strict";var K4=oa&&oa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oa,"__esModule",{value:!0});oa.default=Q4;var X4=K4(KC());function Q4(e,t){let n=null;if(!e||typeof e!="string")return n;let r=(0,X4.default)(e),o=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;let{property:s,value:a}=i;o?t(s,a,i):a&&(n=n||{},n[s]=a)}),n}});var JC=Jn(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});uc.camelCase=void 0;var J4=/^--[a-zA-Z0-9_-]+$/,Z4=/-([a-z])/g,eU=/^[^-]+$/,tU=/^-(webkit|moz|ms|o|khtml)-/,nU=/^-(ms)-/,rU=function(e){return!e||eU.test(e)||J4.test(e)},oU=function(e,t){return t.toUpperCase()},QC=function(e,t){return"".concat(t,"-")},iU=function(e,t){return t===void 0&&(t={}),rU(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(nU,QC):e=e.replace(tU,QC),e.replace(Z4,oU))};uc.camelCase=iU});var e1=Jn((dh,ZC)=>{"use strict";var sU=dh&&dh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},aU=sU(XC()),lU=JC();function ph(e,t){var n={};return!e||typeof e!="string"||(0,aU.default)(e,function(r,o){r&&o&&(n[(0,lU.camelCase)(r,t)]=o)}),n}ph.default=ph;ZC.exports=ph});var FT=Jn((Fue,IT)=>{"use strict";var Bc=Object.prototype.hasOwnProperty,TT=Object.prototype.toString,bT=Object.defineProperty,ST=Object.getOwnPropertyDescriptor,wT=function(t){return typeof Array.isArray=="function"?Array.isArray(t):TT.call(t)==="[object Array]"},vT=function(t){if(!t||TT.call(t)!=="[object Object]")return!1;var n=Bc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Bc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||Bc.call(t,o)},kT=function(t,n){bT&&n.name==="__proto__"?bT(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},CT=function(t,n){if(n==="__proto__")if(Bc.call(t,n)){if(ST)return ST(t,n).value}else return;return t[n]};IT.exports=function e(){var t,n,r,o,i,s,a=arguments[0],u=1,c=arguments.length,l=!1;for(typeof a=="boolean"&&(l=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<c;++u)if(t=arguments[u],t!=null)for(n in t)r=CT(a,n),o=CT(t,n),a!==o&&(l&&o&&(vT(o)||(i=wT(o)))?(i?(i=!1,s=r&&wT(r)?r:[]):s=r&&vT(r)?r:{},kT(a,{name:n,newValue:e(l,s,o)})):typeof o<"u"&&kT(a,{name:n,newValue:o}));return a}});import Ia from"react";import{addons as Vc,types as _x,experimental_getStatusStore as hF}from"storybook/manager-api";import{AddonPanel as E8}from"storybook/internal/components";import Mt,{useState as qW,useEffect as YW}from"react";import{styled as fr}from"storybook/theming";import Yx from"react";import{styled as At}from"storybook/theming";var le="#ea580c",Yc="#c2410c",Pa="#ff6b35";var jx=At.div(({theme:e})=>({fontFamily:e.typography.fonts.base,height:"100%",display:"flex",flexDirection:"column",backgroundColor:e.background.content,color:e.color.defaultText})),Hx=At.div({flex:1,overflow:"auto",padding:"6px 20px 20px"}),ts=At.div({marginBottom:"20px"}),ns=At.label(({theme:e})=>({display:"block",marginBottom:`${e.layoutMargin*.6}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,fontWeight:e.typography.weight.bold,color:e.color.defaultText})),rs=At.input(({theme:e})=>({width:"100%",padding:`${e.layoutMargin*.8}px ${e.layoutMargin}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,border:`1px solid ${e.appBorderColor}`,borderRadius:e.appBorderRadius,backgroundColor:e.input.background,color:e.color.defaultText,"&:focus":{outline:"none",borderColor:e.color.secondary,boxShadow:`0 0 0 2px ${e.color.secondary}20`}})),En=At.select(({theme:e})=>({width:"100%",padding:`${e.layoutMargin*.8}px 32px ${e.layoutMargin*.8}px ${e.layoutMargin}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,border:`1px solid ${e.appBorderColor}`,borderRadius:e.appBorderRadius,backgroundColor:e.input.background,color:e.color.defaultText,cursor:"pointer",appearance:"none",backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 10px center",backgroundSize:"12px",transition:"border-color 0.15s, box-shadow 0.15s","&:focus":{outline:"none",borderColor:e.color.secondary,boxShadow:`0 0 0 2px ${e.color.secondary}20`},"&:hover":{borderColor:e.color.mediumdark},"&:disabled":{opacity:.6,cursor:"not-allowed"}})),Wx=At(En)(({theme:e})=>({width:"auto",padding:`${e.layoutMargin*.6}px 28px ${e.layoutMargin*.6}px ${e.layoutMargin}px`,fontSize:e.typography.size.s1})),La=e=>({padding:`${e.layoutMargin*.8}px ${e.layoutMargin*1.6}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,fontWeight:e.typography.weight.bold,border:"none",borderRadius:e.appBorderRadius,cursor:"pointer",transition:"all 0.15s","&:disabled":{opacity:.5,cursor:"not-allowed"}}),er=At.button(({theme:e})=>({...La(e),backgroundColor:e.color.secondary,color:e.color.inverseText,"&:hover:not(:disabled)":{opacity:.9}})),qt=At.button(({theme:e})=>({...La(e),backgroundColor:le,color:e.color.inverseText,boxShadow:`0 2px 4px ${le}4d`,"&:hover:not(:disabled)":{backgroundColor:Yc,transform:"translateY(-1px)",boxShadow:`0 4px 8px ${le}66`}})),Er=At.button(({theme:e})=>({...La(e),backgroundColor:"transparent",border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,"&:hover:not(:disabled)":{backgroundColor:e.background.hoverable}})),Vx=At.button(({theme:e})=>({...La(e),backgroundColor:e.color.negative,color:e.color.inverseText,"&:hover:not(:disabled)":{opacity:.9}})),wn=At.button(({theme:e})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",padding:`${e.layoutMargin*.4}px`,fontSize:e.typography.size.s2,color:e.color.mediumdark,backgroundColor:"transparent",border:"none",borderRadius:e.appBorderRadius,cursor:"pointer",transition:"all 0.15s","&:hover":{color:e.color.defaultText,backgroundColor:e.background.hoverable},"&:disabled":{opacity:.5,cursor:"not-allowed"}})),Kc=At.button(({theme:e})=>({padding:0,fontSize:e.typography.size.s1,fontFamily:e.typography.fonts.base,color:e.color.secondary,backgroundColor:"transparent",border:"none",cursor:"pointer",textDecoration:"none","&:hover":{textDecoration:"underline"},"&:disabled":{opacity:.5,cursor:"not-allowed"}})),io=At.button(({theme:e,active:t})=>({padding:`${e.layoutMargin*.6}px ${e.layoutMargin*1.2}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,fontWeight:t?e.typography.weight.bold:400,color:t?e.color.secondary:e.color.mediumdark,backgroundColor:"transparent",border:"none",borderBottom:t?`2px solid ${e.color.secondary}`:"2px solid transparent",cursor:"pointer",transition:"all 0.15s","&:hover":{color:t?e.color.secondary:e.color.defaultText}})),so=At(rs)(({theme:e})=>({paddingLeft:`${e.layoutMargin*3}px`,backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:`${e.layoutMargin}px center`,backgroundSize:"14px"})),z8=At.div(({theme:e})=>({padding:`${e.layoutMargin*1.6}px`,borderRadius:e.appBorderRadius,border:`1px solid ${e.appBorderColor}`,backgroundColor:e.background.content})),Gx=At.h2(({theme:e})=>({margin:`0 0 ${e.layoutMargin*1.6}px`,fontSize:e.typography.size.s3,fontFamily:e.typography.fonts.base,fontWeight:e.typography.weight.bold,color:e.color.defaultText})),N8=At.h3(({theme:e})=>({margin:`0 0 ${e.layoutMargin*1.2}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,fontWeight:e.typography.weight.bold,color:e.color.defaultText})),Xc=At.p(({theme:e})=>({margin:`0 0 ${e.layoutMargin*.8}px`,fontSize:e.typography.size.s2,fontFamily:e.typography.fonts.base,color:e.color.defaultText,lineHeight:1.5})),O8=At.div(({theme:e,width:t="100%",height:n="40px"})=>({width:t,height:n,backgroundColor:e.background.hoverable,borderRadius:e.appBorderRadius,position:"relative",overflow:"hidden","&::after":{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"100%",background:`linear-gradient(90deg, transparent, ${e.color.mediumlight}33, transparent)`,animation:"shimmer 1.5s infinite"},"@keyframes shimmer":{"0%":{transform:"translateX(-100%)"},"100%":{transform:"translateX(100%)"}}})),qx=At.span(({theme:e,variant:t="default"})=>{let n={default:{bg:e.background.hoverable,color:e.color.defaultText},success:{bg:`${e.color.positive}40`,color:e.color.positive},warning:{bg:`${e.color.warning}40`,color:e.color.warning},error:{bg:`${e.color.negative}40`,color:e.color.negative}};return{display:"inline-block",padding:"2px 8px",fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,borderRadius:"3px",backgroundColor:n[t].bg,color:n[t].color}}),_8=At.div(({theme:e})=>({padding:"40px 20px",textAlign:"center",color:e.color.mediumdark})),$8=At.div(({theme:e})=>({fontSize:e.typography.size.s3,fontWeight:e.typography.weight.bold,marginBottom:`${e.layoutMargin*.8}px`,color:e.color.defaultText})),U8=At.div(({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.mediumdark}));var Qc=({header:e,children:t,footer:n})=>Yx.createElement(jx,null,e,Yx.createElement(Hx,null,t),n);import TF from"react";import{styled as IF}from"storybook/theming";var FF=IF.div(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"6px 12px",borderBottom:`1px solid ${e.appBorderColor}`,position:"sticky",top:0,zIndex:100,backgroundColor:e.background.content})),Jc=({toolbar:e})=>TF.createElement(FF,null,e);import Q8 from"react";import{styled as Ma}from"storybook/theming";var eV=Ma.div(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"6px 12px",borderBottom:`1px solid ${e.appBorderColor}`,position:"sticky",top:0,zIndex:100,backgroundColor:e.background.content})),tV=Ma.div({display:"flex",flex:1}),nV=Ma(io)(({theme:e,disabled:t})=>({padding:"6px 12px",...t?{color:e.color.mediumlight,cursor:"not-allowed",opacity:.5,"&:hover":{}}:{}})),rV=Ma.div({display:"flex",gap:"8px",alignItems:"center"});import pn,{useState as gw,useCallback as mw,useEffect as hw}from"react";import{styled as fo}from"storybook/theming";import Re,{useEffect as aw}from"react";import{styled as at}from"storybook/theming";ve();je();De();pt();var lw=at.div({position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e4}),cw=at.div(({theme:e})=>({position:"absolute",top:"100%",right:0,marginTop:"8px",backgroundColor:e.background.content,borderRadius:"12px",width:"360px",maxWidth:"90vw",boxShadow:"0 10px 40px rgba(0, 0, 0, 0.3)",overflow:"hidden",zIndex:10001})),uD=at.div({display:"flex",alignItems:"center",gap:"12px",padding:"16px 16px 12px"}),pD=at.div({width:"36px",height:"36px",borderRadius:"50%",backgroundColor:le,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontSize:"14px",fontWeight:700,flexShrink:0}),dD=at.div({display:"flex",flexDirection:"column",gap:"4px"}),fD=at.div(({theme:e})=>({fontSize:"15px",fontWeight:600,color:e.color.defaultText,lineHeight:1.2})),gD=at.span({display:"inline-block",alignSelf:"flex-start",padding:"2px 10px",borderRadius:"6px",fontSize:"11px",fontWeight:600,color:"#7c3aed",backgroundColor:"rgba(124, 58, 237, 0.1)",letterSpacing:"0.3px"}),mD=at.div(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px 8px",fontSize:"14px",color:e.color.defaultText})),hD=at.span(({theme:e})=>({color:e.textMutedColor,fontSize:"13px"})),xD=at.span(({theme:e})=>({color:e.color.defaultText,fontSize:"15px",fontWeight:600})),yD=at.div(({theme:e})=>({height:"8px",borderRadius:"4px",backgroundColor:e.base==="dark"?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.08)",margin:"0 16px 8px",overflow:"hidden"})),bD=at.div(({percent:e})=>({height:"100%",width:`${Math.min(100,Math.max(0,e))}%`,background:`linear-gradient(90deg, #f59e0b 0%, ${le} 100%)`,transition:"width 0.3s ease"})),SD=at.div(({theme:e})=>({padding:"0 16px 14px",fontSize:"12px",color:e.textMutedColor})),wD=at.div(({theme:e})=>({height:"1px",backgroundColor:e.appBorderColor})),vD=at.button({width:"100%",padding:"14px 16px",background:"transparent",border:"none",color:le,fontSize:"14px",fontWeight:500,textAlign:"left",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}),kD=at.button(({theme:e})=>({position:"absolute",top:"12px",right:"12px",width:"24px",height:"24px",borderRadius:"4px",border:"none",background:"transparent",color:e.textMutedColor,cursor:"pointer",fontSize:"16px",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:e.background.hoverable}})),CD=at.div(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px",borderBottom:`1px solid ${e.appBorderColor}`})),TD=at.div(({theme:e})=>({display:"flex",alignItems:"center",gap:"10px",color:e.color.defaultText,fontSize:"14px",fontWeight:500})),ID=at.div(({theme:e})=>({width:"32px",height:"32px",borderRadius:"50%",backgroundColor:le,display:"flex",alignItems:"center",justifyContent:"center",color:e.color.inverseText,fontSize:"14px",fontWeight:600})),FD=at.div({display:"flex",gap:"8px"}),uw=at(wn)({fontSize:"18px"}),ED=at.div({padding:"20px 16px"}),AD=at.div(({theme:e})=>({padding:"16px",borderRadius:"8px",background:"linear-gradient(135deg, #10B981 0%, #3B82F6 100%)",marginBottom:"16px",color:"#fff"})),PD=at.div({fontSize:"12px",fontWeight:500,opacity:.9,marginBottom:"4px"}),LD=at.div({fontSize:"28px",fontWeight:700}),MD=at.div({fontSize:"11px",opacity:.8,marginTop:"4px"}),BD=at.div(({theme:e})=>({padding:"16px",borderRadius:"8px",border:`1px solid ${e.appBorderColor}`,marginBottom:"16px"})),DD=at.div({display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"}),RD=at.div({display:"flex",alignItems:"center",gap:"8px"}),zD=at.span(({theme:e})=>({fontSize:"14px",fontWeight:600,color:e.color.defaultText})),ND=at.span(({theme:e})=>({fontSize:"10px",fontWeight:600,padding:"2px 6px",borderRadius:"4px",backgroundColor:le,color:e.color.inverseText})),OD=at.button(({theme:e})=>({background:"none",border:"none",color:le,fontSize:"12px",cursor:"pointer","&:hover":{textDecoration:"underline"}})),_D=at.div(({theme:e})=>({fontSize:"12px",color:e.color.mediumdark})),$D=at.button(({theme:e,variant:t="primary"})=>({width:"100%",padding:"12px",borderRadius:"6px",fontSize:"14px",fontWeight:600,cursor:"pointer",border:"none",marginBottom:"12px",backgroundColor:t==="primary"?le:e.background.hoverable,color:t==="primary"?e.color.inverseText:e.color.defaultText,"&:hover":{opacity:.9}})),UD=30*1e3,pw=({onClose:e})=>{let{sessionToken:t,resetAuth:n,usageData:r,usageLastFetched:o,setUsageData:i}=we(),{featureFlags:s}=ie(),a=s.showCosts,u=r,c=!r&&t,l=async(g=!1)=>{if(!t)return;let S=o&&Date.now()-o<UD;if(!(!g&&S&&r))try{let C=q(),F=await oe(`${C}/api/addon/account`,{headers:{Authorization:`Bearer ${t}`}});if(F.ok){let k=await F.json();i(k)}}catch(C){y.error("Failed to fetch usage:",C)}};aw(()=>{l()},[t]),aw(()=>{let g=()=>{document.visibilityState==="visible"&&(y.debug("[TokenUsageModal] Tab visible, refreshing balance..."),l(!0))};return document.addEventListener("visibilitychange",g),()=>document.removeEventListener("visibilitychange",g)},[t]);let d=()=>{n(),e()},f=()=>{let g=q();window.open(`${g}/pricing`,"_blank")},p=()=>{let g=q();window.open(`${g}/pricing#add-credits`,"_blank")};if(t&&!a&&!c){let g=Math.floor(u?.creditBalance??0),C=Math.max(g,10),F=Math.max(0,C-g),k=C>0?g/C*100:0;return Re.createElement(Re.Fragment,null,Re.createElement(lw,{onClick:e}),Re.createElement(cw,{onClick:R=>R.stopPropagation(),style:{width:"320px"}},Re.createElement(kD,{onClick:e,title:"Close"},"\xD7"),Re.createElement(uD,null,Re.createElement(pD,null,u?.email?u.email[0].toUpperCase():"U"),Re.createElement(dD,null,Re.createElement(fD,null,"UI Review"),Re.createElement(gD,null,(u?.plan||"BETA").toUpperCase()))),Re.createElement(mD,null,Re.createElement(hD,null,"Credits"),Re.createElement(xD,null,g," left")),Re.createElement(yD,null,Re.createElement(bD,{percent:k})),Re.createElement(SD,null,F," used \xB7 ",g," remaining"),Re.createElement(wD,null),Re.createElement(vD,{onClick:p},"Get free credits \u2192")))}return Re.createElement(Re.Fragment,null,Re.createElement(lw,{onClick:e}),Re.createElement(cw,{onClick:g=>g.stopPropagation()},Re.createElement(CD,null,Re.createElement(TD,null,Re.createElement(ID,null,u?.email?u.email[0].toUpperCase():"U"),Re.createElement("span",null,u?.email||"Loading...")),Re.createElement(FD,null,Re.createElement(uw,{onClick:d,title:"Sign out"},"\u2192"),Re.createElement(uw,{onClick:e,title:"Close"},"\xD7"))),Re.createElement(ED,null,c?Re.createElement("div",{style:{textAlign:"center",padding:"20px"}},"Loading..."):t?Re.createElement(Re.Fragment,null,Re.createElement(AD,null,Re.createElement(PD,null,"Credit Balance"),Re.createElement(LD,null,"$",(u?.creditBalance??0).toFixed(2)),Re.createElement(MD,null,(u?.creditBalance??0)<2?"Low balance - consider topping up":"Pay only for what you use")),Re.createElement(BD,null,Re.createElement(DD,null,Re.createElement(RD,null,Re.createElement(zD,null,"Current Plan"),Re.createElement(ND,null,u?.plan||"Free")),Re.createElement(OD,{onClick:f},"View detail >")),Re.createElement(_D,null,"~$0.02-0.05 per review depending on complexity"),Re.createElement($D,{onClick:p,style:{marginTop:"16px"}},"Add Credits"))):Re.createElement("div",{style:{textAlign:"center",padding:"20px"}},"Please sign in to view usage"))))};ve();import wi from"react";import{styled as dw}from"storybook/theming";je();ve();pt();De();var jD=dw.div({display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}),HD=dw.span(({theme:e})=>({fontSize:e.typography.size.s1,color:e.color.mediumdark})),WD={admin:{enableFixGeneration:!0,enableFixApply:!0,enableAutoMap:!0,enableReviewBadges:!0,showCosts:!0,enableParallelReview:!0,enableModelSelection:!0},beta:{enableFixGeneration:!0,enableFixApply:!1,enableAutoMap:!0,enableReviewBadges:!1,showCosts:!1,enableParallelReview:!1,enableModelSelection:!1}},fw=()=>{let{userRole:e,roleOverride:t,setRoleOverride:n,setFeatureFlags:r}=ie(),{sessionToken:o}=we();return e!=="admin"?null:wi.createElement(jD,null,wi.createElement(HD,null,"View as:"),wi.createElement(Wx,{value:t??e,onChange:a=>{let u=a.target.value;if(u===e)n(null),o&&oe(`${q()}/api/addon/flags`,{headers:{Authorization:`Bearer ${o}`}}).then(c=>c.json()).then(c=>{let l={enableFixGeneration:!!c.enableFixGeneration,enableFixApply:!!c.enableFixApply,enableAutoMap:!!c.enableAutoMap,enableReviewBadges:!!c.enableReviewBadges,showCosts:!!c.showCosts,enableParallelReview:!!c.enableParallelReview,enableModelSelection:!!c.enableModelSelection};r(l);try{localStorage.setItem("uicopilot_feature_flags",JSON.stringify(l))}catch{}}).catch(c=>y.warn("[RoleSwitcher] Failed to re-fetch flags:",c.message));else{n(u);let c=WD[u];r(c);try{localStorage.setItem("uicopilot_feature_flags",JSON.stringify(c))}catch{}}},style:{width:"auto",minWidth:"100px"}},wi.createElement("option",{value:"admin"},"Admin"),wi.createElement("option",{value:"beta"},"Beta Tester")),t&&wi.createElement(qx,{variant:"warning"},"Previewing as ",t))};ve();je();pt();var VD=fo.div({display:"flex",alignItems:"center"}),vi=fo.div(({theme:e})=>({display:"flex",alignItems:"center",paddingLeft:"8px",borderLeft:`1px solid ${e.appBorderColor}`,"&:first-of-type":{paddingLeft:0,borderLeft:"none"}})),GD=fo.span(({theme:e})=>({fontSize:e.typography.size.s1,color:e.color.secondary,fontWeight:e.typography.weight.bold,paddingRight:"8px",opacity:.8})),qD=fo.div({position:"relative"}),YD=fo.button(({theme:e})=>({width:"26px",height:"26px",padding:0,background:`linear-gradient(135deg, ${e.color.secondary} 0%, ${e.color.secondary}cc 100%)`,border:"none",borderRadius:"50%",color:e.color.inverseText,cursor:"pointer",fontSize:e.typography.size.s2,fontWeight:e.typography.weight.bold,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s","&:hover":{transform:"scale(1.05)",boxShadow:`0 2px 8px ${e.color.secondary}66`}})),xw=fo.button(({isLow:e})=>({display:"flex",alignItems:"center",gap:"6px",padding:"4px 10px",background:e?"#FEF3C7":"linear-gradient(135deg, #10B981 0%, #3B82F6 100%)",border:"none",borderRadius:"12px",color:e?"#92400E":"#fff",cursor:"pointer",fontSize:"12px",fontWeight:600,transition:"all 0.2s",minWidth:"60px",justifyContent:"center","&:hover":{transform:"scale(1.02)",boxShadow:"0 2px 8px rgba(0,0,0,0.15)"}})),KD=fo.span({display:"inline-block",width:"12px",height:"12px",border:"2px solid rgba(255,255,255,0.3)",borderTopColor:"#fff",borderRadius:"50%",animation:"credit-spin 0.8s linear infinite","@keyframes credit-spin":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}}),XD=fo.button(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"4px",padding:"4px 10px",height:"28px",border:`1px solid ${e.appBorderColor}`,borderRadius:e.appBorderRadius,backgroundColor:"transparent",color:e.color.mediumdark,fontSize:"12px",fontWeight:500,cursor:"pointer",transition:"all 0.15s","&:hover":{backgroundColor:e.background.hoverable,color:e.color.defaultText,borderColor:e.color.mediumdark}})),QD=30*1e3,bg=({onOpenSettings:e})=>{let[t,n]=gw(!1),[r,o]=gw(!1),{usageData:i,usageLastFetched:s,setUsageData:a,sessionToken:u}=we(),{userRole:c,roleOverride:l,featureFlags:d}=ie(),f=l??c;hw(()=>{(async()=>{if(!(!u||s&&Date.now()-s<QD&&i)){o(!0);try{let R=q(),z=await oe(`${R}/api/addon/account`,{headers:{Authorization:`Bearer ${u}`}});if(z.ok){let _=await z.json();a(_)}}catch(R){console.error("Failed to fetch balance:",R)}finally{o(!1)}}})()},[u,s,i,a]),hw(()=>{let F=()=>{document.visibilityState==="visible"&&t&&n(!1)},k=()=>{t&&n(!1)};return document.addEventListener("visibilitychange",F),window.addEventListener("focus",k),()=>{document.removeEventListener("visibilitychange",F),window.removeEventListener("focus",k)}},[t]);let p=mw(()=>{n(!0)},[]),g=mw(()=>{n(!1)},[]),S=i?.creditBalance??0,C=S<2&&!r;return pn.createElement(VD,null,e&&pn.createElement(vi,null,pn.createElement(XD,{onClick:e,title:"Settings"},pn.createElement("span",{style:{fontSize:"14px"}},"\u2699"),"Settings")),u&&c==="admin"&&f==="admin"&&pn.createElement(vi,null,pn.createElement(fw,null)),pn.createElement(vi,null,pn.createElement(GD,null,"v","0.5.3")),u&&d.showCosts&&pn.createElement(vi,null,pn.createElement(xw,{onClick:p,isLow:C,title:r?"Loading...":i?C?"Low balance - click to top up":"Credit balance - click for details":"Click to load balance"},r?pn.createElement(KD,null):i?`$${S.toFixed(2)}`:"...")),u&&!d.showCosts&&i&&pn.createElement(vi,null,pn.createElement(xw,{onClick:p,isLow:Math.floor(S)<=3,title:`${Math.floor(S)} review credits remaining \u2014 click to manage`},"\u26A1 ",Math.floor(S))),pn.createElement(vi,null,pn.createElement(qD,null,pn.createElement(YD,{title:"Account & Usage",onClick:p},i?.email?i.email[0].toUpperCase():"?"),t&&pn.createElement(pw,{onClose:g}))))};import Et from"react";import{styled as cr}from"storybook/theming";import Lt from"react";ve();De();je();pt();import{useCallback as ki,useRef as yw,useEffect as JD}from"react";var go=q();y.debug("[useAuth] Module loaded, APP_URL:",go);var Bs=()=>{let e=yw(null),{sessionToken:t,apiKey:n,authMethod:r,deviceCode:o,userCode:i,verificationUri:s,isConnected:a,authError:u,setSessionToken:c,setApiKey:l,setAuthMethod:d,setDeviceCode:f,setUserCode:p,setVerificationUri:g,setPollingInterval:S,setAuthError:C,resetAuth:F}=we(),k=yw(null),R=ki(async()=>{try{y.debug("[useAuth] Starting OAuth flow, requesting poll_code...");let x;try{x=await oe(`${go}/api/addon/auth/oauth-poll`,{method:"POST"})}catch(A){let D=A instanceof Error&&A.message.includes("timed out")?`Cannot reach UI Copilot server at ${go}. Is the dashboard running?`:`Connection failed: ${go} is not responding.`;C(D),y.error("[useAuth]",D);return}if(!x.ok)throw new Error("Failed to create poll code");let{poll_code:b}=await x.json();y.debug("[useAuth] Got poll_code:",b.substring(0,15)+"...");let E=600,h=700,T=window.screenX+(window.outerWidth-E)/2,I=window.screenY+(window.outerHeight-h)/2;window.open(`${go}/addon/auth?poll_code=${b}`,"figma-auth",`width=${E},height=${h},left=${T},top=${I}`),y.debug("[useAuth] Starting OAuth poll for token..."),k.current&&clearInterval(k.current);let v=async()=>{try{let P=await(await fetch(`${go}/api/addon/auth/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({device_code:b})})).json();P.status==="authorized"&&P.session_token?(y.debug("[useAuth] \u2705 OAuth poll successful! Got token."),k.current&&(clearInterval(k.current),k.current=null),localStorage.setItem("uicopilot_session_token",P.session_token),c(P.session_token)):P.status==="expired"&&(y.debug("[useAuth] OAuth poll_code expired"),k.current&&(clearInterval(k.current),k.current=null))}catch(A){y.error("[useAuth] OAuth poll error:",A)}};k.current=setInterval(v,2e3),setTimeout(v,1e3)}catch(x){y.error("[useAuth] OAuth flow error:",x)}},[c]),z=ki(async()=>{try{let x=await fetch(`${go}/api/addon/auth/device`,{method:"POST"});if(!x.ok)throw new Error("Failed to start device code flow");let b=await x.json();f(b.device_code),p(b.user_code),g(b.verification_uri),window.open(b.verification_uri,"_blank"),_(b.device_code,b.interval*1e3)}catch(x){throw y.error("[useAuth] Device code flow error:",x),x}},[f,p,g]),_=ki((x,b)=>{y.debug("[useAuth] Starting polling. Device code:",x,"Interval:",b),e.current&&clearInterval(e.current);let E=async()=>{try{let T=await(await fetch(`${go}/api/addon/auth/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({device_code:x})})).json();T.status==="authorized"?(y.debug("[useAuth] Device code authorization successful!"),e.current&&(clearInterval(e.current),e.current=null),f(null),p(null),g(null),localStorage.setItem("uicopilot_session_token",T.session_token),c(T.session_token)):(T.status==="expired"||T.status==="denied")&&(y.debug("[useAuth] Device code expired or denied"),e.current&&(clearInterval(e.current),e.current=null),f(null),p(null),g(null))}catch(h){y.error("[useAuth] Polling error:",h)}};e.current=setInterval(E,b),S(b)},[f,p,g,c,S]),M=ki(()=>{e.current&&(clearInterval(e.current),e.current=null),f(null),p(null),g(null),S(null)},[f,p,g,S]),B=ki(x=>{l(x),localStorage.setItem("uicopilot_api_key",x)},[l]),m=ki(()=>{F(),e.current&&(clearInterval(e.current),e.current=null)},[F]);return JD(()=>()=>{e.current&&clearInterval(e.current),k.current&&clearInterval(k.current)},[]),{sessionToken:t,apiKey:n,authMethod:r,deviceCode:o,userCode:i,verificationUri:s,isConnected:a,authError:u,setAuthMethod:d,startOAuth:R,startDeviceCode:z,cancelDeviceCode:M,saveApiKey:B,logout:m}};ve();De();je();pt();import{useCallback as kl}from"react";var Ds=q(),qr=()=>{let{projects:e,selectedProjectId:t,loadingProjects:n,setProjects:r,setSelectedProjectId:o,setLoadingProjects:i,getSelectedProject:s}=Ze(),{sessionToken:a}=we(),u=kl(async()=>{if(!a){y.debug("[useProjects] No session token, skipping fetch");return}try{i(!0),y.debug("[useProjects] Fetching from:",`${Ds}/api/projects`);let f=await oe(`${Ds}/api/projects`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`}});if(f.ok){let p=await f.json();y.debug("[useProjects] Projects:",p.projects),r(p.projects||[])}else y.error("[useProjects] Failed to fetch projects:",f.status,f.statusText)}catch(f){y.error("[useProjects] Error fetching projects:",f)}finally{i(!1)}},[a,r,i]),c=kl(async f=>{if(!a)throw new Error("Not authenticated");let p=await oe(`${Ds}/api/projects`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify(f)});if(!p.ok)throw new Error("Failed to create project");let g=await p.json();return await u(),g.project},[a,u]),l=kl(async(f,p)=>{if(!a)throw new Error("Not authenticated");let g={};if(p.name!==void 0&&(g.name=p.name),p.description!==void 0&&(g.description=p.description),p.figmaFileUrl!==void 0&&(g.figmaFileId=p.figmaFileUrl||void 0),!(await oe(`${Ds}/api/projects/${f}`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify(g)})).ok)throw new Error("Failed to update project");await u()},[a,u]),d=kl(async f=>{if(!a)throw new Error("Not authenticated");if(!(await oe(`${Ds}/api/projects/${f}`,{method:"DELETE",headers:{Authorization:`Bearer ${a}`}})).ok)throw new Error("Failed to delete project");await u(),t===f&&o(null)},[a,t,u,o]);return{projects:e,selectedProjectId:t,selectedProject:s(),loadingProjects:n,setSelectedProjectId:o,fetchProjects:u,createProject:c,updateProject:l,deleteProject:d}};ve();var Rs=()=>{let{showComponentBrowser:e,figmaFileUrl:t,currentMapping:n,mappingSource:r,loadingMapping:o,showFigmaQuality:i,setShowComponentBrowser:s,setFigmaFileUrl:a,setCurrentMapping:u,setMappingSource:c,setLoadingMapping:l,setShowFigmaQuality:d}=rt();return{showComponentBrowser:e,figmaFileUrl:t,currentMapping:n,mappingSource:r,loadingMapping:o,showFigmaQuality:i,setShowComponentBrowser:s,setFigmaFileUrl:a,setCurrentMapping:u,setMappingSource:c,setLoadingMapping:l,setShowFigmaQuality:d,openComponentBrowser:()=>s(!0),closeComponentBrowser:()=>s(!1)}};ve();Cg();Pg();import{useCallback as Vs,useRef as Rl}from"react";De();function El(){return new Promise(e=>{let t=document.getElementById("storybook-preview-iframe");if(!t||!t.contentWindow){y.warn("[iframeReload] No preview iframe found"),e();return}let n=t.contentWindow.location.href,r=new URL(n);r.searchParams.set("_cb",Date.now().toString());let o=r.toString();y.debug("[iframeReload] Triggering cache-busted reload:",o);let i=setTimeout(()=>{y.warn("[iframeReload] Iframe reload timed out after 5s"),t.removeEventListener("load",s),e()},5e3),s=()=>{clearTimeout(i),t.removeEventListener("load",s),y.debug("[iframeReload] Iframe loaded, waiting for HMR and styles to settle..."),setTimeout(()=>{y.debug("[iframeReload] Iframe reloaded and styles should be fresh"),e()},2e3)};t.addEventListener("load",s),t.contentWindow.location.href=o})}var Al=BigInt(4294967295),Bw=BigInt(32);function wR(e,t=!1){return t?{h:Number(e&Al),l:Number(e>>Bw&Al)}:{h:Number(e>>Bw&Al)|0,l:Number(e&Al)|0}}function Dw(e,t=!1){let n=e.length,r=new Uint32Array(n),o=new Uint32Array(n);for(let i=0;i<n;i++){let{h:s,l:a}=wR(e[i],t);[r[i],o[i]]=[s,a]}return[r,o]}var Rw=(e,t,n)=>e<<n|t>>>32-n,zw=(e,t,n)=>t<<n|e>>>32-n,Nw=(e,t,n)=>t<<n-32|e>>>64-n,Ow=(e,t,n)=>e<<n-32|t>>>64-n;function vR(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Lg(e,t=""){if(!Number.isSafeInteger(e)||e<0){let n=t&&`"${t}" `;throw new Error(`${n}expected integer >= 0, got ${e}`)}}function Pl(e,t,n=""){let r=vR(e),o=e?.length,i=t!==void 0;if(!r||i&&o!==t){let s=n&&`"${n}" `,a=i?` of length ${t}`:"",u=r?`length=${o}`:`type=${typeof e}`;throw new Error(s+"expected Uint8Array"+a+", got "+u)}return e}function Mg(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function _w(e,t){Pl(e,void 0,"digestInto() output");let n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function $w(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Bg(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}var kR=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function CR(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function TR(e){for(let t=0;t<e.length;t++)e[t]=CR(e[t]);return e}var Dg=kR?e=>e:TR;function Uw(e,t={}){let n=(o,i)=>e(i).update(o).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=o=>e(o),Object.assign(n,t),Object.freeze(n)}var jw=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});var IR=BigInt(0),Us=BigInt(1),FR=BigInt(2),ER=BigInt(7),AR=BigInt(256),PR=BigInt(113),Vw=[],Gw=[],qw=[];for(let e=0,t=Us,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Vw.push(2*(5*r+n)),Gw.push((e+1)*(e+2)/2%64);let o=IR;for(let i=0;i<7;i++)t=(t<<Us^(t>>ER)*PR)%AR,t&FR&&(o^=Us<<(Us<<BigInt(i))-Us);qw.push(o)}var Yw=Dw(qw,!0),LR=Yw[0],MR=Yw[1],Hw=(e,t,n)=>n>32?Nw(e,t,n):Rw(e,t,n),Ww=(e,t,n)=>n>32?Ow(e,t,n):zw(e,t,n);function BR(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let s=0;s<10;s++)n[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,u=(s+2)%10,c=n[u],l=n[u+1],d=Hw(c,l,1)^n[a],f=Ww(c,l,1)^n[a+1];for(let p=0;p<50;p+=10)e[s+p]^=d,e[s+p+1]^=f}let o=e[2],i=e[3];for(let s=0;s<24;s++){let a=Gw[s],u=Hw(o,i,a),c=Ww(o,i,a),l=Vw[s];o=e[l],i=e[l+1],e[l]=u,e[l+1]=c}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)n[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=LR[r],e[1]^=MR[r]}Bg(n)}var Rg=class e{constructor(t,n,r,o=!1,i=24){Zn(this,"state");Zn(this,"pos",0);Zn(this,"posOut",0);Zn(this,"finished",!1);Zn(this,"state32");Zn(this,"destroyed",!1);Zn(this,"blockLen");Zn(this,"suffix");Zn(this,"outputLen");Zn(this,"enableXOF",!1);Zn(this,"rounds");if(this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=i,Lg(r,"outputLen"),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=$w(this.state)}clone(){return this._cloneInto()}keccak(){Dg(this.state32),BR(this.state32,this.rounds),Dg(this.state32),this.posOut=0,this.pos=0}update(t){Mg(this),Pl(t);let{blockLen:n,state:r}=this,o=t.length;for(let i=0;i<o;){let s=Math.min(n-this.pos,o-i);for(let a=0;a<s;a++)r[this.pos++]^=t[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,(n&128)!==0&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){Mg(this,!1),Pl(t),this.finish();let n=this.state,{blockLen:r}=this;for(let o=0,i=t.length;o<i;){this.posOut>=r&&this.keccak();let s=Math.min(r-this.posOut,i-o);t.set(n.subarray(this.posOut,this.posOut+s),o),this.posOut+=s,o+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Lg(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(_w(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Bg(this.state)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:o,rounds:i,enableXOF:s}=this;return t||(t=new e(n,r,o,s,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=o,t.enableXOF=s,t.destroyed=this.destroyed,t}},DR=(e,t,n,r={})=>Uw(()=>new Rg(t,e,n),r);var Kw=DR(6,72,64,jw(10));var RR=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,zg=Math.ceil,ar=Math.floor,Rn="[BigNumber Error] ",Xw=Rn+"Number primitive has more than 15 significant digits: ",Sr=1e14,He=14,Ng=9007199254740991,Og=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],mo=1e7,rn=1e9;function Qw(e){var t,n,r,o=k.prototype={constructor:k,toString:null,valueOf:null},i=new k(1),s=20,a=4,u=-7,c=21,l=-1e7,d=1e7,f=!1,p=1,g=0,S={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},C="0123456789abcdefghijklmnopqrstuvwxyz",F=!0;function k(m,x){var b,E,h,T,I,v,A,P,D=this;if(!(D instanceof k))return new k(m,x);if(x==null){if(m&&m._isBigNumber===!0){D.s=m.s,!m.c||m.e>d?D.c=D.e=null:m.e<l?D.c=[D.e=0]:(D.e=m.e,D.c=m.c.slice());return}if((v=typeof m=="number")&&m*0==0){if(D.s=1/m<0?(m=-m,-1):1,m===~~m){for(T=0,I=m;I>=10;I/=10,T++);T>d?D.c=D.e=null:(D.e=T,D.c=[m]);return}P=String(m)}else{if(!RR.test(P=String(m)))return r(D,P,v);D.s=P.charCodeAt(0)==45?(P=P.slice(1),-1):1}(T=P.indexOf("."))>-1&&(P=P.replace(".","")),(I=P.search(/e/i))>0?(T<0&&(T=I),T+=+P.slice(I+1),P=P.substring(0,I)):T<0&&(T=P.length)}else{if(Dt(x,2,C.length,"Base"),x==10&&F)return D=new k(m),M(D,s+D.e+1,a);if(P=String(m),v=typeof m=="number"){if(m*0!=0)return r(D,P,v,x);if(D.s=1/m<0?(P=P.slice(1),-1):1,k.DEBUG&&P.replace(/^0\.0*|\./,"").length>15)throw Error(Xw+m)}else D.s=P.charCodeAt(0)===45?(P=P.slice(1),-1):1;for(b=C.slice(0,x),T=I=0,A=P.length;I<A;I++)if(b.indexOf(E=P.charAt(I))<0){if(E=="."){if(I>T){T=A;continue}}else if(!h&&(P==P.toUpperCase()&&(P=P.toLowerCase())||P==P.toLowerCase()&&(P=P.toUpperCase()))){h=!0,I=-1,T=0;continue}return r(D,String(m),v,x)}v=!1,P=n(P,x,10,D.s),(T=P.indexOf("."))>-1?P=P.replace(".",""):T=P.length}for(I=0;P.charCodeAt(I)===48;I++);for(A=P.length;P.charCodeAt(--A)===48;);if(P=P.slice(I,++A)){if(A-=I,v&&k.DEBUG&&A>15&&(m>Ng||m!==ar(m)))throw Error(Xw+D.s*m);if((T=T-I-1)>d)D.c=D.e=null;else if(T<l)D.c=[D.e=0];else{if(D.e=T,D.c=[],I=(T+1)%He,T<0&&(I+=He),I<A){for(I&&D.c.push(+P.slice(0,I)),A-=He;I<A;)D.c.push(+P.slice(I,I+=He));I=He-(P=P.slice(I)).length}else I-=A;for(;I--;P+="0");D.c.push(+P)}}else D.c=[D.e=0]}k.clone=Qw,k.ROUND_UP=0,k.ROUND_DOWN=1,k.ROUND_CEIL=2,k.ROUND_FLOOR=3,k.ROUND_HALF_UP=4,k.ROUND_HALF_DOWN=5,k.ROUND_HALF_EVEN=6,k.ROUND_HALF_CEIL=7,k.ROUND_HALF_FLOOR=8,k.EUCLID=9,k.config=k.set=function(m){var x,b;if(m!=null)if(typeof m=="object"){if(m.hasOwnProperty(x="DECIMAL_PLACES")&&(b=m[x],Dt(b,0,rn,x),s=b),m.hasOwnProperty(x="ROUNDING_MODE")&&(b=m[x],Dt(b,0,8,x),a=b),m.hasOwnProperty(x="EXPONENTIAL_AT")&&(b=m[x],b&&b.pop?(Dt(b[0],-rn,0,x),Dt(b[1],0,rn,x),u=b[0],c=b[1]):(Dt(b,-rn,rn,x),u=-(c=b<0?-b:b))),m.hasOwnProperty(x="RANGE"))if(b=m[x],b&&b.pop)Dt(b[0],-rn,-1,x),Dt(b[1],1,rn,x),l=b[0],d=b[1];else if(Dt(b,-rn,rn,x),b)l=-(d=b<0?-b:b);else throw Error(Rn+x+" cannot be zero: "+b);if(m.hasOwnProperty(x="CRYPTO"))if(b=m[x],b===!!b)if(b)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=b;else throw f=!b,Error(Rn+"crypto unavailable");else f=b;else throw Error(Rn+x+" not true or false: "+b);if(m.hasOwnProperty(x="MODULO_MODE")&&(b=m[x],Dt(b,0,9,x),p=b),m.hasOwnProperty(x="POW_PRECISION")&&(b=m[x],Dt(b,0,rn,x),g=b),m.hasOwnProperty(x="FORMAT"))if(b=m[x],typeof b=="object")S=b;else throw Error(Rn+x+" not an object: "+b);if(m.hasOwnProperty(x="ALPHABET"))if(b=m[x],typeof b=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(b))F=b.slice(0,10)=="0123456789",C=b;else throw Error(Rn+x+" invalid: "+b)}else throw Error(Rn+"Object expected: "+m);return{DECIMAL_PLACES:s,ROUNDING_MODE:a,EXPONENTIAL_AT:[u,c],RANGE:[l,d],CRYPTO:f,MODULO_MODE:p,POW_PRECISION:g,FORMAT:S,ALPHABET:C}},k.isBigNumber=function(m){if(!m||m._isBigNumber!==!0)return!1;if(!k.DEBUG)return!0;var x,b,E=m.c,h=m.e,T=m.s;e:if({}.toString.call(E)=="[object Array]"){if((T===1||T===-1)&&h>=-rn&&h<=rn&&h===ar(h)){if(E[0]===0){if(h===0&&E.length===1)return!0;break e}if(x=(h+1)%He,x<1&&(x+=He),String(E[0]).length==x){for(x=0;x<E.length;x++)if(b=E[x],b<0||b>=Sr||b!==ar(b))break e;if(b!==0)return!0}}}else if(E===null&&h===null&&(T===null||T===1||T===-1))return!0;throw Error(Rn+"Invalid BigNumber: "+m)},k.maximum=k.max=function(){return z(arguments,-1)},k.minimum=k.min=function(){return z(arguments,1)},k.random=(function(){var m=9007199254740992,x=Math.random()*m&2097151?function(){return ar(Math.random()*m)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(b){var E,h,T,I,v,A=0,P=[],D=new k(i);if(b==null?b=s:Dt(b,0,rn),I=zg(b/He),f)if(crypto.getRandomValues){for(E=crypto.getRandomValues(new Uint32Array(I*=2));A<I;)v=E[A]*131072+(E[A+1]>>>11),v>=9e15?(h=crypto.getRandomValues(new Uint32Array(2)),E[A]=h[0],E[A+1]=h[1]):(P.push(v%1e14),A+=2);A=I/2}else if(crypto.randomBytes){for(E=crypto.randomBytes(I*=7);A<I;)v=(E[A]&31)*281474976710656+E[A+1]*1099511627776+E[A+2]*4294967296+E[A+3]*16777216+(E[A+4]<<16)+(E[A+5]<<8)+E[A+6],v>=9e15?crypto.randomBytes(7).copy(E,A):(P.push(v%1e14),A+=7);A=I/7}else throw f=!1,Error(Rn+"crypto unavailable");if(!f)for(;A<I;)v=x(),v<9e15&&(P[A++]=v%1e14);for(I=P[--A],b%=He,I&&b&&(v=Og[He-b],P[A]=ar(I/v)*v);P[A]===0;P.pop(),A--);if(A<0)P=[T=0];else{for(T=-1;P[0]===0;P.splice(0,1),T-=He);for(A=1,v=P[0];v>=10;v/=10,A++);A<He&&(T-=He-A)}return D.e=T,D.c=P,D}})(),k.sum=function(){for(var m=1,x=arguments,b=new k(x[0]);m<x.length;)b=b.plus(x[m++]);return b},n=(function(){var m="0123456789";function x(b,E,h,T){for(var I,v=[0],A,P=0,D=b.length;P<D;){for(A=v.length;A--;v[A]*=E);for(v[0]+=T.indexOf(b.charAt(P++)),I=0;I<v.length;I++)v[I]>h-1&&(v[I+1]==null&&(v[I+1]=0),v[I+1]+=v[I]/h|0,v[I]%=h)}return v.reverse()}return function(b,E,h,T,I){var v,A,P,D,N,w,j,G,L=b.indexOf("."),K=s,ee=a;for(L>=0&&(D=g,g=0,b=b.replace(".",""),G=new k(E),w=G.pow(b.length-L),g=D,G.c=x(Yr(sr(w.c),w.e,"0"),10,h,m),G.e=G.c.length),j=x(b,E,h,I?(v=C,m):(v=m,C)),P=D=j.length;j[--D]==0;j.pop());if(!j[0])return v.charAt(0);if(L<0?--P:(w.c=j,w.e=P,w.s=T,w=t(w,G,K,ee,h),j=w.c,N=w.r,P=w.e),A=P+K+1,L=j[A],D=h/2,N=N||A<0||j[A+1]!=null,N=ee<4?(L!=null||N)&&(ee==0||ee==(w.s<0?3:2)):L>D||L==D&&(ee==4||N||ee==6&&j[A-1]&1||ee==(w.s<0?8:7)),A<1||!j[0])b=N?Yr(v.charAt(1),-K,v.charAt(0)):v.charAt(0);else{if(j.length=A,N)for(--h;++j[--A]>h;)j[A]=0,A||(++P,j=[1].concat(j));for(D=j.length;!j[--D];);for(L=0,b="";L<=D;b+=v.charAt(j[L++]));b=Yr(b,P,v.charAt(0))}return b}})(),t=(function(){function m(E,h,T){var I,v,A,P,D=0,N=E.length,w=h%mo,j=h/mo|0;for(E=E.slice();N--;)A=E[N]%mo,P=E[N]/mo|0,I=j*A+P*w,v=w*A+I%mo*mo+D,D=(v/T|0)+(I/mo|0)+j*P,E[N]=v%T;return D&&(E=[D].concat(E)),E}function x(E,h,T,I){var v,A;if(T!=I)A=T>I?1:-1;else for(v=A=0;v<T;v++)if(E[v]!=h[v]){A=E[v]>h[v]?1:-1;break}return A}function b(E,h,T,I){for(var v=0;T--;)E[T]-=v,v=E[T]<h[T]?1:0,E[T]=v*I+E[T]-h[T];for(;!E[0]&&E.length>1;E.splice(0,1));}return function(E,h,T,I,v){var A,P,D,N,w,j,G,L,K,ee,re,de,ae,qe,tt,se,pe,Ie=E.s==h.s?1:-1,ze=E.c,me=h.c;if(!ze||!ze[0]||!me||!me[0])return new k(!E.s||!h.s||(ze?me&&ze[0]==me[0]:!me)?NaN:ze&&ze[0]==0||!me?Ie*0:Ie/0);for(L=new k(Ie),K=L.c=[],P=E.e-h.e,Ie=T+P+1,v||(v=Sr,P=lr(E.e/He)-lr(h.e/He),Ie=Ie/He|0),D=0;me[D]==(ze[D]||0);D++);if(me[D]>(ze[D]||0)&&P--,Ie<0)K.push(1),N=!0;else{for(qe=ze.length,se=me.length,D=0,Ie+=2,w=ar(v/(me[0]+1)),w>1&&(me=m(me,w,v),ze=m(ze,w,v),se=me.length,qe=ze.length),ae=se,ee=ze.slice(0,se),re=ee.length;re<se;ee[re++]=0);pe=me.slice(),pe=[0].concat(pe),tt=me[0],me[1]>=v/2&&tt++;do{if(w=0,A=x(me,ee,se,re),A<0){if(de=ee[0],se!=re&&(de=de*v+(ee[1]||0)),w=ar(de/tt),w>1)for(w>=v&&(w=v-1),j=m(me,w,v),G=j.length,re=ee.length;x(j,ee,G,re)==1;)w--,b(j,se<G?pe:me,G,v),G=j.length,A=1;else w==0&&(A=w=1),j=me.slice(),G=j.length;if(G<re&&(j=[0].concat(j)),b(ee,j,re,v),re=ee.length,A==-1)for(;x(me,ee,se,re)<1;)w++,b(ee,se<re?pe:me,re,v),re=ee.length}else A===0&&(w++,ee=[0]);K[D++]=w,ee[0]?ee[re++]=ze[ae]||0:(ee=[ze[ae]],re=1)}while((ae++<qe||ee[0]!=null)&&Ie--);N=ee[0]!=null,K[0]||K.splice(0,1)}if(v==Sr){for(D=1,Ie=K[0];Ie>=10;Ie/=10,D++);M(L,T+(L.e=D+P*He-1)+1,I,N)}else L.e=P,L.r=+N;return L}})();function R(m,x,b,E){var h,T,I,v,A;if(b==null?b=a:Dt(b,0,8),!m.c)return m.toString();if(h=m.c[0],I=m.e,x==null)A=sr(m.c),A=E==1||E==2&&(I<=u||I>=c)?Ml(A,I):Yr(A,I,"0");else if(m=M(new k(m),x,b),T=m.e,A=sr(m.c),v=A.length,E==1||E==2&&(x<=T||T<=u)){for(;v<x;A+="0",v++);A=Ml(A,T)}else if(x-=I+(E===2&&T>I),A=Yr(A,T,"0"),T+1>v){if(--x>0)for(A+=".";x--;A+="0");}else if(x+=T-v,x>0)for(T+1==v&&(A+=".");x--;A+="0");return m.s<0&&h?"-"+A:A}function z(m,x){for(var b,E,h=1,T=new k(m[0]);h<m.length;h++)E=new k(m[h]),(!E.s||(b=jo(T,E))===x||b===0&&T.s===x)&&(T=E);return T}function _(m,x,b){for(var E=1,h=x.length;!x[--h];x.pop());for(h=x[0];h>=10;h/=10,E++);return(b=E+b*He-1)>d?m.c=m.e=null:b<l?m.c=[m.e=0]:(m.e=b,m.c=x),m}r=(function(){var m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,b=/^\.([^.]+)$/,E=/^-?(Infinity|NaN)$/,h=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(T,I,v,A){var P,D=v?I:I.replace(h,"");if(E.test(D))T.s=isNaN(D)?null:D<0?-1:1;else{if(!v&&(D=D.replace(m,function(N,w,j){return P=(j=j.toLowerCase())=="x"?16:j=="b"?2:8,!A||A==P?w:N}),A&&(P=A,D=D.replace(x,"$1").replace(b,"0.$1")),I!=D))return new k(D,P);if(k.DEBUG)throw Error(Rn+"Not a"+(A?" base "+A:"")+" number: "+I);T.s=null}T.c=T.e=null}})();function M(m,x,b,E){var h,T,I,v,A,P,D,N=m.c,w=Og;if(N){e:{for(h=1,v=N[0];v>=10;v/=10,h++);if(T=x-h,T<0)T+=He,I=x,A=N[P=0],D=ar(A/w[h-I-1]%10);else if(P=zg((T+1)/He),P>=N.length)if(E){for(;N.length<=P;N.push(0));A=D=0,h=1,T%=He,I=T-He+1}else break e;else{for(A=v=N[P],h=1;v>=10;v/=10,h++);T%=He,I=T-He+h,D=I<0?0:ar(A/w[h-I-1]%10)}if(E=E||x<0||N[P+1]!=null||(I<0?A:A%w[h-I-1]),E=b<4?(D||E)&&(b==0||b==(m.s<0?3:2)):D>5||D==5&&(b==4||E||b==6&&(T>0?I>0?A/w[h-I]:0:N[P-1])%10&1||b==(m.s<0?8:7)),x<1||!N[0])return N.length=0,E?(x-=m.e+1,N[0]=w[(He-x%He)%He],m.e=-x||0):N[0]=m.e=0,m;if(T==0?(N.length=P,v=1,P--):(N.length=P+1,v=w[He-T],N[P]=I>0?ar(A/w[h-I]%w[I])*v:0),E)for(;;)if(P==0){for(T=1,I=N[0];I>=10;I/=10,T++);for(I=N[0]+=v,v=1;I>=10;I/=10,v++);T!=v&&(m.e++,N[0]==Sr&&(N[0]=1));break}else{if(N[P]+=v,N[P]!=Sr)break;N[P--]=0,v=1}for(T=N.length;N[--T]===0;N.pop());}m.e>d?m.c=m.e=null:m.e<l&&(m.c=[m.e=0])}return m}function B(m){var x,b=m.e;return b===null?m.toString():(x=sr(m.c),x=b<=u||b>=c?Ml(x,b):Yr(x,b,"0"),m.s<0?"-"+x:x)}return o.absoluteValue=o.abs=function(){var m=new k(this);return m.s<0&&(m.s=1),m},o.comparedTo=function(m,x){return jo(this,new k(m,x))},o.decimalPlaces=o.dp=function(m,x){var b,E,h,T=this;if(m!=null)return Dt(m,0,rn),x==null?x=a:Dt(x,0,8),M(new k(T),m+T.e+1,x);if(!(b=T.c))return null;if(E=((h=b.length-1)-lr(this.e/He))*He,h=b[h])for(;h%10==0;h/=10,E--);return E<0&&(E=0),E},o.dividedBy=o.div=function(m,x){return t(this,new k(m,x),s,a)},o.dividedToIntegerBy=o.idiv=function(m,x){return t(this,new k(m,x),0,1)},o.exponentiatedBy=o.pow=function(m,x){var b,E,h,T,I,v,A,P,D,N=this;if(m=new k(m),m.c&&!m.isInteger())throw Error(Rn+"Exponent not an integer: "+B(m));if(x!=null&&(x=new k(x)),v=m.e>14,!N.c||!N.c[0]||N.c[0]==1&&!N.e&&N.c.length==1||!m.c||!m.c[0])return D=new k(Math.pow(+B(N),v?m.s*(2-Ll(m)):+B(m))),x?D.mod(x):D;if(A=m.s<0,x){if(x.c?!x.c[0]:!x.s)return new k(NaN);E=!A&&N.isInteger()&&x.isInteger(),E&&(N=N.mod(x))}else{if(m.e>9&&(N.e>0||N.e<-1||(N.e==0?N.c[0]>1||v&&N.c[1]>=24e7:N.c[0]<8e13||v&&N.c[0]<=9999975e7)))return T=N.s<0&&Ll(m)?-0:0,N.e>-1&&(T=1/T),new k(A?1/T:T);g&&(T=zg(g/He+2))}for(v?(b=new k(.5),A&&(m.s=1),P=Ll(m)):(h=Math.abs(+B(m)),P=h%2),D=new k(i);;){if(P){if(D=D.times(N),!D.c)break;T?D.c.length>T&&(D.c.length=T):E&&(D=D.mod(x))}if(h){if(h=ar(h/2),h===0)break;P=h%2}else if(m=m.times(b),M(m,m.e+1,1),m.e>14)P=Ll(m);else{if(h=+B(m),h===0)break;P=h%2}N=N.times(N),T?N.c&&N.c.length>T&&(N.c.length=T):E&&(N=N.mod(x))}return E?D:(A&&(D=i.div(D)),x?D.mod(x):T?M(D,g,a,I):D)},o.integerValue=function(m){var x=new k(this);return m==null?m=a:Dt(m,0,8),M(x,x.e+1,m)},o.isEqualTo=o.eq=function(m,x){return jo(this,new k(m,x))===0},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(m,x){return jo(this,new k(m,x))>0},o.isGreaterThanOrEqualTo=o.gte=function(m,x){return(x=jo(this,new k(m,x)))===1||x===0},o.isInteger=function(){return!!this.c&&lr(this.e/He)>this.c.length-2},o.isLessThan=o.lt=function(m,x){return jo(this,new k(m,x))<0},o.isLessThanOrEqualTo=o.lte=function(m,x){return(x=jo(this,new k(m,x)))===-1||x===0},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&this.c[0]==0},o.minus=function(m,x){var b,E,h,T,I=this,v=I.s;if(m=new k(m,x),x=m.s,!v||!x)return new k(NaN);if(v!=x)return m.s=-x,I.plus(m);var A=I.e/He,P=m.e/He,D=I.c,N=m.c;if(!A||!P){if(!D||!N)return D?(m.s=-x,m):new k(N?I:NaN);if(!D[0]||!N[0])return N[0]?(m.s=-x,m):new k(D[0]?I:a==3?-0:0)}if(A=lr(A),P=lr(P),D=D.slice(),v=A-P){for((T=v<0)?(v=-v,h=D):(P=A,h=N),h.reverse(),x=v;x--;h.push(0));h.reverse()}else for(E=(T=(v=D.length)<(x=N.length))?v:x,v=x=0;x<E;x++)if(D[x]!=N[x]){T=D[x]<N[x];break}if(T&&(h=D,D=N,N=h,m.s=-m.s),x=(E=N.length)-(b=D.length),x>0)for(;x--;D[b++]=0);for(x=Sr-1;E>v;){if(D[--E]<N[E]){for(b=E;b&&!D[--b];D[b]=x);--D[b],D[E]+=Sr}D[E]-=N[E]}for(;D[0]==0;D.splice(0,1),--P);return D[0]?_(m,D,P):(m.s=a==3?-1:1,m.c=[m.e=0],m)},o.modulo=o.mod=function(m,x){var b,E,h=this;return m=new k(m,x),!h.c||!m.s||m.c&&!m.c[0]?new k(NaN):!m.c||h.c&&!h.c[0]?new k(h):(p==9?(E=m.s,m.s=1,b=t(h,m,0,3),m.s=E,b.s*=E):b=t(h,m,0,p),m=h.minus(b.times(m)),!m.c[0]&&p==1&&(m.s=h.s),m)},o.multipliedBy=o.times=function(m,x){var b,E,h,T,I,v,A,P,D,N,w,j,G,L,K,ee=this,re=ee.c,de=(m=new k(m,x)).c;if(!re||!de||!re[0]||!de[0])return!ee.s||!m.s||re&&!re[0]&&!de||de&&!de[0]&&!re?m.c=m.e=m.s=null:(m.s*=ee.s,!re||!de?m.c=m.e=null:(m.c=[0],m.e=0)),m;for(E=lr(ee.e/He)+lr(m.e/He),m.s*=ee.s,A=re.length,N=de.length,A<N&&(G=re,re=de,de=G,h=A,A=N,N=h),h=A+N,G=[];h--;G.push(0));for(L=Sr,K=mo,h=N;--h>=0;){for(b=0,w=de[h]%K,j=de[h]/K|0,I=A,T=h+I;T>h;)P=re[--I]%K,D=re[I]/K|0,v=j*P+D*w,P=w*P+v%K*K+G[T]+b,b=(P/L|0)+(v/K|0)+j*D,G[T--]=P%L;G[T]=b}return b?++E:G.splice(0,1),_(m,G,E)},o.negated=function(){var m=new k(this);return m.s=-m.s||null,m},o.plus=function(m,x){var b,E=this,h=E.s;if(m=new k(m,x),x=m.s,!h||!x)return new k(NaN);if(h!=x)return m.s=-x,E.minus(m);var T=E.e/He,I=m.e/He,v=E.c,A=m.c;if(!T||!I){if(!v||!A)return new k(h/0);if(!v[0]||!A[0])return A[0]?m:new k(v[0]?E:h*0)}if(T=lr(T),I=lr(I),v=v.slice(),h=T-I){for(h>0?(I=T,b=A):(h=-h,b=v),b.reverse();h--;b.push(0));b.reverse()}for(h=v.length,x=A.length,h-x<0&&(b=A,A=v,v=b,x=h),h=0;x;)h=(v[--x]=v[x]+A[x]+h)/Sr|0,v[x]=Sr===v[x]?0:v[x]%Sr;return h&&(v=[h].concat(v),++I),_(m,v,I)},o.precision=o.sd=function(m,x){var b,E,h,T=this;if(m!=null&&m!==!!m)return Dt(m,1,rn),x==null?x=a:Dt(x,0,8),M(new k(T),m,x);if(!(b=T.c))return null;if(h=b.length-1,E=h*He+1,h=b[h]){for(;h%10==0;h/=10,E--);for(h=b[0];h>=10;h/=10,E++);}return m&&T.e+1>E&&(E=T.e+1),E},o.shiftedBy=function(m){return Dt(m,-Ng,Ng),this.times("1e"+m)},o.squareRoot=o.sqrt=function(){var m,x,b,E,h,T=this,I=T.c,v=T.s,A=T.e,P=s+4,D=new k("0.5");if(v!==1||!I||!I[0])return new k(!v||v<0&&(!I||I[0])?NaN:I?T:1/0);if(v=Math.sqrt(+B(T)),v==0||v==1/0?(x=sr(I),(x.length+A)%2==0&&(x+="0"),v=Math.sqrt(+x),A=lr((A+1)/2)-(A<0||A%2),v==1/0?x="5e"+A:(x=v.toExponential(),x=x.slice(0,x.indexOf("e")+1)+A),b=new k(x)):b=new k(v+""),b.c[0]){for(A=b.e,v=A+P,v<3&&(v=0);;)if(h=b,b=D.times(h.plus(t(T,h,P,1))),sr(h.c).slice(0,v)===(x=sr(b.c)).slice(0,v))if(b.e<A&&--v,x=x.slice(v-3,v+1),x=="9999"||!E&&x=="4999"){if(!E&&(M(h,h.e+s+2,0),h.times(h).eq(T))){b=h;break}P+=4,v+=4,E=1}else{(!+x||!+x.slice(1)&&x.charAt(0)=="5")&&(M(b,b.e+s+2,1),m=!b.times(b).eq(T));break}}return M(b,b.e+s+1,a,m)},o.toExponential=function(m,x){return m!=null&&(Dt(m,0,rn),m++),R(this,m,x,1)},o.toFixed=function(m,x){return m!=null&&(Dt(m,0,rn),m=m+this.e+1),R(this,m,x)},o.toFormat=function(m,x,b){var E,h=this;if(b==null)m!=null&&x&&typeof x=="object"?(b=x,x=null):m&&typeof m=="object"?(b=m,m=x=null):b=S;else if(typeof b!="object")throw Error(Rn+"Argument not an object: "+b);if(E=h.toFixed(m,x),h.c){var T,I=E.split("."),v=+b.groupSize,A=+b.secondaryGroupSize,P=b.groupSeparator||"",D=I[0],N=I[1],w=h.s<0,j=w?D.slice(1):D,G=j.length;if(A&&(T=v,v=A,A=T,G-=T),v>0&&G>0){for(T=G%v||v,D=j.substr(0,T);T<G;T+=v)D+=P+j.substr(T,v);A>0&&(D+=P+j.slice(T)),w&&(D="-"+D)}E=N?D+(b.decimalSeparator||"")+((A=+b.fractionGroupSize)?N.replace(new RegExp("\\d{"+A+"}\\B","g"),"$&"+(b.fractionGroupSeparator||"")):N):D}return(b.prefix||"")+E+(b.suffix||"")},o.toFraction=function(m){var x,b,E,h,T,I,v,A,P,D,N,w,j=this,G=j.c;if(m!=null&&(v=new k(m),!v.isInteger()&&(v.c||v.s!==1)||v.lt(i)))throw Error(Rn+"Argument "+(v.isInteger()?"out of range: ":"not an integer: ")+B(v));if(!G)return new k(j);for(x=new k(i),P=b=new k(i),E=A=new k(i),w=sr(G),T=x.e=w.length-j.e-1,x.c[0]=Og[(I=T%He)<0?He+I:I],m=!m||v.comparedTo(x)>0?T>0?x:P:v,I=d,d=1/0,v=new k(w),A.c[0]=0;D=t(v,x,0,1),h=b.plus(D.times(E)),h.comparedTo(m)!=1;)b=E,E=h,P=A.plus(D.times(h=P)),A=h,x=v.minus(D.times(h=x)),v=h;return h=t(m.minus(b),E,0,1),A=A.plus(h.times(P)),b=b.plus(h.times(E)),A.s=P.s=j.s,T=T*2,N=t(P,E,T,a).minus(j).abs().comparedTo(t(A,b,T,a).minus(j).abs())<1?[P,E]:[A,b],d=I,N},o.toNumber=function(){return+B(this)},o.toPrecision=function(m,x){return m!=null&&Dt(m,1,rn),R(this,m,x,2)},o.toString=function(m){var x,b=this,E=b.s,h=b.e;return h===null?E?(x="Infinity",E<0&&(x="-"+x)):x="NaN":(m==null?x=h<=u||h>=c?Ml(sr(b.c),h):Yr(sr(b.c),h,"0"):m===10&&F?(b=M(new k(b),s+h+1,a),x=Yr(sr(b.c),b.e,"0")):(Dt(m,2,C.length,"Base"),x=n(Yr(sr(b.c),h,"0"),10,m,E,!0)),E<0&&b.c[0]&&(x="-"+x)),x},o.valueOf=o.toJSON=function(){return B(this)},o._isBigNumber=!0,o[Symbol.toStringTag]="BigNumber",o[Symbol.for("nodejs.util.inspect.custom")]=o.valueOf,e!=null&&k.set(e),k}function lr(e){var t=e|0;return e>0||e===t?t:t-1}function sr(e){for(var t,n,r=1,o=e.length,i=e[0]+"";r<o;){for(t=e[r++]+"",n=He-t.length;n--;t="0"+t);i+=t}for(o=i.length;i.charCodeAt(--o)===48;);return i.slice(0,o+1||1)}function jo(e,t){var n,r,o=e.c,i=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=u==c,!o||!i)return r?0:!o^n?1:-1;if(!r)return u>c^n?1:-1;for(a=(u=o.length)<(c=i.length)?u:c,s=0;s<a;s++)if(o[s]!=i[s])return o[s]>i[s]^n?1:-1;return u==c?0:u>c^n?1:-1}function Dt(e,t,n,r){if(e<t||e>n||e!==ar(e))throw Error(Rn+(r||"Argument")+(typeof e=="number"?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Ll(e){var t=e.c.length-1;return lr(e.e/He)==t&&e.c[t]%2!=0}function Ml(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Yr(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(r=e.length,++t>r){for(o=n,t-=r;--t;o+=n);e+=o}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var zR=Qw(),Jw=zR;var NR=24,js=32,OR=()=>typeof globalThis<"u"&&globalThis.crypto&&typeof globalThis.crypto.getRandomValues=="function"?()=>{let e=new Uint32Array(1);return globalThis.crypto.getRandomValues(e),e[0]/4294967296}:Math.random,$g=OR(),_g=(e=4,t=$g)=>{let n="";for(;n.length<e;)n=n+Math.floor(t()*36).toString(36);return n};function _R(e){let t=new Jw(0);for(let n of e.values())t=t.multipliedBy(256).plus(n);return t}var ev=(e="")=>{let t=new TextEncoder;return _R(Kw(t.encode(e))).toString(36).slice(1)},Zw=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),$R=e=>Zw[Math.floor(e()*Zw.length)],UR=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=$g}={})=>{let n=Object.keys(e).toString(),r=n.length?n+_g(js,t):_g(js,t);return ev(r).substring(0,js)},jR=e=>()=>e++,HR=476782367,tv=({random:e=$g,counter:t=jR(Math.floor(e()*HR)),length:n=NR,fingerprint:r=UR({random:e})}={})=>{if(n>js)throw new Error(`Length must be between 2 and ${js}. Received: ${n}`);return function(){let i=$R(e),s=Date.now().toString(36),a=t().toString(36),u=_g(n,e),c=`${s+u+a+r}`;return`${i+ev(c).substring(1,n)}`}},ho=WR(tv);function WR(e){let t;return()=>(t||(t=e()),t())}var qR=Aa(ov());Ls();De();var Bl=/\[([^\]]+)\]\s*\[([^\]]+)\]\s*\[([^\]]+)\]\s*-\s*(.+)/g;function YR(e){return e.replace(/\*\*/g,"").replace(/\*/g,"").replace(/__/g,"").replace(/_/g," ").trim()}function Ug(e,t){let n=[],r=e.split(`
15
15
  `);for(let s=0;s<r.length;s++){let a=YR(r[s]),u=Bl.exec(a);if(u){let[,c,l,,d]=u,f=KR(l),p=XR(r,s+1),g={id:ho(),reviewId:t,type:c.trim(),severity:f,title:d.trim(),description:p.description,file:p.file,lineNumber:p.lineNumber,property:p.property,currentValue:p.currentValue,suggestedValue:p.suggestedValue,suggestedCode:p.suggestedCode,suggestedFix:p.suggestedFix,fixTarget:p.fixTarget,fixRequired:p.fixRequired,status:"pending",selectedForFix:!1,createdAt:new Date};n.push(g)}Bl.lastIndex=0}return n.map(s=>{let a=Ps(s);return a.dismissed?(y.debug(`[parseIssues] Auto-dismissed: ${s.title} - ${a.dismissReason}`),{...s,dismissed:!0,dismissReason:a.dismissReason,dismissedBy:a.dismissedBy,dismissedAt:new Date}):s})}function KR(e){let t=e.toLowerCase().trim();return t.includes("critical")||t.includes("high")?"critical":t.includes("major")||t.includes("medium")?"major":"minor"}function XR(e,t){let n={description:"",file:void 0,lineNumber:void 0,property:void 0,currentValue:void 0,suggestedValue:void 0,suggestedCode:void 0,suggestedFix:void 0,fixTarget:void 0,fixRequired:void 0},r=[];for(let o=t;o<e.length;o++){let i=e[o].trim();if(!i||Bl.test(i)){Bl.lastIndex=0;break}if(i.startsWith("Expected:"))n.suggestedValue=i.replace("Expected:","").trim();else if(i.startsWith("Actual:")||i.startsWith("Current:"))n.currentValue=i.replace(/^(Actual|Current):/,"").trim();else if(i.startsWith("File:")){let s=i.replace("File:","").trim(),a=s.match(/^(.+?):(\d+)$/);a?(n.file=a[1],n.lineNumber=parseInt(a[2],10)):n.file=s}else if(i.startsWith("Property:"))n.property=i.replace("Property:","").trim();else if(i.startsWith("FixTarget:")){let s=i.replace("FixTarget:","").trim().toLowerCase();(s==="css"||s==="component")&&(n.fixTarget=s)}else if(i.startsWith("FixRequired:")){let s=i.replace("FixRequired:","").trim().toLowerCase();n.fixRequired=s==="true"}else if(i.startsWith("Fix:"))n.suggestedFix=i.replace("Fix:","").trim();else if(i.startsWith("```")){let s=[];for(o++;o<e.length&&!e[o].trim().startsWith("```");)s.push(e[o]),o++;n.suggestedCode=s.join(`
16
16
  `)}else r.push(i)}return n.description=r.join(" ").trim(),n}De();var Hs=null,iv=0,QR=3e4;async function JR(){let e=Date.now();if(Hs&&e-iv<QR)return Hs;try{let t=await fetch("/index.json");if(!t.ok)throw new Error(`Failed to fetch index.json: ${t.status}`);let n=await t.json();return Hs=n.entries||n.stories||{},iv=e,y.debug("[storyFilePaths] Fetched index.json, entries:",Object.keys(Hs).length),Hs}catch(t){throw y.error("[storyFilePaths] Error fetching index.json:",t),t}}async function Ws(e){try{let n=(await JR())[e];if(!n?.importPath)return y.warn("[storyFilePaths] No importPath found for story:",e),null;let r=n.importPath;y.debug("[storyFilePaths] Found importPath:",r);let o=r.replace(/^\.\//,""),i;n.componentPath?(i=n.componentPath.replace(/^\.\//,""),y.debug("[storyFilePaths] Using Storybook componentPath:",i)):(i=`${o.replace(/\.stories\.tsx$/,"").replace(/\.stories\.ts$/,"").replace(/\.stories\.jsx$/,"").replace(/\.stories\.js$/,"")}.tsx`,y.debug("[storyFilePaths] Derived componentFile:",i));let s=i.replace(/\.tsx$/,".css").replace(/\.ts$/,".css").replace(/\.jsx$/,".css").replace(/\.js$/,".css"),a=i.substring(0,i.lastIndexOf("/")),u={storyFile:o,componentFile:i,cssFile:s,baseDir:a};return y.debug("[storyFilePaths] Final paths:",u),u}catch(t){return y.error("[storyFilePaths] Error getting file paths:",t),null}}function jg(e,t){if(e==="css")return t.cssFile;if(e==="component")return t.componentFile;if(e==="story")return t.storyFile}function ZR(e,t){let n=e.toLowerCase().trim();return["color","spacing","typography","dimension","border","shadow","layout","background","font","size","margin","padding"].some(i=>n.includes(i))?t.cssFile:t.componentFile}function Hg(e,t){let n=e.property?.toLowerCase()||"",r=e.domElement?.toLowerCase()||"",o=r.startsWith("svg"),i=r.startsWith("img"),s=n==="width"||n==="height",a=/\[(?:width|height)=/.test(r);return(o||i)&&s||a?(y.debug(`[storyFilePaths] \u{1F50D} INLINE ATTRIBUTE: domElement="${e.domElement}", property="${e.property}" \u2192 component file`),t.componentFile):ZR(e.type,t)}De();function ez(e){let t=(e.description||"").toLowerCase(),n=(e.title||"").toLowerCase(),r=`${t} ${n}`;return r.includes("inner icon")||r.includes("inner vector")?"inner-icon":r.includes("second icon")?"icon-2":r.includes("first icon")?"icon-1":r.includes("icon")||r.includes("vector")||r.includes("svg")?"icon":r.includes("button")?"button":r.includes("text")||r.includes("label")?"text":r.includes("container")||r.includes("wrapper")?"container":"other"}function tz(e){let t=(e.property||"").toLowerCase(),n=(e.description||"").toLowerCase();return t.includes("width")||t.includes("height")||t.includes("size")||t.includes("dimensions")?"dimensions":t.includes("padding")||t.includes("margin")||t.includes("gap")?"spacing":t.includes("color")||t.includes("background")||t.includes("fill")?"colors":t.includes("font")||t.includes("text")||t.includes("line-height")?"typography":t.includes("border")||t.includes("radius")?"border":n.includes("overall")||n.includes("visual fidelity")||n.includes("pixel similarity")||t.includes("overall")?"summary":"other"}function nz(e){let t=(e.property||"").toLowerCase(),n=(e.description||"").toLowerCase();return t.includes("overall")||t.includes("visual fidelity")||n.includes("pixel similarity score")||n.includes("primarily explained by")||n.includes("visual discrepancy")}function rz(e,t,n){let r={critical:3,major:2,minor:1},i=[...e].sort((c,l)=>(r[l.severity]||0)-(r[c.severity]||0))[0],s=e.length,a,u;if(t.includes("icon")&&n==="dimensions"){let c=e.map(d=>d.currentValue).filter(Boolean),l=e.map(d=>d.suggestedValue).filter(Boolean);a=`Icon sizing is incorrect (${s} related issues)`,u=`Icons are rendered at wrong dimensions. Current: ${c[0]||"10px"}, Expected: ${l[0]||"20px"}. This single CSS fix will resolve all ${s} icon dimension issues.`}else a=`${t} ${n} issues (${s} related)`,u=`${s} related ${n} issues for ${t}. ${i.description}`;return{...i,id:`merged-${t}-${n}-${i.id}`,title:a,description:u,currentValue:i.currentValue,suggestedValue:i.suggestedValue,mergedCount:s,mergedIssueIds:e.map(c=>c.id)}}function Wg(e){if(!e||e.length===0)return[];let t=e.filter(i=>!nz(i)),n=[],r=[];for(let i of t){let s=ez(i),a=tz(i);s.includes("icon")&&a==="dimensions"?n.push(i):r.push(i)}let o=[];return n.length>0&&(n.length===1?o.push(n[0]):o.push(rz(n,"icon","dimensions"))),o.push(...r),y.debug("[deduplicateIssues] Input:",e.length,"issues, Output:",o.length,"issues"),y.debug("[deduplicateIssues] Removed",e.length-t.length,"summary issues"),y.debug("[deduplicateIssues] Merged",n.length,"icon issues into",n.length>0?1:0),o}De();je();import{addons as Dl}from"storybook/manager-api";var Vg="uireview/badge",Ii={REVIEW_START:"uireview/review-start",REVIEW_COMPLETE:"uireview/review-complete",REVIEW_ERROR:"uireview/review-error"};function oz(e){return e.criticalCount>0||e.score<70?"status-value:error":e.majorCount>0||e.score<90?"status-value:warning":"status-value:success"}function iz(e){let t=[`Score: ${e.score}`];return e.criticalCount>0&&t.push(`${e.criticalCount} critical`),e.majorCount>0&&t.push(`${e.majorCount} major`),e.minorCount>0&&t.push(`${e.minorCount} minor`),t.join(" \xB7 ")}function sz(e){return e.score>=90?`\u2713 Score ${e.score}`:e.score>=70?`\u26A0 Score ${e.score}`:`\u2717 Score ${e.score}`}function Fi(){try{let e=localStorage.getItem("uicopilot_feature_flags");return e?!!JSON.parse(e).enableReviewBadges:!1}catch{return!1}}function av(e){if(Fi())try{Dl.getChannel().emit(Ii.REVIEW_START,{storyId:e})}catch{}}function xo(e,t){if(Fi())try{Dl.getChannel().emit(Ii.REVIEW_COMPLETE,{storyId:e,summary:t})}catch{}}function lv(e){if(Fi())try{Dl.getChannel().emit(Ii.REVIEW_ERROR,{storyId:e})}catch{}}function sv(e){try{typeof e.unset=="function"?e.unset():typeof e.set=="function"&&e.set([])}catch{}}function cv(e){let t=Dl.getChannel(),n=o=>i=>{Fi()&&o(i)};t.on(Ii.REVIEW_START,n(({storyId:o})=>{e.set([{value:"status-value:pending",typeId:Vg,storyId:o,title:"Reviewing...",description:"AI review in progress"}])})),t.on(Ii.REVIEW_COMPLETE,n(({storyId:o,summary:i})=>{e.set([{value:oz(i),typeId:Vg,storyId:o,title:sz(i),description:iz(i)}])})),t.on(Ii.REVIEW_ERROR,n(({storyId:o})=>{e.set([{value:"status-value:error",typeId:Vg,storyId:o,title:"Review Failed",description:"An error occurred during review"}])}));let r=Fi();r||sv(e),setInterval(()=>{let o=Fi();o!==r&&(r=o,o||sv(e))},1500)}var Gg=q(),qg=180;function yo(e){if(e==null)return"";if(typeof e=="string")return e;if(typeof e=="object"){let t=e;if("value"in t&&typeof t.value=="string")return t.value;if("top"in t||"left"in t){let n=[t.top,t.right,t.bottom,t.left].filter(Boolean);if(n.length>0)return n.join(" ")}return JSON.stringify(e)}return String(e)}var Yg=()=>{let{isReviewing:e,reviewError:t,reviewResults:n,showReviewMenu:r,severityFilter:o,showStreamingPanel:i,streamingPanelCollapsed:s,streamingMessages:a,streamingProgress:u,streamingStatus:c,selectedModels:l,setIsReviewing:d,setReviewError:f,setReviewResults:p,setShowReviewMenu:g,setSeverityFilter:S,setShowStreamingPanel:C,setStreamingPanelCollapsed:F,addStreamingMessage:k,updateStreamingMessage:R,clearStreamingMessages:z,setStreamingProgress:_,setStreamingStatus:M,setFullPrompt:B,setFullResponse:m,setFigmaImageUrl:x,storybookImageUrl:b,setStorybookImageUrl:E,setFigmaDimensions:h,setMultiModelResults:T,updateMultiModelStreamingMessages:I,setModelCompleted:v,setActiveModelId:A,resetReview:P,addReview:D,setReviewDetailTab:N,includeTextComparison:w,usePromptCache:j,setApplyFixesResult:G,featureFlags:L}=ie(),{sessionToken:K,usageData:ee,setUsageData:re}=we(),{selectedProjectId:de}=Ze(),{currentStoryId:ae,currentStoryName:qe}=rt(),tt=Rl(ee);tt.current=ee;let se=Rl(null),pe=Rl(null),Ie=Rl({}),ze=Vs((Ge,lt)=>{k({role:Ge,content:lt})},[k]),me=Vs((Ge,lt)=>{_(Ge),M(lt)},[_,M]),Nt=Vs(async Ge=>{let{isIteration:lt=!1,parentReviewId:nt=null}=Ge||{};if(!K)throw new Error("Not authenticated");if(!de)throw new Error("No project selected");if(!ae||!qe)throw new Error("No story is currently selected in Storybook");if(e){y.debug("[useAIReview] Review already in progress, ignoring duplicate request");return}let ne=Date.now();try{d(!0),f(null),p(null),N("issues"),G(null),ae&&L.enableReviewBadges&&av(ae),pe.current&&clearTimeout(pe.current),pe.current=setTimeout(()=>{y.debug(`[useAIReview] Auto-stopping review after ${qg}s timeout`),se.current&&se.current.abort(),k({role:"system",content:`Review auto-stopped after ${qg} seconds timeout.`})},qg*1e3),B(""),m(""),C(!0),F(!1),z(),me(0,"Starting review..."),me(5,"Refreshing component preview..."),y.debug("[Review] Forcing iframe reload for fresh styles..."),await El(),y.debug("[Review] Iframe reloaded, styles should be fresh"),me(20,"Capturing screenshot & extracting styles..."),y.debug("[Review] Starting parallel data collection...");let[W,Ae,ge]=await Promise.all([Il({sessionToken:K||void 0}),Promise.resolve($s()),Promise.resolve(Ag())]);if(W&&W!==b&&(E(W),y.debug("[Review] Storybook screenshot captured and set")),!Ae)throw new Error("Failed to extract styles from component");let{computed:O,declared:U,markup:H,textElementStyles:Pe,nestedElementStyles:Ne}=Ae;ge?y.debug("[Review] DOM tree extracted:",{selector:ge.selector,childrenCount:ge.children.length}):(y.error("[Review] DOM tree extraction FAILED - domTree is null"),y.error("[Review] This will cause AI to use comparison table instead of tree comparison")),me(50,"Preparing metadata..."),y.debug("[Review] Current story:",{id:ae,name:qe});let yt=ht.getState().currentMapping?.figmaNodeId??null,Un=ht.getState().figmaImageUrl;if(yt&&(y.debug("[Review] Using Figma node ID from store:",yt),Un&&(me(65,"Using existing Figma design..."),y.debug("[Review] Reusing already-loaded Figma image"))),!yt)try{let Xe=await fetch(`${Gg}/api/mappings?projectId=${de}&storyId=${ae}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${K}`}});if(Xe.ok){let Bt=await Xe.json();Bt.mapping?.figmaNodeId?(yt=Bt.mapping.figmaNodeId,y.debug("[Review] Found Figma node ID from API:",yt)):y.debug("[Review] No mapping found for story:",ae)}else y.debug("[Review] Failed to fetch mapping:",Xe.status)}catch(Xe){y.error("[Review] Error fetching mapping:",Xe)}if(yt&&!Un){me(65,"Fetching Figma design...");try{let Xe=await fetch(`${Gg}/api/figma/frames?projectId=${de}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${K}`}});if(Xe.ok){let Ot=(await Xe.json()).thumbnails?.[yt];Ot?(x(Ot),y.debug("[Review] Figma thumbnail fetched and displayed:",Ot)):y.warn("[Review] No thumbnail found for node:",yt)}else y.warn("[Review] Failed to fetch Figma frames:",Xe.status)}catch(Xe){y.error("[Review] Error fetching Figma frames:",Xe)}}if(!yt)throw new Error('Figma mapping required. Please link this story to a Figma frame using the "Map to Figma" button before reviewing.');me(80,"AI is analyzing your component..."),y.debug("[Review] Sending to streaming API...");let Qn={projectId:de,storyId:ae,storyName:qe,storybookScreenshot:W,computedStyles:O,declaredStyles:U,textElementStyles:Pe,nestedElementStyles:Ne,componentMarkup:H,domTree:ge,figmaNodeId:yt,figmaImageUrl:Un||void 0,aiModels:l,includeTextComparison:w,usePromptCache:j,parentReviewId:lt?nt:void 0,isIteration:lt};y.debug("[Review] Request payload:",{...Qn,storybookScreenshot:W?`${W.substring(0,50)}...`:null,domTree:ge?{selector:ge.selector,childrenCount:ge.children.length}:null}),se.current=new AbortController;let In=await fetch(`${Gg}/api/review/stream`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Authorization:`Bearer ${K}`},body:JSON.stringify(Qn),signal:se.current.signal});if(y.debug("[Review] Response status:",In.status,In.statusText),!In.ok){let Xe=await In.json();if(y.error("[Review] API error response:",Xe),In.status===429){let Bt=Xe.retryAfter||60;throw new Error(`Rate limit exceeded. Please wait ${Bt} seconds before trying again.`)}if(In.status===402){if(Xe.code==="INSUFFICIENT_CREDITS"){let Bt=Xe.details?.required??1,Ot=Xe.details?.balance??0;throw new Error(`Not enough credits. This review requires ${Bt} credit(s) but you have ${Ot}. Visit Settings to add more.`)}throw Xe.code==="SUBSCRIPTION_LIMIT_EXCEEDED"?new Error(Xe.message||"Monthly review limit reached. Upgrade your plan to continue."):new Error(Xe.message||"Payment required")}throw In.status===401&&Xe.code==="FIGMA_AUTH_EXPIRED"?new Error("Figma connection expired. Open Settings \u2192 Disconnect \u2192 Reconnect Figma to continue."):new Error(Xe.error||Xe.message||"Review request failed")}let oo=In.body?.getReader(),bn=new TextDecoder,Ir="",en="",Oe=null,qc=null,$x=l.length>1,Bo={},Zi={},L8={};if(!oo)throw new Error("Response body is not readable");let Ux=ht.getState().streamingMessages.length;for(ze("assistant","");;){let{done:Xe,value:Bt}=await oo.read();if(Xe)break;Ir+=bn.decode(Bt,{stream:!0});let Ot=Ir.split(`
17
17
  `);Ir=Ot.pop()||"";for(let jn of Ot)if(jn.startsWith("data: ")){let ln=jn.slice(6);if(ln==="[DONE]")continue;try{let te=JSON.parse(ln);if(te.type!=="text"&&te.type!=="content"&&y.debug("[Review] SSE Event received:",te.type),te.type==="prompt")te.prompt&&(B(te.prompt),y.debug("[Review] Prompt received early"));else if(te.type==="model_started")y.debug("[Review] Model started:",te.modelId),Bo[te.modelId]||(Bo[te.modelId]="",Zi[te.modelId]=[{role:"assistant",content:""}]);else if(te.type==="text"||te.type==="content")if($x&&te.modelId){Bo[te.modelId]||(Bo[te.modelId]="",Zi[te.modelId]=[{role:"assistant",content:""}]),Bo[te.modelId]+=te.content,Zi[te.modelId][0].content=Bo[te.modelId],I(te.modelId,Zi[te.modelId]);let Gt=Object.entries(Bo).map(([cn,st])=>`[${cn}]
@@ -195,7 +195,7 @@ ${"=".repeat(40)}
195
195
  color: ${({theme:e})=>e.color.mediumdark};
196
196
  text-align: center;
197
197
  opacity: 0.7;
198
- `,t8=fr.div(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px 24px",textAlign:"center",gap:"16px"})),n8=fr.div({fontSize:"32px"}),r8=fr.h3(({theme:e})=>({margin:0,fontSize:e.typography.size.s3,fontWeight:e.typography.weight.bold,color:e.color.defaultText})),o8=fr.p(({theme:e})=>({margin:0,fontSize:e.typography.size.s2,color:e.color.mediumdark,maxWidth:"320px",lineHeight:1.5})),JI=fr.div(({theme:e})=>({display:"flex",alignItems:"center",gap:"10px",padding:"10px 14px",margin:"8px 12px",backgroundColor:`${e.color.warning}15`,border:`1px solid ${e.color.warning}50`,borderRadius:e.appBorderRadius,fontSize:e.typography.size.s2,color:e.color.defaultText})),ZI=fr.span({flex:1}),eF=fr.button(({theme:e})=>({padding:"4px 12px",fontSize:11,fontWeight:600,border:`1px solid ${e.color.warning}`,borderRadius:e.appBorderRadius,backgroundColor:"transparent",color:e.color.warning,cursor:"pointer",whiteSpace:"nowrap","&:hover":{backgroundColor:`${e.color.warning}15`}})),tF=()=>{let{selectedProjectId:e,projects:t,loadingProjects:n}=Ze(),{isConnected:r,sessionToken:o,authError:i}=we(),{currentStoryId:s}=rt(),{currentReviewId:a,userRole:u,roleOverride:c,setRoleOverride:l,setFeatureFlags:d}=ie(),[f,p]=qW(!1),g=()=>{l(null),o&&fetch(`${q()}/api/addon/flags`,{headers:{Authorization:`Bearer ${o}`}}).then(M=>M.json()).then(M=>{d({enableFixGeneration:!!M.enableFixGeneration,enableFixApply:!!M.enableFixApply,enableAutoMap:!!M.enableAutoMap,enableReviewBadges:!!M.enableReviewBadges,showCosts:!!M.showCosts,enableParallelReview:!!M.enableParallelReview,enableModelSelection:!!M.enableModelSelection})}).catch(()=>{})};Kg(),fm(),QI(),om(),tm();let{notification:S,dismissNotification:C}=KI();YW(()=>{if(S){let M=setTimeout(C,5e3);return()=>clearTimeout(M)}},[S,C]);let F=t.find(M=>M.id===e),k=r&&!!e&&!!F,R=!!o&&!!e&&(n||t.length===0),{loadingMapping:z}=rt(),_=k&&!!s&&!a&&z;return Mt.createElement(Qc,{header:Mt.createElement(Jc,{toolbar:Mt.createElement(bg,{onOpenSettings:()=>p(!0)})}),footer:Mt.createElement(e8,null,"UI Copilot v","0.5.2")},S&&Mt.createElement(XW,{variant:S.variant||"success"},Mt.createElement(QW,null,S.variant==="error"?"!":S.variant==="warning"?"\u26A0":"+"),Mt.createElement(JW,null,S.message),Mt.createElement(ZW,{onClick:C},"x")),i&&Mt.createElement(JI,null,Mt.createElement("span",null,"\u26A0"),Mt.createElement(ZI,null,i),Mt.createElement(eF,{onClick:()=>p(!0)},"Reconnect")),u==="admin"&&c&&Mt.createElement(JI,null,Mt.createElement("span",null,"\u{1F441}"),Mt.createElement(ZI,null,"Previewing as ",c),Mt.createElement(eF,{onClick:g},"Exit preview")),R||_?Mt.createElement(Nc,{label:R?"Loading...":"Loading review..."}):k?Mt.createElement(Mx,null):Mt.createElement(t8,null,Mt.createElement(n8,null,"\u2699"),Mt.createElement(r8,null,i?"Connection issue":"Set up UI Copilot"),Mt.createElement(o8,null,i?"Session expired or dashboard unreachable. Please reconnect.":"Connect your account and select a project to start reviewing your components against Figma designs."),Mt.createElement(qt,{onClick:()=>p(!0)},i?"Reconnect":"Open Settings")),f&&Mt.createElement(kC,{onClose:()=>p(!1)}))};import nF,{useCallback as i8}from"react";import{useStorybookApi as s8}from"storybook/manager-api";import{IconButton as a8}from"storybook/internal/components";var l8="uireview",c8=`${l8}/panel`,rF=()=>{let e=s8(),t=i8(()=>{e.togglePanel(!0),e.setSelectedPanel(c8)},[e]);return nF.createElement(a8,{key:"uireview-tool",title:"UI Review - Compare with Figma",onClick:t},nF.createElement(NI,null))};ve();import Vt,{useState as Ta,useCallback as aF,useEffect as Ox}from"react";import{styled as ro,useTheme as S8}from"storybook/theming";import{addons as Wc}from"storybook/manager-api";je();De();import{addons as m8,experimental_getStatusStore as Hc}from"storybook/manager-api";async function oF(e,t,n,r){let o=new Array(e.length),i=0;async function s(){for(;i<e.length&&!r();){let a=i++;try{let u=await e[a]();o[a]=u,r()||n(a,u)}catch(u){o[a]=u,r()||n(a,u)}}}return await Promise.all(Array.from({length:Math.min(t,e.length)},()=>s())),o}je();De();var u8=q(),p8="uireview/badge";async function d8(e,t,n=3){for(let r=0;r<=n;r++){let o=await fetch(e,t);if(o.status!==429||r===n)return o;let i=Math.pow(2,r)*1e3;y.warn(`[reviewAll] Rate limited, retrying in ${i}ms`),await new Promise(s=>setTimeout(s,i))}throw new Error("Max retries exceeded")}async function f8(e,t){let n=new TextDecoder,r="",o=null,i=0,s=0,a=0,u=0,c=0,l=0;for(;;){let{done:d,value:f}=await e.read();if(d)break;if(t()){e.cancel();break}r+=n.decode(f,{stream:!0});let p=r.split(`
198
+ `,t8=fr.div(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px 24px",textAlign:"center",gap:"16px"})),n8=fr.div({fontSize:"32px"}),r8=fr.h3(({theme:e})=>({margin:0,fontSize:e.typography.size.s3,fontWeight:e.typography.weight.bold,color:e.color.defaultText})),o8=fr.p(({theme:e})=>({margin:0,fontSize:e.typography.size.s2,color:e.color.mediumdark,maxWidth:"320px",lineHeight:1.5})),JI=fr.div(({theme:e})=>({display:"flex",alignItems:"center",gap:"10px",padding:"10px 14px",margin:"8px 12px",backgroundColor:`${e.color.warning}15`,border:`1px solid ${e.color.warning}50`,borderRadius:e.appBorderRadius,fontSize:e.typography.size.s2,color:e.color.defaultText})),ZI=fr.span({flex:1}),eF=fr.button(({theme:e})=>({padding:"4px 12px",fontSize:11,fontWeight:600,border:`1px solid ${e.color.warning}`,borderRadius:e.appBorderRadius,backgroundColor:"transparent",color:e.color.warning,cursor:"pointer",whiteSpace:"nowrap","&:hover":{backgroundColor:`${e.color.warning}15`}})),tF=()=>{let{selectedProjectId:e,projects:t,loadingProjects:n}=Ze(),{isConnected:r,sessionToken:o,authError:i}=we(),{currentStoryId:s}=rt(),{currentReviewId:a,userRole:u,roleOverride:c,setRoleOverride:l,setFeatureFlags:d}=ie(),[f,p]=qW(!1),g=()=>{l(null),o&&fetch(`${q()}/api/addon/flags`,{headers:{Authorization:`Bearer ${o}`}}).then(M=>M.json()).then(M=>{d({enableFixGeneration:!!M.enableFixGeneration,enableFixApply:!!M.enableFixApply,enableAutoMap:!!M.enableAutoMap,enableReviewBadges:!!M.enableReviewBadges,showCosts:!!M.showCosts,enableParallelReview:!!M.enableParallelReview,enableModelSelection:!!M.enableModelSelection})}).catch(()=>{})};Kg(),fm(),QI(),om(),tm();let{notification:S,dismissNotification:C}=KI();YW(()=>{if(S){let M=setTimeout(C,5e3);return()=>clearTimeout(M)}},[S,C]);let F=t.find(M=>M.id===e),k=r&&!!e&&!!F,R=!!o&&!!e&&(n||t.length===0),{loadingMapping:z}=rt(),_=k&&!!s&&!a&&z;return Mt.createElement(Qc,{header:Mt.createElement(Jc,{toolbar:Mt.createElement(bg,{onOpenSettings:()=>p(!0)})}),footer:Mt.createElement(e8,null,"UI Copilot v","0.5.3")},S&&Mt.createElement(XW,{variant:S.variant||"success"},Mt.createElement(QW,null,S.variant==="error"?"!":S.variant==="warning"?"\u26A0":"+"),Mt.createElement(JW,null,S.message),Mt.createElement(ZW,{onClick:C},"x")),i&&Mt.createElement(JI,null,Mt.createElement("span",null,"\u26A0"),Mt.createElement(ZI,null,i),Mt.createElement(eF,{onClick:()=>p(!0)},"Reconnect")),u==="admin"&&c&&Mt.createElement(JI,null,Mt.createElement("span",null,"\u{1F441}"),Mt.createElement(ZI,null,"Previewing as ",c),Mt.createElement(eF,{onClick:g},"Exit preview")),R||_?Mt.createElement(Nc,{label:R?"Loading...":"Loading review..."}):k?Mt.createElement(Mx,null):Mt.createElement(t8,null,Mt.createElement(n8,null,"\u2699"),Mt.createElement(r8,null,i?"Connection issue":"Set up UI Copilot"),Mt.createElement(o8,null,i?"Session expired or dashboard unreachable. Please reconnect.":"Connect your account and select a project to start reviewing your components against Figma designs."),Mt.createElement(qt,{onClick:()=>p(!0)},i?"Reconnect":"Open Settings")),f&&Mt.createElement(kC,{onClose:()=>p(!1)}))};import nF,{useCallback as i8}from"react";import{useStorybookApi as s8}from"storybook/manager-api";import{IconButton as a8}from"storybook/internal/components";var l8="uireview",c8=`${l8}/panel`,rF=()=>{let e=s8(),t=i8(()=>{e.togglePanel(!0),e.setSelectedPanel(c8)},[e]);return nF.createElement(a8,{key:"uireview-tool",title:"UI Review - Compare with Figma",onClick:t},nF.createElement(NI,null))};ve();import Vt,{useState as Ta,useCallback as aF,useEffect as Ox}from"react";import{styled as ro,useTheme as S8}from"storybook/theming";import{addons as Wc}from"storybook/manager-api";je();De();import{addons as m8,experimental_getStatusStore as Hc}from"storybook/manager-api";async function oF(e,t,n,r){let o=new Array(e.length),i=0;async function s(){for(;i<e.length&&!r();){let a=i++;try{let u=await e[a]();o[a]=u,r()||n(a,u)}catch(u){o[a]=u,r()||n(a,u)}}}return await Promise.all(Array.from({length:Math.min(t,e.length)},()=>s())),o}je();De();var u8=q(),p8="uireview/badge";async function d8(e,t,n=3){for(let r=0;r<=n;r++){let o=await fetch(e,t);if(o.status!==429||r===n)return o;let i=Math.pow(2,r)*1e3;y.warn(`[reviewAll] Rate limited, retrying in ${i}ms`),await new Promise(s=>setTimeout(s,i))}throw new Error("Max retries exceeded")}async function f8(e,t){let n=new TextDecoder,r="",o=null,i=0,s=0,a=0,u=0,c=0,l=0;for(;;){let{done:d,value:f}=await e.read();if(d)break;if(t()){e.cancel();break}r+=n.decode(f,{stream:!0});let p=r.split(`
199
199
  `);r=p.pop()||"";for(let g of p)if(g.startsWith("data: "))try{let S=JSON.parse(g.slice(6));if(S.type==="complete"){o=S.complianceScore??S.validation?.complianceScore??null;let F=(S.issues||[]).filter(k=>!k.dismissed);i=F.filter(k=>k.severity==="critical").length,s=F.filter(k=>k.severity==="major").length,a=F.filter(k=>k.severity==="minor").length,u=S.costUsd||0,c=S.inputTokens||0,l=S.outputTokens||0}}catch{}}return{score:o,criticalCount:i,majorCount:s,minorCount:a,costUsd:u,inputTokens:c,outputTokens:l}}function jc(e,t,n,r,o){e&&e.set([{value:n,typeId:p8,storyId:t,title:r,description:o}])}async function g8(e){let t=window.location.origin;try{let n=await fetch(`${t}/__uicopilot/capture?storyId=${encodeURIComponent(e)}`);if(n.ok){let r=await n.json();return{screenshot:r.screenshot||void 0,computedStyles:r.computedStyles||void 0,domTree:r.domTree||void 0}}}catch{}try{let n=await fetch(`${t}/__uicopilot/screenshot?storyId=${encodeURIComponent(e)}`);if(n.ok)return{screenshot:(await n.json()).screenshot||void 0}}catch{}return{}}async function iF(e,t,n,r,o,i){jc(o,e.storyId,"status-value:pending","Reviewing...",e.storyName);try{console.warn(`[reviewAll] Capturing for: ${e.storyName} (${e.storyId})`);let s=await g8(e.storyId);console.warn(`[reviewAll] Captured: screenshot=${!!s.screenshot} domTree=${!!s.domTree} styles=${!!s.computedStyles} for: ${e.storyName}`);let a=await d8(`${u8}/api/review/stream`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({projectId:n,storyId:e.storyId,storyName:e.storyName,storybookScreenshot:s.screenshot,computedStyles:s.computedStyles,domTree:s.domTree,aiModels:[r]})});if(console.warn(`[reviewAll] API response for ${e.storyName}: HTTP ${a.status}`),!a.ok)throw new Error(`HTTP ${a.status}`);let u=a.body?.getReader();if(!u)throw new Error("No response body");let c=await f8(u,i),{score:l,criticalCount:d,majorCount:f,minorCount:p,costUsd:g,inputTokens:S,outputTokens:C}=c;if(l!==null){let F=d>0||l<70?"status-value:error":f>0||l<90?"status-value:warning":"status-value:success",k=[`Score: ${l}`];d>0&&k.push(`${d} critical`),f>0&&k.push(`${f} major`),p>0&&k.push(`${p} minor`);let R=l>=90?`\u2713 Score ${l}`:l>=70?`\u26A0 Score ${l}`:`\u2717 Score ${l}`;return jc(o,e.storyId,F,R,k.join(" \xB7 ")),{passed:l>=70,score:l,costUsd:g,inputTokens:S,outputTokens:C}}return jc(o,e.storyId,"status-value:error","Review Failed","No score received"),{passed:!1,score:null,costUsd:0,inputTokens:0,outputTokens:0}}catch(s){y.error(`[reviewAll] Failed to review ${e.storyName}:`,s);let a=s instanceof Error?s.message:"Unknown error";return jc(o,e.storyId,"status-value:error","Review Failed",a),{passed:!1,score:null,costUsd:0,inputTokens:0,outputTokens:0}}}var h8=q(),va="uireview/badge";function sF(){let e=!1,t=!1;try{let n=m8.getChannel();n.on(zx,async()=>{if(!t){t=!0,e=!1;try{await b8(n,()=>e)}finally{t=!1}}}),n.on(Nx,()=>{e=!0})}catch{}}async function Rx(){try{let e=localStorage.getItem("uicopilot_session_token"),t=localStorage.getItem("uicopilot_selected_project_id");if(!e||!t)return[];let n=await fetch(`${h8}/api/mappings?projectId=${t}`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)return[];let i=((await n.json()).mappings||[]).filter(s=>s.figmaNodeId).map(s=>{let a=s;return{storyId:a.storyId,storyName:a.name||a.storyId,figmaNodeId:a.figmaNodeId}});return x8(i),i}catch(e){return y.error("[useReviewAll] Failed to load mapped stories:",e),[]}}function x8(e){try{if(typeof Hc!="function")return;let t=Hc(va);if(!t)return;let n=t.getAll?.()||{},r=new Set(e.map(s=>s.storyId)),o=Object.keys(n).filter(s=>n[s]?.[va]&&!r.has(s));o.length>0&&t.unset(o);let i=e.filter(s=>{let a=n[s.storyId]?.[va];return!(a?.value==="status-value:success"||a?.value==="status-value:warning"||a?.value==="status-value:error")}).map(s=>({value:"status-value:pending",typeId:va,storyId:s.storyId,title:"Mapped to Figma",description:"Ready for UI review \u2014 click Run to start"}));i.length>0&&t.set(i)}catch{}}function y8(){try{let e=localStorage.getItem("uicopilot_review_all_concurrency");if(e)return Math.max(1,Math.min(5,parseInt(e,10)))}catch{}return 3}async function b8(e,t){let n=await Rx();if(n.length===0){e.emit(Ca,{total:0,passed:0,failed:0});return}let r=localStorage.getItem("uicopilot_session_token"),o=localStorage.getItem("uicopilot_selected_project_id");if(!r||!o)return;let i="claude-sonnet-4-5-20250929";try{let S=localStorage.getItem("uicopilot_selected_models");if(S){let C=JSON.parse(S);Array.isArray(C)&&C.length>0&&(i=C[0])}}catch{}let s=null;try{typeof Hc=="function"&&(s=Hc(va))}catch{}let a=y8(),u=0,c=0,l=0,d=0,f=0,p=0;e.emit(ka,{total:n.length,completed:0,currentStoryName:n[0]?.storyName||""});let g=n.map(S=>()=>iF(S,r,o,i,s,t));await oF(g,a,(S,C)=>{if(C&&typeof C=="object"&&"score"in C){let F=C;F.score!==null&&F.score>=90?u++:F.score!==null&&F.score>=70?c++:l++,d+=F.costUsd||0,f+=F.inputTokens||0,p+=F.outputTokens||0}else l++;console.warn(`[reviewAll] Story ${S+1}/${n.length} done:`,n[S].storyName,C),e.emit(ka,{total:n.length,completed:u+c+l,currentStoryName:n[S].storyName})},t),e.emit(Ca,{total:n.length,passed:u,failed:l,warnCount:c,costUsd:d,inputTokens:f,outputTokens:p})}var w8=ro.div({padding:"8px 12px",display:"flex",flexDirection:"column",gap:"6px"}),v8=ro.div({display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px"}),k8=ro.span(({theme:e})=>({fontSize:"12px",fontWeight:500,color:e.color.defaultText})),lF=ro.span(({theme:e})=>({fontSize:"11px",color:e.color.mediumdark})),cF=ro.button(({theme:e,running:t})=>({display:"flex",alignItems:"center",gap:"6px",padding:"4px 12px",background:t?e.color.warning:e.color.secondary,border:"none",borderRadius:"6px",color:e.color.inverseText,cursor:"pointer",fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,transition:"all 0.2s","&:disabled":{opacity:.4,cursor:"not-allowed"},"&:hover:not(:disabled)":{opacity:.9}})),C8=ro.div(({theme:e})=>({width:"100%",height:"3px",backgroundColor:e.appBorderColor,borderRadius:"2px",overflow:"hidden"})),T8=ro.div(({theme:e,percent:t})=>({width:`${t}%`,height:"100%",backgroundColor:e.color.secondary,borderRadius:"2px",transition:"width 0.3s ease"})),uF=ro.div(({theme:e})=>({display:"flex",alignItems:"center",gap:`${e.layoutMargin*.8}px`,fontSize:e.typography.size.s1,color:e.color.mediumdark})),Ji=ro.span(e=>({display:"flex",alignItems:"center",gap:"3px","&::before":{content:'""',display:"inline-block",width:"7px",height:"7px",borderRadius:"50%",backgroundColor:e.dotColor}})),zx="uireview/review-all-start",Nx="uireview/review-all-cancel",ka="uireview/review-all-progress",Ca="uireview/review-all-complete";function pF(){try{let e=localStorage.getItem("uicopilot_feature_flags");return e?!!JSON.parse(e).enableParallelReview:!1}catch{return!1}}var dF=()=>{let[e,t]=Ta(!1),[n,r]=Ta(null),[o,i]=Ta(null),[s,a]=Ta(null),[u,c]=Ta(pF);Ox(()=>{let g=()=>c(pF()),S=setInterval(g,2e3);return window.addEventListener("storage",g),()=>{clearInterval(S),window.removeEventListener("storage",g)}},[]),Ox(()=>{let g=()=>{Rx().then(k=>{a(k.length)}).catch(()=>{})},S=setTimeout(g,3e3),C=null;try{C=Wc.getChannel(),C.on("storyChanged",g),C.on("uireview/mappings-changed",g)}catch{}let F=setInterval(g,6e4);return()=>{clearTimeout(S),clearInterval(F),C&&(C.off("storyChanged",g),C.off("uireview/mappings-changed",g))}},[]),Ox(()=>{let g;try{g=Wc.getChannel()}catch{return}let S=F=>{r(F),t(!0)},C=F=>{t(!1),r(null),i({total:F.total,passed:F.passed,failed:F.failed,warned:F.warnCount||0,costUsd:F.costUsd||0})};return g.on(ka,S),g.on(Ca,C),()=>{g.off(ka,S),g.off(Ca,C)}},[]);let l=aF(()=>{try{Wc.getChannel().emit(zx),t(!0),i(null)}catch{}},[]),d=aF(()=>{try{Wc.getChannel().emit(Nx)}catch{}t(!1),r(null)},[]),f=n?Math.round(n.completed/n.total*100):0,p=S8();return u?Vt.createElement(w8,null,Vt.createElement(v8,null,Vt.createElement(k8,null,"UI Review"),e?Vt.createElement(cF,{running:!0,onClick:d},"Cancel"):Vt.createElement(cF,{onClick:l,disabled:!s||s===0},"Run",s?` (${s})`:"")),!e&&o?Vt.createElement(Vt.Fragment,null,Vt.createElement(uF,null,Vt.createElement(Ji,{dotColor:p.color.positive},"Pass (",o.passed,")"),Vt.createElement(Ji,{dotColor:p.color.warning},"Warn (",o.warned,")"),Vt.createElement(Ji,{dotColor:p.color.negative},"Fail (",o.failed,")")),o.costUsd>0&&Vt.createElement(lF,null,"$",o.costUsd.toFixed(3)," \xB7 \u20AA",(o.costUsd*3.6).toFixed(3))):e?null:Vt.createElement(uF,null,Vt.createElement(Ji,{dotColor:p.color.positive},"Pass"),Vt.createElement(Ji,{dotColor:p.color.warning},"Warn"),Vt.createElement(Ji,{dotColor:p.color.negative},"Fail")),e&&n&&Vt.createElement(Vt.Fragment,null,Vt.createElement(C8,null,Vt.createElement(T8,{percent:f})),Vt.createElement(lF,null,"Reviewing ",Math.min(n.completed+1,n.total),"/",n.total," \u2014 ",n.currentStoryName))):null};import*as gF from"@sentry/react";var I8="https://015e961f5f626bad5315430e02940616@o138219.ingest.us.sentry.io/4511134750539776",fF=!1;function F8(){if(typeof window>"u")return"production";let e=window.location.hostname;return/^(localhost|127\.0\.0\.1|0\.0\.0\.0)$/i.test(e)?"localhost":"production"}function mF(){if(!fF){fF=!0;try{gF.init({dsn:I8,environment:F8(),release:`uicopilot-addon@${process.env.npm_package_version||"unknown"}`,tracesSampleRate:0,enabled:!0,beforeSend(e){return e.tags={...e.tags,component:"storybook-addon"},e}})}catch{}}}mF();var Gc="uireview",A8=`${Gc}/panel`,P8=`${Gc}/tool`,xF=`${Gc}/test-provider`;Vc.register(Gc,()=>{if(console.log("[UI Review] Registering addon, checking for StatusStore API..."),typeof hF=="function"){console.log("[UI Review] StatusStore API available, initializing badges");let t=hF("uireview/badge");cv(t),console.log("[UI Review] Badge listener initialized")}else console.warn("[UI Review] experimental_getStatusStore not available \u2014 badges disabled");Vc.add(P8,{type:_x.TOOL,title:"UI Review",match:({viewMode:t})=>t==="story",render:()=>Ia.createElement(rF,null)}),sF(),(()=>{try{let t=localStorage.getItem("uicopilot_feature_flags");return t?!!JSON.parse(t).enableParallelReview:!1}catch{return!1}})()&&Vc.add(xF,{type:_x.experimental_TEST_PROVIDER,id:xF,render:()=>Ia.createElement(dF,null)}),Vc.add(A8,{type:_x.PANEL,title:"UI Review",match:({viewMode:t})=>t==="story",render:({active:t})=>Ia.createElement(E8,{active:t||!1},Ia.createElement(yg,null,Ia.createElement(tF,null)))})});
200
200
  /*! Bundled license information:
201
201