@pobammer-ts/small-rules 2.11.0 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +8 -8
  2. package/package.json +7 -18
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import e from"ignore";import t,{basename as n,dirname as r,extname as i,isAbsolute as a,join as o,relative as s}from"node:path";import{parse as c}from"yuku-parser";import{existsSync as l,readFileSync as u,readdirSync as d}from"node:fs";import{ResolverFactory as f}from"oxc-resolver";import{type as p}from"arktype";import{Minimatch as m,minimatch as h}from"minimatch";import{definePlugin as g}from"oxlint-plugin-utilities";function _(e,t,n){let r=`https://docs.howmanysmall.com/small-rules/rules/${t}/${e}/`;return n.meta===void 0?{...n}:{...n,meta:{...n.meta,docs:{...n.meta.docs,url:r}}}}function v(e,t){return e.type===`TSParenthesizedType`?v(e.typeAnnotation,t):e.type===`TSArrayType`?`Array<${v(e.elementType,t)}>`:e.type===`TSTypeOperator`&&e.operator===`readonly`&&e.typeAnnotation.type===`TSArrayType`?`ReadonlyArray<${v(e.typeAnnotation.elementType,t)}>`:t.getText(e)}function ee({parent:e}){let t=e.type===`TSParenthesizedType`?e.parent:e;return!(t.type===`TSRestType`&&t.parent.type===`TSTupleType`||t.type===`TSTupleType`||t.type===`TSArrayType`||t.type===`TSTypeOperator`&&t.operator===`readonly`)}const te=_(`array-type-generic`,`naming`,{createOnce(e){function t(t){e.report({fix(n){return n.replaceText(t,v(t,e.sourceCode))},messageId:`useGenericArrayType`,node:t})}return{TSArrayType(e){ee(e)&&t(e)},TSTypeOperator(e){e.operator===`readonly`&&e.typeAnnotation.type===`TSArrayType`&&ee(e)&&t(e)}}},meta:{docs:{description:`Disallow bracket array type syntax and require Array<T> / ReadonlyArray<T>.`},fixable:`code`,messages:{useGenericArrayType:`Bracket array type syntax is not allowed. Use Array<T> or ReadonlyArray<T> generic syntax.`},schema:[],type:`problem`}});function y(e){return typeof e==`string`}function b(e){return typeof e==`number`}function x(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ne(e){return y(e)&&e.length>0}function S(e){if(!Array.isArray(e))return!1;for(let t of e)if(!y(t))return!1;return!0}function C(e){if(!x(e))return!1;for(let t of Object.values(e))if(!y(t))return!1;return!0}function re(e){return b(e)&&!Number.isNaN(e)}function w(e){let t=e;for(;;)switch(t.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:t=t.expression;break;default:return t}}function T(e){return e.computed?e.property.type===`Literal`&&y(e.property.value)?e.property.value:void 0:e.property.type===`Identifier`?e.property.name:void 0}function E(e,t){let n=e;for(;n!==null;){let e=n.set.get(t);if(e!==void 0)return e;n=n.upper}}function ie(e,t){let n=[e.getScope(e.ast)];for(let e of n){for(let t of e.childScopes)n.push(t);for(let n of e.variables)t(n)}}function ae(e,t,n){let r=e.getScope(t);for(;r!==null;){let e=r.set.get(n);if(e!==void 0&&e.defs.length>0)return!0;r=r.upper}return!1}const oe=/^[A-Z]/v,se=new Set([`end`,`loc`,`parent`,`range`,`start`,`type`]);function D(e){return x(e)&&y(e.type)}function ce(e){return se.has(e)}function O(e){return oe.test(e)}function k(e){return e.type===`VariableDeclarator`}function le(e){return ue(e.typeAnnotation)?e.typeAnnotation:void 0}function ue(e){return x(e)&&`type`in e&&e.type===`TSTypeAnnotation`}function de(e,t){return e.type===`Identifier`&&e.name===t}function fe(e,t,n,r){return e.callee.type===`Identifier`?t.has(e.callee.name):e.callee.type!==`MemberExpression`||e.callee.object.type!==`Identifier`?!1:n.has(e.callee.object.name)&&T(e.callee)===r}function pe(e,t,n){return fe(e,t,n,`useMemo`)}function me({imported:e}){return e.type===`Identifier`?e.name:e.value}function A(e){return e.type===`Identifier`&&y(e.name)}function j(e){return e.type===`Identifier`}function he(e){return e.type===`JSXIdentifier`&&`name`in e}function ge(e){return e.type===`JSXOpeningElement`}function _e(e){return e.type===`ImportDeclaration`}function ve(e){return e.type===`Literal`&&y(e.value)}function ye(e){return e.type===`CallExpression`}function be(e){return e.type===`ImportSpecifier`}function xe(e){return e.type===`ExportSpecifier`}function Se(e){return e.type===`Property`}function M(e){return e.type===`MemberExpression`}function Ce(e){return e.type===`AssignmentExpression`}function we(e){return e.type===`UnaryExpression`}function Te(e){return e.type===`BinaryExpression`}function Ee(e){return e.type===`LogicalExpression`}function De(e){return e.type===`ConditionalExpression`}function Oe(e){return e.type===`SequenceExpression`}function ke(e){return e.type===`MethodDefinition`||e.type===`TSAbstractMethodDefinition`}function Ae(e){return e.type===`PropertyDefinition`||e.type===`TSAbstractPropertyDefinition`}function je(e){return e.type===`ImportDefaultSpecifier`}function Me(e){return e.type===`ImportNamespaceSpecifier`}function Ne(e){return e.type===`VariableDeclaration`}function Pe(e){return e.type===`ExportNamedDeclaration`}function Fe(e){return e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function Ie(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionExpression`}function N(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function Le(e,t){return de(e.callee,t)}function Re(e){return e.type===`ClassDeclaration`||e.type===`ClassExpression`}function ze(e){return e.type===`TSTypeAliasDeclaration`}function Be(e){return e.type===`TSPropertySignature`}function Ve(e){return e.type===`Literal`}function He(e){return e.type===`ArrowFunctionExpression`}function Ue(e){return Fe(e)||He(e)}function We(e){return e.type===`TSQualifiedName`}function Ge(e){return e.type===`Literal`&&b(e.value)}function Ke(e){return e.type===`NewExpression`}function qe(e){return e.type===`ArrayExpression`}function Je(e){return e.type===`ObjectExpression`}function Ye(e){return e.type===`ObjectPattern`}function Xe(e){return e.type===`TemplateLiteral`}function Ze(e){return e.type===`ExpressionStatement`}function Qe(e){return e.type===`TSTypeAssertion`}function $e(e){return e.type===`TSAsExpression`}function et(e){return e.type===`AssignmentPattern`}function tt(e){return e.type===`ThisExpression`}function nt(e){if(!ye(e)||e.optional)return!1;let{callee:t}=e;if(!j(t)||t.name!==`require`||e.arguments.length!==1)return!1;let[n]=e.arguments;return n!==void 0&&ve(n)}function rt(e){return e.type===`Identifier`}function it(e){return e.type!==`PrivateIdentifier`}function at(e){return e.type===`JSXIdentifier`?e.name:e.name.name}function ot(e){if(!(x(e)&&`bannedInstances`in e))return new Map;let{bannedInstances:t}=e,n=new Map;if(S(t)){for(let e of t)n.set(e.toLowerCase(),{message:void 0,originalName:e});return n}if(C(t))for(let[e,r]of Object.entries(t))n.set(e.toLowerCase(),{message:r,originalName:e});return n}function st(e){if(!(x(e)&&`bannedProperties`in e))return new Map;let{bannedProperties:t}=e,n=new Map;if(!x(t))return n;for(let[e,r]of Object.entries(t)){if(!x(r))continue;let t=new Map;for(let[e,n]of Object.entries(r))y(n)&&t.set(e.toLowerCase(),{message:n,propertyName:e});t.size>0&&n.set(e.toLowerCase(),t)}return n}function ct(e){let t=e;for(;t.upper!==null&&t.type!==`function`&&t.type!==`module`&&t.type!==`global`;)t=t.upper;return t}function lt(e){if(!Le(e,`Instance`))return;let[t]=e.arguments;if(!(t?.type!==`Literal`||!y(t.value)))return t.value}function ut(e){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.init===e&&t.id.type===`Identifier`)return t}const dt=_(`ban-instances`,`roblox`,{create(e){let{sourceCode:t}=e,[n]=e.options;if(!x(n))return{};let r=ot(n),i=st(n);if(r.size===0&&i.size===0)return{};let a=new Map,o=new Set;function s(t,n){if(n.message!==void 0&&n.message!==``){e.report({data:{className:n.originalName,customMessage:n.message},messageId:`bannedInstanceCustom`,node:t});return}e.report({data:{className:n.originalName},messageId:`bannedInstance`,node:t})}function c(t,n,r){if(r.message!==``){e.report({data:{className:n,customMessage:r.message,propertyName:r.propertyName},messageId:`bannedPropertyCustom`,node:t});return}e.report({data:{className:n,propertyName:r.propertyName},messageId:`bannedProperty`,node:t})}function l(e){if(o.has(e)||e.id.type!==`Identifier`||e.init===null)return;let n=w(e.init);if(n.type!==`NewExpression`)return;let r=lt(n);if(r===void 0)return;let i=E(t.getScope(e),e.id.name);i!==void 0&&(a.set(i,{className:r,functionScope:ct(i.scope)}),o.add(e))}function u(e){let n=t.getScope(e),r=E(n,e.name);if(r===void 0)return;let i=a.get(r);if(i!==void 0)return i.functionScope===ct(n)?i:void 0}return{AssignmentExpression(e){if(e.left.type!==`MemberExpression`)return;let t=T(e.left);if(t===void 0)return;let n=w(e.left.object);if(n.type!==`Identifier`)return;let r=u(n);if(r===void 0)return;let a=i.get(r.className.toLowerCase());if(a===void 0)return;let o=a.get(t.toLowerCase());o!==void 0&&c(e.left,r.className,o)},JSXOpeningElement(e){if(e.name.type!==`JSXIdentifier`)return;let{name:t}=e.name,n=t.charAt(0);if(n!==n.toLowerCase())return;let a=r.get(t.toLowerCase());a!==void 0&&s(e,a);let o=i.get(t.toLowerCase());if(o!==void 0)for(let n of e.attributes){if(n.type!==`JSXAttribute`)continue;let e=at(n.name);if(e===void 0)continue;let r=o.get(e.toLowerCase());r!==void 0&&c(n,t,r)}},NewExpression(e){let t=lt(e);if(t===void 0)return;let n=ut(e);n!==void 0&&l(n);let i=r.get(t.toLowerCase());i!==void 0&&s(e,i)},VariableDeclarator(e){l(e)}}},meta:{docs:{description:`Ban specified Roblox Instance classes and configured Instance properties.`},messages:{bannedInstance:`Instance class '{{className}}' is banned by project configuration. This class may cause performance issues, is deprecated, or has a better alternative. Check project guidelines for the recommended replacement.`,bannedInstanceCustom:`{{customMessage}}`,bannedProperty:`Property '{{propertyName}}' on Instance class '{{className}}' is banned by project configuration. This property may cause performance issues, is deprecated, or has a better alternative. Check project guidelines for the recommended replacement.`,bannedPropertyCustom:`{{customMessage}}`},schema:[{additionalProperties:!1,properties:{bannedInstances:{description:`Map of banned class names to custom messages, or an array of class names.`,oneOf:[{items:{type:`string`},type:`array`},{additionalProperties:{type:`string`},type:`object`}]},bannedProperties:{additionalProperties:{additionalProperties:{type:`string`},type:`object`},description:`Map of banned class names to maps of banned property names and custom messages.`,type:`object`}},type:`object`}],type:`problem`}}),ft=new Set([`FC`,`FunctionComponent`,`VFC`,`VoidFunctionComponent`]);function pt(e){if(e.type===`Identifier`&&ft.has(e.name))return e.name;if(e.type===`TSQualifiedName`&&ft.has(e.right.name))return e.right.name}function mt(e){let{typeAnnotation:t}=e.id;return ue(t)?t:void 0}const ht=_(`ban-react-fc`,`react`,{createOnce(e){return{VariableDeclarator(t){let n=mt(t);if(n===void 0)return;let r=n.typeAnnotation;r.type===`TSTypeReference`&&pt(r.typeName)!==void 0&&t.init?.type===`ArrowFunctionExpression`&&e.report({messageId:`banReactFC`,node:t})}}},meta:{docs:{description:`Ban React.FC and similar component type annotations. Use explicit function declarations instead.`},messages:{banReactFC:"Avoid React.FC/FunctionComponent/VFC/VoidFunctionComponent types. They break debug information and profiling. Use explicit function declarations instead: `function Component(props: Props) { ... }`"},schema:[],type:`problem`}}),gt=new Map([[`omit`,{originalName:`Omit`,replacementName:`Except`}]]);function _t(e){let t=new Map(gt);if(!(x(e)&&`bannedTypes`in e))return t;let{bannedTypes:n}=e;if(n===void 0)return t;if(S(n)){for(let e of n)t.set(e.toLowerCase(),{originalName:e,replacementName:void 0});return t}if(C(n))for(let[e,r]of Object.entries(n))t.set(e.toLowerCase(),{originalName:e,replacementName:r});return t}function vt(e){if(e.type===`Identifier`)return e.name;if(e.type===`TSQualifiedName`)return e.right.name}const yt=_(`ban-types`,`naming`,{create(e){let[t]=e.options,n=_t(t);return{TSTypeReference(t){let r=vt(t.typeName);if(r===void 0)return;let i=n.get(r.toLowerCase());if(i!==void 0){if(i.replacementName!==void 0&&i.replacementName!==``){e.report({data:{replacementName:i.replacementName,typeName:i.originalName},messageId:`bannedTypeWithReplacement`,node:t.typeName});return}e.report({data:{typeName:i.originalName},messageId:`bannedType`,node:t.typeName})}}}},meta:{docs:{description:`Ban configured TypeScript utility types, defaulting to Omit in favor of Except.`},messages:{bannedType:`Type '{{typeName}}' is banned by project configuration. Use the project-preferred alternative for this type.`,bannedTypeWithReplacement:`Type '{{typeName}}' is banned. Use '{{replacementName}}' instead.`},schema:[{additionalProperties:!1,properties:{bannedTypes:{default:{Omit:`Except`},description:`Array of banned type names or an object mapping banned type names to preferred replacement names.`,oneOf:[{items:{type:`string`},type:`array`},{additionalProperties:{type:`string`},type:`object`}]}},type:`object`}],type:`problem`}}),bt=new Map([[`backGround`,`background`],[`callBack`,`callback`],[`checkBox`,`checkbox`],[`clipBoard`,`clipboard`],[`codeBase`,`codebase`],[`dataBase`,`database`],[`downLoad`,`download`],[`feedBack`,`feedback`],[`foreGround`,`foreground`],[`frameWork`,`framework`],[`headLine`,`headline`],[`keyBoard`,`keyboard`],[`keyFrame`,`keyframe`],[`lifeCycle`,`lifecycle`],[`metaData`,`metadata`],[`midPoint`,`midpoint`],[`nameSpace`,`namespace`],[`overRide`,`override`],[`passWord`,`password`],[`payLoad`,`payload`],[`placeHolder`,`placeholder`],[`preView`,`preview`],[`screenShot`,`screenshot`],[`sideBar`,`sidebar`],[`subClass`,`subclass`],[`subDirectory`,`subdirectory`],[`subDomain`,`subdomain`],[`subMenu`,`submenu`],[`subProcess`,`subprocess`],[`subString`,`substring`],[`subTree`,`subtree`],[`subType`,`subtype`],[`subTitle`,`subtitle`],[`timeOut`,`timeout`],[`timeStamp`,`timestamp`],[`toolBar`,`toolbar`],[`toolKit`,`toolkit`],[`toolTip`,`tooltip`],[`touchScreen`,`touchscreen`],[`unSubscribe`,`unsubscribe`],[`underScore`,`underscore`],[`upLoad`,`upload`],[`userName`,`username`],[`viewPort`,`viewport`],[`webCam`,`webcam`],[`webHook`,`webhook`],[`webSite`,`website`],[`weekEnd`,`weekend`],[`whiteSpace`,`whitespace`],[`wildCard`,`wildcard`],[`workFlow`,`workflow`],[`workSpace`,`workspace`]]),xt=/[\\^$.*+?()[\]{}|]/gu,St=String.raw`(?=$|[\d_$]|\p{Uppercase_Letter})`;function Ct(e){return e.replaceAll(xt,String.raw`\$&`)}function wt(e){let t=e.at(0);return t===void 0?e:`${t.toUpperCase()}${e.slice(1)}`}function Tt(e){let t=e.at(0);return t===void 0?e:`${t.toLowerCase()}${e.slice(1)}`}function Et(e){return e===e.toUpperCase()}function Dt(e){let t=e.at(0);return t?.toUpperCase()===t&&t!==void 0}function Ot(e){if(e.size===0)return;let t=[],n=[];for(let r of e.keys())t.push(Ct(r)),n.push(Ct(wt(r)));return RegExp(`(?:^(?:${t.join(`|`)})|(?:${n.join(`|`)}))${St}`,`gu`)}function kt(e,t){let n=new Map(t?bt:void 0);if(!x(e))return n;for(let[t,r]of Object.entries(e)){if(r===!1){n.delete(t);continue}y(r)&&r.length>0&&n.set(t,r)}return n}function At(e){let t=x(e)?e:{},n=t.extendDefaultReplacements!==!1,r=kt(t.replacements,n),i=new Set;if(x(t.allowList))for(let e of Object.keys(t.allowList))i.add(e);return{allowList:i,checkProperties:t.checkProperties===!0,checkShorthandProperties:t.checkShorthandProperties===!0,checkVariables:t.checkVariables!==!1,replacementRegExp:Ot(r),replacements:r}}function jt(e,t){let n=t.get(e)??t.get(Tt(e));if(n!==void 0)return Dt(e)?wt(n):Tt(n)}function Mt(e,t){let{replacementRegExp:n,replacements:r,allowList:i}=t;if(n===void 0||Et(e)||i.has(e))return;n.lastIndex=0;let a=e.replaceAll(n,e=>jt(e,r)??e);return a===e?void 0:a}function Nt(e){let{parent:t}=e;return t?.type===`Property`&&t.shorthand&&t.value===e}function Pt(e){let{parent:t}=e;return t===null?!1:t.type===`Property`&&t.key===e&&!t.computed||t.type===`PropertyDefinition`&&t.key===e&&!t.computed||t.type===`MethodDefinition`&&t.key===e&&!t.computed}const Ft=_(`consistent-compound-words`,`naming`,{create(e){let t=At(e.options[0]);function n(n,r){let i=Mt(r,t);i!==void 0&&e.report({data:{name:r,replacement:i},messageId:`error`,node:n})}return{Identifier(e){!t.checkProperties||e.name===`__proto__`||e.parent.type===`ExportSpecifier`||!Pt(e)||n(e,e.name)},"Program:exit"(){t.checkVariables&&ie(e.sourceCode,e=>{if(e.defs.length===0)return;let[r]=e.defs;r===void 0||!t.checkShorthandProperties&&Nt(r.name)||n(r.name,e.name)})}}},meta:{docs:{description:`Enforce consistent spelling of compound words in identifiers.`,recommended:!1},messages:{error:"Prefer `{{replacement}}` over `{{name}}`.",rename:"Rename to `{{replacement}}`."},schema:[{additionalProperties:!1,properties:{allowList:{additionalProperties:{enum:[!0]},type:`object`},checkProperties:{type:`boolean`},checkShorthandProperties:{type:`boolean`},checkVariables:{type:`boolean`},extendDefaultReplacements:{type:`boolean`},replacements:{additionalProperties:{anyOf:[{enum:[!1]},{minLength:1,type:`string`}]},type:`object`}},type:`object`}],type:`suggestion`}}),It=/^(?:eslint|oxlint)-disable-(?:next-)?line$/u,Lt=/[\s,]+/gu,Rt=/\s/u,zt=new Set([`eslint-disable`,`eslint-disable-line`,`eslint-disable-next-line`,`oxlint-disable`,`oxlint-disable-line`,`oxlint-disable-next-line`]),Bt=new Set([...zt,`eslint-enable`,`oxlint-enable`]),Vt=new Set([`eslint`,`eslint-disable`,`eslint-disable-line`,`eslint-disable-next-line`,`eslint-enable`,`eslint-env`,`exported`,`global`,`globals`,`oxlint`,`oxlint-disable`,`oxlint-disable-line`,`oxlint-disable-next-line`,`oxlint-enable`,`oxlint-env`]);function Ht(e){return zt.has(e)}function Ut(e){return Bt.has(e)}function Wt(e,t){if(!x(e))return;let n=Reflect.get(e,t);if(n===void 0||!Array.isArray(n))return;let r=[],i=0;for(let e of n){if(!y(e))return;r[i++]=e}return r}function Gt(e){let t=Kt(e.value);if(t===void 0)return;let n=It.test(t.kind);if(!(e.type===`Line`&&!n||(t.kind===`eslint-disable-line`||t.kind===`oxlint-disable-line`)&&e.loc.start.line!==e.loc.end.line))return{comment:e,description:t.description,kind:t.kind,value:t.value}}function Kt(e){let{description:t,text:n}=Jt(e),r=n.search(Rt),i=r===-1?n:n.slice(0,r);if(Vt.has(i))return{description:t,kind:i,value:r===-1?``:n.slice(r).trim()}}const qt=/\s-{2,}\s/u;function Jt(e){let[t,n]=e.split(qt);return t===void 0?{description:void 0,text:``}:{description:n?.trim(),text:t.trim()}}function Yt(e,t){return e.line<t.line||e.line===t.line&&e.column<=t.column}function Xt(e){return{end:e.end,start:{column:0,line:e.start.line}}}const Zt=/\r\n|[\r\n\u2028\u2029]/u;function Qt(e,t){if(t===void 0)return Xt(e.loc);let n=e.value.split(Zt),[r]=n;if(r===void 0)return e.loc;let i=RegExp(`([\\s,]|^)${tn(t)}(?:[\\s,]|$)`,`u`),a=e.loc.start,o=i.exec(r);if(o!==null){let[,n]=o;return n===void 0?e.loc:{end:{column:2+a.column+o.index+n.length+t.length,line:a.line},start:{column:2+a.column+o.index+n.length,line:a.line}}}for(let e=1;e<n.length;e+=1){let r=n[e];if(r===void 0)continue;let o=i.exec(r);if(o!==null){let[,n]=o;if(n===void 0)continue;return{end:{column:o.index+n.length+t.length,line:a.line+e},start:{column:o.index+n.length,line:a.line+e}}}}return e.loc}const $t=/[|\\{}()[\]^$+*?.]/gu,en=String.raw`\$&`;function tn(e){return e.replaceAll($t,en)}function nn(e){let t={areas:[],duplicateDisableDirectives:[],numberOfRelatedDisableDirectives:new Map,unusedEnableDirectives:[]};for(let n of e.getAllComments()){let e=Gt(n);if(e===void 0)continue;let{kind:r}=e;if(!Ut(r))continue;let{start:i}=n.loc,a=e.value!==void 0&&e.value!==``?e.value.split(Lt):void 0;switch(r){case`eslint-disable`:case`oxlint-disable`:rn(t,n,i,a,`block`);break;case`eslint-disable-line`:case`oxlint-disable-line`:{let{line:e}=i;rn(t,n,{column:0,line:e},a,`line`),an(t,n,{column:-1,line:e+1},a,`line`);break}case`eslint-disable-next-line`:case`oxlint-disable-next-line`:{let{line:e}=i;rn(t,n,{column:0,line:e+1},a,`line`),an(t,n,{column:-1,line:e+2},a,`line`);break}case`eslint-enable`:case`oxlint-enable`:an(t,n,i,a,`block`);break}}return t}function rn(e,t,n,r,i){if(r===void 0){ln(e.areas,void 0,n)!==void 0&&e.duplicateDisableDirectives.push({comment:t,ruleId:void 0}),e.areas.push({comment:t,end:void 0,kind:i,ruleId:void 0,start:n});return}for(let a of r)ln(e.areas,a,n)!==void 0&&e.duplicateDisableDirectives.push({comment:t,ruleId:a}),e.areas.push({comment:t,end:void 0,kind:i,ruleId:a,start:n})}function an(e,t,n,r,i){let a=new Set;if(r===void 0){on(e.areas,n,i,void 0,a)||cn(e,t,void 0),e.numberOfRelatedDisableDirectives.set(t,a.size);return}for(let o of r)on(e.areas,n,i,o,a)||cn(e,t,o);e.numberOfRelatedDisableDirectives.set(t,a.size)}function on(e,t,n,r,i){let a=!1;for(let o=e.length-1;o>=0;--o){let s=e[o];s===void 0||!sn(s,n,r)||(i.add(s.comment),s.end=t,a=!0)}return a}function sn(e,t,n){return e.end!==void 0||e.kind!==t?!1:n===void 0||e.ruleId===n}function cn(e,t,n){e.unusedEnableDirectives.push({comment:t,ruleId:n})}function ln(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];if(i!==void 0&&(i.ruleId===void 0||i.ruleId===t)&&Yt(i.start,n)&&(i.end===void 0||Yt(n,i.end)))return i}}const un=_(`directive-disable-enable-pair`,`general`,{create(e){let[t]=e.options,n=t?.allowWholeFile===!0,r=nn(e.sourceCode),[i]=e.sourceCode.ast.tokens;if(n&&i===void 0)return{};for(let t of r.areas)t.end===void 0&&(n&&i!==void 0&&Yt(t.start,i.loc.start)||e.report({data:{ruleId:t.ruleId??``},loc:Qt(t.comment,t.ruleId),messageId:t.ruleId===void 0?`missingPair`:`missingRulePair`}));return{}},meta:{docs:{description:"Require a matching enable comment for every `oxlint-disable` or `eslint-disable` block directive."},messages:{missingPair:`Requires 'eslint-enable' directive.`,missingRulePair:`Requires 'eslint-enable' directive for '{{ruleId}}'.`},schema:[{additionalProperties:!1,properties:{allowWholeFile:{description:`Allow a disable directive that covers the entire file.`,type:`boolean`}},type:`object`}],type:`suggestion`}}),dn=_(`directive-no-aggregating-enable`,`general`,{create(e){let t=nn(e.sourceCode);for(let[n,r]of t.numberOfRelatedDisableDirectives)r>1&&e.report({data:{kind:`eslint-enable`},loc:Xt(n.loc),messageId:`aggregatingEnable`});return{}},meta:{docs:{description:"Disallow aggregating `oxlint-enable` or `eslint-enable` comments across multiple disable directives."},messages:{aggregatingEnable:`'{{kind}}' comment enables rules for multiple disable directives. Please move '{{kind}}' after each disable directive.`},schema:[],type:`suggestion`}}),fn=_(`directive-no-duplicate-disable`,`general`,{create(e){let t=nn(e.sourceCode);for(let n of t.duplicateDisableDirectives)e.report({data:{ruleId:n.ruleId??``},loc:Qt(n.comment,n.ruleId),messageId:n.ruleId===void 0?`duplicate`:`duplicateRule`});return{}},meta:{docs:{description:"Disallow duplicate `oxlint-disable` or `eslint-disable` comments."},messages:{duplicate:`ESLint rules have been disabled already.`,duplicateRule:`'{{ruleId}}' rule has been disabled already.`},schema:[],type:`problem`}}),pn=_(`directive-no-restricted-disable`,`general`,{create(t){let n=nn(t.sourceCode),r=t.options;if(r.length===0)return{};let i=e();for(let e of r)i.add(e);for(let e of n.areas)(e.ruleId===void 0||i.ignores(e.ruleId))&&t.report({data:{ruleId:e.ruleId??String(r)},loc:Qt(e.comment,e.ruleId),messageId:`disallow`});return{}},meta:{docs:{description:"Disallow `oxlint-disable` or `eslint-disable` comments for configured rules."},messages:{disallow:`Disabling '{{ruleId}}' is not allowed.`},schema:{items:{type:`string`},type:`array`,uniqueItems:!0},type:`suggestion`}}),mn=_(`directive-no-unlimited-disable`,`general`,{create(e){for(let t of e.sourceCode.getAllComments()){let n=Gt(t);if(n===void 0)continue;let{kind:r}=n;Ht(r)&&(n.value===void 0||n.value===``)&&e.report({data:{kind:n.kind},loc:Xt(n.comment.loc),messageId:`unexpected`})}return{}},meta:{docs:{description:"Disallow `oxlint-disable` or `eslint-disable` comments without rule names."},messages:{unexpected:`Unexpected unlimited '{{kind}}' comment. Specify some rule names to disable.`},schema:[],type:`suggestion`}}),hn=_(`directive-no-unused-enable`,`general`,{create(e){let t=nn(e.sourceCode);for(let n of t.unusedEnableDirectives)e.report({data:{kind:`eslint-enable`,ruleId:n.ruleId??``},loc:Qt(n.comment,n.ruleId),messageId:n.ruleId===void 0?`unused`:`unusedRule`});return{}},meta:{docs:{description:"Disallow unused `oxlint-enable` or `eslint-enable` comments."},messages:{unused:`Unused '{{kind}}' comment. No reported rules are disabled.`,unusedRule:`'{{ruleId}}' rule is disabled but never reported. Please remove unnecessary '{{kind}}' comment.`},schema:[],type:`suggestion`}}),gn=_(`directive-no-use`,`general`,{create(e){let t=new Set(Wt(e.options[0],`allow`));for(let n of e.sourceCode.getAllComments()){let r=Gt(n);r===void 0||n.type===`Line`||t.has(r.kind)||e.report({loc:Xt(r.comment.loc),messageId:`disallow`})}return{}},meta:{docs:{description:`Disallow block ESLint/Oxlint directive comments.`},messages:{disallow:`Unexpected ESLint directive comment.`},schema:[{additionalProperties:!1,properties:{allow:{description:`Directive kinds that are still allowed in block comments.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`suggestion`}}),_n=/\s-{2,}\s/u,vn=/^(?<kind>oxlint-disable|oxlint-enable)(?:\s|$)/u,yn=_(`directive-require-description`,`general`,{create(e){let t=new Set(Wt(e.options[0],`ignore`));function n(n){let r=Gt(n);if(r!==void 0){let{kind:n}=r;if(!Ut(n)||t.has(n)||r.description!==void 0)return;e.report({data:{kind:r.kind},loc:r.comment.loc,messageId:`missingDescription`});return}if(n.type!==`Line`)return;let i=n.value.trim(),a=vn.exec(i);if(a===null)return;let o=a.groups?.kind;o!==void 0&&Ut(o)&&(t.has(o)||_n.test(i)||e.report({data:{kind:o},loc:n.loc,messageId:`missingDescription`}))}for(let t of e.sourceCode.getAllComments())n(t);return{}},meta:{docs:{description:"Require descriptions for `oxlint` and `eslint` disable/enable directives."},messages:{missingDescription:`Missing description for '{{kind}}' comment.`},schema:[{additionalProperties:!1,properties:{ignore:{description:`Directive kinds that do not require a description.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`suggestion`}}),bn={baseThreshold:10,errorThreshold:25,interfacePenalty:20,performanceMode:!0};function xn(e){let{callee:t}=e;return t.type===`MemberExpression`&&t.object.type===`Identifier`&&t.object.name===`Ianitor`}function Sn(e){if(e.type!==`TSTypeReference`)return e;let{typeName:t,typeArguments:n}=e;return t.type!==`Identifier`||t.name!==`Readonly`?e:n?.params[0]??e}function Cn(e){let t=Sn(e);if(t.type!==`TSTypeReference`)return;let{typeName:n,typeArguments:r}=t;if(n.type!==`TSQualifiedName`)return;let{left:i,right:a}=n;if(i.type!==`Identifier`||i.name!==`Ianitor`||a.name!==`Static`)return;let o=r?.params[0];if(o?.type!==`TSTypeQuery`)return;let{exprName:s}=o;return s.type===`Identifier`?s.name:void 0}function wn(e){let t=Sn(e);if(t.type!==`TSTypeReference`)return!1;let{typeName:n,typeArguments:r}=t;if(n.type!==`TSQualifiedName`)return!1;let{left:i,right:a}=n;return i.type!==`Identifier`||i.name!==`Ianitor`||a.name!==`Static`?!1:r?.params[0]?.type===`TSTypeQuery`}function Tn(e){let{callee:t}=e;if(t.type!==`MemberExpression`||t.property.type!==`Identifier`)return 0;switch(t.property.name){case`array`:case`instanceIsA`:case`instanceOf`:case`optional`:return 2;case`boolean`:case`number`:case`string`:return 1;case`interface`:case`strictInterface`:{let[t]=e.arguments;return t?.type===`ObjectExpression`?10+t.properties.length*3:0}case`intersection`:case`union`:return e.arguments.length*2;case`map`:case`record`:return 3;default:return 1}}function P(e,t,n,r){let i=e+t;return n.performanceMode?Math.min(i,r):i}function En(e,t,n,r,i,a,o,s=0){return P(e,F(t,n,r,i,a,o)+s,r,o)}function Dn(e,t,n,r,i,a,o){let s=e;for(let e of t){if(!(`typeAnnotation`in e))continue;let{typeAnnotation:t}=e;t?.type===`TSTypeAnnotation`&&(s=En(s,t.typeAnnotation,n,r,i,a,o))}return s}function On(e,t,n,r,i,a,o,s,c){if(`types`in t){let l=e,{types:u}=t;for(let e of u)l=En(l,e,n,r,i,a,o);return P(l,s*(u.length+c),r,o)}return e}function kn(e,t){let n=t.get(e);if(n!==void 0)return n;let r=Math.log2(e+1);return t.set(e,r),r}function F(e,t,n,r,i,a){let o=r.nodeCache.get(e);if(o!==void 0)return o;if(r.visitedNodes.has(e))return 50;r.visitedNodes.add(e);let s=0,c=t+1;switch(e.type){case`TSAnyKeyword`:case`TSNeverKeyword`:case`TSUnknownKeyword`:break;case`TSArrayType`:if(`elementType`in e){let{elementType:t}=e;s=P(F(t,c,n,r,i,a),1,n,a);break}s=1;break;case`TSBigIntKeyword`:case`TSBooleanKeyword`:case`TSNullKeyword`:case`TSNumberKeyword`:case`TSStringKeyword`:case`TSSymbolKeyword`:case`TSUndefinedKeyword`:case`TSVoidKeyword`:s=1;break;case`TSConditionalType`:{let{checkType:t,extendsType:o,trueType:l,falseType:u}=e;s=P(P(3,F(t,c,n,r,i,a),n,a),F(o,c,n,r,i,a),n,a),s=P(P(s,F(l,c,n,r,i,a),n,a),F(u,c,n,r,i,a),n,a);break}case`TSFunctionType`:case`TSMethodSignature`:{s=2;let{params:t}=e;for(let e of t){if(!(`typeAnnotation`in e))continue;let{typeAnnotation:t}=e;t?.type===`TSTypeAnnotation`&&(s=P(s,F(t.typeAnnotation,c,n,r,i,a),n,a))}if(`returnType`in e){let{returnType:t}=e;t?.type===`TSTypeAnnotation`&&(s=P(s,F(t.typeAnnotation,c,n,r,i,a),n,a))}break}case`TSInterfaceDeclaration`:{s=n.interfacePenalty;let{extends:t,body:o}=e;t.length>0&&(s=P(s,t.length*5,n,a));let l=o.body;s=P(s,l.length*2,n,a),s=Dn(s,l,c,n,r,i,a);break}case`TSIntersectionType`:s=On(s,e,c,n,r,i,a,3,0);break;case`TSMappedType`:{let{constraint:t,typeAnnotation:o}=e;s=En(5,t,c,n,r,i,a),o!==null&&(s=En(s,o,c,n,r,i,a));break}case`TSTupleType`:{let{elementTypes:t}=e;s=1;for(let e of t)e.type!==`TSRestType`&&e.type!==`TSOptionalType`&&(s=En(s,e,c,n,r,i,a));s=P(s,1.5*t.length,n,a);break}case`TSTypeLiteral`:{let{members:t}=e;s=2+t.length*.5,s=Dn(s,t,c,n,r,i,a);break}case`TSTypeReference`:{s=2;let{typeArguments:t}=e,o=t?.params??[];for(let e of o)s=En(s,e,c,n,r,i,a,2);break}case`TSUnionType`:s=On(s,e,c,n,r,i,a,2,-1);break;default:s=1}return s*=kn(t,i),r.nodeCache.set(e,s),r.visitedNodes.delete(e),s}const An=_(`enforce-ianitor-check-type`,`roblox`,{create(e){let t=e.options[0]??{},n={...bn,...t},r={nodeCache:new WeakMap,visitedNodes:new WeakSet},i=new Set,a=new Map,o=n.errorThreshold*2,s=!1,c=new Map,l=new Map,u=new Map;return{Identifier(e){e.name===`Ianitor`&&(s=!0)},"Program:exit"(){if(s){for(let[t,n]of l.entries())e.report({data:{score:n.complexity.toFixed(1)},messageId:`missingIanitorCheckType`,node:t});for(let[t]of c.entries())e.report({data:{name:t.id.name},messageId:`complexInterfaceNeedsCheck`,node:t});for(let[t,n]of u.entries()){let{id:r}=t;r.type===`Identifier`&&i.has(r.name)||e.report({data:{score:n.complexity.toFixed(1)},messageId:`missingIanitorCheckType`,node:r})}}},TSInterfaceDeclaration(e){let t=F(e,0,n,r,a,o);t<n.interfacePenalty||c.set(e,{complexity:t})},TSTypeAliasDeclaration(e){let t=Cn(e.typeAnnotation);if(t!==void 0&&(s=!0,i.add(t)),wn(e.typeAnnotation))return;let c=F(e.typeAnnotation,0,n,r,a,o);c<n.baseThreshold||l.set(e,{complexity:c})},VariableDeclarator(e){let{init:t,id:r}=e;if(t?.type!==`CallExpression`||!xn(t)||(s=!0,r.type===`Identifier`&&r.typeAnnotation!==void 0&&r.typeAnnotation!==null))return;let i=Tn(t);i<n.baseThreshold||u.set(e,{complexity:i})}}},meta:{docs:{description:`Enforce Ianitor.Check<T> type annotations on complex TypeScript types`,recommended:!0},messages:{complexInterfaceNeedsCheck:`Interface '{{name}}' requires Ianitor.Check<T> annotation (interfaces always need explicit checking)`,missingIanitorCheckType:`Complex type (score: {{score}}) requires Ianitor.Check<T> annotation for type safety`},schema:[{additionalProperties:!1,properties:{baseThreshold:{default:bn.baseThreshold,description:`Minimum complexity score before missing Ianitor.Check<T> annotations are reported.`,minimum:1,type:`number`},errorThreshold:{default:bn.errorThreshold,description:`Complexity score used to cap recursive analysis before reporting is determined.`,minimum:1,type:`number`},interfacePenalty:{default:bn.interfacePenalty,description:`Complexity penalty applied when an Ianitor validator builds an interface-like shape.`,minimum:1,type:`number`},performanceMode:{default:bn.performanceMode,description:`Whether repeated type nodes are cached during complexity analysis.`,type:`boolean`}},type:`object`}],type:`problem`}}),jn=[`makeSynchronous`,`workerize`],Mn=[`@isolated`],Nn=new Set([`browser`,`chrome`]),Pn=new Set([`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`MethodDefinition`,`Property`,`VariableDeclaration`,`VariableDeclarator`]),Fn=new Set([`FunctionDeclaration`,`FunctionExpression`]),In=new Set([`ClassDeclaration`,`ClassExpression`]),Ln=/(?:\*\s*)*/u;function Rn(e){if(e===!0||e===`writable`||e===`writeable`)return`writable`;if(e===!1||e===`off`)return`off`;if(e===`readonly`||e===`readable`)return`readonly`}function zn(e){if(!x(e))return{comments:Mn.map(e=>e.toLowerCase()),functions:new Set(jn),overrideGlobals:new Map,selectors:[]};let t=S(e.comments)?e.comments.map(e=>e.toLowerCase()):Mn.map(e=>e.toLowerCase()),n=S(e.functions)?new Set(e.functions):new Set(jn),r=S(e.selectors)?e.selectors:[],i=new Map;if(x(e.overrideGlobals))for(let[t,n]of Object.entries(e.overrideGlobals)){let e=Rn(n);e!==void 0&&i.set(t,e)}return{comments:t,functions:n,overrideGlobals:i,selectors:r}}function Bn(e){return N(e)}function Vn(e){if((e.type===`Property`||e.type===`MethodDefinition`)&&!(e.computed&&e.key.type!==`Literal`)){if(e.key.type===`Identifier`)return e.key.name;if(e.key.type===`Literal`&&y(e.key.value))return e.key.value}}function Hn(e,t,n){return e.callee.type!==`MemberExpression`||e.callee.computed||e.callee.optional||e.callee.object.type!==`Identifier`||e.callee.object.name!==t?!1:T(e.callee)===n}function Un(e){let{parent:t}=e;if(t?.type===`CallExpression`&&t.arguments[0]===e){if(Hn(t,`browser`,`execute`))return`callee of method named "browser.execute"`;if(Hn(t,`page`,`evaluate`))return`callee of method named "page.evaluate"`}}function Wn(e){if(e.callee.type!==`MemberExpression`||e.callee.computed||e.callee.optional||T(e.callee)!==`executeScript`)return;let t=e.callee.object;if(!(t.type!==`MemberExpression`||t.computed||t.optional)&&T(t)===`scripting`&&!(t.object.type!==`Identifier`||!Nn.has(t.object.name)))return t.object.name}function Gn(e){let t=e.parent;if(t?.type!==`Property`||t.kind!==`init`||t.value!==e||Vn(t)!==`func`)return;let n=t.parent;if(n.type!==`ObjectExpression`)return;let r=n.parent;if(r.type!==`CallExpression`||r.arguments[0]!==n)return;let i=Wn(r);if(i!==void 0)return`property "func" passed to "${i}.scripting.executeScript"`}function Kn(e,t){for(let n of e.arguments)if(n===t)return!0;return!1}function qn(e,t){if(t.size===0)return;let{parent:n}=e;if(!(n?.type!==`CallExpression`||!Kn(n,e))&&!(n.callee.type!==`Identifier`||!t.has(n.callee.name)))return`callee of function named ${JSON.stringify(n.callee.name)}`}function Jn(e,t){return t===null||!Pn.has(t.type)?!1:t.type===`Property`||t.type===`MethodDefinition`?t.value===e:!0}function Yn(e){return e.replace(Ln,``).trim().toLowerCase()}function Xn(e,t){let n=t;for(;;){let t=e.getCommentsBefore(n).at(-1);if(t!==void 0)return t.value;let{parent:r}=n;if(r===null||!Jn(n,r))return;n=r}}function Zn(e,t,n){if(n.length===0)return;let r=Xn(e,t);if(r===void 0)return;let i=Yn(r);for(let e of n)if(i===e||i.startsWith(`${e} - `)||i.startsWith(`${e} -- `))return`follows comment ${JSON.stringify(e)}`}function Qn(e,t,n){return Zn(e,t,n.comments)??qn(t,n.functions)??Un(t)??Gn(t)}function $n(e){let{parent:t}=e;return t!==null&&(t.type===`TSTypeReference`||t.type===`TSTypeQuery`)}function er(e,t){let n=e;for(;n!==null;){if(n===t)return!0;n=n.upper}return!1}function tr(e,t){let{resolved:n}=t;return n?.scope===void 0||!er(n.scope,e)}function nr(e){let t=[],n=[e];for(let r of n){for(let e of r.childScopes)n.push(e);for(let n of r.references)tr(e,n)&&t.push(n)}return t}function rr(e,t,n){let{identifier:r}=t,{name:i}=r,a=n.overrideGlobals.get(i);if(a!==void 0)return a===`off`?`off`:t.resolved!==null&&!e.isGlobalReference(r)?void 0:a;if(e.isGlobalReference(r))return`readonly`}function ir(e,t,n,r){let i=e.sourceCode.getScope(t);for(let t of nr(i)){let{identifier:i}=t;if($n(i))continue;let a=rr(e.sourceCode,t,r),o=n;if(a!==void 0&&a!==`off`){if(t.isReadOnly()||a===`writable`)continue;o=`${n} (global variable is not writable)`}e.report({data:{name:i.name,reason:o},messageId:`externallyScopedVariable`,node:i})}}function ar(e,t,n){let r=e.visitorKeys[t.type]??[];for(let e of r){if(!x(t))break;let r=t[e];if(Array.isArray(r))for(let e of r)D(e)&&n.push(e);else D(r)&&n.push(r)}}function or(e,t){if(e.type===`ClassDeclaration`||e.type===`ClassExpression`){e.superClass!==null&&t.push(e.superClass);for(let n of e.body.body)`computed`in n&&n.computed&&t.push(n.key)}}function sr(e,t,n){return e===t?!1:Fn.has(e.type)?!0:In.has(e.type)?(or(e,n),!0):!1}function cr(e,t,n){let r=[t];for(let i of r)if(!sr(i,t,r)){if(i.type===`ThisExpression`){e.report({data:{reason:n},messageId:`thisExpression`,node:i});continue}if(i.type===`Super`){e.report({data:{reason:n},messageId:`super`,node:i});continue}ar(e.sourceCode,i,r)}}function lr(e,t,n,r,i){i.has(t)||(i.add(t),ir(e,t,n,r),cr(e,t,n))}const ur=_(`isolated-functions`,`general`,{create(e){let t=zn(e.options[0]),n=new WeakSet;function r(r){if(!Bn(r))return;let i=Qn(e.sourceCode,r,t);i!==void 0&&lr(e,r,i,t,n)}let i={ArrowFunctionExpression:r,FunctionDeclaration:r,FunctionExpression:r};for(let r of t.selectors){let a=`matches selector ${JSON.stringify(r)}`;i[r]=r=>{Bn(r)&&lr(e,r,a,t,n)}}return i},meta:{docs:{description:`Prevent usage of variables from outside the scope of isolated functions.`,recommended:!0},messages:{externallyScopedVariable:`Variable {{name}} not defined in scope of isolated function. Function is isolated because: {{reason}}.`,super:"Unexpected `super` in isolated function. Function is isolated because: {{reason}}.",thisExpression:"Unexpected `this` in isolated function. Function is isolated because: {{reason}}."},schema:[{additionalProperties:!1,properties:{comments:{description:`Comment patterns that mark a function as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0},functions:{description:`Function names that mark argument callbacks as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0},overrideGlobals:{additionalProperties:{anyOf:[{type:`boolean`},{enum:[`off`,`readonly`,`writable`,`writeable`],type:`string`}]},description:`Override which global variables are allowed inside isolated scopes.`,type:`object`},selectors:{description:`AST selectors that mark matched function nodes as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`problem`}}),dr={default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`};function fr(e){return e===`roblox-ts`||e===`standard`}const pr=new Set([`react`,`react-dom`]),mr=new Set([`@rbxts/react`,`@rbxts/roact`]);function hr(e){return e===`standard`?pr:mr}function gr(e){return hr(yr(e))}function _r(e,t){return t.has(e.source.value)}function vr(e,t,n,r){if(_r(e,t))for(let t of e.specifiers){if(t.type===`ImportDefaultSpecifier`||t.type===`ImportNamespaceSpecifier`){n.add(t.local.name);continue}let e=me(t);e!==void 0&&r(e,t.local.name)}}function yr(e){return!x(e)||e.environment!==`standard`?`roblox-ts`:`standard`}function br(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function xr(e,t){if(e.type!==`ImportBinding`)return!1;let n=br(e.node);return n!==void 0&&t.has(n.source.value)}const Sr=new Map([[`useEffect`,1],[`useInsertionEffect`,1],[`useLayoutEffect`,1]]),Cr=new Set([`useCallback`,`useMemo`]),wr=new Set([`useBinding`,`useRef`]),Tr=new Set([`useReducer`,`useState`,`useTransition`]),Er=new Set([...wr,...Tr]),Dr=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`ClassExpression`,`FunctionExpression`,`NewExpression`,`ObjectExpression`]);function Or(e){return e===`aggressive`||e===`definite`||e===`moderate`}function kr(e,t){if(!(e.computed||e.object.type!==`Identifier`||!t.has(e.object.name)))return e.property.type===`Identifier`?e.property.name:void 0}function Ar(e){let t=w(e);for(;t.type===`MemberExpression`;)t=w(t.object);return t.type===`Identifier`?t:void 0}function jr(e){return Dr.has(e.type)}function Mr(e){if(e!==null){if(e.type===`Identifier`)return e.name;if(e.type===`AssignmentPattern`&&e.left.type===`Identifier`)return e.left.name;if(e.type===`RestElement`&&e.argument.type===`Identifier`)return e.argument.name}}function Nr(e,t,n){let r=e.elements[n];return r!=null&&Mr(r)===t}function Pr(e){return e.scope.type===`module`||e.scope.type===`global`}function Fr(e,t){if(`hooks`in e&&Array.isArray(e.hooks))for(let n of e.hooks){if(!(x(n)&&`name`in n&&y(n.name)))continue;let e=`dependenciesIndex`in n&&b(n.dependenciesIndex)?n.dependenciesIndex:1;t.set(n.name,e)}}const Ir=_(`memoized-effect-dependencies`,`react`,{create(e){let[t]=e.options,n=x(t)?t:{},r=`mode`in n&&Or(n.mode)?n.mode:`definite`,i=`environment`in n&&fr(n.environment)?n.environment:`roblox-ts`,a=new Map(Sr);Fr(n,a);let o=hr(i),s=new Set,c=new Map,l=new Set,u=new Map,d=new WeakMap,f=new WeakMap,p=new WeakMap,{sourceCode:m}=e;function h(e){let t=d.get(e);if(t!==void 0)return t;let n=m.getScope(e);return d.set(e,n),n}function g(e){let t=h(e),n=f.get(t);if(n===void 0)n=new Map,f.set(t,n);else if(n.has(e.name))return n.get(e.name);let r=t;for(;r!==null;){let t=r.set.get(e.name);if(t!==void 0)return n.set(e.name,t),t;r=r.upper}n.set(e.name,void 0)}function _(e){let{callee:t}=e;if(t.type===`Identifier`)return l.has(t.name);if(t.type===`MemberExpression`){let e=kr(t,s);return e!==void 0&&Cr.has(e)}return!1}function v(e){let{callee:t}=e;if(t.type===`Identifier`){let e=u.get(t.name);return e===void 0?void 0:wr.has(e)?`whole`:Tr.has(e)?`index1`:void 0}if(t.type===`MemberExpression`){let e=kr(t,s);if(e===void 0)return;if(wr.has(e))return`whole`;if(Tr.has(e))return`index1`}}function ee(e,t){if(e.type===`Parameter`)return`unknown`;if(e.type===`ImportBinding`)return`memoized`;let{node:n}=e;if(n.type===`FunctionDeclaration`||n.type===`ClassDeclaration`)return`unmemoized`;if(n.type!==`VariableDeclarator`)return`unknown`;let i=n.parent;if(i.type===`VariableDeclaration`&&i.kind!==`const`)return r===`definite`?`unknown`:`unmemoized`;let a=n.init===null?void 0:w(n.init);return a===void 0?`unknown`:jr(a)?`unmemoized`:a.type===`CallExpression`?te(a,n.id,t):`unknown`}function te(e,t,n){if(_(e))return`memoized`;let i=v(e);return i===`whole`||i===`index1`&&t.type===`ArrayPattern`&&Nr(t,n,1)?`memoized`:r===`definite`?`unknown`:`unmemoized`}function y(e){let t=p.get(e);if(t!==void 0)return t;if(Pr(e))return p.set(e,`memoized`),`memoized`;let n=!1;for(let t of e.defs){let r=ee(t,e.name);if(r===`unmemoized`)return p.set(e,`unmemoized`),`unmemoized`;r===`memoized`&&(n=!0)}let i=n?`memoized`:`unknown`;return r===`aggressive`&&i!==`memoized`&&(i=`unmemoized`),p.set(e,i),i}function b(e){let t=w(e);if(jr(t))return`unmemoized`;if(t.type===`CallExpression`)return r===`definite`?`unknown`:`unmemoized`;let n=Ar(t);if(n===void 0)return`unknown`;let i=g(n);return i===void 0?`unknown`:y(i)}function ne(e){let{callee:t}=e;if(t.type===`Identifier`)return c.get(t.name);if(t.type===`MemberExpression`){let e=kr(t,s);return e===void 0?void 0:a.get(e)}}return{CallExpression(t){let n=ne(t);if(n===void 0)return;let i=t.arguments[n];if(i?.type===`ArrayExpression`)for(let t of i.elements){if(t===null)continue;if(t.type===`SpreadElement`){if(r===`definite`)continue;let n=t.argument,i=m.getText(n);e.report({data:{name:i},messageId:`unmemoizedDependency`,node:n});continue}if(b(t)!==`unmemoized`)continue;let n=m.getText(t);e.report({data:{name:n},messageId:`unmemoizedDependency`,node:t})}},ImportDeclaration(e){vr(e,o,s,(e,t)=>{if(a.has(e)){let n=a.get(e);c.set(t,n??1)}Cr.has(e)&&l.add(t),Er.has(e)&&u.set(t,e)})}}},meta:{docs:{description:`Flags effect dependencies that are not memoized. Unmemoized dependencies can cause unnecessary re-renders or infinite loops.`},messages:{unmemoizedDependency:`{{name}} is not memoized. Wrap it in useMemo/useCallback or move it to module scope.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:Array.from(Sr,([e,t])=>({dependenciesIndex:t,name:e})),description:`Effect hooks checked by default; configured entries are added to this set.`,items:{additionalProperties:!1,properties:{dependenciesIndex:{description:`Index of the dependencies array for validation`,type:`number`},name:{description:`The name of the hook`,type:`string`}},required:[`name`],type:`object`},type:`array`},mode:{default:`definite`,description:`Strictness for memoization detection: definite (only obvious), moderate (unknown calls and non-const), aggressive (any non-module).`,enum:[`aggressive`,`definite`,`moderate`],type:`string`}},type:`object`}],type:`problem`}});function Lr(e){return e.type===`Identifier`||e.type===`PrivateIdentifier`||I(e)}function I(e){let t=w(e);return t.type===`Identifier`||tt(t)?!0:M(t)?Rr(t):we(t)?t.operator!==`delete`&&I(t.argument):Te(t)||Ee(t)?zr(t):De(t)?Br(t):Xe(t)?Ur(t.expressions):qe(t)?Vr(t):Je(t)?Hr(t):Oe(t)?Ur(t.expressions):Ve(t)}function Rr(e){return e.optional||e.object.type===`Super`||!I(e.object)?!1:!e.computed||I(e.property)}function zr(e){return I(e.left)&&I(e.right)}function Br(e){return I(e.test)&&I(e.consequent)&&I(e.alternate)}function Vr(e){for(let t of e.elements)if(t!==null&&(t.type===`SpreadElement`||!I(t)))return!1;return!0}function Hr(e){for(let t of e.properties)if(t.type===`SpreadElement`||t.kind!==`init`||t.method||t.computed&&!Lr(t.key)||!I(t.value))return!1;return!0}function Ur(e){for(let t of e)if(!I(t))return!1;return!0}const Wr={environment:`roblox-ts`,requireExplicitGenericOnNewArray:!0};function Gr(e){return e.type===`Identifier`}function Kr(e,t){let n=w(t.callee);return!Gr(n)||n.name!==`Array`?!1:!ae(e,n,`Array`)}function qr(e,t){if(e.type!==`TSTypeReference`||!Gr(e.typeName)||e.typeName.name!==`Array`&&e.typeName.name!==`ReadonlyArray`||e.typeArguments?.params.length!==1)return;let[n]=e.typeArguments.params;return n===void 0?void 0:t.getText(n)}const Jr=/:\s*(?:Array<.+>|ReadonlyArray<.+>)\s*=/u;function Yr(e){return Jr.exec(e)!==null}function Xr(e){if(Gr(e)||e.type===`ArrayPattern`||e.type===`ObjectPattern`)return e.typeAnnotation??void 0}function Zr(e,t){let{parent:n}=e;if(k(n)&&n.init===e){let e=Xr(n.id);return e!==void 0&&qr(e.typeAnnotation,t)!==void 0}return et(n)&&n.right===e?Yr(t.getText(n)):Ae(n)&&n.value===e&&n.typeAnnotation!==void 0&&n.typeAnnotation!==null?qr(n.typeAnnotation.typeAnnotation,t)!==void 0:$e(n)&&n.expression===e||Qe(n)&&n.expression===e?qr(n.typeAnnotation,t)!==void 0:!1}function Qr(e){if(e===void 0)return!1;let{typeAnnotation:t}=e;return t.type!==`TSTypeReference`||!Gr(t.typeName)?!1:t.typeName.name===`ReadonlyArray`}function $r(e){let t=w(e);return Ve(t)&&`value`in t?!b(t.value):qe(t)||Je(t)||He(t)||Fe(t)||Re(t)?!0:Xe(t)?t.expressions.length===0:we(t)?t.operator===`void`||t.operator===`typeof`&&!t.prefix:!1}function ei(e,t){let n=w(e);if(!(!ye(n)||n.optional)&&!(!M(n.callee)||n.callee.optional)&&!(!Gr(n.callee.object)||n.callee.object.name!==t))return T(n.callee)===`push`?n:void 0}function ti(e,t,n){for(let r=t;r<e.length;r+=1){let t=e[r];if(!(t===void 0||!Ze(t))&&ei(t.expression,n)!==void 0)return!0}return!1}function ni(e,t){let n=[],r=0;for(let i of e){if(i.type===`SpreadElement`){n[r++]=`...${t.getText(i.argument)}`;continue}n[r++]=t.getText(i)}return`[${n.join(`, `)}]`}function ri(e,t,n,r,i){if(n.init===null||r.length===0)return[];let[a]=r,o=r.at(-1);if(a===void 0||o===void 0)return[];let[s]=a.range;for(;s>0;){let e=t.text[s-1];if(e===` `||e===` `){--s;continue}e===`
2
- `&&--s;break}return[e.replaceText(n.init,i),e.removeRange([s,o.range[1]])]}function ii(e,t,n){let{sourceCode:r}=e;if(t.arguments.length===0){ai(e,t,n);return}if(t.arguments.length>1){oi(e,t,n);return}si(e,t,n,r)}function ai(e,t,n){n.requireExplicitGenericOnNewArray&&(t.typeArguments!==void 0&&t.typeArguments!==null&&t.typeArguments.params.length>0||Zr(t,e.sourceCode)||e.report({messageId:`requireExplicitGenericOnNewArray`,node:t}))}function oi(e,t,n){let[r]=t.arguments;if(r===void 0||r.type!==`SpreadElement`&&n.environment===`roblox-ts`&&!$r(r))return;let i=ni(t.arguments,e.sourceCode);if(!t.arguments.some(e=>e.type===`SpreadElement`)){e.report({fix(e){return e.replaceText(t,i)},messageId:`avoidConstructorEnumeration`,node:t});return}e.report({messageId:`avoidConstructorEnumeration`,node:t,suggest:[{fix(e){return e.replaceText(t,i)},messageId:`suggestArrayLiteral`}]})}function si(e,t,n,r){let[i]=t.arguments;if(i===void 0)return;if(i.type===`SpreadElement`){ci(e,t,r.getText(i.argument));return}if(!$r(i)){li(e,t,n,r.getText(i));return}let a=`[${r.getText(i)}]`;e.report({fix(e){return e.replaceText(t,a)},messageId:`avoidSingleArgumentConstructor`,node:t})}function ci(e,t,n){e.report({messageId:`avoidSingleArgumentConstructor`,node:t,suggest:[{fix(e){return e.replaceText(t,`[...${n}]`)},messageId:`suggestArrayLiteral`}]})}function li(e,t,n,r){n.environment!==`roblox-ts`&&e.report({messageId:`avoidLengthConstructorInStandard`,node:t,suggest:[{fix(e){return e.replaceText(t,`Array.from({ length: ${r} })`)},messageId:`suggestArrayFromLength`}]})}function ui(e,t,n){let r=t[n];if(r===void 0||!Ne(r)||r.kind!==`const`&&r.kind!==`let`||r.declarations.length!==1)return;let[i]=r.declarations;if(i===void 0||!Gr(i.id)||i.init===null||!Ke(i.init)||!Kr(e,i.init)||i.init.arguments.length>0||Qr(Xr(i.id)))return;let a=i.id.name,o=di(e,t,n+1,a);if(o.pushStatements.length!==0&&!ti(t,o.nextIndex,a))return{arrayIdentifierName:a,declarator:i,hasUnsafeArgument:o.hasUnsafeArgument,literalText:`[${o.argumentParts.join(`, `)}]`,pushStatements:o.pushStatements,statement:r}}function di(e,t,n,r){let i=[],a=[],o=!1,s=n;for(;s<t.length;){let n=t[s];if(n===void 0||!Ze(n))break;let c=ei(n.expression,r);if(c===void 0||c.arguments.length===0)break;i.push(n),o=fi(e,c,a)||o,s+=1}return{argumentParts:a,hasUnsafeArgument:o,nextIndex:s,pushStatements:i}}function fi(e,t,n){let r=!1;for(let i of t.arguments){if(i.type===`SpreadElement`){r=!0,n.push(`...${e.getText(i.argument)}`);continue}I(i)||(r=!0),n.push(e.getText(i))}return r}const pi=_(`no-array-constructor-elements`,`roblox`,{create(e){let t=e.options?.[0],n=x(t)?{...Wr,...t}:{...Wr},{sourceCode:r}=e;function i(t){for(let n=0;n<t.length;n+=1){let i=ui(r,t,n);if(i!==void 0){if(!i.hasUnsafeArgument){e.report({fix(e){return ri(e,r,i.declarator,i.pushStatements,i.literalText)},messageId:`collapseArrayPushInitialization`,node:i.statement});continue}e.report({messageId:`collapseArrayPushInitialization`,node:i.statement,suggest:[{fix(e){return ri(e,r,i.declarator,i.pushStatements,i.literalText)},messageId:`suggestCollapseArrayPushInitialization`}]})}}}return{BlockStatement(e){i(e.body)},NewExpression(t){Kr(r,t)&&ii(e,t,n)},Program(e){i(e.body)}}},meta:{docs:{description:`Disallow array constructor element forms and enforce roblox-ts-aware constructor patterns.`},fixable:`code`,hasSuggestions:!0,messages:{avoidConstructorEnumeration:`Do not use Array constructor enumeration arguments. Use an array literal instead.`,avoidLengthConstructorInStandard:`Length-based Array constructor is not allowed in standard mode. Prefer Array.from({ length: n }).`,avoidSingleArgumentConstructor:`Single-argument Array constructor form is not allowed here. Use an array literal instead.`,collapseArrayPushInitialization:`Collapse new Array<T>() + consecutive .push(...) calls into a single array literal initializer.`,requireExplicitGenericOnNewArray:`new Array() must use an explicit generic argument or a contextual Array<T>/ReadonlyArray<T> annotation.`,suggestArrayFromLength:`Replace with Array.from({ length: value }).`,suggestArrayLiteral:`Replace constructor form with an array literal.`,suggestCollapseArrayPushInitialization:`Collapse constructor + push sequence into a single array literal initializer.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`Array constructor environment mode: 'roblox-ts' allows new Array(length); 'standard' reports it.`,enum:[`roblox-ts`,`standard`],type:`string`},requireExplicitGenericOnNewArray:{default:!0,description:`When true, zero-argument new Array() requires explicit generic type arguments or contextual array typing.`,type:`boolean`}},type:`object`}],type:`problem`}}),mi=new Set([`parent`,`range`,`loc`,`tokens`,`comments`]);function hi(e){return e.type===`Identifier`}function gi(e){return`type`in e&&typeof e.type==`string`}function _i(e,t){for(let n of Object.keys(e)){if(mi.has(n))continue;let r=Reflect.get(e,n);r!=null&&t.push(r)}}function vi(e,t){let n=[e];for(;n.length>0;){let e=n.pop();if(!(typeof e!=`object`||!e)){if(Array.isArray(e)){for(let t of e)n.push(t);continue}if(gi(e)){if(e.type===`Identifier`&&e.name===t)return!0;_i(e,n)}}}return!1}function yi(e,t){let n=w(t.callee);return!hi(n)||n.name!==`Array`?!1:!ae(e,n,`Array`)}function bi(e,t,n){if(!Ze(e))return;let{expression:r}=e;if(!Ce(r)||r.operator!==`=`)return;let{left:i}=r;if(!(M(i)&&i.computed))return;let{object:a,property:o}=i;if(!(!hi(a)||a.name!==t)&&!(!Ge(o)||o.value!==n))return{expression:r,statement:e}}function xi(e,t,n){let r=t[n];if(r===void 0||!Ne(r)||r.declarations.length!==1)return;let[i]=r.declarations;if(i===void 0||!k(i)||i.init===null)return;let{init:a}=i;if(!Ke(a)||a.arguments.length>0||!yi(e,a)||!rt(i.id))return;let o=i.id.name,s=[],c=n+1,l=0;for(;c<t.length;){let e=t[c];if(e===void 0)break;let n=bi(e,o,l);if(n!==void 0){s.push(n),l+=1,c+=1;continue}if(vi(e,o))break;c+=1}if(s.length===0)return;let[u]=s,d=s.at(-1);if(u!==void 0&&d!==void 0)return{assignments:s.map(t=>({statement:t.statement,valueText:e.getText(t.expression.right)})),declaration:r,declarator:i,firstAssignmentStatement:u.statement,lastAssignmentStatement:d.statement}}function Si(e,t,n){let{declaration:r,declarator:i,assignments:a,firstAssignmentStatement:o,lastAssignmentStatement:s}=n,{init:c}=i;if(c===null)return[];let l=`[${a.map(e=>e.valueText).join(`, `)}]`,u=[e.replaceText(c,l)],[d]=r.range,[,f]=r.range,[p]=o.range,[,m]=s.range,h=t.text.slice(f,p);if(h.trim().length>0){let n=d;n>0&&t.text[n-1]===`
1
+ import e from"ignore";import t,{basename as n,dirname as r,extname as i,isAbsolute as a,join as o,relative as s}from"node:path";import{parse as c}from"yuku-parser";import{existsSync as l,readFileSync as u,readdirSync as d}from"node:fs";import{ResolverFactory as f}from"oxc-resolver";import{type as p}from"arktype";import{Minimatch as m,minimatch as h}from"minimatch";import{definePlugin as g}from"oxlint-plugin-utilities";function _(e,t,n){let r=`https://docs.howmanysmall.com/small-rules/rules/${t}/${e}/`;return n.meta===void 0?{...n}:{...n,meta:{...n.meta,docs:{...n.meta.docs,url:r}}}}function v(e,t){return e.type===`TSParenthesizedType`?v(e.typeAnnotation,t):e.type===`TSArrayType`?`Array<${v(e.elementType,t)}>`:e.type===`TSTypeOperator`&&e.operator===`readonly`&&e.typeAnnotation.type===`TSArrayType`?`ReadonlyArray<${v(e.typeAnnotation.elementType,t)}>`:t.getText(e)}function ee({parent:e}){let t=e.type===`TSParenthesizedType`?e.parent:e;return!(t.type===`TSRestType`&&t.parent.type===`TSTupleType`||t.type===`TSTupleType`||t.type===`TSArrayType`||t.type===`TSTypeOperator`&&t.operator===`readonly`)}const te=_(`array-type-generic`,`naming`,{createOnce(e){function t(t){e.report({fix(n){return n.replaceText(t,v(t,e.sourceCode))},messageId:`useGenericArrayType`,node:t})}return{TSArrayType(e){ee(e)&&t(e)},TSTypeOperator(e){e.operator===`readonly`&&e.typeAnnotation.type===`TSArrayType`&&ee(e)&&t(e)}}},meta:{docs:{description:`Disallow bracket array type syntax and require Array<T> / ReadonlyArray<T>.`},fixable:`code`,messages:{useGenericArrayType:`Bracket array type syntax is not allowed. Use Array<T> or ReadonlyArray<T> generic syntax.`},schema:[],type:`problem`}});function y(e){return typeof e==`string`}function b(e){return typeof e==`number`}function x(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ne(e){return y(e)&&e.length>0}function S(e){if(!Array.isArray(e))return!1;for(let t of e)if(!y(t))return!1;return!0}function re(e){if(!x(e))return!1;for(let t of Object.values(e))if(!y(t))return!1;return!0}function ie(e){return b(e)&&!Number.isNaN(e)}function C(e){let t=e;for(;;)switch(t.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:t=t.expression;break;default:return t}}function w(e){return e.computed?e.property.type===`Literal`&&y(e.property.value)?e.property.value:void 0:e.property.type===`Identifier`?e.property.name:void 0}function T(e,t){let n=e;for(;n!==null;){let e=n.set.get(t);if(e!==void 0)return e;n=n.upper}}function ae(e,t){let n=[e.getScope(e.ast)];for(let e of n){for(let t of e.childScopes)n.push(t);for(let n of e.variables)t(n)}}function E(e,t,n){let r=e.getScope(t);for(;r!==null;){let e=r.set.get(n);if(e!==void 0&&e.defs.length>0)return!0;r=r.upper}return!1}const oe=/^[A-Z]/v,se=new Set([`end`,`loc`,`parent`,`range`,`start`,`type`]);function D(e){return x(e)&&y(e.type)}function ce(e){return se.has(e)}function O(e){return oe.test(e)}function k(e){return e.type===`VariableDeclarator`}function le(e){return ue(e.typeAnnotation)?e.typeAnnotation:void 0}function ue(e){return x(e)&&`type`in e&&e.type===`TSTypeAnnotation`}function de(e,t){return e.type===`Identifier`&&e.name===t}function fe(e,t,n,r){return e.callee.type===`Identifier`?t.has(e.callee.name):e.callee.type!==`MemberExpression`||e.callee.object.type!==`Identifier`?!1:n.has(e.callee.object.name)&&w(e.callee)===r}function pe(e,t,n){return fe(e,t,n,`useMemo`)}function me({imported:e}){return e.type===`Identifier`?e.name:e.value}function A(e){return e.type===`Identifier`&&y(e.name)}function j(e){return e.type===`Identifier`}function he(e){return e.type===`JSXIdentifier`&&`name`in e}function ge(e){return e.type===`JSXOpeningElement`}function _e(e){return e.type===`ImportDeclaration`}function ve(e){return e.type===`Literal`&&y(e.value)}function ye(e){return e.type===`CallExpression`}function be(e){return e.type===`ImportSpecifier`}function xe(e){return e.type===`ExportSpecifier`}function Se(e){return e.type===`Property`}function M(e){return e.type===`MemberExpression`}function Ce(e){return e.type===`AssignmentExpression`}function we(e){return e.type===`UnaryExpression`}function Te(e){return e.type===`BinaryExpression`}function Ee(e){return e.type===`LogicalExpression`}function De(e){return e.type===`ConditionalExpression`}function Oe(e){return e.type===`SequenceExpression`}function ke(e){return e.type===`MethodDefinition`||e.type===`TSAbstractMethodDefinition`}function Ae(e){return e.type===`PropertyDefinition`||e.type===`TSAbstractPropertyDefinition`}function je(e){return e.type===`ImportDefaultSpecifier`}function Me(e){return e.type===`ImportNamespaceSpecifier`}function Ne(e){return e.type===`VariableDeclaration`}function Pe(e){return e.type===`ExportNamedDeclaration`}function Fe(e){return e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function Ie(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionExpression`}function N(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function Le(e,t){return de(e.callee,t)}function Re(e){return e.type===`ClassDeclaration`||e.type===`ClassExpression`}function ze(e){return e.type===`TSTypeAliasDeclaration`}function Be(e){return e.type===`TSPropertySignature`}function Ve(e){return e.type===`Literal`}function He(e){return e.type===`ArrowFunctionExpression`}function Ue(e){return Fe(e)||He(e)}function We(e){return e.type===`TSQualifiedName`}function Ge(e){return e.type===`Literal`&&b(e.value)}function Ke(e){return e.type===`NewExpression`}function qe(e){return e.type===`ArrayExpression`}function Je(e){return e.type===`ObjectExpression`}function Ye(e){return e.type===`ObjectPattern`}function Xe(e){return e.type===`TemplateLiteral`}function Ze(e){return e.type===`ExpressionStatement`}function Qe(e){return e.type===`TSTypeAssertion`}function $e(e){return e.type===`TSAsExpression`}function et(e){return e.type===`AssignmentPattern`}function tt(e){return e.type===`ThisExpression`}function nt(e){if(!ye(e)||e.optional)return!1;let{callee:t}=e;if(!j(t)||t.name!==`require`||e.arguments.length!==1)return!1;let[n]=e.arguments;return n!==void 0&&ve(n)}function rt(e){return e.type===`Identifier`}function it(e){return e.type!==`PrivateIdentifier`}function at(e){return e.type===`JSXIdentifier`?e.name:e.name.name}function ot(e){if(!(x(e)&&`bannedInstances`in e))return new Map;let{bannedInstances:t}=e,n=new Map;if(S(t)){for(let e of t)n.set(e.toLowerCase(),{message:void 0,originalName:e});return n}if(re(t))for(let[e,r]of Object.entries(t))n.set(e.toLowerCase(),{message:r,originalName:e});return n}function st(e){if(!(x(e)&&`bannedProperties`in e))return new Map;let{bannedProperties:t}=e,n=new Map;if(!x(t))return n;for(let[e,r]of Object.entries(t)){if(!x(r))continue;let t=new Map;for(let[e,n]of Object.entries(r))y(n)&&t.set(e.toLowerCase(),{message:n,propertyName:e});t.size>0&&n.set(e.toLowerCase(),t)}return n}function ct(e){let t=e;for(;t.upper!==null&&t.type!==`function`&&t.type!==`module`&&t.type!==`global`;)t=t.upper;return t}function lt(e){if(!Le(e,`Instance`))return;let[t]=e.arguments;if(!(t?.type!==`Literal`||!y(t.value)))return t.value}function ut(e){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.init===e&&t.id.type===`Identifier`)return t}const dt=_(`ban-instances`,`roblox`,{create(e){let{sourceCode:t}=e,[n]=e.options;if(!x(n))return{};let r=ot(n),i=st(n);if(r.size===0&&i.size===0)return{};let a=new Map,o=new Set;function s(t,n){if(n.message!==void 0&&n.message!==``){e.report({data:{className:n.originalName,customMessage:n.message},messageId:`bannedInstanceCustom`,node:t});return}e.report({data:{className:n.originalName},messageId:`bannedInstance`,node:t})}function c(t,n,r){if(r.message!==``){e.report({data:{className:n,customMessage:r.message,propertyName:r.propertyName},messageId:`bannedPropertyCustom`,node:t});return}e.report({data:{className:n,propertyName:r.propertyName},messageId:`bannedProperty`,node:t})}function l(e){if(o.has(e)||e.id.type!==`Identifier`||e.init===null)return;let n=C(e.init);if(n.type!==`NewExpression`)return;let r=lt(n);if(r===void 0)return;let i=T(t.getScope(e),e.id.name);i!==void 0&&(a.set(i,{className:r,functionScope:ct(i.scope)}),o.add(e))}function u(e){let n=t.getScope(e),r=T(n,e.name);if(r===void 0)return;let i=a.get(r);if(i!==void 0)return i.functionScope===ct(n)?i:void 0}return{AssignmentExpression(e){if(e.left.type!==`MemberExpression`)return;let t=w(e.left);if(t===void 0)return;let n=C(e.left.object);if(n.type!==`Identifier`)return;let r=u(n);if(r===void 0)return;let a=i.get(r.className.toLowerCase());if(a===void 0)return;let o=a.get(t.toLowerCase());o!==void 0&&c(e.left,r.className,o)},JSXOpeningElement(e){if(e.name.type!==`JSXIdentifier`)return;let{name:t}=e.name,n=t.charAt(0);if(n!==n.toLowerCase())return;let a=r.get(t.toLowerCase());a!==void 0&&s(e,a);let o=i.get(t.toLowerCase());if(o!==void 0)for(let n of e.attributes){if(n.type!==`JSXAttribute`)continue;let e=at(n.name);if(e===void 0)continue;let r=o.get(e.toLowerCase());r!==void 0&&c(n,t,r)}},NewExpression(e){let t=lt(e);if(t===void 0)return;let n=ut(e);n!==void 0&&l(n);let i=r.get(t.toLowerCase());i!==void 0&&s(e,i)},VariableDeclarator(e){l(e)}}},meta:{docs:{description:`Ban specified Roblox Instance classes and configured Instance properties.`},messages:{bannedInstance:`Instance class '{{className}}' is banned by project configuration. This class may cause performance issues, is deprecated, or has a better alternative. Check project guidelines for the recommended replacement.`,bannedInstanceCustom:`{{customMessage}}`,bannedProperty:`Property '{{propertyName}}' on Instance class '{{className}}' is banned by project configuration. This property may cause performance issues, is deprecated, or has a better alternative. Check project guidelines for the recommended replacement.`,bannedPropertyCustom:`{{customMessage}}`},schema:[{additionalProperties:!1,properties:{bannedInstances:{description:`Map of banned class names to custom messages, or an array of class names.`,oneOf:[{items:{type:`string`},type:`array`},{additionalProperties:{type:`string`},type:`object`}]},bannedProperties:{additionalProperties:{additionalProperties:{type:`string`},type:`object`},description:`Map of banned class names to maps of banned property names and custom messages.`,type:`object`}},type:`object`}],type:`problem`}}),ft=new Set([`FC`,`FunctionComponent`,`VFC`,`VoidFunctionComponent`]);function pt(e){if(e.type===`Identifier`&&ft.has(e.name))return e.name;if(e.type===`TSQualifiedName`&&ft.has(e.right.name))return e.right.name}function mt(e){let{typeAnnotation:t}=e.id;return ue(t)?t:void 0}const ht=_(`ban-react-fc`,`react`,{createOnce(e){return{VariableDeclarator(t){let n=mt(t);if(n===void 0)return;let r=n.typeAnnotation;r.type===`TSTypeReference`&&pt(r.typeName)!==void 0&&t.init?.type===`ArrowFunctionExpression`&&e.report({messageId:`banReactFC`,node:t})}}},meta:{docs:{description:`Ban React.FC and similar component type annotations. Use explicit function declarations instead.`},messages:{banReactFC:"Avoid React.FC/FunctionComponent/VFC/VoidFunctionComponent types. They break debug information and profiling. Use explicit function declarations instead: `function Component(props: Props) { ... }`"},schema:[],type:`problem`}}),gt=new Map([[`omit`,{originalName:`Omit`,replacementName:`Except`}]]);function _t(e){let t=new Map(gt);if(!(x(e)&&`bannedTypes`in e))return t;let{bannedTypes:n}=e;if(n===void 0)return t;if(S(n)){for(let e of n)t.set(e.toLowerCase(),{originalName:e,replacementName:void 0});return t}if(re(n))for(let[e,r]of Object.entries(n))t.set(e.toLowerCase(),{originalName:e,replacementName:r});return t}function vt(e){if(e.type===`Identifier`)return e.name;if(e.type===`TSQualifiedName`)return e.right.name}const yt=_(`ban-types`,`naming`,{create(e){let[t]=e.options,n=_t(t);return{TSTypeReference(t){let r=vt(t.typeName);if(r===void 0)return;let i=n.get(r.toLowerCase());if(i!==void 0){if(i.replacementName!==void 0&&i.replacementName!==``){e.report({data:{replacementName:i.replacementName,typeName:i.originalName},messageId:`bannedTypeWithReplacement`,node:t.typeName});return}e.report({data:{typeName:i.originalName},messageId:`bannedType`,node:t.typeName})}}}},meta:{docs:{description:`Ban configured TypeScript utility types, defaulting to Omit in favor of Except.`},messages:{bannedType:`Type '{{typeName}}' is banned by project configuration. Use the project-preferred alternative for this type.`,bannedTypeWithReplacement:`Type '{{typeName}}' is banned. Use '{{replacementName}}' instead.`},schema:[{additionalProperties:!1,properties:{bannedTypes:{default:{Omit:`Except`},description:`Array of banned type names or an object mapping banned type names to preferred replacement names.`,oneOf:[{items:{type:`string`},type:`array`},{additionalProperties:{type:`string`},type:`object`}]}},type:`object`}],type:`problem`}}),bt=new Map([[`backGround`,`background`],[`callBack`,`callback`],[`checkBox`,`checkbox`],[`clipBoard`,`clipboard`],[`codeBase`,`codebase`],[`dataBase`,`database`],[`downLoad`,`download`],[`feedBack`,`feedback`],[`foreGround`,`foreground`],[`frameWork`,`framework`],[`headLine`,`headline`],[`keyBoard`,`keyboard`],[`keyFrame`,`keyframe`],[`lifeCycle`,`lifecycle`],[`metaData`,`metadata`],[`midPoint`,`midpoint`],[`nameSpace`,`namespace`],[`overRide`,`override`],[`passWord`,`password`],[`payLoad`,`payload`],[`placeHolder`,`placeholder`],[`preView`,`preview`],[`screenShot`,`screenshot`],[`sideBar`,`sidebar`],[`subClass`,`subclass`],[`subDirectory`,`subdirectory`],[`subDomain`,`subdomain`],[`subMenu`,`submenu`],[`subProcess`,`subprocess`],[`subString`,`substring`],[`subTree`,`subtree`],[`subType`,`subtype`],[`subTitle`,`subtitle`],[`timeOut`,`timeout`],[`timeStamp`,`timestamp`],[`toolBar`,`toolbar`],[`toolKit`,`toolkit`],[`toolTip`,`tooltip`],[`touchScreen`,`touchscreen`],[`unSubscribe`,`unsubscribe`],[`underScore`,`underscore`],[`upLoad`,`upload`],[`userName`,`username`],[`viewPort`,`viewport`],[`webCam`,`webcam`],[`webHook`,`webhook`],[`webSite`,`website`],[`weekEnd`,`weekend`],[`whiteSpace`,`whitespace`],[`wildCard`,`wildcard`],[`workFlow`,`workflow`],[`workSpace`,`workspace`]]),xt=/[\\^$.*+?()[\]{}|]/gu,St=String.raw`(?=$|[\d_$]|\p{Uppercase_Letter})`;function Ct(e){return e.replaceAll(xt,String.raw`\$&`)}function wt(e){let t=e.at(0);return t===void 0?e:`${t.toUpperCase()}${e.slice(1)}`}function Tt(e){let t=e.at(0);return t===void 0?e:`${t.toLowerCase()}${e.slice(1)}`}function Et(e){return e===e.toUpperCase()}function Dt(e){let t=e.at(0);return t?.toUpperCase()===t&&t!==void 0}function Ot(e){if(e.size===0)return;let t=[],n=[];for(let r of e.keys())t.push(Ct(r)),n.push(Ct(wt(r)));return RegExp(`(?:^(?:${t.join(`|`)})|(?:${n.join(`|`)}))${St}`,`gu`)}function kt(e,t){let n=new Map(t?bt:void 0);if(!x(e))return n;for(let[t,r]of Object.entries(e)){if(r===!1){n.delete(t);continue}y(r)&&r.length>0&&n.set(t,r)}return n}function At(e){let t=x(e)?e:{},n=t.extendDefaultReplacements!==!1,r=kt(t.replacements,n),i=new Set;if(x(t.allowList))for(let e of Object.keys(t.allowList))i.add(e);return{allowList:i,checkProperties:t.checkProperties===!0,checkShorthandProperties:t.checkShorthandProperties===!0,checkVariables:t.checkVariables!==!1,replacementRegExp:Ot(r),replacements:r}}function jt(e,t){let n=t.get(e)??t.get(Tt(e));if(n!==void 0)return Dt(e)?wt(n):Tt(n)}function Mt(e,t){let{replacementRegExp:n,replacements:r,allowList:i}=t;if(n===void 0||Et(e)||i.has(e))return;n.lastIndex=0;let a=e.replaceAll(n,e=>jt(e,r)??e);return a===e?void 0:a}function Nt(e){let{parent:t}=e;return t?.type===`Property`&&t.shorthand&&t.value===e}function Pt(e){let{parent:t}=e;return t===null?!1:t.type===`Property`&&t.key===e&&!t.computed||t.type===`PropertyDefinition`&&t.key===e&&!t.computed||t.type===`MethodDefinition`&&t.key===e&&!t.computed}const Ft=_(`consistent-compound-words`,`naming`,{create(e){let t=At(e.options[0]);function n(n,r){let i=Mt(r,t);i!==void 0&&e.report({data:{name:r,replacement:i},messageId:`error`,node:n})}return{Identifier(e){!t.checkProperties||e.name===`__proto__`||e.parent.type===`ExportSpecifier`||!Pt(e)||n(e,e.name)},"Program:exit"(){t.checkVariables&&ae(e.sourceCode,e=>{if(e.defs.length===0)return;let[r]=e.defs;r===void 0||!t.checkShorthandProperties&&Nt(r.name)||n(r.name,e.name)})}}},meta:{docs:{description:`Enforce consistent spelling of compound words in identifiers.`,recommended:!1},messages:{error:"Prefer `{{replacement}}` over `{{name}}`.",rename:"Rename to `{{replacement}}`."},schema:[{additionalProperties:!1,properties:{allowList:{additionalProperties:{enum:[!0]},type:`object`},checkProperties:{type:`boolean`},checkShorthandProperties:{type:`boolean`},checkVariables:{type:`boolean`},extendDefaultReplacements:{type:`boolean`},replacements:{additionalProperties:{anyOf:[{enum:[!1]},{minLength:1,type:`string`}]},type:`object`}},type:`object`}],type:`suggestion`}}),It=/^(?:eslint|oxlint)-disable-(?:next-)?line$/u,Lt=/[\s,]+/gu,Rt=/\s/u,zt=new Set([`eslint-disable`,`eslint-disable-line`,`eslint-disable-next-line`,`oxlint-disable`,`oxlint-disable-line`,`oxlint-disable-next-line`]),Bt=new Set([...zt,`eslint-enable`,`oxlint-enable`]),Vt=new Set([`eslint`,`eslint-disable`,`eslint-disable-line`,`eslint-disable-next-line`,`eslint-enable`,`eslint-env`,`exported`,`global`,`globals`,`oxlint`,`oxlint-disable`,`oxlint-disable-line`,`oxlint-disable-next-line`,`oxlint-enable`,`oxlint-env`]);function Ht(e){return zt.has(e)}function Ut(e){return Bt.has(e)}function Wt(e,t){if(!x(e))return;let n=Reflect.get(e,t);if(n===void 0||!Array.isArray(n))return;let r=[],i=0;for(let e of n){if(!y(e))return;r[i++]=e}return r}function Gt(e){let t=Kt(e.value);if(t===void 0)return;let n=It.test(t.kind);if(!(e.type===`Line`&&!n||(t.kind===`eslint-disable-line`||t.kind===`oxlint-disable-line`)&&e.loc.start.line!==e.loc.end.line))return{comment:e,description:t.description,kind:t.kind,value:t.value}}function Kt(e){let{description:t,text:n}=Jt(e),r=n.search(Rt),i=r===-1?n:n.slice(0,r);if(Vt.has(i))return{description:t,kind:i,value:r===-1?``:n.slice(r).trim()}}const qt=/\s-{2,}\s/u;function Jt(e){let[t,n]=e.split(qt);return t===void 0?{description:void 0,text:``}:{description:n?.trim(),text:t.trim()}}function Yt(e,t){return e.line<t.line||e.line===t.line&&e.column<=t.column}function Xt(e){return{end:e.end,start:{column:0,line:e.start.line}}}const Zt=/\r\n|[\r\n\u2028\u2029]/u;function Qt(e,t){if(t===void 0)return Xt(e.loc);let n=e.value.split(Zt),[r]=n;if(r===void 0)return e.loc;let i=RegExp(`([\\s,]|^)${tn(t)}(?:[\\s,]|$)`,`u`),a=e.loc.start,o=i.exec(r);if(o!==null){let[,n]=o;return n===void 0?e.loc:{end:{column:2+a.column+o.index+n.length+t.length,line:a.line},start:{column:2+a.column+o.index+n.length,line:a.line}}}for(let e=1;e<n.length;e+=1){let r=n[e];if(r===void 0)continue;let o=i.exec(r);if(o!==null){let[,n]=o;if(n===void 0)continue;return{end:{column:o.index+n.length+t.length,line:a.line+e},start:{column:o.index+n.length,line:a.line+e}}}}return e.loc}const $t=/[|\\{}()[\]^$+*?.]/gu,en=String.raw`\$&`;function tn(e){return e.replaceAll($t,en)}function nn(e){let t={areas:[],duplicateDisableDirectives:[],numberOfRelatedDisableDirectives:new Map,unusedEnableDirectives:[]};for(let n of e.getAllComments()){let e=Gt(n);if(e===void 0)continue;let{kind:r}=e;if(!Ut(r))continue;let{start:i}=n.loc,a=e.value!==void 0&&e.value!==``?e.value.split(Lt):void 0;switch(r){case`eslint-disable`:case`oxlint-disable`:rn(t,n,i,a,`block`);break;case`eslint-disable-line`:case`oxlint-disable-line`:{let{line:e}=i;rn(t,n,{column:0,line:e},a,`line`),an(t,n,{column:-1,line:e+1},a,`line`);break}case`eslint-disable-next-line`:case`oxlint-disable-next-line`:{let{line:e}=i;rn(t,n,{column:0,line:e+1},a,`line`),an(t,n,{column:-1,line:e+2},a,`line`);break}case`eslint-enable`:case`oxlint-enable`:an(t,n,i,a,`block`);break}}return t}function rn(e,t,n,r,i){if(r===void 0){ln(e.areas,void 0,n)!==void 0&&e.duplicateDisableDirectives.push({comment:t,ruleId:void 0}),e.areas.push({comment:t,end:void 0,kind:i,ruleId:void 0,start:n});return}for(let a of r)ln(e.areas,a,n)!==void 0&&e.duplicateDisableDirectives.push({comment:t,ruleId:a}),e.areas.push({comment:t,end:void 0,kind:i,ruleId:a,start:n})}function an(e,t,n,r,i){let a=new Set;if(r===void 0){on(e.areas,n,i,void 0,a)||cn(e,t,void 0),e.numberOfRelatedDisableDirectives.set(t,a.size);return}for(let o of r)on(e.areas,n,i,o,a)||cn(e,t,o);e.numberOfRelatedDisableDirectives.set(t,a.size)}function on(e,t,n,r,i){let a=!1;for(let o=e.length-1;o>=0;--o){let s=e[o];s===void 0||!sn(s,n,r)||(i.add(s.comment),s.end=t,a=!0)}return a}function sn(e,t,n){return e.end!==void 0||e.kind!==t?!1:n===void 0||e.ruleId===n}function cn(e,t,n){e.unusedEnableDirectives.push({comment:t,ruleId:n})}function ln(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];if(i!==void 0&&(i.ruleId===void 0||i.ruleId===t)&&Yt(i.start,n)&&(i.end===void 0||Yt(n,i.end)))return i}}const un=_(`directive-disable-enable-pair`,`general`,{create(e){let[t]=e.options,n=t?.allowWholeFile===!0,r=nn(e.sourceCode),[i]=e.sourceCode.ast.tokens;if(n&&i===void 0)return{};for(let t of r.areas)t.end===void 0&&(n&&i!==void 0&&Yt(t.start,i.loc.start)||e.report({data:{ruleId:t.ruleId??``},loc:Qt(t.comment,t.ruleId),messageId:t.ruleId===void 0?`missingPair`:`missingRulePair`}));return{}},meta:{docs:{description:"Require a matching enable comment for every `oxlint-disable` or `eslint-disable` block directive."},messages:{missingPair:`Requires 'eslint-enable' directive.`,missingRulePair:`Requires 'eslint-enable' directive for '{{ruleId}}'.`},schema:[{additionalProperties:!1,properties:{allowWholeFile:{description:`Allow a disable directive that covers the entire file.`,type:`boolean`}},type:`object`}],type:`suggestion`}}),dn=_(`directive-no-aggregating-enable`,`general`,{create(e){let t=nn(e.sourceCode);for(let[n,r]of t.numberOfRelatedDisableDirectives)r>1&&e.report({data:{kind:`eslint-enable`},loc:Xt(n.loc),messageId:`aggregatingEnable`});return{}},meta:{docs:{description:"Disallow aggregating `oxlint-enable` or `eslint-enable` comments across multiple disable directives."},messages:{aggregatingEnable:`'{{kind}}' comment enables rules for multiple disable directives. Please move '{{kind}}' after each disable directive.`},schema:[],type:`suggestion`}}),fn=_(`directive-no-duplicate-disable`,`general`,{create(e){let t=nn(e.sourceCode);for(let n of t.duplicateDisableDirectives)e.report({data:{ruleId:n.ruleId??``},loc:Qt(n.comment,n.ruleId),messageId:n.ruleId===void 0?`duplicate`:`duplicateRule`});return{}},meta:{docs:{description:"Disallow duplicate `oxlint-disable` or `eslint-disable` comments."},messages:{duplicate:`ESLint rules have been disabled already.`,duplicateRule:`'{{ruleId}}' rule has been disabled already.`},schema:[],type:`problem`}}),pn=_(`directive-no-restricted-disable`,`general`,{create(t){let n=nn(t.sourceCode),r=t.options;if(r.length===0)return{};let i=e();for(let e of r)i.add(e);for(let e of n.areas)(e.ruleId===void 0||i.ignores(e.ruleId))&&t.report({data:{ruleId:e.ruleId??String(r)},loc:Qt(e.comment,e.ruleId),messageId:`disallow`});return{}},meta:{docs:{description:"Disallow `oxlint-disable` or `eslint-disable` comments for configured rules."},messages:{disallow:`Disabling '{{ruleId}}' is not allowed.`},schema:{items:{type:`string`},type:`array`,uniqueItems:!0},type:`suggestion`}}),mn=_(`directive-no-unlimited-disable`,`general`,{create(e){for(let t of e.sourceCode.getAllComments()){let n=Gt(t);if(n===void 0)continue;let{kind:r}=n;Ht(r)&&(n.value===void 0||n.value===``)&&e.report({data:{kind:n.kind},loc:Xt(n.comment.loc),messageId:`unexpected`})}return{}},meta:{docs:{description:"Disallow `oxlint-disable` or `eslint-disable` comments without rule names."},messages:{unexpected:`Unexpected unlimited '{{kind}}' comment. Specify some rule names to disable.`},schema:[],type:`suggestion`}}),hn=_(`directive-no-unused-enable`,`general`,{create(e){let t=nn(e.sourceCode);for(let n of t.unusedEnableDirectives)e.report({data:{kind:`eslint-enable`,ruleId:n.ruleId??``},loc:Qt(n.comment,n.ruleId),messageId:n.ruleId===void 0?`unused`:`unusedRule`});return{}},meta:{docs:{description:"Disallow unused `oxlint-enable` or `eslint-enable` comments."},messages:{unused:`Unused '{{kind}}' comment. No reported rules are disabled.`,unusedRule:`'{{ruleId}}' rule is disabled but never reported. Please remove unnecessary '{{kind}}' comment.`},schema:[],type:`suggestion`}}),gn=_(`directive-no-use`,`general`,{create(e){let t=new Set(Wt(e.options[0],`allow`));for(let n of e.sourceCode.getAllComments()){let r=Gt(n);r===void 0||n.type===`Line`||t.has(r.kind)||e.report({loc:Xt(r.comment.loc),messageId:`disallow`})}return{}},meta:{docs:{description:`Disallow block ESLint/Oxlint directive comments.`},messages:{disallow:`Unexpected ESLint directive comment.`},schema:[{additionalProperties:!1,properties:{allow:{description:`Directive kinds that are still allowed in block comments.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`suggestion`}}),_n=/\s-{2,}\s/u,vn=/^(?<kind>oxlint-disable|oxlint-enable)(?:\s|$)/u,yn=_(`directive-require-description`,`general`,{create(e){let t=new Set(Wt(e.options[0],`ignore`));function n(n){let r=Gt(n);if(r!==void 0){let{kind:n}=r;if(!Ut(n)||t.has(n)||r.description!==void 0)return;e.report({data:{kind:r.kind},loc:r.comment.loc,messageId:`missingDescription`});return}if(n.type!==`Line`)return;let i=n.value.trim(),a=vn.exec(i);if(a===null)return;let o=a.groups?.kind;o!==void 0&&Ut(o)&&(t.has(o)||_n.test(i)||e.report({data:{kind:o},loc:n.loc,messageId:`missingDescription`}))}for(let t of e.sourceCode.getAllComments())n(t);return{}},meta:{docs:{description:"Require descriptions for `oxlint` and `eslint` disable/enable directives."},messages:{missingDescription:`Missing description for '{{kind}}' comment.`},schema:[{additionalProperties:!1,properties:{ignore:{description:`Directive kinds that do not require a description.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`suggestion`}}),bn={baseThreshold:10,errorThreshold:25,interfacePenalty:20,performanceMode:!0};function xn(e){let{callee:t}=e;return t.type===`MemberExpression`&&t.object.type===`Identifier`&&t.object.name===`Ianitor`}function Sn(e){if(e.type!==`TSTypeReference`)return e;let{typeName:t,typeArguments:n}=e;return t.type!==`Identifier`||t.name!==`Readonly`?e:n?.params[0]??e}function Cn(e){let t=Sn(e);if(t.type!==`TSTypeReference`)return;let{typeName:n,typeArguments:r}=t;if(n.type!==`TSQualifiedName`)return;let{left:i,right:a}=n;if(i.type!==`Identifier`||i.name!==`Ianitor`||a.name!==`Static`)return;let o=r?.params[0];if(o?.type!==`TSTypeQuery`)return;let{exprName:s}=o;return s.type===`Identifier`?s.name:void 0}function wn(e){let t=Sn(e);if(t.type!==`TSTypeReference`)return!1;let{typeName:n,typeArguments:r}=t;if(n.type!==`TSQualifiedName`)return!1;let{left:i,right:a}=n;return i.type!==`Identifier`||i.name!==`Ianitor`||a.name!==`Static`?!1:r?.params[0]?.type===`TSTypeQuery`}function Tn(e){let{callee:t}=e;if(t.type!==`MemberExpression`||t.property.type!==`Identifier`)return 0;switch(t.property.name){case`array`:case`instanceIsA`:case`instanceOf`:case`optional`:return 2;case`boolean`:case`number`:case`string`:return 1;case`interface`:case`strictInterface`:{let[t]=e.arguments;return t?.type===`ObjectExpression`?10+t.properties.length*3:0}case`intersection`:case`union`:return e.arguments.length*2;case`map`:case`record`:return 3;default:return 1}}function P(e,t,n,r){let i=e+t;return n.performanceMode?Math.min(i,r):i}function En(e,t,n,r,i,a,o,s=0){return P(e,F(t,n,r,i,a,o)+s,r,o)}function Dn(e,t,n,r,i,a,o){let s=e;for(let e of t){if(!(`typeAnnotation`in e))continue;let{typeAnnotation:t}=e;t?.type===`TSTypeAnnotation`&&(s=En(s,t.typeAnnotation,n,r,i,a,o))}return s}function On(e,t,n,r,i,a,o,s,c){if(`types`in t){let l=e,{types:u}=t;for(let e of u)l=En(l,e,n,r,i,a,o);return P(l,s*(u.length+c),r,o)}return e}function kn(e,t){let n=t.get(e);if(n!==void 0)return n;let r=Math.log2(e+1);return t.set(e,r),r}function F(e,t,n,r,i,a){let o=r.nodeCache.get(e);if(o!==void 0)return o;if(r.visitedNodes.has(e))return 50;r.visitedNodes.add(e);let s=0,c=t+1;switch(e.type){case`TSAnyKeyword`:case`TSNeverKeyword`:case`TSUnknownKeyword`:break;case`TSArrayType`:if(`elementType`in e){let{elementType:t}=e;s=P(F(t,c,n,r,i,a),1,n,a);break}s=1;break;case`TSBigIntKeyword`:case`TSBooleanKeyword`:case`TSNullKeyword`:case`TSNumberKeyword`:case`TSStringKeyword`:case`TSSymbolKeyword`:case`TSUndefinedKeyword`:case`TSVoidKeyword`:s=1;break;case`TSConditionalType`:{let{checkType:t,extendsType:o,trueType:l,falseType:u}=e;s=P(P(3,F(t,c,n,r,i,a),n,a),F(o,c,n,r,i,a),n,a),s=P(P(s,F(l,c,n,r,i,a),n,a),F(u,c,n,r,i,a),n,a);break}case`TSFunctionType`:case`TSMethodSignature`:{s=2;let{params:t}=e;for(let e of t){if(!(`typeAnnotation`in e))continue;let{typeAnnotation:t}=e;t?.type===`TSTypeAnnotation`&&(s=P(s,F(t.typeAnnotation,c,n,r,i,a),n,a))}if(`returnType`in e){let{returnType:t}=e;t?.type===`TSTypeAnnotation`&&(s=P(s,F(t.typeAnnotation,c,n,r,i,a),n,a))}break}case`TSInterfaceDeclaration`:{s=n.interfacePenalty;let{extends:t,body:o}=e;t.length>0&&(s=P(s,t.length*5,n,a));let l=o.body;s=P(s,l.length*2,n,a),s=Dn(s,l,c,n,r,i,a);break}case`TSIntersectionType`:s=On(s,e,c,n,r,i,a,3,0);break;case`TSMappedType`:{let{constraint:t,typeAnnotation:o}=e;s=En(5,t,c,n,r,i,a),o!==null&&(s=En(s,o,c,n,r,i,a));break}case`TSTupleType`:{let{elementTypes:t}=e;s=1;for(let e of t)e.type!==`TSRestType`&&e.type!==`TSOptionalType`&&(s=En(s,e,c,n,r,i,a));s=P(s,1.5*t.length,n,a);break}case`TSTypeLiteral`:{let{members:t}=e;s=2+t.length*.5,s=Dn(s,t,c,n,r,i,a);break}case`TSTypeReference`:{s=2;let{typeArguments:t}=e,o=t?.params??[];for(let e of o)s=En(s,e,c,n,r,i,a,2);break}case`TSUnionType`:s=On(s,e,c,n,r,i,a,2,-1);break;default:s=1}return s*=kn(t,i),r.nodeCache.set(e,s),r.visitedNodes.delete(e),s}const An=_(`enforce-ianitor-check-type`,`roblox`,{create(e){let t=e.options[0]??{},n={...bn,...t},r={nodeCache:new WeakMap,visitedNodes:new WeakSet},i=new Set,a=new Map,o=n.errorThreshold*2,s=!1,c=new Map,l=new Map,u=new Map;return{Identifier(e){e.name===`Ianitor`&&(s=!0)},"Program:exit"(){if(s){for(let[t,n]of l.entries())e.report({data:{score:n.complexity.toFixed(1)},messageId:`missingIanitorCheckType`,node:t});for(let[t]of c.entries())e.report({data:{name:t.id.name},messageId:`complexInterfaceNeedsCheck`,node:t});for(let[t,n]of u.entries()){let{id:r}=t;r.type===`Identifier`&&i.has(r.name)||e.report({data:{score:n.complexity.toFixed(1)},messageId:`missingIanitorCheckType`,node:r})}}},TSInterfaceDeclaration(e){let t=F(e,0,n,r,a,o);t<n.interfacePenalty||c.set(e,{complexity:t})},TSTypeAliasDeclaration(e){let t=Cn(e.typeAnnotation);if(t!==void 0&&(s=!0,i.add(t)),wn(e.typeAnnotation))return;let c=F(e.typeAnnotation,0,n,r,a,o);c<n.baseThreshold||l.set(e,{complexity:c})},VariableDeclarator(e){let{init:t,id:r}=e;if(t?.type!==`CallExpression`||!xn(t)||(s=!0,r.type===`Identifier`&&r.typeAnnotation!==void 0&&r.typeAnnotation!==null))return;let i=Tn(t);i<n.baseThreshold||u.set(e,{complexity:i})}}},meta:{docs:{description:`Enforce Ianitor.Check<T> type annotations on complex TypeScript types`,recommended:!0},messages:{complexInterfaceNeedsCheck:`Interface '{{name}}' requires Ianitor.Check<T> annotation (interfaces always need explicit checking)`,missingIanitorCheckType:`Complex type (score: {{score}}) requires Ianitor.Check<T> annotation for type safety`},schema:[{additionalProperties:!1,properties:{baseThreshold:{default:bn.baseThreshold,description:`Minimum complexity score before missing Ianitor.Check<T> annotations are reported.`,minimum:1,type:`number`},errorThreshold:{default:bn.errorThreshold,description:`Complexity score used to cap recursive analysis before reporting is determined.`,minimum:1,type:`number`},interfacePenalty:{default:bn.interfacePenalty,description:`Complexity penalty applied when an Ianitor validator builds an interface-like shape.`,minimum:1,type:`number`},performanceMode:{default:bn.performanceMode,description:`Whether repeated type nodes are cached during complexity analysis.`,type:`boolean`}},type:`object`}],type:`problem`}}),jn=[`makeSynchronous`,`workerize`],Mn=[`@isolated`],Nn=new Set([`browser`,`chrome`]),Pn=new Set([`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`MethodDefinition`,`Property`,`VariableDeclaration`,`VariableDeclarator`]),Fn=new Set([`FunctionDeclaration`,`FunctionExpression`]),In=new Set([`ClassDeclaration`,`ClassExpression`]),Ln=/(?:\*\s*)*/u;function Rn(e){if(e===!0||e===`writable`||e===`writeable`)return`writable`;if(e===!1||e===`off`)return`off`;if(e===`readonly`||e===`readable`)return`readonly`}function zn(e){if(!x(e))return{comments:Mn.map(e=>e.toLowerCase()),functions:new Set(jn),overrideGlobals:new Map,selectors:[]};let t=S(e.comments)?e.comments.map(e=>e.toLowerCase()):Mn.map(e=>e.toLowerCase()),n=S(e.functions)?new Set(e.functions):new Set(jn),r=S(e.selectors)?e.selectors:[],i=new Map;if(x(e.overrideGlobals))for(let[t,n]of Object.entries(e.overrideGlobals)){let e=Rn(n);e!==void 0&&i.set(t,e)}return{comments:t,functions:n,overrideGlobals:i,selectors:r}}function Bn(e){return N(e)}function Vn(e){if((e.type===`Property`||e.type===`MethodDefinition`)&&!(e.computed&&e.key.type!==`Literal`)){if(e.key.type===`Identifier`)return e.key.name;if(e.key.type===`Literal`&&y(e.key.value))return e.key.value}}function Hn(e,t,n){return e.callee.type!==`MemberExpression`||e.callee.computed||e.callee.optional||e.callee.object.type!==`Identifier`||e.callee.object.name!==t?!1:w(e.callee)===n}function Un(e){let{parent:t}=e;if(t?.type===`CallExpression`&&t.arguments[0]===e){if(Hn(t,`browser`,`execute`))return`callee of method named "browser.execute"`;if(Hn(t,`page`,`evaluate`))return`callee of method named "page.evaluate"`}}function Wn(e){if(e.callee.type!==`MemberExpression`||e.callee.computed||e.callee.optional||w(e.callee)!==`executeScript`)return;let t=e.callee.object;if(!(t.type!==`MemberExpression`||t.computed||t.optional)&&w(t)===`scripting`&&!(t.object.type!==`Identifier`||!Nn.has(t.object.name)))return t.object.name}function Gn(e){let t=e.parent;if(t?.type!==`Property`||t.kind!==`init`||t.value!==e||Vn(t)!==`func`)return;let n=t.parent;if(n.type!==`ObjectExpression`)return;let r=n.parent;if(r.type!==`CallExpression`||r.arguments[0]!==n)return;let i=Wn(r);if(i!==void 0)return`property "func" passed to "${i}.scripting.executeScript"`}function Kn(e,t){for(let n of e.arguments)if(n===t)return!0;return!1}function qn(e,t){if(t.size===0)return;let{parent:n}=e;if(!(n?.type!==`CallExpression`||!Kn(n,e))&&!(n.callee.type!==`Identifier`||!t.has(n.callee.name)))return`callee of function named ${JSON.stringify(n.callee.name)}`}function Jn(e,t){return t===null||!Pn.has(t.type)?!1:t.type===`Property`||t.type===`MethodDefinition`?t.value===e:!0}function Yn(e){return e.replace(Ln,``).trim().toLowerCase()}function Xn(e,t){let n=t;for(;;){let t=e.getCommentsBefore(n).at(-1);if(t!==void 0)return t.value;let{parent:r}=n;if(r===null||!Jn(n,r))return;n=r}}function Zn(e,t,n){if(n.length===0)return;let r=Xn(e,t);if(r===void 0)return;let i=Yn(r);for(let e of n)if(i===e||i.startsWith(`${e} - `)||i.startsWith(`${e} -- `))return`follows comment ${JSON.stringify(e)}`}function Qn(e,t,n){return Zn(e,t,n.comments)??qn(t,n.functions)??Un(t)??Gn(t)}function $n(e){let{parent:t}=e;return t!==null&&(t.type===`TSTypeReference`||t.type===`TSTypeQuery`)}function er(e,t){let n=e;for(;n!==null;){if(n===t)return!0;n=n.upper}return!1}function tr(e,t){let{resolved:n}=t;return n?.scope===void 0||!er(n.scope,e)}function nr(e){let t=[],n=[e];for(let r of n){for(let e of r.childScopes)n.push(e);for(let n of r.references)tr(e,n)&&t.push(n)}return t}function rr(e,t,n){let{identifier:r}=t,{name:i}=r,a=n.overrideGlobals.get(i);if(a!==void 0)return a===`off`?`off`:t.resolved!==null&&!e.isGlobalReference(r)?void 0:a;if(e.isGlobalReference(r))return`readonly`}function ir(e,t,n,r){let i=e.sourceCode.getScope(t);for(let t of nr(i)){let{identifier:i}=t;if($n(i))continue;let a=rr(e.sourceCode,t,r),o=n;if(a!==void 0&&a!==`off`){if(t.isReadOnly()||a===`writable`)continue;o=`${n} (global variable is not writable)`}e.report({data:{name:i.name,reason:o},messageId:`externallyScopedVariable`,node:i})}}function ar(e,t,n){let r=e.visitorKeys[t.type]??[];for(let e of r){if(!x(t))break;let r=t[e];if(Array.isArray(r))for(let e of r)D(e)&&n.push(e);else D(r)&&n.push(r)}}function or(e,t){if(e.type===`ClassDeclaration`||e.type===`ClassExpression`){e.superClass!==null&&t.push(e.superClass);for(let n of e.body.body)`computed`in n&&n.computed&&t.push(n.key)}}function sr(e,t,n){return e===t?!1:Fn.has(e.type)?!0:In.has(e.type)?(or(e,n),!0):!1}function cr(e,t,n){let r=[t];for(let i of r)if(!sr(i,t,r)){if(i.type===`ThisExpression`){e.report({data:{reason:n},messageId:`thisExpression`,node:i});continue}if(i.type===`Super`){e.report({data:{reason:n},messageId:`super`,node:i});continue}ar(e.sourceCode,i,r)}}function lr(e,t,n,r,i){i.has(t)||(i.add(t),ir(e,t,n,r),cr(e,t,n))}const ur=_(`isolated-functions`,`general`,{create(e){let t=zn(e.options[0]),n=new WeakSet;function r(r){if(!Bn(r))return;let i=Qn(e.sourceCode,r,t);i!==void 0&&lr(e,r,i,t,n)}let i={ArrowFunctionExpression:r,FunctionDeclaration:r,FunctionExpression:r};for(let r of t.selectors){let a=`matches selector ${JSON.stringify(r)}`;i[r]=r=>{Bn(r)&&lr(e,r,a,t,n)}}return i},meta:{docs:{description:`Prevent usage of variables from outside the scope of isolated functions.`,recommended:!0},messages:{externallyScopedVariable:`Variable {{name}} not defined in scope of isolated function. Function is isolated because: {{reason}}.`,super:"Unexpected `super` in isolated function. Function is isolated because: {{reason}}.",thisExpression:"Unexpected `this` in isolated function. Function is isolated because: {{reason}}."},schema:[{additionalProperties:!1,properties:{comments:{description:`Comment patterns that mark a function as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0},functions:{description:`Function names that mark argument callbacks as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0},overrideGlobals:{additionalProperties:{anyOf:[{type:`boolean`},{enum:[`off`,`readonly`,`writable`,`writeable`],type:`string`}]},description:`Override which global variables are allowed inside isolated scopes.`,type:`object`},selectors:{description:`AST selectors that mark matched function nodes as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`problem`}}),dr={default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`};function fr(e){return e===`roblox-ts`||e===`standard`}const pr=new Set([`react`,`react-dom`]),mr=new Set([`@rbxts/react`,`@rbxts/roact`]);function hr(e){return e===`standard`?pr:mr}function gr(e){return hr(yr(e))}function _r(e,t){return t.has(e.source.value)}function vr(e,t,n,r){if(_r(e,t))for(let t of e.specifiers){if(t.type===`ImportDefaultSpecifier`||t.type===`ImportNamespaceSpecifier`){n.add(t.local.name);continue}let e=me(t);e!==void 0&&r(e,t.local.name)}}function yr(e){return!x(e)||e.environment!==`standard`?`roblox-ts`:`standard`}function br(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function xr(e,t){if(e.type!==`ImportBinding`)return!1;let n=br(e.node);return n!==void 0&&t.has(n.source.value)}const Sr=new Map([[`useEffect`,1],[`useInsertionEffect`,1],[`useLayoutEffect`,1]]),Cr=new Set([`useCallback`,`useMemo`]),wr=new Set([`useBinding`,`useRef`]),Tr=new Set([`useReducer`,`useState`,`useTransition`]),Er=new Set([...wr,...Tr]),Dr=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`ClassExpression`,`FunctionExpression`,`NewExpression`,`ObjectExpression`]);function Or(e){return e===`aggressive`||e===`definite`||e===`moderate`}function kr(e,t){if(!(e.computed||e.object.type!==`Identifier`||!t.has(e.object.name)))return e.property.type===`Identifier`?e.property.name:void 0}function Ar(e){let t=C(e);for(;t.type===`MemberExpression`;)t=C(t.object);return t.type===`Identifier`?t:void 0}function jr(e){return Dr.has(e.type)}function Mr(e){if(e!==null){if(e.type===`Identifier`)return e.name;if(e.type===`AssignmentPattern`&&e.left.type===`Identifier`)return e.left.name;if(e.type===`RestElement`&&e.argument.type===`Identifier`)return e.argument.name}}function Nr(e,t,n){let r=e.elements[n];return r!=null&&Mr(r)===t}function Pr(e){return e.scope.type===`module`||e.scope.type===`global`}function Fr(e,t){if(`hooks`in e&&Array.isArray(e.hooks))for(let n of e.hooks){if(!(x(n)&&`name`in n&&y(n.name)))continue;let e=`dependenciesIndex`in n&&b(n.dependenciesIndex)?n.dependenciesIndex:1;t.set(n.name,e)}}const Ir=_(`memoized-effect-dependencies`,`react`,{create(e){let[t]=e.options,n=x(t)?t:{},r=`mode`in n&&Or(n.mode)?n.mode:`definite`,i=`environment`in n&&fr(n.environment)?n.environment:`roblox-ts`,a=new Map(Sr);Fr(n,a);let o=hr(i),s=new Set,c=new Map,l=new Set,u=new Map,d=new WeakMap,f=new WeakMap,p=new WeakMap,{sourceCode:m}=e;function h(e){let t=d.get(e);if(t!==void 0)return t;let n=m.getScope(e);return d.set(e,n),n}function g(e){let t=h(e),n=f.get(t);if(n===void 0)n=new Map,f.set(t,n);else if(n.has(e.name))return n.get(e.name);let r=t;for(;r!==null;){let t=r.set.get(e.name);if(t!==void 0)return n.set(e.name,t),t;r=r.upper}n.set(e.name,void 0)}function _(e){let{callee:t}=e;if(t.type===`Identifier`)return l.has(t.name);if(t.type===`MemberExpression`){let e=kr(t,s);return e!==void 0&&Cr.has(e)}return!1}function v(e){let{callee:t}=e;if(t.type===`Identifier`){let e=u.get(t.name);return e===void 0?void 0:wr.has(e)?`whole`:Tr.has(e)?`index1`:void 0}if(t.type===`MemberExpression`){let e=kr(t,s);if(e===void 0)return;if(wr.has(e))return`whole`;if(Tr.has(e))return`index1`}}function ee(e,t){if(e.type===`Parameter`)return`unknown`;if(e.type===`ImportBinding`)return`memoized`;let{node:n}=e;if(n.type===`FunctionDeclaration`||n.type===`ClassDeclaration`)return`unmemoized`;if(n.type!==`VariableDeclarator`)return`unknown`;let i=n.parent;if(i.type===`VariableDeclaration`&&i.kind!==`const`)return r===`definite`?`unknown`:`unmemoized`;let a=n.init===null?void 0:C(n.init);return a===void 0?`unknown`:jr(a)?`unmemoized`:a.type===`CallExpression`?te(a,n.id,t):`unknown`}function te(e,t,n){if(_(e))return`memoized`;let i=v(e);return i===`whole`||i===`index1`&&t.type===`ArrayPattern`&&Nr(t,n,1)?`memoized`:r===`definite`?`unknown`:`unmemoized`}function y(e){let t=p.get(e);if(t!==void 0)return t;if(Pr(e))return p.set(e,`memoized`),`memoized`;let n=!1;for(let t of e.defs){let r=ee(t,e.name);if(r===`unmemoized`)return p.set(e,`unmemoized`),`unmemoized`;r===`memoized`&&(n=!0)}let i=n?`memoized`:`unknown`;return r===`aggressive`&&i!==`memoized`&&(i=`unmemoized`),p.set(e,i),i}function b(e){let t=C(e);if(jr(t))return`unmemoized`;if(t.type===`CallExpression`)return r===`definite`?`unknown`:`unmemoized`;let n=Ar(t);if(n===void 0)return`unknown`;let i=g(n);return i===void 0?`unknown`:y(i)}function ne(e){let{callee:t}=e;if(t.type===`Identifier`)return c.get(t.name);if(t.type===`MemberExpression`){let e=kr(t,s);return e===void 0?void 0:a.get(e)}}return{CallExpression(t){let n=ne(t);if(n===void 0)return;let i=t.arguments[n];if(i?.type===`ArrayExpression`)for(let t of i.elements){if(t===null)continue;if(t.type===`SpreadElement`){if(r===`definite`)continue;let n=t.argument,i=m.getText(n);e.report({data:{name:i},messageId:`unmemoizedDependency`,node:n});continue}if(b(t)!==`unmemoized`)continue;let n=m.getText(t);e.report({data:{name:n},messageId:`unmemoizedDependency`,node:t})}},ImportDeclaration(e){vr(e,o,s,(e,t)=>{if(a.has(e)){let n=a.get(e);c.set(t,n??1)}Cr.has(e)&&l.add(t),Er.has(e)&&u.set(t,e)})}}},meta:{docs:{description:`Flags effect dependencies that are not memoized. Unmemoized dependencies can cause unnecessary re-renders or infinite loops.`},messages:{unmemoizedDependency:`{{name}} is not memoized. Wrap it in useMemo/useCallback or move it to module scope.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:Array.from(Sr,([e,t])=>({dependenciesIndex:t,name:e})),description:`Effect hooks checked by default; configured entries are added to this set.`,items:{additionalProperties:!1,properties:{dependenciesIndex:{description:`Index of the dependencies array for validation`,type:`number`},name:{description:`The name of the hook`,type:`string`}},required:[`name`],type:`object`},type:`array`},mode:{default:`definite`,description:`Strictness for memoization detection: definite (only obvious), moderate (unknown calls and non-const), aggressive (any non-module).`,enum:[`aggressive`,`definite`,`moderate`],type:`string`}},type:`object`}],type:`problem`}});function Lr(e){return e.type===`Identifier`||e.type===`PrivateIdentifier`||I(e)}function I(e){let t=C(e);return t.type===`Identifier`||tt(t)?!0:M(t)?Rr(t):we(t)?t.operator!==`delete`&&I(t.argument):Te(t)||Ee(t)?zr(t):De(t)?Br(t):Xe(t)?Ur(t.expressions):qe(t)?Vr(t):Je(t)?Hr(t):Oe(t)?Ur(t.expressions):Ve(t)}function Rr(e){return e.optional||e.object.type===`Super`||!I(e.object)?!1:!e.computed||I(e.property)}function zr(e){return I(e.left)&&I(e.right)}function Br(e){return I(e.test)&&I(e.consequent)&&I(e.alternate)}function Vr(e){for(let t of e.elements)if(t!==null&&(t.type===`SpreadElement`||!I(t)))return!1;return!0}function Hr(e){for(let t of e.properties)if(t.type===`SpreadElement`||t.kind!==`init`||t.method||t.computed&&!Lr(t.key)||!I(t.value))return!1;return!0}function Ur(e){for(let t of e)if(!I(t))return!1;return!0}const Wr={environment:`roblox-ts`,requireExplicitGenericOnNewArray:!0};function Gr(e){return e.type===`Identifier`}function Kr(e,t){let n=C(t.callee);return!Gr(n)||n.name!==`Array`?!1:!E(e,n,`Array`)}function qr(e,t){if(e.type!==`TSTypeReference`||!Gr(e.typeName)||e.typeName.name!==`Array`&&e.typeName.name!==`ReadonlyArray`||e.typeArguments?.params.length!==1)return;let[n]=e.typeArguments.params;return n===void 0?void 0:t.getText(n)}const Jr=/:\s*(?:Array<.+>|ReadonlyArray<.+>)\s*=/u;function Yr(e){return Jr.exec(e)!==null}function Xr(e){if(Gr(e)||e.type===`ArrayPattern`||e.type===`ObjectPattern`)return e.typeAnnotation??void 0}function Zr(e,t){let{parent:n}=e;if(k(n)&&n.init===e){let e=Xr(n.id);return e!==void 0&&qr(e.typeAnnotation,t)!==void 0}return et(n)&&n.right===e?Yr(t.getText(n)):Ae(n)&&n.value===e&&n.typeAnnotation!==void 0&&n.typeAnnotation!==null?qr(n.typeAnnotation.typeAnnotation,t)!==void 0:$e(n)&&n.expression===e||Qe(n)&&n.expression===e?qr(n.typeAnnotation,t)!==void 0:!1}function Qr(e){if(e===void 0)return!1;let{typeAnnotation:t}=e;return t.type!==`TSTypeReference`||!Gr(t.typeName)?!1:t.typeName.name===`ReadonlyArray`}function $r(e){let t=C(e);return Ve(t)&&`value`in t?!b(t.value):qe(t)||Je(t)||He(t)||Fe(t)||Re(t)?!0:Xe(t)?t.expressions.length===0:we(t)?t.operator===`void`||t.operator===`typeof`&&!t.prefix:!1}function ei(e,t){let n=C(e);if(!(!ye(n)||n.optional)&&!(!M(n.callee)||n.callee.optional)&&!(!Gr(n.callee.object)||n.callee.object.name!==t))return w(n.callee)===`push`?n:void 0}function ti(e,t,n){for(let r=t;r<e.length;r+=1){let t=e[r];if(!(t===void 0||!Ze(t))&&ei(t.expression,n)!==void 0)return!0}return!1}function ni(e,t){let n=[],r=0;for(let i of e){if(i.type===`SpreadElement`){n[r++]=`...${t.getText(i.argument)}`;continue}n[r++]=t.getText(i)}return`[${n.join(`, `)}]`}function ri(e,t,n,r,i){if(n.init===null||r.length===0)return[];let[a]=r,o=r.at(-1);if(a===void 0||o===void 0)return[];let[s]=a.range;for(;s>0;){let e=t.text[s-1];if(e===` `||e===` `){--s;continue}e===`
2
+ `&&--s;break}return[e.replaceText(n.init,i),e.removeRange([s,o.range[1]])]}function ii(e,t,n){let{sourceCode:r}=e;if(t.arguments.length===0){ai(e,t,n);return}if(t.arguments.length>1){oi(e,t,n);return}si(e,t,n,r)}function ai(e,t,n){n.requireExplicitGenericOnNewArray&&(t.typeArguments!==void 0&&t.typeArguments!==null&&t.typeArguments.params.length>0||Zr(t,e.sourceCode)||e.report({messageId:`requireExplicitGenericOnNewArray`,node:t}))}function oi(e,t,n){let[r]=t.arguments;if(r===void 0||r.type!==`SpreadElement`&&n.environment===`roblox-ts`&&!$r(r))return;let i=ni(t.arguments,e.sourceCode);if(!t.arguments.some(e=>e.type===`SpreadElement`)){e.report({fix(e){return e.replaceText(t,i)},messageId:`avoidConstructorEnumeration`,node:t});return}e.report({messageId:`avoidConstructorEnumeration`,node:t,suggest:[{fix(e){return e.replaceText(t,i)},messageId:`suggestArrayLiteral`}]})}function si(e,t,n,r){let[i]=t.arguments;if(i===void 0)return;if(i.type===`SpreadElement`){ci(e,t,r.getText(i.argument));return}if(!$r(i)){li(e,t,n,r.getText(i));return}let a=`[${r.getText(i)}]`;e.report({fix(e){return e.replaceText(t,a)},messageId:`avoidSingleArgumentConstructor`,node:t})}function ci(e,t,n){e.report({messageId:`avoidSingleArgumentConstructor`,node:t,suggest:[{fix(e){return e.replaceText(t,`[...${n}]`)},messageId:`suggestArrayLiteral`}]})}function li(e,t,n,r){n.environment!==`roblox-ts`&&e.report({messageId:`avoidLengthConstructorInStandard`,node:t,suggest:[{fix(e){return e.replaceText(t,`Array.from({ length: ${r} })`)},messageId:`suggestArrayFromLength`}]})}function ui(e,t,n){let r=t[n];if(r===void 0||!Ne(r)||r.kind!==`const`&&r.kind!==`let`||r.declarations.length!==1)return;let[i]=r.declarations;if(i===void 0||!Gr(i.id)||i.init===null||!Ke(i.init)||!Kr(e,i.init)||i.init.arguments.length>0||Qr(Xr(i.id)))return;let a=i.id.name,o=di(e,t,n+1,a);if(o.pushStatements.length!==0&&!ti(t,o.nextIndex,a))return{arrayIdentifierName:a,declarator:i,hasUnsafeArgument:o.hasUnsafeArgument,literalText:`[${o.argumentParts.join(`, `)}]`,pushStatements:o.pushStatements,statement:r}}function di(e,t,n,r){let i=[],a=[],o=!1,s=n;for(;s<t.length;){let n=t[s];if(n===void 0||!Ze(n))break;let c=ei(n.expression,r);if(c===void 0||c.arguments.length===0)break;i.push(n),o=fi(e,c,a)||o,s+=1}return{argumentParts:a,hasUnsafeArgument:o,nextIndex:s,pushStatements:i}}function fi(e,t,n){let r=!1;for(let i of t.arguments){if(i.type===`SpreadElement`){r=!0,n.push(`...${e.getText(i.argument)}`);continue}I(i)||(r=!0),n.push(e.getText(i))}return r}const pi=_(`no-array-constructor-elements`,`roblox`,{create(e){let t=e.options?.[0],n=x(t)?{...Wr,...t}:{...Wr},{sourceCode:r}=e;function i(t){for(let n=0;n<t.length;n+=1){let i=ui(r,t,n);if(i!==void 0){if(!i.hasUnsafeArgument){e.report({fix(e){return ri(e,r,i.declarator,i.pushStatements,i.literalText)},messageId:`collapseArrayPushInitialization`,node:i.statement});continue}e.report({messageId:`collapseArrayPushInitialization`,node:i.statement,suggest:[{fix(e){return ri(e,r,i.declarator,i.pushStatements,i.literalText)},messageId:`suggestCollapseArrayPushInitialization`}]})}}}return{BlockStatement(e){i(e.body)},NewExpression(t){Kr(r,t)&&ii(e,t,n)},Program(e){i(e.body)}}},meta:{docs:{description:`Disallow array constructor element forms and enforce roblox-ts-aware constructor patterns.`},fixable:`code`,hasSuggestions:!0,messages:{avoidConstructorEnumeration:`Do not use Array constructor enumeration arguments. Use an array literal instead.`,avoidLengthConstructorInStandard:`Length-based Array constructor is not allowed in standard mode. Prefer Array.from({ length: n }).`,avoidSingleArgumentConstructor:`Single-argument Array constructor form is not allowed here. Use an array literal instead.`,collapseArrayPushInitialization:`Collapse new Array<T>() + consecutive .push(...) calls into a single array literal initializer.`,requireExplicitGenericOnNewArray:`new Array() must use an explicit generic argument or a contextual Array<T>/ReadonlyArray<T> annotation.`,suggestArrayFromLength:`Replace with Array.from({ length: value }).`,suggestArrayLiteral:`Replace constructor form with an array literal.`,suggestCollapseArrayPushInitialization:`Collapse constructor + push sequence into a single array literal initializer.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`Array constructor environment mode: 'roblox-ts' allows new Array(length); 'standard' reports it.`,enum:[`roblox-ts`,`standard`],type:`string`},requireExplicitGenericOnNewArray:{default:!0,description:`When true, zero-argument new Array() requires explicit generic type arguments or contextual array typing.`,type:`boolean`}},type:`object`}],type:`problem`}}),mi=new Set([`parent`,`range`,`loc`,`tokens`,`comments`]);function hi(e){return e.type===`Identifier`}function gi(e){return`type`in e&&typeof e.type==`string`}function _i(e,t){for(let n of Object.keys(e)){if(mi.has(n))continue;let r=Reflect.get(e,n);r!=null&&t.push(r)}}function vi(e,t){let n=[e];for(;n.length>0;){let e=n.pop();if(!(typeof e!=`object`||!e)){if(Array.isArray(e)){for(let t of e)n.push(t);continue}if(gi(e)){if(e.type===`Identifier`&&e.name===t)return!0;_i(e,n)}}}return!1}function yi(e,t){let n=C(t.callee);return!hi(n)||n.name!==`Array`?!1:!E(e,n,`Array`)}function bi(e,t,n){if(!Ze(e))return;let{expression:r}=e;if(!Ce(r)||r.operator!==`=`)return;let{left:i}=r;if(!(M(i)&&i.computed))return;let{object:a,property:o}=i;if(!(!hi(a)||a.name!==t)&&!(!Ge(o)||o.value!==n))return{expression:r,statement:e}}function xi(e,t,n){let r=t[n];if(r===void 0||!Ne(r)||r.declarations.length!==1)return;let[i]=r.declarations;if(i===void 0||!k(i)||i.init===null)return;let{init:a}=i;if(!Ke(a)||a.arguments.length>0||!yi(e,a)||!rt(i.id))return;let o=i.id.name,s=[],c=n+1,l=0;for(;c<t.length;){let e=t[c];if(e===void 0)break;let n=bi(e,o,l);if(n!==void 0){s.push(n),l+=1,c+=1;continue}if(vi(e,o))break;c+=1}if(s.length===0)return;let[u]=s,d=s.at(-1);if(u!==void 0&&d!==void 0)return{assignments:s.map(t=>({statement:t.statement,valueText:e.getText(t.expression.right)})),declaration:r,declarator:i,firstAssignmentStatement:u.statement,lastAssignmentStatement:d.statement}}function Si(e,t,n){let{declaration:r,declarator:i,assignments:a,firstAssignmentStatement:o,lastAssignmentStatement:s}=n,{init:c}=i;if(c===null)return[];let l=`[${a.map(e=>e.valueText).join(`, `)}]`,u=[e.replaceText(c,l)],[d]=r.range,[,f]=r.range,[p]=o.range,[,m]=s.range,h=t.text.slice(f,p);if(h.trim().length>0){let n=d;n>0&&t.text[n-1]===`
3
3
  `&&--n;let i=h;n===d&&i.startsWith(`
4
4
  `)&&(i=i.slice(1));let a=t.getText(r),o=t.getText(c),s=a.indexOf(o),u=s===-1?a:`${a.slice(0,s)}${l}${a.slice(s+o.length)}`;return[e.replaceTextRange([n,m],`${i}${u}`)]}let g=p;for(;g>f;){let e=t.text[g-1];if(e===` `||e===` `){--g;continue}e===`
5
- `&&--g;break}return u.push(e.removeRange([g,m])),u}const Ci=_(`no-array-constructor-index-assignment`,`roblox`,{create(e){let{sourceCode:t}=e;function n(n){let r=0;for(;r<n.length;){let i=xi(t,n,r);if(i===void 0){r+=1;continue}e.report({fix(e){return Si(e,t,i)},messageId:`preferArrayLiteral`,node:i.declaration}),r=n.indexOf(i.lastAssignmentStatement)+1}}return{BlockStatement(e){n(e.body)},Program(e){n(e.body)}}},meta:{docs:{description:`Disallow new Array<T>() followed by contiguous index assignments; use an array literal instead.`},fixable:`code`,messages:{preferArrayLiteral:`Use an array literal instead of new Array<T>() followed by index assignments.`},schema:[],type:`suggestion`}});function wi(e){return typeof e!=`object`||!e?!1:`allowAutofix`in e?e.allowAutofix===void 0||typeof e.allowAutofix==`boolean`:!0}function Ti(e,t,n){if(e.type!==t.type)return!1;switch(e.type){case`CallExpression`:return t.type===`CallExpression`&&n.getText(e)===n.getText(t);case`Identifier`:return t.type===`Identifier`&&e.name===t.name;case`Literal`:return t.type===`Literal`&&e.value===t.value&&e.raw===t.raw;case`MemberExpression`:return t.type===`MemberExpression`&&Ei(e,t,n);case`Super`:return t.type===`Super`;case`ThisExpression`:return t.type===`ThisExpression`;default:return!1}}function Ei(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!Ti(e.object,t.object,n)?!1:e.computed?Di(e.property,t.property,n):Oi(e.property,t.property)}function Di(e,t,n){return it(e)&&it(t)&&Ti(e,t,n)}function Oi(e,t){return e.type===`PrivateIdentifier`||t.type===`PrivateIdentifier`?e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`&&e.name===t.name:t.type===`Identifier`&&e.type===`Identifier`&&e.name===t.name}function ki(e,t){switch(e.type){case`Identifier`:case`ThisExpression`:return!0;case`Literal`:return t;case`MemberExpression`:return e.optional||!ki(e.object,!1)?!1:e.computed?it(e.property)?ki(e.property,!0):!1:e.property.type===`Identifier`||e.property.type===`PrivateIdentifier`;default:return!1}}function Ai(e){return ki(e,!1)}function ji(e){return e.type!==`CallExpression`||e.optional||e.arguments.length>0||e.callee.type!==`MemberExpression`||e.callee.optional||e.callee.computed||e.callee.property.type!==`Identifier`?!1:e.callee.property.name===`size`}function Mi(e,t,n){if(!(e.operator!==`=`||e.left.type!==`MemberExpression`||!e.left.computed)){if(n===`roblox-ts`&&ji(e.left.property))return Ti(e.left.object,e.left.property.callee.object,t)?e.left:void 0;if(n===`standard`){let{property:n}=e.left;if(n.type===`MemberExpression`&&!n.optional&&!n.computed&&n.property.type===`Identifier`&&n.property.name===`length`)return Ti(e.left.object,n.object,t)?e.left:void 0}}}const Ni=_(`no-array-size-assignment`,`roblox`,{create(e){let[t]=e.options,n=wi(t)&&t.allowAutofix,r=t?.environment===`standard`?`standard`:`roblox-ts`,{sourceCode:i}=e;return{AssignmentExpression(t){let a=Mi(t,i,r);if(a===void 0)return;let o=t.parent.type===`ExpressionStatement`?t.parent:void 0;if(!(n&&o!==void 0&&Ai(a.object))){e.report({messageId:`usePush`,node:t});return}let s=i.getText(a.object),c=i.getText(t.right);e.report({fix(e){return e.replaceText(o,`${s}.push(${c});`)},messageId:`usePush`,node:t})}}},meta:{docs:{description:`Disallow array append assignments using array[array.size()] = value (roblox-ts) or array[array.length] = value (standard) and prefer push-based appends.`},fixable:`code`,messages:{usePush:`Do not append with array[array.size()] = value or array[array.length] = value. Use array.push(value) instead.`},schema:[{additionalProperties:!1,properties:{allowAutofix:{default:!1,description:`Allow the fixer to replace safe append assignments with array.push(value).`,type:`boolean`},environment:{...dr,default:`roblox-ts`,description:`Array environment mode: 'roblox-ts' checks array[array.size()]; 'standard' checks array[array.length].`}},type:`object`}],type:`problem`}}),Pi=/^set[A-Z]/u;function L({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`&&e.property.type===`Identifier`)return e.property.name}function Fi(e){return Pi.test(e)}function Ii(e){let[t]=e.arguments;return t?.type===`ArrowFunctionExpression`||t?.type===`FunctionExpression`?t:void 0}function Li(e,t){let n=[e];for(let e of n)t(e),zi(e,n)}function Ri(e,t){let n=[e];for(let e of n){t(e);for(let t of Object.values(e))Hi(t,e,n)}}function zi(e,t){for(let n in e)ce(n)||Bi(Reflect.get(e,n),e,t)}function Bi(e,t,n){if(!(typeof e!=`object`||!e||e===t.parent)){if(Array.isArray(e)){Vi(e,t,n);return}D(e)&&n.push(e)}}function Vi(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];i!==t.parent&&D(i)&&n.push(i)}}function Hi(e,t,n){if(Array.isArray(e)){for(let r of e)Hi(r,t,n);return}e===t.parent||!D(e)||n.push(e)}function Ui(e){let{key:t}=e;if(t.type===`Identifier`)return t.name;if(t.type===`Literal`&&y(t.value))return t.value}function Wi(e){let{value:t}=e;if(t.type===`Identifier`)return t;if(t.type===`AssignmentPattern`&&t.left.type===`Identifier`)return t.left}function Gi(e){let t=0;return Li(e,e=>{e.type===`CallExpression`&&e.callee.type===`Identifier`&&Fi(e.callee.name)&&(t+=1)}),t}function Ki(e,t,n,r,i){if(t===void 0)return 0;if(t.type===`SpreadElement`)return 3;let a=w(t);return a.type===`ArrayExpression`?a.elements.length===0?1:i(e,a,n,r)?2:3:3}const qi=new Set([`catch`,`finally`,`then`]);function Ji(e){let t=new Set;for(let n of e.body)n.type!==`MethodDefinition`||n.kind!==`method`||!n.value.async||n.key.type===`Identifier`&&t.add(n.key.name);return t}function Yi(e){return e.callee.type!==`MemberExpression`||e.callee.property.type!==`Identifier`?!1:qi.has(e.callee.property.name)}function Xi({callee:e}){let t=w(e);return Ie(t)&&t.async}function Zi({callee:e},t){if(e.type===`MemberExpression`&&e.object.type===`ThisExpression`&&e.property.type===`Identifier`)return t.has(e.property.name)?e.property.name:void 0}function Qi(e){let{parent:t}=e;return t?.type!==`AssignmentExpression`||t.right!==e?!1:t.left.type===`MemberExpression`&&t.left.object.type===`ThisExpression`}function $i(e){let{parent:t}=e;if(t?.type===`VariableDeclarator`&&t.init===e)return t.id.type===`Identifier`?t.id.name:void 0}function ea(e){return!Ie(e)||e.parent.type===`ParenthesizedExpression`&&e.parent.parent.type===`CallExpression`&&e.parent.parent.callee===e.parent?!1:e.parent.type!==`CallExpression`||e.parent.callee!==e}function ta(e,t){let n=e;for(;n!==t;){let{parent:e}=n;if(e===null)return!1;if(ea(e))return!0;n=e}return!1}function na(e,t){let n=Zi(e,t);if(n===void 0||Qi(e))return;if(e.parent.type===`ExpressionStatement`)return{data:{methodName:n},messageId:`unhandledAsyncCall`,node:e};let r=$i(e);if(r!==void 0)return{data:{variableName:r},messageId:`orphanedPromise`,node:e}}function ra(e,t){let n=[],r=0;function i(i){if(i!==e&&ta(i,e))return;if(i.type===`AwaitExpression`){n[r++]={messageId:`awaitInConstructor`,node:i};return}if(i.type!==`CallExpression`)return;Yi(i)&&(n[r++]={messageId:`promiseChainInConstructor`,node:i}),Xi(i)&&(n[r++]={messageId:`asyncIifeInConstructor`,node:i});let a=na(i,t);a!==void 0&&(n[r++]=a)}return Ri(e,i),n}const ia=_(`no-async-constructor`,`general`,{create(e){function t(t){e.report({data:t.data,messageId:t.messageId,node:t.node})}return{"MethodDefinition[kind='constructor']"(e){if(e.value.type!==`FunctionExpression`||e.value.body?.type!==`BlockStatement`||e.parent.type!==`ClassBody`)return;let n=Ji(e.parent),r=e.value.body,i=ra(r,n);for(let e of i)t(e)}}},meta:{docs:{description:`Disallow asynchronous operations inside class constructors. Constructors return immediately, so async work causes race conditions, unhandled rejections, and incomplete object states.`},messages:{asyncIifeInConstructor:`Refactor this asynchronous operation outside of the constructor. Async IIFEs create unhandled promises and incomplete object state.`,awaitInConstructor:`Refactor this asynchronous operation outside of the constructor. Using 'await' in a constructor causes the class to be instantiated before the async operation completes.`,orphanedPromise:`Refactor this asynchronous operation outside of the constructor. Promise assigned to '{{variableName}}' is never consumed - errors will be silently swallowed.`,promiseChainInConstructor:`Refactor this asynchronous operation outside of the constructor. Promise chains (.then/.catch/.finally) in constructors lead to race conditions.`,unhandledAsyncCall:`Refactor this asynchronous operation outside of the constructor. Calling async method '{{methodName}}' without handling its result creates uncontrolled async behavior.`},schema:[],type:`problem`}}),aa=new Map(`Accessory,AccessoryDescription,AccountService,Accoutrement,AchievementService,ActivityHistoryEventService,Actor,AdGui,AdPortal,AdService,AdvancedDragger,AirController,AlignOrientation,AlignPosition,AnalyticsService,AngularVelocity,Animation,AnimationClip,AnimationClipProvider,AnimationConstraint,AnimationController,AnimationFromVideoCreatorService,AnimationFromVideoCreatorStudioService,AnimationGraphDefinition,AnimationImportData,AnimationNode,AnimationNodeDefinition,AnimationRigData,AnimationStreamTrack,AnimationTrack,Animator,Annotation,AnnotationsService,AppAgeSignalsService,AppLifecycleObserverService,AppRatingPromptService,AppStorageService,AppUpdateService,ArcHandles,AssetCounterService,AssetDeliveryProxy,AssetImportService,AssetImportSession,AssetManagerService,AssetPatchSettings,AssetQualityService,AssetService,AssetSoundEffect,Atmosphere,AtmosphereSensor,Attachment,AudioAnalyzer,AudioChannelMixer,AudioChannelSplitter,AudioChorus,AudioCompressor,AudioDeviceInput,AudioDeviceOutput,AudioDistortion,AudioEcho,AudioEmitter,AudioEqualizer,AudioFader,AudioFilter,AudioFlanger,AudioFocusService,AudioGate,AudioLimiter,AudioListener,AudioPages,AudioPitchShifter,AudioPlayer,AudioRecorder,AudioReverb,AudioSearchParams,AudioSpeechToText,AudioTextToSpeech,AudioTremolo,AuroraScriptObject,AvatarAbilityRules,AvatarAccessoryRules,AvatarAnimationRules,AvatarBodyRules,AvatarChatService,AvatarClothingRules,AvatarCollisionRules,AvatarCreationService,AvatarEditorService,AvatarImportService,AvatarRules,AvatarSettings,Backpack,BackpackItem,BadgeService,BallSocketConstraint,BanHistoryPages,BaseCoreGuiConfiguration,BaseImportData,BasePart,BasePlayerGui,BaseRemoteEvent,BaseScript,BaseWrap,Beam,BevelMesh,BillboardGui,BinaryStringValue,BindableEvent,BindableFunction,BlockMesh,BloomEffect,BlurEffect,BodyAngularVelocity,BodyColors,BodyForce,BodyGyro,BodyMover,BodyPartDescription,BodyPosition,BodyThrust,BodyVelocity,Bone,BoolValue,BoxHandleAdornment,Breakpoint,BrickColorValue,BrowserService,BubbleChatConfiguration,BubbleChatMessageProperties,BugReporterService,BulkImportService,BuoyancySensor,CFrameValue,CSGDictionaryService,CacheableContentProvider,CalloutService,Camera,CanvasGroup,Capture,CaptureService,CapturesPages,CapturesViewConfiguration,CatalogPages,ChangeHistoryService,ChangeHistoryStreamingService,ChannelSelectorSoundEffect,ChannelTabsConfiguration,CharacterAppearance,CharacterMesh,Chat,ChatInputBarConfiguration,ChatWindowConfiguration,ChatWindowMessageProperties,ChorusSoundEffect,ClickDetector,ClientReplicator,ClientStorageService,ClimbController,Clothing,CloudCRUDService,CloudExecutionService,CloudLocalizationTable,Clouds,ClusterPacketCache,Collaborator,CollaboratorsService,CollectionService,Color3Value,ColorCorrectionEffect,ColorGradingEffect,CommerceService,CompositeValueCurve,CompressorSoundEffect,ConeHandleAdornment,ConfigService,ConfigSnapshot,Configuration,ConfigureServerService,ConnectivityService,Constraint,ContentProvider,ContextActionService,Controller,ControllerBase,ControllerManager,ControllerPartSensor,ControllerSensor,ControllerService,CookiesService,CoreGui,CoreGuiConfiguration,CorePackages,CoreScript,CoreScriptDebuggingManagerHelper,CoreScriptSyncService,CornerWedgePart,CreationDBService,CreatorStoreService,CrossDMScriptChangeListener,CurveAnimation,CustomEvent,CustomEventReceiver,CustomLog,CustomSoundEffect,CylinderHandleAdornment,CylinderMesh,CylindricalConstraint,DataModel,DataModelMesh,DataModelPatchService,DataModelSession,DataStore,DataStoreGetOptions,DataStoreIncrementOptions,DataStoreInfo,DataStoreKey,DataStoreKeyInfo,DataStoreKeyPages,DataStoreListingPages,DataStoreObjectVersionInfo,DataStoreOptions,DataStorePages,DataStoreService,DataStoreSetOptions,DataStoreVersionPages,Debris,DebugSettings,DebuggablePluginWatcher,DebuggerBreakpoint,DebuggerConnection,DebuggerConnectionManager,DebuggerLuaResponse,DebuggerManager,DebuggerUIService,DebuggerVariable,DebuggerWatch,Decal,DeferredAssetManagerService,DepthOfFieldEffect,DesignFoundationsService,DeviceDisplayService,DeviceIdService,Dialog,DialogChoice,DigitsRigDescription,DisplayWakeLock,DistortionSoundEffect,DockWidgetPluginGui,DoubleConstrainedValue,DraftsService,DragDetector,Dragger,DraggerService,DynamicRotate,EchoSoundEffect,EditableImage,EditableMesh,EditableService,EditorSourceService,EncodingService,EqualizerSoundEffect,EulerRotationCurve,EventIngestService,ExampleV2Service,ExecutedRemoteCommand,ExperienceAuthService,ExperienceInviteOptions,ExperienceNotificationService,ExperienceService,ExperienceStateCaptureService,ExperienceStateRecordingService,ExplorerFilter,ExplorerFilterAutocompleter,ExplorerServiceVisibilityService,Explosion,FaceAnimatorService,FaceControls,FaceInstance,FacialAgeEstimationService,FacialAnimationRecordingService,FacialAnimationStreamingServiceStats,FacialAnimationStreamingServiceV2,FacialAnimationStreamingSubsessionStats,FacsImportData,Feature,FeatureRestrictionManager,File,FileManagerService,FileMesh,FileSyncReplicationService,Fire,Flag,FlagStand,FlagStandService,FlangeSoundEffect,FloatCurve,FloorWire,FluidForceSensor,FlyweightService,Folder,ForceField,FormFactorPart,Frame,FriendPages,FriendService,FunctionalTest,GamePassService,GameSettings,GamepadService,GeneratedFolder,GenerationService,GenericChallengeService,GenericSettings,Geometry,GeometryService,GetTextBoundsParams,GlobalDataStore,GlobalSettings,Glue,GongService,GroundController,GroupImportData,GroupService,GuiBase,GuiBase2d,GuiBase3d,GuiButton,GuiLabel,GuiMain,GuiObject,GuiService,GuidRegistryService,HSRDataContentProvider,HandleAdornment,Handles,HandlesBase,HapticEffect,HapticService,HarmonyService,Hat,HeapProfilerService,HeatmapQueryService,HeatmapService,HeightmapImporterService,HiddenSurfaceRemovalAsset,Highlight,HingeConstraint,Hint,Hole,Hopper,HopperBin,HttpRbxApiService,HttpRequest,HttpService,Humanoid,HumanoidController,HumanoidDescription,HumanoidRigDescription,IKControl,ILegacyStudioBridge,IXPService,ImageButton,ImageHandleAdornment,ImageLabel,ImageScreenCaptureService,ImportSession,IncrementalPatchBuilder,InputAction,InputBinding,InputContext,InputObject,InsertService,Instance,InstanceAdornment,InstanceExtensionsService,InstanceFileSyncService,IntConstrainedValue,IntValue,InternalMessagingService,InternalMessagingServiceVerifier,IntersectOperation,InventoryPages,JointImportData,JointInstance,JointsService,KeyboardService,Keyframe,KeyframeMarker,KeyframeSequence,KeyframeSequenceProvider,LanguageService,LayerCollector,LegacyStudioBridge,Light,Lighting,LineForce,LineHandleAdornment,LinearVelocity,LinkingService,LiveScriptingService,LiveSyncService,LocalDebuggerConnection,LocalScript,LocalStorageService,LocalizationService,LocalizationTable,LodDataEntity,LodDataService,LogReporterService,LogService,LoginService,LuaSettings,LuaSourceContainer,LuaWebService,LuauExpression,LuauExpressionService,LuauScriptAnalyzerService,MLModelDeliveryService,MLService,MLSession,MakeupDescription,ManualGlue,ManualSurfaceJointInstance,ManualWeld,MarkerCurve,MarketplaceService,MatchmakingService,MaterialGenerationService,MaterialImportData,MaterialService,MaterialVariant,MemStorageConnection,MemStorageService,MemoryStoreHashMap,MemoryStoreHashMapPages,MemoryStoreQueue,MemoryStoreService,MemoryStoreSortedMap,MeshContentProvider,MeshImportData,MeshPart,Message,MessageBusConnection,MessageBusService,MessagingService,MetaBreakpoint,MetaBreakpointContext,MetaBreakpointManager,MicroProfilerService,Model,ModerationService,ModuleScript,Motor,Motor6D,MotorFeature,Mouse,MouseService,MultipleDocumentInterfaceInstance,NegateOperation,NetworkClient,NetworkMarker,NetworkPeer,NetworkReplicator,NetworkServer,NetworkSettings,NoCollisionConstraint,Noise,NonReplicatedCSGDictionaryService,NotificationService,NumberPose,NumberValue,Object,ObjectValue,OmniRecommendationsService,OpenCloudApiV1,OpenCloudService,OperationGraph,OrderedDataStore,OutfitPages,OutputLink,PVAdornment,PVInstance,PackageLink,PackageService,PackageUIService,Packages,Pages,Pants,ParabolaAdornment,Part,PartAdornment,PartOperation,PartOperationAsset,ParticleEmitter,PartyEmulatorService,PatchBundlerFileWatch,PatchMapping,Path,Path2D,Path3D,PathfindingLink,PathfindingModifier,PathfindingService,PausedState,PausedStateBreakpoint,PausedStateException,PerformanceControlService,PermissionsService,PhysicsService,PhysicsSettings,PinShortcutService,PitchShiftSoundEffect,PlaceAssetIdsService,PlaceStatsService,PlacesService,Plane,PlaneConstraint,Platform,PlatformCloudStorageService,PlatformFriendsService,PlatformLibraries,Player,PlayerData,PlayerDataRecord,PlayerDataRecordConfig,PlayerDataService,PlayerEmulatorService,PlayerGui,PlayerHydrationService,PlayerListConfiguration,PlayerMouse,PlayerScripts,PlayerViewService,Players,Plugin,PluginAction,PluginCapabilities,PluginConnection,PluginConnectionService,PluginDebugService,PluginDragEvent,PluginGui,PluginGuiService,PluginManagementService,PluginManager,PluginManagerInterface,PluginMenu,PluginMouse,PluginPolicyService,PluginToolbar,PluginToolbarButton,PointLight,PointsService,PolicyService,PopLatencyService,Pose,PoseBase,PostEffect,Preloaded,PrismaticConstraint,ProceduralBehaviorSchedulerService,ProceduralModel,ProcessInstancePhysicsService,ProximityPrompt,ProximityPromptService,PublishService,PyramidHandleAdornment,QWidgetPluginGui,RTAnimationTracker,RayValue,RbxAnalyticsService,RealtimeMedia,RecommendationPages,RecommendationService,ReflectionMetadata,ReflectionMetadataCallbacks,ReflectionMetadataClass,ReflectionMetadataClasses,ReflectionMetadataEnum,ReflectionMetadataEnumItem,ReflectionMetadataEnums,ReflectionMetadataEvents,ReflectionMetadataFunctions,ReflectionMetadataItem,ReflectionMetadataMember,ReflectionMetadataProperties,ReflectionMetadataYieldFunctions,ReflectionService,RelativeGui,RemoteCommandService,RemoteCursorService,RemoteDebuggerServer,RemoteEvent,RemoteFunction,RenderSettings,RenderingTest,ReplicatedFirst,ReplicatedStorage,RequestOrchestratorService,ReverbSoundEffect,RibbonNotificationService,RigidConstraint,RobloxPluginGuiService,RobloxReplicatedStorage,RobloxSerializableInstance,RobloxServerStorage,RocketPropulsion,RodConstraint,RolloutValidation,RolloutValidationService,RomarkRbxAnalyticsService,RomarkService,RootImportData,RopeConstraint,Rotate,RotateP,RotateV,RotationCurve,RtMessagingService,RunService,RunningAverageItemDouble,RunningAverageItemInt,RunningAverageTimeIntervalItem,RuntimeContentService,RuntimeScriptService,SafetyService,SceneAnalysisService,ScreenGui,ScreenshotCapture,ScreenshotHud,Script,ScriptBuilder,ScriptChangeService,ScriptCloneWatcher,ScriptCloneWatcherHelper,ScriptCommitService,ScriptContext,ScriptDebugger,ScriptDebuggerService,ScriptDocument,ScriptEditorService,ScriptProfilerService,ScriptRegistrationService,ScriptRuntime,ScriptService,ScrollingFrame,Seat,Selection,SelectionBox,SelectionHighlightManager,SelectionLasso,SelectionPartLasso,SelectionPointLasso,SelectionSphere,SelfViewConfiguration,SensorBase,SerializationService,ServerReplicator,ServerScriptService,ServerStorage,ServiceProvider,ServiceVisibilityService,SessionCheckService,SessionService,SharedTableRegistry,Shirt,ShirtGraphic,SkateboardController,SkateboardPlatform,Skin,Sky,SlidingBallConstraint,SlimAnimationDataEntity,SlimAnimationReplicationService,SlimContentProvider,SlimDebugSettings,SlimReplicationService,SlimService,Smoke,SmoothVoxelsUpgraderService,Snap,SnippetService,SocialService,SolidModelContentProvider,Sound,SoundEffect,SoundGroup,SoundService,SoundShimService,Sparkles,SpawnLocation,SpawnerService,SpecialMesh,SphereHandleAdornment,SpotLight,SpringConstraint,StackFrame,StandalonePluginScripts,StandardPages,StartPageService,StarterCharacterScripts,StarterGear,StarterGui,StarterPack,StarterPlayer,StarterPlayerScripts,StartupMessageService,Stats,StatsItem,Status,StopWatchReporter,StringValue,Studio,StudioActionOverride,StudioAssetService,StudioAttachment,StudioCallout,StudioCameraService,StudioCaptureService,StudioData,StudioDeviceEmulatorService,StudioDeviceSimulatorService,StudioObjectBase,StudioPublishService,StudioScreenshotCapture,StudioScriptDebugEventListener,StudioSdkService,StudioService,StudioTestService,StudioTheme,StudioUserService,StudioWidget,StudioWidgetsService,StyleBase,StyleDerive,StyleLink,StyleQuery,StyleRule,StyleSheet,StylingService,SunRaysEffect,SurfaceAppearance,SurfaceGui,SurfaceGuiBase,SurfaceLight,SurfaceSelection,SwimController,SyncScriptBuilder,SystemThemeService,TaskScheduler,Team,TeamCreateData,TeamCreatePublishService,TeamCreateService,Teams,TelemetryService,TeleportAsyncResult,TeleportOptions,TeleportService,TemporaryCageMeshProvider,TemporaryScriptService,Terrain,TerrainDetail,TerrainIterateOperation,TerrainModifyOperation,TerrainReadOperation,TerrainRegion,TerrainWriteOperation,TestCase,TestService,TextBox,TextBoxService,TextButton,TextChannel,TextChannelWindow,TextChatCommand,TextChatConfigurations,TextChatMessage,TextChatMessageProperties,TextChatService,TextFilterResult,TextFilterTranslatedResult,TextGenerator,TextLabel,TextService,TextSource,Texture,TextureGenerationPartGroup,TextureGenerationService,TextureGenerationUnwrappingRequest,ThirdPartyUserService,ThreadState,TimerService,ToastNotificationService,Tool,Torque,TorsionSpringConstraint,TotalCountTimeIntervalItem,TouchInputService,TouchTransmitter,TraceRouteService,TracerService,TrackerLodController,TrackerStreamAnimation,Trail,Translator,TremoloSoundEffect,TriangleMeshPart,TrussPart,TutorialService,Tween,TweenBase,TweenService,UGCAvatarService,UGCValidationService,UIAspectRatioConstraint,UIBase,UIComponent,UIConstraint,UICorner,UIDragDetector,UIDragDetectorService,UIFlexItem,UIGradient,UIGridLayout,UIGridStyleLayout,UILayout,UIListLayout,UIPadding,UIPageLayout,UIScale,UIShadow,UISizeConstraint,UIStroke,UITableLayout,UITextSizeConstraint,UnionOperation,UniqueIdLookupService,UniversalConstraint,UnreliableRemoteEvent,UnvalidatedAssetService,UserGameSettings,UserInputService,UserService,UserSettings,UserStorageService,VRService,VRStatusService,ValueBase,ValueCurve,Vector3Curve,Vector3Value,VectorForce,VehicleController,VehicleSeat,VelocityMotor,VersionControlService,VideoCapture,VideoCaptureService,VideoDeviceInput,VideoDisplay,VideoFrame,VideoPlayer,VideoSampler,VideoScreenCaptureService,VideoService,ViewportFrame,VirtualInput,VirtualInputManager,VirtualUser,VisibilityCheckDispatcher,Visit,VisualizationMode,VisualizationModeCategory,VisualizationModeService,VoiceChatInternal,VoiceChatService,VoxelBuffer,WebSocketClient,WebSocketService,WebStreamClient,WebViewService,WedgePart,Weld,WeldConstraint,WindowProtocolService,Wire,WireframeHandleAdornment,Workspace,WorkspaceAnnotation,WorldModel,WorldRoot,WrapDeformMeshProvider,WrapDeformer,WrapLayer,WrapTarget,WrapTextureTransfer`.split(`,`).map((e,t)=>[e,t])),oa=new Set(`WaitForChild`.split(`,`)),R=[`AdvanceToNextPageAsync`,`IntersectAsync,SubtractAsync,UnionAsync`,`IsAvailable`],sa=new Map([[2,`GetCredentialsHeaders,GetDeviceAccessToken,GetDeviceIntegrityTokenYield`],[4,`GrantAchievement,HasAchieved`],[9,`GetAdAvailabilityNowAsync,GetAdAvailabilityNowForUniverseAsync,GetCampaignEligibilityAsync,RegisterAdOpportunityAsync,ShowRewardedVideoAdAsync,ShowRewardedVideoAdAtClientAsync`],[14,`GetPlayerSegmentsAsync`],[18,`GetAnimationClipAsync,GetAnimations,GetAnimationsAsync,GetClipEvaluatorAsync`],[21,`CreateJob,DownloadJobResult,FullProcess,GetJobStatus`],[22,`CreateAnimationByUploadingVideo,ImportVideoWithPrompt`],[32,`CreateOrUpdateChannelPreferenceAsync,CreateOrUpdatePlacePreferenceAsync,GetChannelPreferenceAsync,GetPlacePreferenceAsync`],[33,`GetAppAgeSignalsAsync`],[41,`GetFilesInDirAsync,PickFileWithPromptAsync,PickImageFileWithPrompt,PickMeshFileWithPrompt,PickMultipleFilesWithPrompt,StartSessionWithPathAsync,UploadAssetFromContentAsync,UploadAssetFromPathAsync,UploadVersionedAssetFromContentAsync,UploadVersionedAssetFromPathAsync`],[43,`AddNewPlace,CreateAlias,DeleteAlias,RemovePlace,RenameAlias,RenameModel,RenamePlace`],[45,`FetchAssetQualitySummaryFromGltfAsync,FetchAssetQualitySummaryFromJobIdAsync,FetchAssetQualityValidationEntriesFromModelsAsync,FetchAssetQualityVisualizationDataFromUrlAsync,GenerateAssetQualityGltfFromInstanceAsync`],[46,`CachePartOperationsAsync,CanEditAssetAsync,ComposeDecalAsync,CreateAssetAsync,CreateAssetVersionAsync,CreateDataModelContentAsync,CreateEditableImageAsync,CreateEditableMeshAsync,CreateMeshPartAsync,CreatePlaceAsync,CreatePlaceInPlayerInventoryAsync,CreateSurfaceAppearanceAsync,GetAssetIdsForPackage,GetAssetIdsForPackageAsync,GetAudioMetadataAsync,GetBundleDetailsAsync,GetCreatorAssetID,GetGamePlacesAsync,LoadAssetAsync,PromptCreateAssetAsync,PromptImportAnimationClipFromVideoAsync,SavePlaceAsync,SearchAudio,SearchAudioAsync`],[69,R[0]],[71,`GetWaveformAsync`],[72,`CanRecordAsync,GetUnrecordableInstancesAsync,RecordAsync`],[76,`GetWaveformAsync,LoadAsync`],[83,`GetClientFeaturesAsync,GetServerFeaturesAsync`],[86,`AutoSetupAvatarAsync,CreateCageMeshPartsWithScaleForExportAsync,GenerateAvatar2DPreviewAsync,GenerateAvatarAsync,GetBatchTokenDetailsAsync,LoadAvatar2DPreviewAsync,LoadGeneratedAvatarAsync,PrepareAvatarForPreviewAsync,PromptCreateAvatarAssetAsync,PromptCreateAvatarAsync,PromptCreateMakeupAsync,PromptSelectAvatarGenerationImageAsync,RequestAvatarGenerationSessionAsync,ValidateUGCAccessoryAsync,ValidateUGCBodyPartAsync,ValidateUGCFullBodyAsync`],[87,`CheckApplyDefaultClothing,CheckApplyDefaultClothingAsync,ConformToAvatarRules,ConformToAvatarRulesAsync,GetAvatarRules,GetAvatarRulesAsync,GetBatchItemDetails,GetBatchItemDetailsAsync,GetBundlesByAssetIdAsync,GetFavorite,GetFavoriteAsync,GetHeadShapesAsync,GetInventory,GetInventoryAsync,GetItemDetails,GetItemDetailsAsync,GetOutfitDetails,GetOutfitDetailsAsync,GetOutfits,GetOutfitsAsync,GetRecommendedAssets,GetRecommendedAssetsAsync,GetRecommendedBundles,GetRecommendedBundlesAsync,SearchCatalog,SearchCatalogAsync`],[88,`ImportFBXAnimationFromFilePathUserMayChooseModel,ImportFBXAnimationUserMayChooseModel,ImportFbxRigWithoutSceneLoad,ImportLoadedFBXAnimation,LoadRigAndDetectType`],[93,`AwardBadge,AwardBadgeAsync,CheckUserBadgesAsync,GetBadgeInfoAsync,GetUserBadgesAsync,IsDisabled,IsLegal,UserHasBadge,UserHasBadgeAsync`],[95,R[0]],[98,R[1]],[108,`Invoke`],[129,R[2]],[139,`CheckUploadCaptureStatusAsync,CreatePostAsync,DeleteCapturesAsync,DeleteVideoCaptureAsync,GetCaptureFilePathAsync,GetCaptureSizeAsync,GetCaptureStorageSizeAsync,GetCaptureUploadDataAsync,InternalCheckPlayabilityAsync,InternalGetStartPlaceIdAsync,PromptCaptureGalleryPermissionAsync,ReadCapturesFromGalleryAsync,SaveCapturesToExternalStorageAsync,StartUploadCaptureAsync,StartVideoCaptureAsync,StartVideoCaptureInternalAsync,UploadCaptureAsync`],[140,R[0]],[142,R[0]],[149,`CanUserChatAsync,CanUsersChatAsync,FilterStringAsync,FilterStringForBroadcast,FilterStringForPlayerAsync`],[170,`GetCommerceProductInfoAsync,PrepareCommerceProductPurchase,UserEligibleForRealWorldCommerceAsync`],[174,`GetConfigAsync,GetConfigForPlayerAsync`],[180,`PreloadAsync`],[181,`GetButton`],[195,R[1]],[197,`GetAssetInfoAsync,GetCreatorStoreProductInfoAsync,PerformCreatorStorePurchase`],[207,`GetObjectsAsync,HttpGetAsync,HttpPostAsync,InsertObjectsAndJoinIfLegacyAsync,SavePlace`],[211,`BatchGetAsync,GetAsync,GetVersionAsync,GetVersionAtTimeAsync,IncrementAsync,ListKeysAsync,ListVersionsAsync,RemoveAsync,RemoveVersionAsync,SetAsync,UpdateAsync`],[217,R[0]],[218,R[0]],[221,R[0]],[222,`ListDataStoresAsync`],[224,R[0]],[249,`CommitEdits,GetDrafts,UpdateToLatestVersion`],[267,`CanPromptOptInAsync`],[270,`LoadPlaybackAsync`],[278,`InquiryAsync`],[279,`CheckOrRequestCameraPermission`],[281,`ResolveStateForUser`],[287,`ListFilesInFolderAsync`],[292,R[1]],[297,`EvaluateAsync`],[301,R[1]],[303,R[0]],[304,`GetPlatformFriends`],[306,`PlayerHasPass`],[310,`ConnectAsync,DisconnectAsync,GenerateMeshAsync,GenerateModelAsync,GetVideoGenSessionAsync,GetVideoGenTriggersAsync,InternalGenerateMeshAsync,LoadGeneratedMeshAsync,LoadModelFromGlbAsync,SegmentMeshAsync,StartVideoGenSessionAsync,UpdateVideoGenSessionPromptAsync,UpdateVideoGenSessionTriggersAsync`],[314,`FragmentAsync,HashMeshAsync,IntersectAsync,SubtractAsync,SweepPartAsync,UnionAsync`],[316,`BatchGetAsync,GetAsync,IncrementAsync,RemoveAsync,SetAsync,UpdateAsync`],[322,`GetAlliesAsync,GetEnemiesAsync,GetGroupInfoAsync,GetGroupsAsync,GetRolesInGroupAsync,PromptJoinAsync`],[330,`GetScreenResolution`],[340,`ClientRequestDataAsync,ServerRequestDataAsync`],[343,`GetHeightmapPreviewAsync,ImportHeightmap`],[351,`GetAsync,GetAsyncFullUrl,PostAsync,PostAsyncFullUrl,RequestAsync,RequestLimitedAsync`],[353,`GetAsync,JSONDecodeAsync,JSONEncodeAsync,PostAsync,RequestAccessTokenScopesAsync,RequestAsync`],[354,`ApplyAvatarRules,ApplyDescription,ApplyDescriptionAsync,ApplyDescriptionReset,ApplyDescriptionResetAsync,PlayEmote,PlayEmoteAndGetAnimTrackById,PlayEmoteAsync`],[371,`CreateMeshPartAsync,GetBaseCategories,GetBaseSets,GetCollection,GetFreeDecals,GetFreeDecalsAsync,GetFreeModels,GetFreeModelsAsync,GetLatestAssetVersionAsync,GetUserCategories,GetUserSets,LoadAsset,LoadAssetVersion,LoadAssetWithBytecodeAsync,LoadAssetWithFormat,LoadPackageAssetAsync,loadAsset`],[380,R[1]],[381,R[0]],[389,`GetAnimations,GetAnimationsAsync,GetKeyframeSequenceAsync`],[390,`GetCapabilitiesUsedInPackageAsync`],[398,`OpenUrl,SupportsSwitchToSettingsApp,SwitchToSettingsApp`],[404,`GetCountryRegionForPlayerAsync,GetTranslatorForLocaleAsync,GetTranslatorForPlayerAsync,PromptDownloadGameTableToCSV,PromptExportToCSVs,PromptImportFromCSVs,PromptUploadCSVToGameTable`],[418,`CreateSessionAsync,LoadPostProcessModelAsync`],[419,`ForwardAsync`],[425,`GetAvailableSubscriptionProductsAsync,GetDeveloperProductsAsync,GetProductInfo,GetProductInfoAsync,GetRobloxSubscriptionDetailsAsync,GetRobuxBalance,GetSubscriptionProductInfoAsync,GetSubscriptionPurchaseInfoAsync,GetUserSubscriptionDetailsAsync,GetUserSubscriptionDetailsInternalAsync,GetUserSubscriptionPaymentHistoryAsync,GetUserSubscriptionStatusAsync,GetUsersPriceLevelsAsync,PerformBulkPurchase,PerformCancelSubscription,PerformPurchase,PerformPurchaseV2,PerformSubscriptionPurchase,PerformSubscriptionPurchaseV2,PerformSubscriptionPurchaseV3Async,PerformSubscriptionPurchaseWithRobuxAsync,PlayerOwnsAsset,PlayerOwnsAssetAsync,PlayerOwnsBundle,PlayerOwnsBundleAsync,PromptRobuxTransferAsync,RankProductsAsync,RecommendTopProductsAsync,UserOwnsGamePassAsync`],[427,`GenerateMaterialVariantsAsync`],[433,`GetAsync,ListItemsAsync,RemoveAsync,SetAsync,UpdateAsync`],[434,R[0]],[435,`AddAsync,GetSizeAsync,ReadAsync,RemoveAsync`],[437,`GetAsync,GetRangeAsync,GetSizeAsync,RemoveAsync,SetAsync,UpdateAsync`],[440,R[1]],[444,`PublishAsync,SubscribeAsync`],[448,`DumpToFileAsync`],[450,`CreateReviewableContentAsync,InternalRequestReviewableContentReviewAsync`],[458,R[1]],[468,`GetScheduledNotifications`],[474,`CreateUserNotificationAsync`],[475,`HttpRequestAsync,InvokeAsync`],[477,`BatchGetAsync,GetAsync,GetSortedAsync,IncrementAsync,RemoveAsync,SetAsync,UpdateAsync`],[478,R[0]],[483,`UpdateAsync`],[484,`ConvertToPackageAsync,GetPackageInfo,PublishPackage,SetPackageVersion`],[486,R[0]],[489,R[1]],[491,R[1]],[494,`GetEmulatedPartyAsync`],[497,`CheckOcclusionAsync,ComputeAsync`],[502,`ComputeRawPathAsync,ComputeSmoothPathAsync,FindPathAsync`],[517,R[1]],[518,`GetUserDataAsync,SetUserDataAsync`],[519,`GetPartyMembers`],[521,`GetCanManageAsync,GetFriendsOnline,GetFriendsOnlineAsync,GetFriendsWhoPlayedAsync,GetRankInGroup,GetRankInGroupAsync,GetRoleInGroup,GetRoleInGroupAsync,IsBestFriendsWith,IsFriendsWith,IsFriendsWithAsync,IsInGroup,IsInGroupAsync,LoadCharacter,LoadCharacterAsync,LoadCharacterBlocking,LoadCharacterWithAvatarRules,LoadCharacterWithHumanoidDescription,LoadCharacterWithHumanoidDescriptionAsync,PromptSecurityChallengeAsync,RequestStreamAroundAsync,WaitForDataReady,isFriendsWith,waitForDataReady`],[522,`GetRecordAsync`],[523,`ReleaseAsync,RequestFlushAsync`],[533,`BanAsync,CreateHumanoidModelFromDescription,CreateHumanoidModelFromDescriptionAsync,CreateHumanoidModelFromUserId,CreateHumanoidModelFromUserIdAsync,GetBanHistoryAsync,GetCharacterAppearanceAsync,GetCharacterAppearanceInfoAsync,GetFriendsAsync,GetHumanoidDescriptionFromOutfitId,GetHumanoidDescriptionFromOutfitIdAsync,GetHumanoidDescriptionFromUserId,GetHumanoidDescriptionFromUserIdAsync,GetNameFromUserIdAsync,GetProfileConfigurationFromUserIdAsync,GetUserIdFromNameAsync,GetUserThumbnailAsync,UnbanAsync`],[534,`CreateDockWidgetPluginGui,CreateDockWidgetPluginGuiAsync,CreateQWidgetPluginGui,ImportFbxAnimation,ImportFbxAnimationAsync,ImportFbxRig,ImportFbxRigAsync,PromptForExistingAssetId,PromptForExistingAssetIdAsync,PromptSaveSelection,PromptSaveSelectionAsync`],[543,`GetOTAPluginVersion`],[546,`ShowAsync`],[552,`AwardPoints,GetGamePointBalance,GetPointBalance`],[553,`CanViewBrandProjectAsync,GetPolicyInfoForPlayerAsync,GetPolicyInfoForServerRobloxOnlyAsync`],[561,`WaitForGenerationAsync`],[565,`CreateAssetAndWaitForAssetId,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsync,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsyncWithAddParam,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsyncWithAddParamErrorJson,PublishCageMeshAsync,PublishDescendantAssetsAsync`],[571,`ConnectAsync`],[572,R[0]],[573,`GenerateItemListAsync,GetRecommendationItemAsync,RegisterItemAsync,RemoveItemAsync,UpdateItemAsync`],[589,`ExecuteCommandAsync`],[593,`InvokeClient,InvokeServer`],[626,`GetAnimationMemoryAsync,GetAudioMemoryAsync,GetInstanceCompositionAsync,GetScriptMemoryAsync,GetTriangleCompositionAsync,GetUnparentedInstancesAsync`],[639,`CloseAsync,EditTextAsync,ForceSetSelectionAsync,MultiEditTextAsync,RequestSetSelectionAsync,ReviewableTextEditsAsync`],[640,`EditSourceAsyncWithRanges,OpenScriptDocumentAsync,UpdateSourceAsync`],[646,R[1]],[656,`DeserializeInstancesAsync,SerializeInstancesAsync`],[668,R[1]],[682,`CanSendCallInviteAsync,CanSendGameInviteAsync,GetEventRsvpStatusAsync,GetExperienceEventAsync,GetPartyAsync,GetUpcomingExperienceEventsAsync,PromptFeedbackSubmissionAsync,PromptLinkSharing,PromptLinkSharingAsync,PromptRsvpToEventAsync`],[687,`EndRecording,GetRecordingDevices`],[690,R[1]],[698,R[0]],[702,`GetCore`],[707,`GetPaginatedMemoryByTexture`],[714,`AutoSetupAvatarAsync,AutoSetupSerializedAvatarAsync,CancelAutoSetupAvatarAsync,DEPRECATED_SerializeInstances,PromptSaveInstanceToRobloxAsync,RequestAvatarAutosetupAsync,SerializeInstances`],[718,`RequestScreenshotPermissionAsync`],[720,`EmulatePCDeviceWithResolution,GetCurrentDeviceId,GetCurrentOrientation,HasDeviceWithId,SetCurrentDeviceId,SetCurrentOrientation`],[721,`CreateDeviceAsync,GetDeviceAsync,GetDeviceInfoAsync,GetDeviceListAsync,GetOrientationAsync,GetPixelDensityAsync,GetResolutionAsync,GetScalingModeAsync,RemoveDeviceAsync,SetDeviceAsync,SetOrientationAsync,SetPixelDensityAsync,SetResolutionAsync,SetScalingModeAsync,StopSimulationAsync,UpdateDeviceAsync`],[724,`ScaleAsync`],[727,`PromptImportFile,PromptImportFileAsync,PromptImportFiles,PromptImportFilesAsync,TryInstallPlugin`],[728,`ExecuteMultiplayerTestAsync,ExecutePlayModeAsync,ExecuteRunModeAsync`],[748,`getSystemThemeAsync`],[758,`GetPlayerPlaceInstanceAsync,PromptExperienceDetailsAsync,ReserveServer,ReserveServerAsync,TeleportAsync,TeleportPartyAsync,UnblockAsync`],[761,`DrawBufferAsync,IntersectAsync,ReadBufferAsync,SubtractAsync,UnionAsync`],[769,`CaptureScreenshotAsync,RequestValidationAsync,Run,RunAsync,StartVideoCaptureAsync,StopVideoCaptureAsync`],[773,`AddUserAsync,SendAsync,SendDictatedSpeechAsync,SendInternalAsync,SendPresetAsync`],[779,`CanUserChatAsync,CanUsersChatAsync,CanUsersDirectChatAsync,CanUsersWhisperAsync,GetChatGroupsAsync,GetChatableUserCountAsync,GetPresetsAsync,OnUserChatSettingUpdateAsync,SendDictatedSpeechUniverseChatAsync,SendUniverseChatMessageAsync,SendUniverseChatPresetAsync`],[780,`GetChatForUserAsync,GetNonChatStringForBroadcastAsync,GetNonChatStringForUserAsync`],[782,`GenerateTextAsync`],[784,`FilterAndTranslateStringAsync,FilterStringAsync,GetFamilyInfoAsync,GetTextBoundsAsync,GetTextSizeOffsetAsync`],[788,`GetQuotasAsync`],[790,`RegisterActiveUser`],[807,R[1]],[808,R[1]],[814,`CalculateBodyMaxCageDistance,CanLoadAsset,CreateEditableImageOriginalSizeAsync,DoesMeshHaveSkinningData,DoesSurfaceAppearanceMatchTexturePackAsync,FetchAssetWithFormat,GetMeshDataBinaryString,GetMeshVerts,IsDeformedLayeredClothingOutOfRenderBounds`],[836,R[1]],[843,`GetUserFromGlobalUserIdAsync,GetUserInfosByUserIdsAsync`],[854,R[1]],[862,`LoadAsync`],[863,`GetSamplesAtTimesAsync`],[865,`CreateVideoSamplerAsync`],[866,`CaptureSnapshotAsync`],[868,`WaitForInputEventsProcessed`],[875,`IsVoiceEnabledForUserIdAsync`],[876,`GetChatGroupsAsync,IsVoiceEnabledForUserIdAsync`],[877,`ClearAsync,DrawBufferAsync,FromHeightmapAsync,NormalizeAsync,UnclampAsync`],[881,R[2]],[882,R[1]],[893,`CreateEditableMeshAsync,GetDeformedCFrameAsync`]]),ca=new Map;function la(e,t){let n=aa.get(e);if(n===void 0)return!1;if(oa.has(t))return!0;let r=ca.get(n);if(r!==void 0)return r.has(t);let i=sa.get(n);if(i===void 0)return!1;let a=new Set(i.split(`,`));return ca.set(n,a),a.has(t)}const ua=[`PlanckSystem`,`System`,`SystemFunction`,`SystemReturn`,`SystemTableLike`],da=new Set([`comments`,`loc`,`parent`,`range`,`tokens`]);function fa(e,t){if(e.type===`Identifier`)return e.name;if(t&&e.type===`TSQualifiedName`)return fa(e.right,t)}function pa(e,t=!0){if(e!=null){if(e.type===`TSTypeAnnotation`)return pa(e.typeAnnotation,t);if(e.type===`TSUnionType`){let n;for(let r of e.types){if(r.type===`TSUndefinedKeyword`||r.type===`TSNullKeyword`)continue;let e=pa(r,t);if(e===void 0||n!==void 0)return;n=e}return n}if(e.type===`TSTypeReference`)return fa(e.typeName,t)}}function ma(e,t){let n=pa(e);return n!==void 0&&t.has(n)}function ha(e,t){for(let n of Object.keys(e)){if(da.has(n))continue;let r=Reflect.get(e,n);r!=null&&t.push(r)}}function ga(e,t){let n=[e];for(;n.length>0;){let e=n.pop();if(!(typeof e!=`object`||!e)){if(Array.isArray(e)){for(let t of e)n.push(t);continue}D(e)&&t(e)!==!1&&ha(e,n)}}}function _a(e){if(e.type===`Property`)return e.computed?e.key.type===`Literal`&&typeof e.key.value==`string`?e.key.value:void 0:e.key.type===`Identifier`?e.key.name:e.key.type===`Literal`&&typeof e.key.value==`string`?e.key.value:void 0}function va(e,t,n){for(let r of e.properties)if(_a(r)===`system`&&r.type===`Property`){if(N(r.value))n.add(r.value);else if(r.value.type===`Identifier`){let e=t.get(r.value.name);e!==void 0&&n.add(e)}}}function ya(e){if(e.type===`ImportSpecifier`)return e.imported.type===`Identifier`?e.imported.name:e.imported.value}function ba(e,t){let n=new Map;for(let r of e.body){if(r.type!==`ImportDeclaration`||typeof r.source.value!=`string`)continue;let e=t.getDeclaredVariables(r);for(let t of r.specifiers){let i=ya(t);if(i===void 0)continue;let a=e.find(e=>e.name===t.local.name);a!==void 0&&n.set(a,{imported:i,source:r.source.value})}}return n}function xa(e){let t=[],n=w(e);for(;n.type===`MemberExpression`;){let e=T(n);if(e===void 0)return;t.unshift(e),n=w(n.object)}return n.type===`Identifier`?{path:t,root:n}:void 0}function Sa(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function Ca(e){if(e.type===`Identifier`)return[e.name];if(e.type!==`MemberExpression`)return;let t=xa(e);return t===void 0?void 0:[t.root.name,...t.path]}function wa(e,t){return E(e.getScope(t),t.name)}function Ta(e,t,n,r,i){ga(e,e=>{if(e.type!==`CallExpression`||e.callee.type!==`MemberExpression`)return;let a=xa(e.callee);if(a===void 0)return;let o=wa(t,a.root),s=o===void 0?void 0:n.get(o);if(s!==void 0)for(let n of r){if(s.source!==n.source||s.imported!==n.imported||!Sa(a.path,n.memberPath))continue;let r=e.arguments[n.callbackArgumentIndex];if(r===void 0||r.type===`SpreadElement`||!N(r))continue;let o=r.params[n.parameterIndex];if(o?.type!==`Identifier`)continue;let c=wa(t,o);c!==void 0&&i.set(c,n.className)}})}function Ea(e,t,n,r){ga(e,e=>{if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){let i=e.id.name,a=pa(e.id.typeAnnotation,!1);if(a===void 0||n.has(a))return;let o=t.getDeclaredVariables(e).find(e=>e.name===i);o!==void 0&&r.set(o,a);return}if(!N(e))return;let i=new Map(t.getDeclaredVariables(e).map(e=>[e.name,e]));for(let t of e.params){if(t.type!==`Identifier`)continue;let e=t.name,a=pa(t.typeAnnotation,!1);if(a===void 0||n.has(a))continue;let o=i.get(e);o!==void 0&&r.set(o,a)}})}function Da(e){let t=new Set;return ga(e,e=>{if(e.type===`ImportDeclaration`){for(let n of e.specifiers)t.add(n.local.name);return!1}return(e.type===`TSInterfaceDeclaration`||e.type===`TSTypeAliasDeclaration`||e.type===`ClassDeclaration`||e.type===`TSEnumDeclaration`)&&e.id!==null&&t.add(e.id.name),!0}),t}function Oa(e,t){let n=wa(t,e);if(n?.defs.length!==1)return;let[r]=n.defs;if(r?.node.type!==`VariableDeclarator`)return;let i=r.node.parent;if(i.type===`VariableDeclaration`&&i.kind===`const`)return r.node.init??void 0}function ka(e,t){let n=wa(t,e);if(n?.defs.length!==1)return;let[r]=n.defs;if(r===void 0)return;if(N(r.node))return r.node;if(r.node.type!==`VariableDeclarator`||r.node.init===null)return;let i=w(r.node.init);return N(i)?i:void 0}function Aa(e,t){let n=w(e);return N(n)?n:n.type===`Identifier`?ka(n,t):void 0}function ja(e,t,n,r,i){let a=w(e);if(a.type===`Identifier`)return Ma(a,t,n,r,i);if(!(a.type===`CallExpression`&&a.callee.type===`MemberExpression`&&T(a.callee)===`GetService`&&a.callee.object.type===`Identifier`&&a.callee.object.name===`game`&&!ae(t,a.callee.object,`game`)))return;let[o]=a.arguments;return o?.type===`Literal`&&typeof o.value==`string`?o.value:void 0}function Ma(e,t,n,r,i){let a=wa(t,e);if(a!==void 0){let e=r.get(a);if(e!==void 0)return e;let t=n.get(a);if(t?.source===`@rbxts/services`)return t.imported}let o=Oa(e,t);if(!(o===void 0||i.has(o)))return i.add(o),ja(o,t,n,r,i)}function Na(e,t,n,r){if(e.callee.type!==`MemberExpression`)return!1;let i=T(e.callee);if(i===void 0)return!1;let a=ja(e.callee.object,t,n,r,new Set);return a!==void 0&&la(a,i)}function Pa(e,t){let n=new Set;if(e.body===null)return n;if(e.body.type!==`BlockStatement`){let r=Aa(e.body,t);return r!==void 0&&n.add(r),n}return ga(e.body,e=>{if(N(e))return!1;if(e.type!==`ReturnStatement`||e.argument===null)return!0;let r=Aa(e.argument,t);return r!==void 0&&n.add(r),!1}),n}function Fa(e,t,n){let r=new Set,i=Ca(e.callee);if(i===void 0)return r;for(let a of n)if(Sa(i,a.calleePath))for(let n of a.callbackArgumentIndexes){let i=e.arguments[n];if(i===void 0||i.type===`SpreadElement`)continue;let a=Aa(i,t);a!==void 0&&r.add(a)}return r}function Ia(e,t,n,r,i,a){if(e.async)return;let o=new Set;function s(e){e.async||e.body===null||o.has(e)||(o.add(e),ga(e.body,o=>{if(N(o)&&o!==e)return!1;if(o.type!==`CallExpression`)return!0;Na(o,t,n,r)&&a(o);for(let e of Fa(o,t,i))s(e);return!0}))}let c=Pa(e,t),l=c.size===0?[e]:c;for(let e of l)s(e)}const La=_(`no-async-in-system`,`roblox`,{create(e){let t=e.options[0]?.additionalSystemTypeNames??[],n=e.options[0]?.callbackParameterTypes??[],r=e.options[0]?.synchronousCallbacks??[],i=new Set([...ua,...t]);return{"Program:exit"(t){let a=new Map,o=new Set,s=[],c=ba(t,e.sourceCode),l=new Map;Ea(t,e.sourceCode,Da(t),l),Ta(t,e.sourceCode,c,n,l),ga(t,e=>{if(N(e)){e.id!==null&&a.set(e.id.name,e),ma(e.returnType,i)&&o.add(e);return}if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){if(!ma(e.id.typeAnnotation,i)||e.init===null)return;N(e.init)?o.add(e.init):e.init.type===`ObjectExpression`&&s.push(e.init);return}e.type===`TSSatisfiesExpression`&&ma(e.typeAnnotation,i)&&e.expression.type===`ObjectExpression`&&s.push(e.expression)});for(let e of s)va(e,a,o);for(let t of o)Ia(t,e.sourceCode,c,l,r,t=>{e.report({messageId:`noAsyncInSystem`,node:t})})}}},meta:{docs:{description:`Disallow yielding Roblox API calls in synchronous Planck system execution.`,recommended:!0},messages:{noAsyncInSystem:`Do not call a yielding Roblox API from a synchronous Planck system.`},schema:[{additionalProperties:!1,properties:{additionalSystemTypeNames:{items:{type:`string`},type:`array`,uniqueItems:!0},callbackParameterTypes:{items:{additionalProperties:!1,properties:{callbackArgumentIndex:{minimum:0,type:`integer`},className:{type:`string`},imported:{type:`string`},memberPath:{items:{type:`string`},type:`array`},parameterIndex:{minimum:0,type:`integer`},source:{type:`string`}},required:[`callbackArgumentIndex`,`className`,`imported`,`memberPath`,`parameterIndex`,`source`],type:`object`},type:`array`},synchronousCallbacks:{items:{additionalProperties:!1,properties:{callbackArgumentIndexes:{items:{minimum:0,type:`integer`},minItems:1,type:`array`,uniqueItems:!0},calleePath:{items:{type:`string`},minItems:1,type:`array`}},required:[`callbackArgumentIndexes`,`calleePath`],type:`object`},type:`array`}},type:`object`}],type:`problem`}}),Ra=new Set([`useAsyncEffect`,`useEffect`,`useInsertionEffect`,`useLayoutEffect`,`useMountEffect`,`useReactiveEffect`,`useUnmountEffect`,`useUpdateEffect`]),za=_(`no-cascading-set-state`,`react`,{create(e){return{CallExpression(t){let n=L(t);if(n===void 0||!Ra.has(n))return;let r=Ii(t);if(r===void 0)return;let i=Gi(r);i<3||e.report({data:{count:String(i)},messageId:`cascadingSetState`,node:t})}}},meta:{docs:{description:`Disallow effect hooks with many cascading state updates.`,recommended:!0},messages:{cascadingSetState:`{{count}} setState calls in a single useEffect — consider using useReducer or deriving state`},type:`problem`}});function Ba(e){return Math.round(e>1?e:e*255)}function Va(e){return{reportUnknownComponents:typeof e==`object`&&e&&`reportUnknownComponents`in e?e.reportUnknownComponents===!0:!0}}function Ha(e){let t=[],n=0,r=!0;for(let i of e){if(!Ge(i))return;let e=Ba(i.value);t[n++]=e,e!==0&&(r=!1)}return[r,t]}const Ua=_(`no-color3-constructor`,`roblox`,{create(e){let t=Va(e.options[0]);return{NewExpression(n){if(!Le(n,`Color3`))return;let r=n.arguments;if(r.length===0)return;let i=Ha(r);if(!i){t.reportUnknownComponents&&e.report({messageId:r.length<3?`useFromRGB`:`onlyZeroArgs`,node:n});return}if(r.length<3){let[t,r=0]=i[1];e.report({fix:e=>e.replaceText(n,`Color3.fromRGB(${t}, ${r}, 0)`),messageId:`useFromRGB`,node:n});return}i[0]||e.report({fix:e=>e.replaceText(n,`Color3.fromRGB(${i[1].join(`, `)})`),messageId:`onlyZeroArgs`,node:n})}}},meta:{docs:{description:`Ban new Color3(...) except new Color3() or new Color3(0, 0, 0). Use Color3.fromRGB() instead.`},fixable:`code`,messages:{onlyZeroArgs:`Use Color3.fromRGB() instead of new Color3(). new Color3() uses floats [0-1] and performs worse than Color3.fromRGB() which uses [0-255]. Only 'new Color3()' or 'new Color3(0, 0, 0)' are allowed.`,useFromRGB:`Use Color3.fromRGB() instead of new Color3(). new Color3() uses floats [0-1] and performs worse than Color3.fromRGB() which uses [0-255].`},schema:[{additionalProperties:!1,properties:{reportUnknownComponents:{default:!0,description:`Report new Color3(...) calls when one or more components are not numeric literals.`,type:`boolean`}},type:`object`}],type:`problem`}});function Wa(e,t){let n=e.scan(t);return n===0?0:1-(1-e.probability)**n}function Ga(e,t){let n=0;for(let r of e){let e=Wa(r,t);n=1-(1-n)*(1-e)}return n}function Ka(e,t){return Ga(e,t)>=.9}function qa(e,t){return t.some(t=>Ka(e,t))}function Ja(e){return{probability:e,scan(e){for(let t=0;t<e.length-1;t+=1){let n=e.charAt(t),r=e.charAt(t+1);if(n===n.toLowerCase()&&r===r.toUpperCase()&&r!==r.toLowerCase())return 1}return 0}}}const Ya=/\s+/gu;function Xa(e,t){if(t===``)return e.length+1;let n=0,r=0;for(;r<=e.length-t.length;){let i=e.indexOf(t,r);if(i===-1)break;n+=1,r=i+t.length}return n}function Za(e,t){let n=t.map(e=>y(e)?{pattern:e,type:`string`}:{pattern:new RegExp(e.source,`gu`),type:`regexp`});return{probability:e,scan(e){let t=e.replace(Ya,``),r=0;for(let e of n){if(e.type===`string`){r+=Xa(t,e.pattern);continue}e.pattern.lastIndex=0;let n=t.match(e.pattern);n&&(r+=n.length)}return r}}}const Qa=/\s/u;function $a(e,t){let n=new Set(t);return{probability:e,scan(e){for(let t=e.length-1;t>=0;--t){let r=e.charAt(t);if(n.has(r))return 1;if(!Qa.test(r)&&r!==`*`&&r!==`/`)return 0}return 0}}}const eo=/[ \t(),{}]/u;function to(e,t){let n=new Set(t);return{probability:e,scan(e){let t=e.split(eo),r=0;for(let e of t)n.has(e)&&(r+=1);return r}}}const no=`public.abstract.class.implements.extends.return.throw.private.protected.enum.continue.assert.boolean.this.instanceof.interface.static.void.super.true.case:.let.const.var.async.await.break.yield.typeof.import.export`.split(`.`),ro=[`++`,`||`,`&&`,`===`,`?.`,`??`],io=[`for(`,`if(`,`while(`,`catch(`,`switch(`,`try{`,`else{`,`this.`,`window.`,/;\s+\/\//u,`import '`,`import "`,`require(`],ao=[`}`,`;`,`{`];function oo(){return[$a(.95,ao),to(.7,ro),to(.3,no),Za(.95,io),Ja(.5)]}const so=new Set([`BreakStatement`,`ContinueStatement`,`LabeledStatement`]);function co(e){return so.has(e.type)}function lo(e){return{comments:e,value:e.map(({value:e})=>e).join(`
5
+ `&&--g;break}return u.push(e.removeRange([g,m])),u}const Ci=_(`no-array-constructor-index-assignment`,`roblox`,{create(e){let{sourceCode:t}=e;function n(n){let r=0;for(;r<n.length;){let i=xi(t,n,r);if(i===void 0){r+=1;continue}e.report({fix(e){return Si(e,t,i)},messageId:`preferArrayLiteral`,node:i.declaration}),r=n.indexOf(i.lastAssignmentStatement)+1}}return{BlockStatement(e){n(e.body)},Program(e){n(e.body)}}},meta:{docs:{description:`Disallow new Array<T>() followed by contiguous index assignments; use an array literal instead.`},fixable:`code`,messages:{preferArrayLiteral:`Use an array literal instead of new Array<T>() followed by index assignments.`},schema:[],type:`suggestion`}});function wi(e){return typeof e!=`object`||!e?!1:`allowAutofix`in e?e.allowAutofix===void 0||typeof e.allowAutofix==`boolean`:!0}function Ti(e,t,n){if(e.type!==t.type)return!1;switch(e.type){case`CallExpression`:return t.type===`CallExpression`&&n.getText(e)===n.getText(t);case`Identifier`:return t.type===`Identifier`&&e.name===t.name;case`Literal`:return t.type===`Literal`&&e.value===t.value&&e.raw===t.raw;case`MemberExpression`:return t.type===`MemberExpression`&&Ei(e,t,n);case`Super`:return t.type===`Super`;case`ThisExpression`:return t.type===`ThisExpression`;default:return!1}}function Ei(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!Ti(e.object,t.object,n)?!1:e.computed?Di(e.property,t.property,n):Oi(e.property,t.property)}function Di(e,t,n){return it(e)&&it(t)&&Ti(e,t,n)}function Oi(e,t){return e.type===`PrivateIdentifier`||t.type===`PrivateIdentifier`?e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`&&e.name===t.name:t.type===`Identifier`&&e.type===`Identifier`&&e.name===t.name}function ki(e,t){switch(e.type){case`Identifier`:case`ThisExpression`:return!0;case`Literal`:return t;case`MemberExpression`:return e.optional||!ki(e.object,!1)?!1:e.computed?it(e.property)?ki(e.property,!0):!1:e.property.type===`Identifier`||e.property.type===`PrivateIdentifier`;default:return!1}}function Ai(e){return ki(e,!1)}function ji(e){return e.type!==`CallExpression`||e.optional||e.arguments.length>0||e.callee.type!==`MemberExpression`||e.callee.optional||e.callee.computed||e.callee.property.type!==`Identifier`?!1:e.callee.property.name===`size`}function Mi(e,t,n){if(!(e.operator!==`=`||e.left.type!==`MemberExpression`||!e.left.computed)){if(n===`roblox-ts`&&ji(e.left.property))return Ti(e.left.object,e.left.property.callee.object,t)?e.left:void 0;if(n===`standard`){let{property:n}=e.left;if(n.type===`MemberExpression`&&!n.optional&&!n.computed&&n.property.type===`Identifier`&&n.property.name===`length`)return Ti(e.left.object,n.object,t)?e.left:void 0}}}const Ni=_(`no-array-size-assignment`,`roblox`,{create(e){let[t]=e.options,n=wi(t)&&t.allowAutofix,r=t?.environment===`standard`?`standard`:`roblox-ts`,{sourceCode:i}=e;return{AssignmentExpression(t){let a=Mi(t,i,r);if(a===void 0)return;let o=t.parent.type===`ExpressionStatement`?t.parent:void 0;if(!(n&&o!==void 0&&Ai(a.object))){e.report({messageId:`usePush`,node:t});return}let s=i.getText(a.object),c=i.getText(t.right);e.report({fix(e){return e.replaceText(o,`${s}.push(${c});`)},messageId:`usePush`,node:t})}}},meta:{docs:{description:`Disallow array append assignments using array[array.size()] = value (roblox-ts) or array[array.length] = value (standard) and prefer push-based appends.`},fixable:`code`,messages:{usePush:`Do not append with array[array.size()] = value or array[array.length] = value. Use array.push(value) instead.`},schema:[{additionalProperties:!1,properties:{allowAutofix:{default:!1,description:`Allow the fixer to replace safe append assignments with array.push(value).`,type:`boolean`},environment:{...dr,default:`roblox-ts`,description:`Array environment mode: 'roblox-ts' checks array[array.size()]; 'standard' checks array[array.length].`}},type:`object`}],type:`problem`}}),Pi=/^set[A-Z]/u;function L({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`&&e.property.type===`Identifier`)return e.property.name}function Fi(e){return Pi.test(e)}function Ii(e){let[t]=e.arguments;return t?.type===`ArrowFunctionExpression`||t?.type===`FunctionExpression`?t:void 0}function Li(e,t){let n=[e];for(let e of n)t(e),zi(e,n)}function Ri(e,t){let n=[e];for(let e of n){t(e);for(let t of Object.values(e))Hi(t,e,n)}}function zi(e,t){for(let n in e)ce(n)||Bi(Reflect.get(e,n),e,t)}function Bi(e,t,n){if(!(typeof e!=`object`||!e||e===t.parent)){if(Array.isArray(e)){Vi(e,t,n);return}D(e)&&n.push(e)}}function Vi(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];i!==t.parent&&D(i)&&n.push(i)}}function Hi(e,t,n){if(Array.isArray(e)){for(let r of e)Hi(r,t,n);return}e===t.parent||!D(e)||n.push(e)}function Ui(e){let{key:t}=e;if(t.type===`Identifier`)return t.name;if(t.type===`Literal`&&y(t.value))return t.value}function Wi(e){let{value:t}=e;if(t.type===`Identifier`)return t;if(t.type===`AssignmentPattern`&&t.left.type===`Identifier`)return t.left}function Gi(e){let t=0;return Li(e,e=>{e.type===`CallExpression`&&e.callee.type===`Identifier`&&Fi(e.callee.name)&&(t+=1)}),t}function Ki(e,t,n,r,i){if(t===void 0)return 0;if(t.type===`SpreadElement`)return 3;let a=C(t);return a.type===`ArrayExpression`?a.elements.length===0?1:i(e,a,n,r)?2:3:3}const qi=new Set([`catch`,`finally`,`then`]);function Ji(e){let t=new Set;for(let n of e.body)n.type!==`MethodDefinition`||n.kind!==`method`||!n.value.async||n.key.type===`Identifier`&&t.add(n.key.name);return t}function Yi(e){return e.callee.type!==`MemberExpression`||e.callee.property.type!==`Identifier`?!1:qi.has(e.callee.property.name)}function Xi({callee:e}){let t=C(e);return Ie(t)&&t.async}function Zi({callee:e},t){if(e.type===`MemberExpression`&&e.object.type===`ThisExpression`&&e.property.type===`Identifier`)return t.has(e.property.name)?e.property.name:void 0}function Qi(e){let{parent:t}=e;return t?.type!==`AssignmentExpression`||t.right!==e?!1:t.left.type===`MemberExpression`&&t.left.object.type===`ThisExpression`}function $i(e){let{parent:t}=e;if(t?.type===`VariableDeclarator`&&t.init===e)return t.id.type===`Identifier`?t.id.name:void 0}function ea(e){return!Ie(e)||e.parent.type===`ParenthesizedExpression`&&e.parent.parent.type===`CallExpression`&&e.parent.parent.callee===e.parent?!1:e.parent.type!==`CallExpression`||e.parent.callee!==e}function ta(e,t){let n=e;for(;n!==t;){let{parent:e}=n;if(e===null)return!1;if(ea(e))return!0;n=e}return!1}function na(e,t){let n=Zi(e,t);if(n===void 0||Qi(e))return;if(e.parent.type===`ExpressionStatement`)return{data:{methodName:n},messageId:`unhandledAsyncCall`,node:e};let r=$i(e);if(r!==void 0)return{data:{variableName:r},messageId:`orphanedPromise`,node:e}}function ra(e,t){let n=[],r=0;function i(i){if(i!==e&&ta(i,e))return;if(i.type===`AwaitExpression`){n[r++]={messageId:`awaitInConstructor`,node:i};return}if(i.type!==`CallExpression`)return;Yi(i)&&(n[r++]={messageId:`promiseChainInConstructor`,node:i}),Xi(i)&&(n[r++]={messageId:`asyncIifeInConstructor`,node:i});let a=na(i,t);a!==void 0&&(n[r++]=a)}return Ri(e,i),n}const ia=_(`no-async-constructor`,`general`,{create(e){function t(t){e.report({data:t.data,messageId:t.messageId,node:t.node})}return{"MethodDefinition[kind='constructor']"(e){if(e.value.type!==`FunctionExpression`||e.value.body?.type!==`BlockStatement`||e.parent.type!==`ClassBody`)return;let n=Ji(e.parent),r=e.value.body,i=ra(r,n);for(let e of i)t(e)}}},meta:{docs:{description:`Disallow asynchronous operations inside class constructors. Constructors return immediately, so async work causes race conditions, unhandled rejections, and incomplete object states.`},messages:{asyncIifeInConstructor:`Refactor this asynchronous operation outside of the constructor. Async IIFEs create unhandled promises and incomplete object state.`,awaitInConstructor:`Refactor this asynchronous operation outside of the constructor. Using 'await' in a constructor causes the class to be instantiated before the async operation completes.`,orphanedPromise:`Refactor this asynchronous operation outside of the constructor. Promise assigned to '{{variableName}}' is never consumed - errors will be silently swallowed.`,promiseChainInConstructor:`Refactor this asynchronous operation outside of the constructor. Promise chains (.then/.catch/.finally) in constructors lead to race conditions.`,unhandledAsyncCall:`Refactor this asynchronous operation outside of the constructor. Calling async method '{{methodName}}' without handling its result creates uncontrolled async behavior.`},schema:[],type:`problem`}}),aa=new Map(`Accessory,AccessoryDescription,AccountService,Accoutrement,AchievementService,ActivityHistoryEventService,Actor,AdGui,AdPortal,AdService,AdvancedDragger,AirController,AlignOrientation,AlignPosition,AnalyticsService,AngularVelocity,Animation,AnimationClip,AnimationClipProvider,AnimationConstraint,AnimationController,AnimationFromVideoCreatorService,AnimationFromVideoCreatorStudioService,AnimationGraphDefinition,AnimationImportData,AnimationNode,AnimationNodeDefinition,AnimationRigData,AnimationStreamTrack,AnimationTrack,Animator,Annotation,AnnotationsService,AppAgeSignalsService,AppLifecycleObserverService,AppRatingPromptService,AppStorageService,AppUpdateService,ArcHandles,AssetCounterService,AssetDeliveryProxy,AssetImportService,AssetImportSession,AssetManagerService,AssetPatchSettings,AssetQualityService,AssetService,AssetSoundEffect,Atmosphere,AtmosphereSensor,Attachment,AudioAnalyzer,AudioChannelMixer,AudioChannelSplitter,AudioChorus,AudioCompressor,AudioDeviceInput,AudioDeviceOutput,AudioDistortion,AudioEcho,AudioEmitter,AudioEqualizer,AudioFader,AudioFilter,AudioFlanger,AudioFocusService,AudioGate,AudioLimiter,AudioListener,AudioPages,AudioPitchShifter,AudioPlayer,AudioRecorder,AudioReverb,AudioSearchParams,AudioSpeechToText,AudioTextToSpeech,AudioTremolo,AuroraScriptObject,AvatarAbilityRules,AvatarAccessoryRules,AvatarAnimationRules,AvatarBodyRules,AvatarChatService,AvatarClothingRules,AvatarCollisionRules,AvatarCreationService,AvatarEditorService,AvatarImportService,AvatarRules,AvatarSettings,Backpack,BackpackItem,BadgeService,BallSocketConstraint,BanHistoryPages,BaseCoreGuiConfiguration,BaseImportData,BasePart,BasePlayerGui,BaseRemoteEvent,BaseScript,BaseWrap,Beam,BevelMesh,BillboardGui,BinaryStringValue,BindableEvent,BindableFunction,BlockMesh,BloomEffect,BlurEffect,BodyAngularVelocity,BodyColors,BodyForce,BodyGyro,BodyMover,BodyPartDescription,BodyPosition,BodyThrust,BodyVelocity,Bone,BoolValue,BoxHandleAdornment,Breakpoint,BrickColorValue,BrowserService,BubbleChatConfiguration,BubbleChatMessageProperties,BugReporterService,BulkImportService,BuoyancySensor,CFrameValue,CSGDictionaryService,CacheableContentProvider,CalloutService,Camera,CanvasGroup,Capture,CaptureService,CapturesPages,CapturesViewConfiguration,CatalogPages,ChangeHistoryService,ChangeHistoryStreamingService,ChannelSelectorSoundEffect,ChannelTabsConfiguration,CharacterAppearance,CharacterMesh,Chat,ChatInputBarConfiguration,ChatWindowConfiguration,ChatWindowMessageProperties,ChorusSoundEffect,ClickDetector,ClientReplicator,ClientStorageService,ClimbController,Clothing,CloudCRUDService,CloudExecutionService,CloudLocalizationTable,Clouds,ClusterPacketCache,Collaborator,CollaboratorsService,CollectionService,Color3Value,ColorCorrectionEffect,ColorGradingEffect,CommerceService,CompositeValueCurve,CompressorSoundEffect,ConeHandleAdornment,ConfigService,ConfigSnapshot,Configuration,ConfigureServerService,ConnectivityService,Constraint,ContentProvider,ContextActionService,Controller,ControllerBase,ControllerManager,ControllerPartSensor,ControllerSensor,ControllerService,CookiesService,CoreGui,CoreGuiConfiguration,CorePackages,CoreScript,CoreScriptDebuggingManagerHelper,CoreScriptSyncService,CornerWedgePart,CreationDBService,CreatorStoreService,CrossDMScriptChangeListener,CurveAnimation,CustomEvent,CustomEventReceiver,CustomLog,CustomSoundEffect,CylinderHandleAdornment,CylinderMesh,CylindricalConstraint,DataModel,DataModelMesh,DataModelPatchService,DataModelSession,DataStore,DataStoreGetOptions,DataStoreIncrementOptions,DataStoreInfo,DataStoreKey,DataStoreKeyInfo,DataStoreKeyPages,DataStoreListingPages,DataStoreObjectVersionInfo,DataStoreOptions,DataStorePages,DataStoreService,DataStoreSetOptions,DataStoreVersionPages,Debris,DebugSettings,DebuggablePluginWatcher,DebuggerBreakpoint,DebuggerConnection,DebuggerConnectionManager,DebuggerLuaResponse,DebuggerManager,DebuggerUIService,DebuggerVariable,DebuggerWatch,Decal,DeferredAssetManagerService,DepthOfFieldEffect,DesignFoundationsService,DeviceDisplayService,DeviceIdService,Dialog,DialogChoice,DigitsRigDescription,DisplayWakeLock,DistortionSoundEffect,DockWidgetPluginGui,DoubleConstrainedValue,DraftsService,DragDetector,Dragger,DraggerService,DynamicRotate,EchoSoundEffect,EditableImage,EditableMesh,EditableService,EditorSourceService,EncodingService,EqualizerSoundEffect,EulerRotationCurve,EventIngestService,ExampleV2Service,ExecutedRemoteCommand,ExperienceAuthService,ExperienceInviteOptions,ExperienceNotificationService,ExperienceService,ExperienceStateCaptureService,ExperienceStateRecordingService,ExplorerFilter,ExplorerFilterAutocompleter,ExplorerServiceVisibilityService,Explosion,FaceAnimatorService,FaceControls,FaceInstance,FacialAgeEstimationService,FacialAnimationRecordingService,FacialAnimationStreamingServiceStats,FacialAnimationStreamingServiceV2,FacialAnimationStreamingSubsessionStats,FacsImportData,Feature,FeatureRestrictionManager,File,FileManagerService,FileMesh,FileSyncReplicationService,Fire,Flag,FlagStand,FlagStandService,FlangeSoundEffect,FloatCurve,FloorWire,FluidForceSensor,FlyweightService,Folder,ForceField,FormFactorPart,Frame,FriendPages,FriendService,FunctionalTest,GamePassService,GameSettings,GamepadService,GeneratedFolder,GenerationService,GenericChallengeService,GenericSettings,Geometry,GeometryService,GetTextBoundsParams,GlobalDataStore,GlobalSettings,Glue,GongService,GroundController,GroupImportData,GroupService,GuiBase,GuiBase2d,GuiBase3d,GuiButton,GuiLabel,GuiMain,GuiObject,GuiService,GuidRegistryService,HSRDataContentProvider,HandleAdornment,Handles,HandlesBase,HapticEffect,HapticService,HarmonyService,Hat,HeapProfilerService,HeatmapQueryService,HeatmapService,HeightmapImporterService,HiddenSurfaceRemovalAsset,Highlight,HingeConstraint,Hint,Hole,Hopper,HopperBin,HttpRbxApiService,HttpRequest,HttpService,Humanoid,HumanoidController,HumanoidDescription,HumanoidRigDescription,IKControl,ILegacyStudioBridge,IXPService,ImageButton,ImageHandleAdornment,ImageLabel,ImageScreenCaptureService,ImportSession,IncrementalPatchBuilder,InputAction,InputBinding,InputContext,InputObject,InsertService,Instance,InstanceAdornment,InstanceExtensionsService,InstanceFileSyncService,IntConstrainedValue,IntValue,InternalMessagingService,InternalMessagingServiceVerifier,IntersectOperation,InventoryPages,JointImportData,JointInstance,JointsService,KeyboardService,Keyframe,KeyframeMarker,KeyframeSequence,KeyframeSequenceProvider,LanguageService,LayerCollector,LegacyStudioBridge,Light,Lighting,LineForce,LineHandleAdornment,LinearVelocity,LinkingService,LiveScriptingService,LiveSyncService,LocalDebuggerConnection,LocalScript,LocalStorageService,LocalizationService,LocalizationTable,LodDataEntity,LodDataService,LogReporterService,LogService,LoginService,LuaSettings,LuaSourceContainer,LuaWebService,LuauExpression,LuauExpressionService,LuauScriptAnalyzerService,MLModelDeliveryService,MLService,MLSession,MakeupDescription,ManualGlue,ManualSurfaceJointInstance,ManualWeld,MarkerCurve,MarketplaceService,MatchmakingService,MaterialGenerationService,MaterialImportData,MaterialService,MaterialVariant,MemStorageConnection,MemStorageService,MemoryStoreHashMap,MemoryStoreHashMapPages,MemoryStoreQueue,MemoryStoreService,MemoryStoreSortedMap,MeshContentProvider,MeshImportData,MeshPart,Message,MessageBusConnection,MessageBusService,MessagingService,MetaBreakpoint,MetaBreakpointContext,MetaBreakpointManager,MicroProfilerService,Model,ModerationService,ModuleScript,Motor,Motor6D,MotorFeature,Mouse,MouseService,MultipleDocumentInterfaceInstance,NegateOperation,NetworkClient,NetworkMarker,NetworkPeer,NetworkReplicator,NetworkServer,NetworkSettings,NoCollisionConstraint,Noise,NonReplicatedCSGDictionaryService,NotificationService,NumberPose,NumberValue,Object,ObjectValue,OmniRecommendationsService,OpenCloudApiV1,OpenCloudService,OperationGraph,OrderedDataStore,OutfitPages,OutputLink,PVAdornment,PVInstance,PackageLink,PackageService,PackageUIService,Packages,Pages,Pants,ParabolaAdornment,Part,PartAdornment,PartOperation,PartOperationAsset,ParticleEmitter,PartyEmulatorService,PatchBundlerFileWatch,PatchMapping,Path,Path2D,Path3D,PathfindingLink,PathfindingModifier,PathfindingService,PausedState,PausedStateBreakpoint,PausedStateException,PerformanceControlService,PermissionsService,PhysicsService,PhysicsSettings,PinShortcutService,PitchShiftSoundEffect,PlaceAssetIdsService,PlaceStatsService,PlacesService,Plane,PlaneConstraint,Platform,PlatformCloudStorageService,PlatformFriendsService,PlatformLibraries,Player,PlayerData,PlayerDataRecord,PlayerDataRecordConfig,PlayerDataService,PlayerEmulatorService,PlayerGui,PlayerHydrationService,PlayerListConfiguration,PlayerMouse,PlayerScripts,PlayerViewService,Players,Plugin,PluginAction,PluginCapabilities,PluginConnection,PluginConnectionService,PluginDebugService,PluginDragEvent,PluginGui,PluginGuiService,PluginManagementService,PluginManager,PluginManagerInterface,PluginMenu,PluginMouse,PluginPolicyService,PluginToolbar,PluginToolbarButton,PointLight,PointsService,PolicyService,PopLatencyService,Pose,PoseBase,PostEffect,Preloaded,PrismaticConstraint,ProceduralBehaviorSchedulerService,ProceduralModel,ProcessInstancePhysicsService,ProximityPrompt,ProximityPromptService,PublishService,PyramidHandleAdornment,QWidgetPluginGui,RTAnimationTracker,RayValue,RbxAnalyticsService,RealtimeMedia,RecommendationPages,RecommendationService,ReflectionMetadata,ReflectionMetadataCallbacks,ReflectionMetadataClass,ReflectionMetadataClasses,ReflectionMetadataEnum,ReflectionMetadataEnumItem,ReflectionMetadataEnums,ReflectionMetadataEvents,ReflectionMetadataFunctions,ReflectionMetadataItem,ReflectionMetadataMember,ReflectionMetadataProperties,ReflectionMetadataYieldFunctions,ReflectionService,RelativeGui,RemoteCommandService,RemoteCursorService,RemoteDebuggerServer,RemoteEvent,RemoteFunction,RenderSettings,RenderingTest,ReplicatedFirst,ReplicatedStorage,RequestOrchestratorService,ReverbSoundEffect,RibbonNotificationService,RigidConstraint,RobloxPluginGuiService,RobloxReplicatedStorage,RobloxSerializableInstance,RobloxServerStorage,RocketPropulsion,RodConstraint,RolloutValidation,RolloutValidationService,RomarkRbxAnalyticsService,RomarkService,RootImportData,RopeConstraint,Rotate,RotateP,RotateV,RotationCurve,RtMessagingService,RunService,RunningAverageItemDouble,RunningAverageItemInt,RunningAverageTimeIntervalItem,RuntimeContentService,RuntimeScriptService,SafetyService,SceneAnalysisService,ScreenGui,ScreenshotCapture,ScreenshotHud,Script,ScriptBuilder,ScriptChangeService,ScriptCloneWatcher,ScriptCloneWatcherHelper,ScriptCommitService,ScriptContext,ScriptDebugger,ScriptDebuggerService,ScriptDocument,ScriptEditorService,ScriptProfilerService,ScriptRegistrationService,ScriptRuntime,ScriptService,ScrollingFrame,Seat,Selection,SelectionBox,SelectionHighlightManager,SelectionLasso,SelectionPartLasso,SelectionPointLasso,SelectionSphere,SelfViewConfiguration,SensorBase,SerializationService,ServerReplicator,ServerScriptService,ServerStorage,ServiceProvider,ServiceVisibilityService,SessionCheckService,SessionService,SharedTableRegistry,Shirt,ShirtGraphic,SkateboardController,SkateboardPlatform,Skin,Sky,SlidingBallConstraint,SlimAnimationDataEntity,SlimAnimationReplicationService,SlimContentProvider,SlimDebugSettings,SlimReplicationService,SlimService,Smoke,SmoothVoxelsUpgraderService,Snap,SnippetService,SocialService,SolidModelContentProvider,Sound,SoundEffect,SoundGroup,SoundService,SoundShimService,Sparkles,SpawnLocation,SpawnerService,SpecialMesh,SphereHandleAdornment,SpotLight,SpringConstraint,StackFrame,StandalonePluginScripts,StandardPages,StartPageService,StarterCharacterScripts,StarterGear,StarterGui,StarterPack,StarterPlayer,StarterPlayerScripts,StartupMessageService,Stats,StatsItem,Status,StopWatchReporter,StringValue,Studio,StudioActionOverride,StudioAssetService,StudioAttachment,StudioCallout,StudioCameraService,StudioCaptureService,StudioData,StudioDeviceEmulatorService,StudioDeviceSimulatorService,StudioObjectBase,StudioPublishService,StudioScreenshotCapture,StudioScriptDebugEventListener,StudioSdkService,StudioService,StudioTestService,StudioTheme,StudioUserService,StudioWidget,StudioWidgetsService,StyleBase,StyleDerive,StyleLink,StyleQuery,StyleRule,StyleSheet,StylingService,SunRaysEffect,SurfaceAppearance,SurfaceGui,SurfaceGuiBase,SurfaceLight,SurfaceSelection,SwimController,SyncScriptBuilder,SystemThemeService,TaskScheduler,Team,TeamCreateData,TeamCreatePublishService,TeamCreateService,Teams,TelemetryService,TeleportAsyncResult,TeleportOptions,TeleportService,TemporaryCageMeshProvider,TemporaryScriptService,Terrain,TerrainDetail,TerrainIterateOperation,TerrainModifyOperation,TerrainReadOperation,TerrainRegion,TerrainWriteOperation,TestCase,TestService,TextBox,TextBoxService,TextButton,TextChannel,TextChannelWindow,TextChatCommand,TextChatConfigurations,TextChatMessage,TextChatMessageProperties,TextChatService,TextFilterResult,TextFilterTranslatedResult,TextGenerator,TextLabel,TextService,TextSource,Texture,TextureGenerationPartGroup,TextureGenerationService,TextureGenerationUnwrappingRequest,ThirdPartyUserService,ThreadState,TimerService,ToastNotificationService,Tool,Torque,TorsionSpringConstraint,TotalCountTimeIntervalItem,TouchInputService,TouchTransmitter,TraceRouteService,TracerService,TrackerLodController,TrackerStreamAnimation,Trail,Translator,TremoloSoundEffect,TriangleMeshPart,TrussPart,TutorialService,Tween,TweenBase,TweenService,UGCAvatarService,UGCValidationService,UIAspectRatioConstraint,UIBase,UIComponent,UIConstraint,UICorner,UIDragDetector,UIDragDetectorService,UIFlexItem,UIGradient,UIGridLayout,UIGridStyleLayout,UILayout,UIListLayout,UIPadding,UIPageLayout,UIScale,UIShadow,UISizeConstraint,UIStroke,UITableLayout,UITextSizeConstraint,UnionOperation,UniqueIdLookupService,UniversalConstraint,UnreliableRemoteEvent,UnvalidatedAssetService,UserGameSettings,UserInputService,UserService,UserSettings,UserStorageService,VRService,VRStatusService,ValueBase,ValueCurve,Vector3Curve,Vector3Value,VectorForce,VehicleController,VehicleSeat,VelocityMotor,VersionControlService,VideoCapture,VideoCaptureService,VideoDeviceInput,VideoDisplay,VideoFrame,VideoPlayer,VideoSampler,VideoScreenCaptureService,VideoService,ViewportFrame,VirtualInput,VirtualInputManager,VirtualUser,VisibilityCheckDispatcher,Visit,VisualizationMode,VisualizationModeCategory,VisualizationModeService,VoiceChatInternal,VoiceChatService,VoxelBuffer,WebSocketClient,WebSocketService,WebStreamClient,WebViewService,WedgePart,Weld,WeldConstraint,WindowProtocolService,Wire,WireframeHandleAdornment,Workspace,WorkspaceAnnotation,WorldModel,WorldRoot,WrapDeformMeshProvider,WrapDeformer,WrapLayer,WrapTarget,WrapTextureTransfer`.split(`,`).map((e,t)=>[e,t])),oa=new Set(`WaitForChild`.split(`,`)),R=[`AdvanceToNextPageAsync`,`IntersectAsync,SubtractAsync,UnionAsync`,`IsAvailable`],sa=new Map([[2,`GetCredentialsHeaders,GetDeviceAccessToken,GetDeviceIntegrityTokenYield`],[4,`GrantAchievement,HasAchieved`],[9,`GetAdAvailabilityNowAsync,GetAdAvailabilityNowForUniverseAsync,GetCampaignEligibilityAsync,RegisterAdOpportunityAsync,ShowRewardedVideoAdAsync,ShowRewardedVideoAdAtClientAsync`],[14,`GetPlayerSegmentsAsync`],[18,`GetAnimationClipAsync,GetAnimations,GetAnimationsAsync,GetClipEvaluatorAsync`],[21,`CreateJob,DownloadJobResult,FullProcess,GetJobStatus`],[22,`CreateAnimationByUploadingVideo,ImportVideoWithPrompt`],[32,`CreateOrUpdateChannelPreferenceAsync,CreateOrUpdatePlacePreferenceAsync,GetChannelPreferenceAsync,GetPlacePreferenceAsync`],[33,`GetAppAgeSignalsAsync`],[41,`GetFilesInDirAsync,PickFileWithPromptAsync,PickImageFileWithPrompt,PickMeshFileWithPrompt,PickMultipleFilesWithPrompt,StartSessionWithPathAsync,UploadAssetFromContentAsync,UploadAssetFromPathAsync,UploadVersionedAssetFromContentAsync,UploadVersionedAssetFromPathAsync`],[43,`AddNewPlace,CreateAlias,DeleteAlias,RemovePlace,RenameAlias,RenameModel,RenamePlace`],[45,`FetchAssetQualitySummaryFromGltfAsync,FetchAssetQualitySummaryFromJobIdAsync,FetchAssetQualityValidationEntriesFromModelsAsync,FetchAssetQualityVisualizationDataFromUrlAsync,GenerateAssetQualityGltfFromInstanceAsync`],[46,`CachePartOperationsAsync,CanEditAssetAsync,ComposeDecalAsync,CreateAssetAsync,CreateAssetVersionAsync,CreateDataModelContentAsync,CreateEditableImageAsync,CreateEditableMeshAsync,CreateMeshPartAsync,CreatePlaceAsync,CreatePlaceInPlayerInventoryAsync,CreateSurfaceAppearanceAsync,GetAssetIdsForPackage,GetAssetIdsForPackageAsync,GetAudioMetadataAsync,GetBundleDetailsAsync,GetCreatorAssetID,GetGamePlacesAsync,LoadAssetAsync,PromptCreateAssetAsync,PromptImportAnimationClipFromVideoAsync,SavePlaceAsync,SearchAudio,SearchAudioAsync`],[69,R[0]],[71,`GetWaveformAsync`],[72,`CanRecordAsync,GetUnrecordableInstancesAsync,RecordAsync`],[76,`GetWaveformAsync,LoadAsync`],[83,`GetClientFeaturesAsync,GetServerFeaturesAsync`],[86,`AutoSetupAvatarAsync,CreateCageMeshPartsWithScaleForExportAsync,GenerateAvatar2DPreviewAsync,GenerateAvatarAsync,GetBatchTokenDetailsAsync,LoadAvatar2DPreviewAsync,LoadGeneratedAvatarAsync,PrepareAvatarForPreviewAsync,PromptCreateAvatarAssetAsync,PromptCreateAvatarAsync,PromptCreateMakeupAsync,PromptSelectAvatarGenerationImageAsync,RequestAvatarGenerationSessionAsync,ValidateUGCAccessoryAsync,ValidateUGCBodyPartAsync,ValidateUGCFullBodyAsync`],[87,`CheckApplyDefaultClothing,CheckApplyDefaultClothingAsync,ConformToAvatarRules,ConformToAvatarRulesAsync,GetAvatarRules,GetAvatarRulesAsync,GetBatchItemDetails,GetBatchItemDetailsAsync,GetBundlesByAssetIdAsync,GetFavorite,GetFavoriteAsync,GetHeadShapesAsync,GetInventory,GetInventoryAsync,GetItemDetails,GetItemDetailsAsync,GetOutfitDetails,GetOutfitDetailsAsync,GetOutfits,GetOutfitsAsync,GetRecommendedAssets,GetRecommendedAssetsAsync,GetRecommendedBundles,GetRecommendedBundlesAsync,SearchCatalog,SearchCatalogAsync`],[88,`ImportFBXAnimationFromFilePathUserMayChooseModel,ImportFBXAnimationUserMayChooseModel,ImportFbxRigWithoutSceneLoad,ImportLoadedFBXAnimation,LoadRigAndDetectType`],[93,`AwardBadge,AwardBadgeAsync,CheckUserBadgesAsync,GetBadgeInfoAsync,GetUserBadgesAsync,IsDisabled,IsLegal,UserHasBadge,UserHasBadgeAsync`],[95,R[0]],[98,R[1]],[108,`Invoke`],[129,R[2]],[139,`CheckUploadCaptureStatusAsync,CreatePostAsync,DeleteCapturesAsync,DeleteVideoCaptureAsync,GetCaptureFilePathAsync,GetCaptureSizeAsync,GetCaptureStorageSizeAsync,GetCaptureUploadDataAsync,InternalCheckPlayabilityAsync,InternalGetStartPlaceIdAsync,PromptCaptureGalleryPermissionAsync,ReadCapturesFromGalleryAsync,SaveCapturesToExternalStorageAsync,StartUploadCaptureAsync,StartVideoCaptureAsync,StartVideoCaptureInternalAsync,UploadCaptureAsync`],[140,R[0]],[142,R[0]],[149,`CanUserChatAsync,CanUsersChatAsync,FilterStringAsync,FilterStringForBroadcast,FilterStringForPlayerAsync`],[170,`GetCommerceProductInfoAsync,PrepareCommerceProductPurchase,UserEligibleForRealWorldCommerceAsync`],[174,`GetConfigAsync,GetConfigForPlayerAsync`],[180,`PreloadAsync`],[181,`GetButton`],[195,R[1]],[197,`GetAssetInfoAsync,GetCreatorStoreProductInfoAsync,PerformCreatorStorePurchase`],[207,`GetObjectsAsync,HttpGetAsync,HttpPostAsync,InsertObjectsAndJoinIfLegacyAsync,SavePlace`],[211,`BatchGetAsync,GetAsync,GetVersionAsync,GetVersionAtTimeAsync,IncrementAsync,ListKeysAsync,ListVersionsAsync,RemoveAsync,RemoveVersionAsync,SetAsync,UpdateAsync`],[217,R[0]],[218,R[0]],[221,R[0]],[222,`ListDataStoresAsync`],[224,R[0]],[249,`CommitEdits,GetDrafts,UpdateToLatestVersion`],[267,`CanPromptOptInAsync`],[270,`LoadPlaybackAsync`],[278,`InquiryAsync`],[279,`CheckOrRequestCameraPermission`],[281,`ResolveStateForUser`],[287,`ListFilesInFolderAsync`],[292,R[1]],[297,`EvaluateAsync`],[301,R[1]],[303,R[0]],[304,`GetPlatformFriends`],[306,`PlayerHasPass`],[310,`ConnectAsync,DisconnectAsync,GenerateMeshAsync,GenerateModelAsync,GetVideoGenSessionAsync,GetVideoGenTriggersAsync,InternalGenerateMeshAsync,LoadGeneratedMeshAsync,LoadModelFromGlbAsync,SegmentMeshAsync,StartVideoGenSessionAsync,UpdateVideoGenSessionPromptAsync,UpdateVideoGenSessionTriggersAsync`],[314,`FragmentAsync,HashMeshAsync,IntersectAsync,SubtractAsync,SweepPartAsync,UnionAsync`],[316,`BatchGetAsync,GetAsync,IncrementAsync,RemoveAsync,SetAsync,UpdateAsync`],[322,`GetAlliesAsync,GetEnemiesAsync,GetGroupInfoAsync,GetGroupsAsync,GetRolesInGroupAsync,PromptJoinAsync`],[330,`GetScreenResolution`],[340,`ClientRequestDataAsync,ServerRequestDataAsync`],[343,`GetHeightmapPreviewAsync,ImportHeightmap`],[351,`GetAsync,GetAsyncFullUrl,PostAsync,PostAsyncFullUrl,RequestAsync,RequestLimitedAsync`],[353,`GetAsync,JSONDecodeAsync,JSONEncodeAsync,PostAsync,RequestAccessTokenScopesAsync,RequestAsync`],[354,`ApplyAvatarRules,ApplyDescription,ApplyDescriptionAsync,ApplyDescriptionReset,ApplyDescriptionResetAsync,PlayEmote,PlayEmoteAndGetAnimTrackById,PlayEmoteAsync`],[371,`CreateMeshPartAsync,GetBaseCategories,GetBaseSets,GetCollection,GetFreeDecals,GetFreeDecalsAsync,GetFreeModels,GetFreeModelsAsync,GetLatestAssetVersionAsync,GetUserCategories,GetUserSets,LoadAsset,LoadAssetVersion,LoadAssetWithBytecodeAsync,LoadAssetWithFormat,LoadPackageAssetAsync,loadAsset`],[380,R[1]],[381,R[0]],[389,`GetAnimations,GetAnimationsAsync,GetKeyframeSequenceAsync`],[390,`GetCapabilitiesUsedInPackageAsync`],[398,`OpenUrl,SupportsSwitchToSettingsApp,SwitchToSettingsApp`],[404,`GetCountryRegionForPlayerAsync,GetTranslatorForLocaleAsync,GetTranslatorForPlayerAsync,PromptDownloadGameTableToCSV,PromptExportToCSVs,PromptImportFromCSVs,PromptUploadCSVToGameTable`],[418,`CreateSessionAsync,LoadPostProcessModelAsync`],[419,`ForwardAsync`],[425,`GetAvailableSubscriptionProductsAsync,GetDeveloperProductsAsync,GetProductInfo,GetProductInfoAsync,GetRobloxSubscriptionDetailsAsync,GetRobuxBalance,GetSubscriptionProductInfoAsync,GetSubscriptionPurchaseInfoAsync,GetUserSubscriptionDetailsAsync,GetUserSubscriptionDetailsInternalAsync,GetUserSubscriptionPaymentHistoryAsync,GetUserSubscriptionStatusAsync,GetUsersPriceLevelsAsync,PerformBulkPurchase,PerformCancelSubscription,PerformPurchase,PerformPurchaseV2,PerformSubscriptionPurchase,PerformSubscriptionPurchaseV2,PerformSubscriptionPurchaseV3Async,PerformSubscriptionPurchaseWithRobuxAsync,PlayerOwnsAsset,PlayerOwnsAssetAsync,PlayerOwnsBundle,PlayerOwnsBundleAsync,PromptRobuxTransferAsync,RankProductsAsync,RecommendTopProductsAsync,UserOwnsGamePassAsync`],[427,`GenerateMaterialVariantsAsync`],[433,`GetAsync,ListItemsAsync,RemoveAsync,SetAsync,UpdateAsync`],[434,R[0]],[435,`AddAsync,GetSizeAsync,ReadAsync,RemoveAsync`],[437,`GetAsync,GetRangeAsync,GetSizeAsync,RemoveAsync,SetAsync,UpdateAsync`],[440,R[1]],[444,`PublishAsync,SubscribeAsync`],[448,`DumpToFileAsync`],[450,`CreateReviewableContentAsync,InternalRequestReviewableContentReviewAsync`],[458,R[1]],[468,`GetScheduledNotifications`],[474,`CreateUserNotificationAsync`],[475,`HttpRequestAsync,InvokeAsync`],[477,`BatchGetAsync,GetAsync,GetSortedAsync,IncrementAsync,RemoveAsync,SetAsync,UpdateAsync`],[478,R[0]],[483,`UpdateAsync`],[484,`ConvertToPackageAsync,GetPackageInfo,PublishPackage,SetPackageVersion`],[486,R[0]],[489,R[1]],[491,R[1]],[494,`GetEmulatedPartyAsync`],[497,`CheckOcclusionAsync,ComputeAsync`],[502,`ComputeRawPathAsync,ComputeSmoothPathAsync,FindPathAsync`],[517,R[1]],[518,`GetUserDataAsync,SetUserDataAsync`],[519,`GetPartyMembers`],[521,`GetCanManageAsync,GetFriendsOnline,GetFriendsOnlineAsync,GetFriendsWhoPlayedAsync,GetRankInGroup,GetRankInGroupAsync,GetRoleInGroup,GetRoleInGroupAsync,IsBestFriendsWith,IsFriendsWith,IsFriendsWithAsync,IsInGroup,IsInGroupAsync,LoadCharacter,LoadCharacterAsync,LoadCharacterBlocking,LoadCharacterWithAvatarRules,LoadCharacterWithHumanoidDescription,LoadCharacterWithHumanoidDescriptionAsync,PromptSecurityChallengeAsync,RequestStreamAroundAsync,WaitForDataReady,isFriendsWith,waitForDataReady`],[522,`GetRecordAsync`],[523,`ReleaseAsync,RequestFlushAsync`],[533,`BanAsync,CreateHumanoidModelFromDescription,CreateHumanoidModelFromDescriptionAsync,CreateHumanoidModelFromUserId,CreateHumanoidModelFromUserIdAsync,GetBanHistoryAsync,GetCharacterAppearanceAsync,GetCharacterAppearanceInfoAsync,GetFriendsAsync,GetHumanoidDescriptionFromOutfitId,GetHumanoidDescriptionFromOutfitIdAsync,GetHumanoidDescriptionFromUserId,GetHumanoidDescriptionFromUserIdAsync,GetNameFromUserIdAsync,GetProfileConfigurationFromUserIdAsync,GetUserIdFromNameAsync,GetUserThumbnailAsync,UnbanAsync`],[534,`CreateDockWidgetPluginGui,CreateDockWidgetPluginGuiAsync,CreateQWidgetPluginGui,ImportFbxAnimation,ImportFbxAnimationAsync,ImportFbxRig,ImportFbxRigAsync,PromptForExistingAssetId,PromptForExistingAssetIdAsync,PromptSaveSelection,PromptSaveSelectionAsync`],[543,`GetOTAPluginVersion`],[546,`ShowAsync`],[552,`AwardPoints,GetGamePointBalance,GetPointBalance`],[553,`CanViewBrandProjectAsync,GetPolicyInfoForPlayerAsync,GetPolicyInfoForServerRobloxOnlyAsync`],[561,`WaitForGenerationAsync`],[565,`CreateAssetAndWaitForAssetId,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsync,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsyncWithAddParam,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsyncWithAddParamErrorJson,PublishCageMeshAsync,PublishDescendantAssetsAsync`],[571,`ConnectAsync`],[572,R[0]],[573,`GenerateItemListAsync,GetRecommendationItemAsync,RegisterItemAsync,RemoveItemAsync,UpdateItemAsync`],[589,`ExecuteCommandAsync`],[593,`InvokeClient,InvokeServer`],[626,`GetAnimationMemoryAsync,GetAudioMemoryAsync,GetInstanceCompositionAsync,GetScriptMemoryAsync,GetTriangleCompositionAsync,GetUnparentedInstancesAsync`],[639,`CloseAsync,EditTextAsync,ForceSetSelectionAsync,MultiEditTextAsync,RequestSetSelectionAsync,ReviewableTextEditsAsync`],[640,`EditSourceAsyncWithRanges,OpenScriptDocumentAsync,UpdateSourceAsync`],[646,R[1]],[656,`DeserializeInstancesAsync,SerializeInstancesAsync`],[668,R[1]],[682,`CanSendCallInviteAsync,CanSendGameInviteAsync,GetEventRsvpStatusAsync,GetExperienceEventAsync,GetPartyAsync,GetUpcomingExperienceEventsAsync,PromptFeedbackSubmissionAsync,PromptLinkSharing,PromptLinkSharingAsync,PromptRsvpToEventAsync`],[687,`EndRecording,GetRecordingDevices`],[690,R[1]],[698,R[0]],[702,`GetCore`],[707,`GetPaginatedMemoryByTexture`],[714,`AutoSetupAvatarAsync,AutoSetupSerializedAvatarAsync,CancelAutoSetupAvatarAsync,DEPRECATED_SerializeInstances,PromptSaveInstanceToRobloxAsync,RequestAvatarAutosetupAsync,SerializeInstances`],[718,`RequestScreenshotPermissionAsync`],[720,`EmulatePCDeviceWithResolution,GetCurrentDeviceId,GetCurrentOrientation,HasDeviceWithId,SetCurrentDeviceId,SetCurrentOrientation`],[721,`CreateDeviceAsync,GetDeviceAsync,GetDeviceInfoAsync,GetDeviceListAsync,GetOrientationAsync,GetPixelDensityAsync,GetResolutionAsync,GetScalingModeAsync,RemoveDeviceAsync,SetDeviceAsync,SetOrientationAsync,SetPixelDensityAsync,SetResolutionAsync,SetScalingModeAsync,StopSimulationAsync,UpdateDeviceAsync`],[724,`ScaleAsync`],[727,`PromptImportFile,PromptImportFileAsync,PromptImportFiles,PromptImportFilesAsync,TryInstallPlugin`],[728,`ExecuteMultiplayerTestAsync,ExecutePlayModeAsync,ExecuteRunModeAsync`],[748,`getSystemThemeAsync`],[758,`GetPlayerPlaceInstanceAsync,PromptExperienceDetailsAsync,ReserveServer,ReserveServerAsync,TeleportAsync,TeleportPartyAsync,UnblockAsync`],[761,`DrawBufferAsync,IntersectAsync,ReadBufferAsync,SubtractAsync,UnionAsync`],[769,`CaptureScreenshotAsync,RequestValidationAsync,Run,RunAsync,StartVideoCaptureAsync,StopVideoCaptureAsync`],[773,`AddUserAsync,SendAsync,SendDictatedSpeechAsync,SendInternalAsync,SendPresetAsync`],[779,`CanUserChatAsync,CanUsersChatAsync,CanUsersDirectChatAsync,CanUsersWhisperAsync,GetChatGroupsAsync,GetChatableUserCountAsync,GetPresetsAsync,OnUserChatSettingUpdateAsync,SendDictatedSpeechUniverseChatAsync,SendUniverseChatMessageAsync,SendUniverseChatPresetAsync`],[780,`GetChatForUserAsync,GetNonChatStringForBroadcastAsync,GetNonChatStringForUserAsync`],[782,`GenerateTextAsync`],[784,`FilterAndTranslateStringAsync,FilterStringAsync,GetFamilyInfoAsync,GetTextBoundsAsync,GetTextSizeOffsetAsync`],[788,`GetQuotasAsync`],[790,`RegisterActiveUser`],[807,R[1]],[808,R[1]],[814,`CalculateBodyMaxCageDistance,CanLoadAsset,CreateEditableImageOriginalSizeAsync,DoesMeshHaveSkinningData,DoesSurfaceAppearanceMatchTexturePackAsync,FetchAssetWithFormat,GetMeshDataBinaryString,GetMeshVerts,IsDeformedLayeredClothingOutOfRenderBounds`],[836,R[1]],[843,`GetUserFromGlobalUserIdAsync,GetUserInfosByUserIdsAsync`],[854,R[1]],[862,`LoadAsync`],[863,`GetSamplesAtTimesAsync`],[865,`CreateVideoSamplerAsync`],[866,`CaptureSnapshotAsync`],[868,`WaitForInputEventsProcessed`],[875,`IsVoiceEnabledForUserIdAsync`],[876,`GetChatGroupsAsync,IsVoiceEnabledForUserIdAsync`],[877,`ClearAsync,DrawBufferAsync,FromHeightmapAsync,NormalizeAsync,UnclampAsync`],[881,R[2]],[882,R[1]],[893,`CreateEditableMeshAsync,GetDeformedCFrameAsync`]]),ca=new Map;function la(e,t){let n=aa.get(e);if(n===void 0)return!1;if(oa.has(t))return!0;let r=ca.get(n);if(r!==void 0)return r.has(t);let i=sa.get(n);if(i===void 0)return!1;let a=new Set(i.split(`,`));return ca.set(n,a),a.has(t)}const ua=[`PlanckSystem`,`System`,`SystemFunction`,`SystemReturn`,`SystemTableLike`],da=new Set([`comments`,`loc`,`parent`,`range`,`tokens`]);function fa(e,t){if(e.type===`Identifier`)return e.name;if(t&&e.type===`TSQualifiedName`)return fa(e.right,t)}function pa(e,t=!0){if(e!=null){if(e.type===`TSTypeAnnotation`)return pa(e.typeAnnotation,t);if(e.type===`TSUnionType`){let n;for(let r of e.types){if(r.type===`TSUndefinedKeyword`||r.type===`TSNullKeyword`)continue;let e=pa(r,t);if(e===void 0||n!==void 0)return;n=e}return n}if(e.type===`TSTypeReference`)return fa(e.typeName,t)}}function ma(e,t){let n=pa(e);return n!==void 0&&t.has(n)}function ha(e,t){for(let n of Object.keys(e)){if(da.has(n))continue;let r=Reflect.get(e,n);r!=null&&t.push(r)}}function ga(e,t){let n=[e];for(;n.length>0;){let e=n.pop();if(!(typeof e!=`object`||!e)){if(Array.isArray(e)){for(let t of e)n.push(t);continue}D(e)&&t(e)!==!1&&ha(e,n)}}}function _a(e){if(e.type===`Property`)return e.computed?e.key.type===`Literal`&&typeof e.key.value==`string`?e.key.value:void 0:e.key.type===`Identifier`?e.key.name:e.key.type===`Literal`&&typeof e.key.value==`string`?e.key.value:void 0}function va(e,t,n){for(let r of e.properties)if(_a(r)===`system`&&r.type===`Property`){if(N(r.value))n.add(r.value);else if(r.value.type===`Identifier`){let e=t.get(r.value.name);e!==void 0&&n.add(e)}}}function ya(e){if(e.type===`ImportSpecifier`)return e.imported.type===`Identifier`?e.imported.name:e.imported.value}function ba(e,t){let n=new Map;for(let r of e.body){if(r.type!==`ImportDeclaration`||typeof r.source.value!=`string`)continue;let e=t.getDeclaredVariables(r);for(let t of r.specifiers){let i=ya(t);if(i===void 0)continue;let a=e.find(e=>e.name===t.local.name);a!==void 0&&n.set(a,{imported:i,source:r.source.value})}}return n}function xa(e){let t=[],n=C(e);for(;n.type===`MemberExpression`;){let e=w(n);if(e===void 0)return;t.unshift(e),n=C(n.object)}return n.type===`Identifier`?{path:t,root:n}:void 0}function Sa(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function Ca(e){if(e.type===`Identifier`)return[e.name];if(e.type!==`MemberExpression`)return;let t=xa(e);return t===void 0?void 0:[t.root.name,...t.path]}function wa(e,t){return T(e.getScope(t),t.name)}function Ta(e,t,n,r,i){ga(e,e=>{if(e.type!==`CallExpression`||e.callee.type!==`MemberExpression`)return;let a=xa(e.callee);if(a===void 0)return;let o=wa(t,a.root),s=o===void 0?void 0:n.get(o);if(s!==void 0)for(let n of r){if(s.source!==n.source||s.imported!==n.imported||!Sa(a.path,n.memberPath))continue;let r=e.arguments[n.callbackArgumentIndex];if(r===void 0||r.type===`SpreadElement`||!N(r))continue;let o=r.params[n.parameterIndex];if(o?.type!==`Identifier`)continue;let c=wa(t,o);c!==void 0&&i.set(c,n.className)}})}function Ea(e,t,n,r){ga(e,e=>{if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){let i=e.id.name,a=pa(e.id.typeAnnotation,!1);if(a===void 0||n.has(a))return;let o=t.getDeclaredVariables(e).find(e=>e.name===i);o!==void 0&&r.set(o,a);return}if(!N(e))return;let i=new Map(t.getDeclaredVariables(e).map(e=>[e.name,e]));for(let t of e.params){if(t.type!==`Identifier`)continue;let e=t.name,a=pa(t.typeAnnotation,!1);if(a===void 0||n.has(a))continue;let o=i.get(e);o!==void 0&&r.set(o,a)}})}function Da(e){let t=new Set;return ga(e,e=>{if(e.type===`ImportDeclaration`){for(let n of e.specifiers)t.add(n.local.name);return!1}return(e.type===`TSInterfaceDeclaration`||e.type===`TSTypeAliasDeclaration`||e.type===`ClassDeclaration`||e.type===`TSEnumDeclaration`)&&e.id!==null&&t.add(e.id.name),!0}),t}function Oa(e,t){let n=wa(t,e);if(n?.defs.length!==1)return;let[r]=n.defs;if(r?.node.type!==`VariableDeclarator`)return;let i=r.node.parent;if(i.type===`VariableDeclaration`&&i.kind===`const`)return r.node.init??void 0}function ka(e,t){let n=wa(t,e);if(n?.defs.length!==1)return;let[r]=n.defs;if(r===void 0)return;if(N(r.node))return r.node;if(r.node.type!==`VariableDeclarator`||r.node.init===null)return;let i=C(r.node.init);return N(i)?i:void 0}function Aa(e,t){let n=C(e);return N(n)?n:n.type===`Identifier`?ka(n,t):void 0}function ja(e,t,n,r,i){let a=C(e);if(a.type===`Identifier`)return Ma(a,t,n,r,i);if(!(a.type===`CallExpression`&&a.callee.type===`MemberExpression`&&w(a.callee)===`GetService`&&a.callee.object.type===`Identifier`&&a.callee.object.name===`game`&&!E(t,a.callee.object,`game`)))return;let[o]=a.arguments;return o?.type===`Literal`&&typeof o.value==`string`?o.value:void 0}function Ma(e,t,n,r,i){let a=wa(t,e);if(a!==void 0){let e=r.get(a);if(e!==void 0)return e;let t=n.get(a);if(t?.source===`@rbxts/services`)return t.imported}let o=Oa(e,t);if(!(o===void 0||i.has(o)))return i.add(o),ja(o,t,n,r,i)}function Na(e,t,n,r){if(e.callee.type!==`MemberExpression`)return!1;let i=w(e.callee);if(i===void 0)return!1;let a=ja(e.callee.object,t,n,r,new Set);return a!==void 0&&la(a,i)}function Pa(e,t){let n=new Set;if(e.body===null)return n;if(e.body.type!==`BlockStatement`){let r=Aa(e.body,t);return r!==void 0&&n.add(r),n}return ga(e.body,e=>{if(N(e))return!1;if(e.type!==`ReturnStatement`||e.argument===null)return!0;let r=Aa(e.argument,t);return r!==void 0&&n.add(r),!1}),n}function Fa(e,t,n){let r=new Set,i=Ca(e.callee);if(i===void 0)return r;for(let a of n)if(Sa(i,a.calleePath))for(let n of a.callbackArgumentIndexes){let i=e.arguments[n];if(i===void 0||i.type===`SpreadElement`)continue;let a=Aa(i,t);a!==void 0&&r.add(a)}return r}function Ia(e,t,n,r,i,a){if(e.async)return;let o=new Set;function s(e){e.async||e.body===null||o.has(e)||(o.add(e),ga(e.body,o=>{if(N(o)&&o!==e)return!1;if(o.type!==`CallExpression`)return!0;Na(o,t,n,r)&&a(o);for(let e of Fa(o,t,i))s(e);return!0}))}let c=Pa(e,t),l=c.size===0?[e]:c;for(let e of l)s(e)}const La=_(`no-async-in-system`,`roblox`,{create(e){let t=e.options[0]?.additionalSystemTypeNames??[],n=e.options[0]?.callbackParameterTypes??[],r=e.options[0]?.synchronousCallbacks??[],i=new Set([...ua,...t]);return{"Program:exit"(t){let a=new Map,o=new Set,s=[],c=ba(t,e.sourceCode),l=new Map;Ea(t,e.sourceCode,Da(t),l),Ta(t,e.sourceCode,c,n,l),ga(t,e=>{if(N(e)){e.id!==null&&a.set(e.id.name,e),ma(e.returnType,i)&&o.add(e);return}if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){if(!ma(e.id.typeAnnotation,i)||e.init===null)return;N(e.init)?o.add(e.init):e.init.type===`ObjectExpression`&&s.push(e.init);return}e.type===`TSSatisfiesExpression`&&ma(e.typeAnnotation,i)&&e.expression.type===`ObjectExpression`&&s.push(e.expression)});for(let e of s)va(e,a,o);for(let t of o)Ia(t,e.sourceCode,c,l,r,t=>{e.report({messageId:`noAsyncInSystem`,node:t})})}}},meta:{docs:{description:`Disallow yielding Roblox API calls in synchronous Planck system execution.`,recommended:!0},messages:{noAsyncInSystem:`Do not call a yielding Roblox API from a synchronous Planck system.`},schema:[{additionalProperties:!1,properties:{additionalSystemTypeNames:{items:{type:`string`},type:`array`,uniqueItems:!0},callbackParameterTypes:{items:{additionalProperties:!1,properties:{callbackArgumentIndex:{minimum:0,type:`integer`},className:{type:`string`},imported:{type:`string`},memberPath:{items:{type:`string`},type:`array`},parameterIndex:{minimum:0,type:`integer`},source:{type:`string`}},required:[`callbackArgumentIndex`,`className`,`imported`,`memberPath`,`parameterIndex`,`source`],type:`object`},type:`array`},synchronousCallbacks:{items:{additionalProperties:!1,properties:{callbackArgumentIndexes:{items:{minimum:0,type:`integer`},minItems:1,type:`array`,uniqueItems:!0},calleePath:{items:{type:`string`},minItems:1,type:`array`}},required:[`callbackArgumentIndexes`,`calleePath`],type:`object`},type:`array`}},type:`object`}],type:`problem`}}),Ra=new Set([`useAsyncEffect`,`useEffect`,`useInsertionEffect`,`useLayoutEffect`,`useMountEffect`,`useReactiveEffect`,`useUnmountEffect`,`useUpdateEffect`]),za=_(`no-cascading-set-state`,`react`,{create(e){return{CallExpression(t){let n=L(t);if(n===void 0||!Ra.has(n))return;let r=Ii(t);if(r===void 0)return;let i=Gi(r);i<3||e.report({data:{count:String(i)},messageId:`cascadingSetState`,node:t})}}},meta:{docs:{description:`Disallow effect hooks with many cascading state updates.`,recommended:!0},messages:{cascadingSetState:`{{count}} setState calls in a single useEffect — consider using useReducer or deriving state`},type:`problem`}});function Ba(e){return Math.round(e>1?e:e*255)}function Va(e){return{reportUnknownComponents:typeof e==`object`&&e&&`reportUnknownComponents`in e?e.reportUnknownComponents===!0:!0}}function Ha(e){let t=[],n=0,r=!0;for(let i of e){if(!Ge(i))return;let e=Ba(i.value);t[n++]=e,e!==0&&(r=!1)}return[r,t]}const Ua=_(`no-color3-constructor`,`roblox`,{create(e){let t=Va(e.options[0]);return{NewExpression(n){if(!Le(n,`Color3`))return;let r=n.arguments;if(r.length===0)return;let i=Ha(r);if(!i){t.reportUnknownComponents&&e.report({messageId:r.length<3?`useFromRGB`:`onlyZeroArgs`,node:n});return}if(r.length<3){let[t,r=0]=i[1];e.report({fix:e=>e.replaceText(n,`Color3.fromRGB(${t}, ${r}, 0)`),messageId:`useFromRGB`,node:n});return}i[0]||e.report({fix:e=>e.replaceText(n,`Color3.fromRGB(${i[1].join(`, `)})`),messageId:`onlyZeroArgs`,node:n})}}},meta:{docs:{description:`Ban new Color3(...) except new Color3() or new Color3(0, 0, 0). Use Color3.fromRGB() instead.`},fixable:`code`,messages:{onlyZeroArgs:`Use Color3.fromRGB() instead of new Color3(). new Color3() uses floats [0-1] and performs worse than Color3.fromRGB() which uses [0-255]. Only 'new Color3()' or 'new Color3(0, 0, 0)' are allowed.`,useFromRGB:`Use Color3.fromRGB() instead of new Color3(). new Color3() uses floats [0-1] and performs worse than Color3.fromRGB() which uses [0-255].`},schema:[{additionalProperties:!1,properties:{reportUnknownComponents:{default:!0,description:`Report new Color3(...) calls when one or more components are not numeric literals.`,type:`boolean`}},type:`object`}],type:`problem`}});function Wa(e,t){let n=e.scan(t);return n===0?0:1-(1-e.probability)**n}function Ga(e,t){let n=0;for(let r of e){let e=Wa(r,t);n=1-(1-n)*(1-e)}return n}function Ka(e,t){return Ga(e,t)>=.9}function qa(e,t){return t.some(t=>Ka(e,t))}function Ja(e){return{probability:e,scan(e){for(let t=0;t<e.length-1;t+=1){let n=e.charAt(t),r=e.charAt(t+1);if(n===n.toLowerCase()&&r===r.toUpperCase()&&r!==r.toLowerCase())return 1}return 0}}}const Ya=/\s+/gu;function Xa(e,t){if(t===``)return e.length+1;let n=0,r=0;for(;r<=e.length-t.length;){let i=e.indexOf(t,r);if(i===-1)break;n+=1,r=i+t.length}return n}function Za(e,t){let n=t.map(e=>y(e)?{pattern:e,type:`string`}:{pattern:new RegExp(e.source,`gu`),type:`regexp`});return{probability:e,scan(e){let t=e.replace(Ya,``),r=0;for(let e of n){if(e.type===`string`){r+=Xa(t,e.pattern);continue}e.pattern.lastIndex=0;let n=t.match(e.pattern);n&&(r+=n.length)}return r}}}const Qa=/\s/u;function $a(e,t){let n=new Set(t);return{probability:e,scan(e){for(let t=e.length-1;t>=0;--t){let r=e.charAt(t);if(n.has(r))return 1;if(!Qa.test(r)&&r!==`*`&&r!==`/`)return 0}return 0}}}const eo=/[ \t(),{}]/u;function to(e,t){let n=new Set(t);return{probability:e,scan(e){let t=e.split(eo),r=0;for(let e of t)n.has(e)&&(r+=1);return r}}}const no=`public.abstract.class.implements.extends.return.throw.private.protected.enum.continue.assert.boolean.this.instanceof.interface.static.void.super.true.case:.let.const.var.async.await.break.yield.typeof.import.export`.split(`.`),ro=[`++`,`||`,`&&`,`===`,`?.`,`??`],io=[`for(`,`if(`,`while(`,`catch(`,`switch(`,`try{`,`else{`,`this.`,`window.`,/;\s+\/\//u,`import '`,`import "`,`require(`],ao=[`}`,`;`,`{`];function oo(){return[$a(.95,ao),to(.7,ro),to(.3,no),Za(.95,io),Ja(.5)]}const so=new Set([`BreakStatement`,`ContinueStatement`,`LabeledStatement`]);function co(e){return so.has(e.type)}function lo(e){return{comments:e,value:e.map(({value:e})=>e).join(`
6
6
  `)}}const uo=oo();function fo(e,t,n){let r=e.loc.start.line,i=t.loc.start.line;if(r+1!==i)return!1;let a=n.getTokenAfter(e);return!a||a.loc.start.line>i}function po(e,t){let n=[],r=0,i=[],a=0;for(let o of e)if(o.type===`Block`)a>0&&(n[r++]=lo(i),i=[],a=0),n[r++]=lo([o]);else if(a===0)i[a++]=o;else{let e=i.at(-1);e&&fo(e,o,t)?i[a++]=o:(n[r++]=lo(i),i=[o],a=1)}return a>0&&(n[r]=lo(i)),n}const mo=/\{/gu,ho=/\}/gu;function go(e){let t=(e.match(mo)??[]).length-(e.match(ho)??[]).length;return t>0?e+`}`.repeat(t):t<0?`{`.repeat(-t)+e:e}function _o(e){return qa(uo,e.split(`
7
7
  `))}function vo(e){return e.type!==`ReturnStatement`&&e.type!==`ThrowStatement`?!1:e.argument?.type===`Identifier`}function yo(e){return e.type===`UnaryExpression`&&(e.operator===`-`||e.operator===`+`)}function bo(e){return e.type===`Literal`&&(y(e.value)||b(e.value))}function xo(e){return x(e)&&y(e.type)}function So(e){let t=[],n=0;for(let r of e)xo(r)&&(t[n++]=r);return t}function Co(e,t){if(e.type!==`ExpressionStatement`)return!1;let{expression:n}=e;return n.type===`Identifier`||n.type===`SequenceExpression`||yo(n)||bo(n)||!t.trimEnd().endsWith(`;`)}function wo(e,t){if(e.length!==1)return!1;let n=e.at(0);return n?co(n)||vo(n)||Co(n,t):!1}const To=[/'return' statement is only valid inside a function/u];function Eo(e){for(let t of e){let e=!1;for(let n of To)if(n.test(t.message)){e=!0;break}if(!e)return!1}return!0}function Do(e){return(e.diagnostics.length===0||Eo(e.diagnostics))&&e.program.body.length>0}function Oo(e,t){let n=i(t),r=c(e,{lang:{".jsx":`jsx`,".tsx":`tsx`}[n]??`js`,sourceType:`module`});if(Do(r))return r;if(n!==`.tsx`&&n!==`.jsx`){let t=c(e,{lang:`tsx`,sourceType:`module`});if(Do(t))return t}}function ko(e,t){if(!_o(e))return!1;let n=Oo(e,t);return n?!wo(So(n.program.body),e):!1}function Ao(e){let t=1;for(let n of e)n===`
8
- `&&(t+=1);return t}const jo=_(`no-commented-code`,`general`,{create(e){let{maxLines:t=0}=e.options[0]??{};return{"Program:exit"(){let n=po(e.sourceCode.getAllComments(),e.sourceCode);for(let r of n){let n=r.value.trim();if(n===`}`||Ao(r.value)<=t||!ko(go(n),e.filename))continue;let i=r.comments.at(0),a=r.comments.at(-1);i&&a&&e.report({loc:{end:a.loc.end,start:i.loc.start},messageId:`commentedCode`,suggest:[{desc:`Remove this commented out code`,fix(e){return e.removeRange([i.range[0],a.range[1]])}}]})}}}},meta:{docs:{description:`Disallow commented-out code`,recommended:!1},hasSuggestions:!0,messages:{commentedCode:`Commented-out code creates confusion about intent and clutters the codebase. Version control preserves history, making dead code comments unnecessary. Delete the commented code entirely. If needed later, retrieve it from git history.`},schema:[{additionalProperties:!1,properties:{maxLines:{default:0,description:`Maximum number of lines of commented code allowed without reporting. Default 0 means any commented code triggers an error.`,type:`number`}},type:`object`}],type:`suggestion`}});function z(e){return{constant:!0,value:e}}function Mo(){return{constant:!1}}function No(e){return{constant:!0,value:e}}function Po(){return{constant:!1}}function Fo(e){let t=new Set;if(!e?.loopExitCalls)return t;for(let n of e.loopExitCalls)ne(n)&&t.add(n);return t}function Io(e){let t=w(e);if(t.type===`Identifier`)return t.name;if(t.type!==`MemberExpression`)return;let n=Io(t.object);if(n===void 0||n.length===0)return;let r=T(t);if(r!==void 0&&r.length!==0)return`${n}.${r}`}function Lo(e,t){if(t.size===0)return!1;let n=Io(e.callee);return n===void 0||n.length===0?!1:t.has(n)}function Ro(e,t){return B(e.type===`SpreadElement`?e.argument:e,t)}function B(e,t){if(t.size===0)return!1;let n=w(e);switch(n.type){case`ArrayExpression`:return zo(n,t);case`ArrowFunctionExpression`:case`ClassExpression`:case`FunctionExpression`:return!1;case`AssignmentExpression`:return B(n.right,t);case`AwaitExpression`:return B(n.argument,t);case`BinaryExpression`:return Bo(n,t);case`CallExpression`:return Vo(n,t);case`ConditionalExpression`:return Ho(n,t);case`LogicalExpression`:return Uo(n,t);case`MemberExpression`:return Wo(n,t);case`NewExpression`:return Go(n,t);case`SequenceExpression`:return n.expressions.some(e=>B(e,t));case`TaggedTemplateExpression`:return Ko(n,t);case`TemplateLiteral`:return n.expressions.some(e=>B(e,t));case`UnaryExpression`:case`UpdateExpression`:return B(n.argument,t);case`YieldExpression`:return n.argument?B(n.argument,t):!1;default:return!1}}function zo(e,t){for(let n of e.elements)if(n!==null&&Ro(n,t))return!0;return!1}function Bo(e,t){let{left:n}=e;return n.type!==`PrivateIdentifier`&&B(n,t)?!0:B(e.right,t)}function Vo(e,t){return Lo(e,t)||B(e.callee,t)?!0:e.arguments.some(e=>Ro(e,t))}function Ho(e,t){return B(e.test,t)||B(e.consequent,t)||B(e.alternate,t)}function Uo(e,t){return B(e.left,t)||B(e.right,t)}function Wo(e,t){return B(e.object,t)?!0:e.computed&&B(e.property,t)}function Go(e,t){return B(e.callee,t)?!0:e.arguments.some(e=>Ro(e,t))}function Ko(e,t){return B(e.tag,t)?!0:e.quasi.expressions.some(e=>B(e,t))}function qo(e){let t=w(e);switch(t.type){case`ArrayExpression`:return z([]);case`ArrowFunctionExpression`:case`ClassExpression`:case`FunctionExpression`:return z(!0);case`Identifier`:return t.name===`undefined`?z(void 0):t.name===`NaN`?z(NaN):t.name===`Infinity`?z(1/0):Mo();case`Literal`:return z(t.value);case`LogicalExpression`:return Jo(t);case`ObjectExpression`:return z({});case`SequenceExpression`:{let e=t.expressions.at(-1);return e?qo(e):Mo()}case`TemplateLiteral`:return t.expressions.length>0?Mo():t.quasis.length===0?z(``):z(t.quasis[0]?.value.cooked??``);case`UnaryExpression`:return Yo(t);default:return Mo()}}function Jo(e){let t=qo(e.left);return t.constant?e.operator===`&&`?t.value===!0?qo(e.right):z(t.value):e.operator===`||`?t.value===!0?z(t.value):qo(e.right):t.value===void 0?qo(e.right):z(t.value):Mo()}function Yo(e){if(e.operator===`typeof`)return z(`string`);if(e.operator===`void`)return z(void 0);let t=qo(e.argument);return t.constant?e.operator===`!`?z(!t.value):e.operator===`+`&&b(t.value)?z(t.value):e.operator===`-`&&b(t.value)?z(-t.value):e.operator===`~`&&b(t.value)?z(~t.value):Mo():Mo()}function V(e){let t=w(e);if(t.type===`ConditionalExpression`)return Xo(t);if(t.type===`LogicalExpression`)return Zo(t);if(t.type===`SequenceExpression`){let e=t.expressions.at(-1);return e?V(e):Po()}let n=qo(t);return n.constant?No(!!n.value):Po()}function Xo(e){let t=V(e.test);if(t.constant)return V(t.value===!0?e.consequent:e.alternate);let n=V(e.consequent),r=V(e.alternate);return n.constant&&r.constant&&n.value===r.value?n:Po()}function Zo(e){let t=V(e.left);if(!t.constant)return Po();if(e.operator===`&&`)return t.value?V(e.right):No(!1);if(e.operator===`||`)return t.value===!0?No(!0):V(e.right);let n=qo(e.left);return n.constant?n.value===void 0?V(e.right):No(!!n.value):Po()}const Qo=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function $o(e){return Qo.has(e.type)}function es(e,t){let n=t;for(;n!==null;){if(n.type===`LabeledStatement`&&n.label.name===e)return n.body;if(n.type===`Program`)return;n=n.parent}}function ts(e,t){if(e.label)return es(e.label.name,e.parent)===t;let n=e.parent;for(;n!==null;){if(n.type===`Program`||N(n)||n.type===`SwitchStatement`)return!1;if($o(n))return n===t;n=n.parent}return!1}function ns(e,t){return e?e.type===`VariableDeclaration`?e.declarations.some(e=>e.init?B(e.init,t):!1):B(e,t):!1}function rs(e,t){switch(e.type){case`DoWhileStatement`:case`WhileStatement`:return B(e.test,t);case`ForInStatement`:case`ForOfStatement`:return B(e.right,t);case`ForStatement`:return!!(ns(e.init,t)||e.test&&B(e.test,t)||e.update&&B(e.update,t));default:return!1}}function H(e,t,n){switch(e.type){case`BlockStatement`:return e.body.some(e=>H(e,t,n));case`BreakStatement`:return ts(e,t);case`DoWhileStatement`:case`WhileStatement`:return is(e,t,n);case`ExpressionStatement`:return B(e.expression,n);case`ForInStatement`:case`ForOfStatement`:return as(e,t,n);case`ForStatement`:return os(e,t,n);case`IfStatement`:return ss(e,t,n);case`LabeledStatement`:return H(e.body,t,n);case`ReturnStatement`:return!0;case`SwitchStatement`:return e.cases.some(e=>e.consequent.some(e=>H(e,t,n)));case`TryStatement`:return cs(e,t,n);case`VariableDeclaration`:return e.declarations.some(e=>e.init?B(e.init,n):!1);case`WithStatement`:return ls(e,t,n);default:return!1}}function is(e,t,n){return B(e.test,n)?!0:H(e.body,t,n)}function as(e,t,n){return B(e.right,n)?!0:H(e.body,t,n)}function os(e,t,n){return ns(e.init,n)||e.test&&B(e.test,n)||e.update&&B(e.update,n)?!0:H(e.body,t,n)}function ss(e,t,n){return H(e.consequent,t,n)?!0:e.alternate?H(e.alternate,t,n):!1}function cs(e,t,n){return!!(H(e.block,t,n)||e.handler&&H(e.handler.body,t,n)||e.finalizer&&H(e.finalizer,t,n))}function ls(e,t,n){return B(e.object,n)?!0:H(e.body,t,n)}function us(e,t,n){return e.constant?!e.value||!rs(t,n)&&!H(t.body,t,n):!1}const ds=_(`no-constant-condition-with-break`,`general`,{create(e){let t=e.options?.[0],n=Fo(x(t)?t:void 0);function r(t){V(t).constant&&e.report({messageId:`unexpected`,node:t})}function i(t,r){us(V(r),t,n)&&e.report({messageId:`unexpected`,node:r})}return{ConditionalExpression(e){r(e.test)},DoWhileStatement(e){i(e,e.test)},ForStatement(e){e.test&&i(e,e.test)},IfStatement(e){r(e.test)},WhileStatement(e){i(e,e.test)}}},meta:{docs:{description:`Disallow constant conditions, but allow constant loops that include loop exits such as break, return, or configured calls.`},messages:{unexpected:`Unexpected constant condition.`},schema:[{additionalProperties:!1,properties:{loopExitCalls:{description:`Call expressions that count as intentional loop exits inside constant loops.`,items:{minLength:1,type:`string`},type:`array`}},type:`object`}],type:`problem`}}),fs=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function ps(e){let t=e;for(;t.parent!==null;){if(t.type===`ArrowFunctionExpression`||t.type===`FunctionDeclaration`||t.type===`FunctionExpression`)return t;t=t.parent}return t}function ms(e,t){if(t.type===`IfStatement`){if(t.consequent===e)return{arm:`then`,complete:t.alternate!==null,control:t};if(t.alternate===e)return{arm:`else`,complete:!0,control:t}}if(t.type===`ConditionalExpression`){if(t.consequent===e)return{arm:`then`,complete:!0,control:t};if(t.alternate===e)return{arm:`else`,complete:!0,control:t}}}function hs(e,t){let n=ms(e,t);if(n!==void 0)return n;if(t.type===`LogicalExpression`&&t.right===e)return{arm:`right`,complete:!1,control:t};if(fs.has(t.type)&&`body`in t&&t.body===e)return{arm:`body`,complete:!1,control:t};if(e.type===`SwitchCase`&&t.type===`SwitchStatement`)return{arm:`case:${e.range[0]}`,complete:!1,control:t};if(t.type===`TryStatement`){if(t.block===e)return{arm:`try`,complete:!1,control:t};if(t.handler===e)return{arm:`catch`,complete:!1,control:t}}}function gs(e,t){let n=[],r=e;for(;r!==t&&r.parent!==null;){let e=hs(r,r.parent);e!==void 0&&n.push(e),r=r.parent}return n}function _s(e,t){return e.find(e=>e.control===t)?.arm}function vs(e,t){for(let n of e){let e=_s(t,n.control);if(e!==void 0&&e!==n.arm)return!1}return!0}function ys(e,t){let{parent:n}=e.node;return n.type===`AssignmentExpression`&&t.some(e=>e.isRead&&Ds(n.right,e.node))}function bs(e,t){if(t.length!==e.length)return;let n;for(let r of e)if(_s(t,r.control)!==r.arm){if(n!==void 0)return;n=r.control}if(n!==void 0&&_s(t,n)!==void 0)return e.filter(e=>e.control!==n)}function xs(e){for(let[t,n]of e.entries())for(let[r,i]of e.entries()){if(r<=t)continue;let a=bs(n,i);if(a!==void 0)return e.splice(r,1),e.splice(t,1,a),a.length===0||xs(e)}return!1}function Ss(e,t,n){let r=e.filter(e=>_s(t,e.control)===void 0);return r.length===0?!0:r.some(e=>!e.complete)?!1:(n.push(r),xs(n))}function Cs(e,t){return e.isRead&&!e.isWrite||e.isWrite&&ys(e,t)}function ws(e,t){let n=ps(e.node),r=gs(e.node,n),i=[];for(let a of t){if(a.node.range[0]<=e.node.range[0]||ps(a.node)!==n)continue;let o=gs(a.node,n);if(vs(r,o)){if(Cs(a,t))return!0;if(a.isWrite&&Ss(o,r,i))return!1}}return!1}function Ts(e){return e.type===`Literal`?e.value===null||e.value===!1||e.value===!0||e.value===``||e.value===-1||e.value===0||e.value===1:e.type===`Identifier`?e.name===`undefined`:e.type===`ArrayExpression`?e.elements.length===0:e.type===`ObjectExpression`?e.properties.length===0:e.type===`UnaryExpression`?e.operator===`void`||Ts(e.argument):!1}function Es(e){let t=e;for(;t.parent!==null&&t.parent.type!==`VariableDeclarator`;){if(t.parent.type===`ObjectPattern`&&t.parent.properties.some(e=>e.type===`RestElement`))return!0;t=t.parent}return!1}function Ds(e,t){return e.range[0]<=t.range[0]&&e.range[1]>=t.range[1]}function Os(e,t){let n=e.node;for(;n.parent!==null;){let e=n.parent;if(e.type===`TryStatement`&&e.block===n&&[e.handler?.body,e.finalizer].filter(e=>e!=null).some(e=>t.references.some(t=>t.isRead()&&Ds(e,t.identifier))))return!0;n=e}return!1}function ks(e,t){if(!e.isWrite||t.scope.block.type===`Program`||t.name.startsWith(`_`))return!1;let{parent:n}=e.node;return n.type===`AssignmentPattern`||n.type===`UpdateExpression`||n.type===`AssignmentExpression`&&n.right.type===`Literal`&&n.right.value===null||Es(e.node)||e.init&&e.writeExpression!==void 0&&Ts(e.writeExpression)?!1:!Os(e,t)}function As(e){let t=new Set(e.references.map(e=>ps(e.identifier)));for(let n of e.defs)t.add(ps(n.name));return e.references.some(e=>e.isRead())&&t.size>1}function js(e){let t=e.references.map(e=>({init:e.init,isRead:e.isRead(),isWrite:e.isWrite(),node:e.identifier,writeExpression:e.writeExpr??void 0}));for(let n of e.defs)n.type!==`Variable`||n.node.type!==`VariableDeclarator`||n.node.init===null||t.some(e=>e.node.range[0]===n.name.range[0])||t.push({init:!0,isRead:!1,isWrite:!0,node:n.name,writeExpression:n.node.init});return t.toSorted((e,t)=>e.node.range[0]-t.node.range[0])}const Ms=_(`no-dead-store`,`general`,{create(e){return{Program(){ie(e.sourceCode,t=>{if(As(t))return;let n=js(t);for(let r of n)!ks(r,t)||ws(r,n)||e.report({data:{name:t.name},messageId:`deadStore`,node:r.node})})}}},meta:{docs:{description:`Disallow assignments whose value is never read.`},messages:{deadStore:`The value assigned to "{{name}}" is never read.`},schema:[],type:`problem`}});function Ns(e){let t=`CallExpression[callee.type="Identifier"][callee.name="${e.name}"]`;return _(e.ruleName,e.category,{create(n){return{[t](t){n.report({messageId:e.messageId,node:t})}}},meta:{docs:{description:`Use ${e.alternative} instead of ${e.name}().`},messages:{[e.messageId]:e.message.replaceAll(`{{name}}`,e.name).replaceAll(`{{alternative}}`,e.alternative)},schema:[],type:`problem`}})}const Ps=Ns({alternative:`throw`,category:`general`,message:`Replace {{name}}(...) with {{alternative}}.`,messageId:`noError`,name:`error`,ruleName:`no-error`});function Fs(e){let t=new Set;if(!e?.eventsImportPaths)return t;for(let n of e.eventsImportPaths)ne(n)&&t.add(n);return t}function Is(e){switch(e.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSTypeAssertion`:return Is(e.expression);default:return e}}function Ls(e){let t=Is(e);if(t.type===`Identifier`)return t.name;if(t.type===`MemberExpression`)return Ls(t.object)}function Rs(e,t){let n=Is(e.callee);if(n.type!==`MemberExpression`||T(n)!==`connect`)return;let r=Ls(n.object);if(r===void 0||!t.has(r))return;let[i]=e.arguments;if(i)switch(i.type){case`ArrowFunctionExpression`:case`FunctionExpression`:return i;default:return}}function zs(e,t){let n=Is(e.callee);if(n.type!==`MemberExpression`)return!1;let r=Ls(n);return r!==void 0&&t.has(r)}function Bs(e,t){return e.has(t)?!1:(e.add(t),!0)}function Vs(e,t){return Bs(t.playerValues,e)}function Hs(e,t){return Bs(t.playerContainers,e)}function U(e,t){switch(e.type){case`ArrayPattern`:{let n=!1;for(let r of e.elements)r&&(n=U(r,t)||n);return n}case`AssignmentPattern`:return U(e.left,t);case`Identifier`:return Vs(e.name,t);case`ObjectPattern`:{let n=!1;for(let r of e.properties){if(r.type===`RestElement`){n=U(r.argument,t)||n;continue}n=U(r.value,t)||n}return n}case`RestElement`:return U(e.argument,t);default:return!1}}function Us(e,t,n){return t===0?!1:e.type===`Identifier`?t===2?Vs(e.name,n):Hs(e.name,n):U(e,n)}function Ws(e,t,n){return e.type===`MemberExpression`||t===0?!1:e.type===`ArrayPattern`||e.type===`AssignmentPattern`||e.type===`Identifier`||e.type===`ObjectPattern`||e.type===`RestElement`?e.type===`Identifier`?t===2?Vs(e.name,n):Hs(e.name,n):U(e,n):!1}function W(e,t){let n=Is(e);switch(n.type){case`ArrayExpression`:return Gs(n,t);case`AssignmentExpression`:return W(n.right,t);case`ConditionalExpression`:return Ks(n,t);case`Identifier`:return t.playerValues.has(n.name)?2:+!!t.playerContainers.has(n.name);case`MemberExpression`:return qs(n,t);case`ObjectExpression`:return Js(n,t);case`SequenceExpression`:{let e=n.expressions.at(-1);return e===void 0?0:W(e,t)}default:return 0}}function Gs(e,t){for(let n of e.elements)if(n!==null&&W(n.type===`SpreadElement`?n.argument:n,t)!==0)return 1;return 0}function Ks(e,t){let n=W(e.consequent,t);return n===W(e.alternate,t)?n:0}function qs(e,t){return W(e.object,t)===1?2:0}function Js(e,t){for(let n of e.properties)if(W(n.type===`SpreadElement`?n.argument:n.value,t)!==0)return 1;return 0}function Ys(e,t){if(e.type===`TSParameterProperty`){U(e.parameter,t);return}U(e,t)}const Xs=_(`no-events-in-events-callback`,`roblox`,{create(e){let t=Fs(e.options[0]),n=new Set,r=new WeakMap,i=[];function a(){let e=i.at(-1);if(e?.callbackState&&!(e.callbackDepth>0))return e.callbackState}function o(e){if(e.type!==`FunctionDeclaration`){let t=r.get(e);if(t){i.push({callbackDepth:0,callbackState:t});return}}let t=i.at(-1);if(!t?.callbackState){i.push({callbackDepth:0,callbackState:void 0});return}i.push({callbackDepth:t.callbackDepth+1,callbackState:t.callbackState})}function s(){i.pop()}return{ArrowFunctionExpression:o,"ArrowFunctionExpression:exit":s,AssignmentExpression(e){let t=a();if(!t||e.operator!==`=`)return;let n=W(e.right,t);n!==0&&Ws(e.left,n,t)},CallExpression(t){let i=Rs(t,n);if(i){let e={playerContainers:new Set,playerValues:new Set},[t]=i.params;t&&Ys(t,e),r.set(i,e)}let o=a();if(!(o&&zs(t,n)))return;let[s]=t.arguments;!s||s.type===`SpreadElement`||W(s,o)!==2||e.report({messageId:`preferFunctions`,node:t})},FunctionDeclaration:o,"FunctionDeclaration:exit":s,FunctionExpression:o,"FunctionExpression:exit":s,ImportDeclaration(e){let r=e.source.value;if(t.has(r))for(let t of e.specifiers){let{name:e}=t.local;if(t.type===`ImportDefaultSpecifier`){e===`Events`&&n.add(e);continue}if(t.type===`ImportSpecifier`){if(t.imported.type===`Identifier`&&t.imported.name===`Events`){n.add(e);continue}t.imported.type===`Literal`&&t.imported.value===`Events`&&n.add(e)}}},VariableDeclarator(e){let t=a();if(!(t&&e.init))return;let n=W(e.init,t);n!==0&&Us(e.id,n,t)}}},meta:{docs:{description:`Disallow sending Events back to the same player inside an Events.connect callback; use Functions for request/response.`},messages:{preferFunctions:`Do not call Events for the same player inside an Events.connect callback. Use a Functions callback instead.`},schema:[{additionalProperties:!1,properties:{eventsImportPaths:{description:`Import paths that identify Events objects whose callbacks should be checked.`,items:{minLength:1,type:`string`},type:`array`}},required:[`eventsImportPaths`],type:`object`}],type:`problem`}}),Zs=_(`no-filter-map-chain`,`general`,{create(e){return{CallExpression(t){let n=w(t.callee);if(n.type!==`MemberExpression`||T(n)!==`map`)return;let r=w(n.object);if(r.type!==`CallExpression`)return;let i=w(r.callee);i.type===`MemberExpression`&&T(i)===`filter`&&e.report({messageId:`avoidFilterMapChain`,node:t})}}},meta:{docs:{description:`Disallow map(...) directly after filter(...).`},messages:{avoidFilterMapChain:`Do not chain map(...) directly after filter(...). Combine both operations in a single loop.`},schema:[],type:`suggestion`}}),Qs=/e/iu,$s=new Set([`!=`,`!==`,`==`,`===`]),ec=new Set([`+`,`-`,`*`,`%`,`**`]),tc=new Set([`deepStrictEqual`,`notDeepStrictEqual`,`notStrictEqual`,`strictEqual`]),nc=new Set([`toBe`,`toEqual`,`toStrictEqual`]),rc=new Set([`@jest/globals`,`bun:test`,`vitest`]),ic=new Set([`assert`,`assert/strict`,`node:assert`,`node:assert/strict`]);function ac(e){let t=e.replaceAll(`_`,``).toLowerCase(),n=t.indexOf(`e`),r=n===-1?t:t.slice(0,n),i=n===-1?0:Number(t.slice(n+1)),a=r.indexOf(`.`),o=a===-1?0:r.length-a-1,s=r.replace(`.`,``),c=o-i,l=BigInt(s);if(l===0n||c<=0)return!0;let u=10n**BigInt(c);for(;l%5n==0n;)l/=5n,u/=5n;return u%5n!=0n}function oc(e){if(e.type===`Literal`&&typeof e.value==`number`)return e.value;if(e.type!==`UnaryExpression`||e.operator!==`+`&&e.operator!==`-`)return;let t=e.argument.type===`Literal`?e.argument.value:void 0;if(typeof t==`number`)return e.operator===`-`?-t:t}function sc(e){let t=oc(e);if(t!==void 0)return t;if(e.type!==`BinaryExpression`||e.left.type===`PrivateIdentifier`)return;let n=sc(e.left),r=sc(e.right);if(n!==void 0&&r!==void 0){if(e.operator===`+`)return n+r;if(e.operator===`-`)return n-r;if(e.operator===`*`)return n*r;if(e.operator===`/`)return r===0?void 0:n/r;if(e.operator===`%`)return r===0?void 0:n%r;if(e.operator===`**`)return n**r}}function cc(e){let t=oc(e.left),n=oc(e.right);if(t===void 0||n===void 0||!Number.isSafeInteger(t)||!Number.isSafeInteger(n)||n===0)return!1;let r=Math.abs(n);for(;r%2==0;)r/=2;return Math.abs(t)%r!==0}function lc(e){let[t]=e.defs;if(t?.type===`Variable`&&t.node.type===`VariableDeclarator`&&t.node.init!==null&&t.parent?.type===`VariableDeclaration`&&t.parent.kind===`const`)return t.node.init}function uc(e,t,n){let r=sc(e);return r!==void 0&&Number.isSafeInteger(r)?!1:e.operator===`/`?cc(e)||dc(e.left,t,n)||dc(e.right,t,n):ec.has(e.operator)&&(dc(e.left,t,n)||dc(e.right,t,n))}function dc(e,t,n){let r=w(e);if(r!==e)return dc(r,t,n);if(e.type===`Literal`&&typeof e.value==`number`){let t=String(e.raw);return(t.includes(`.`)||Qs.test(t))&&!ac(t)}if(e.type===`UnaryExpression`)return(e.operator===`+`||e.operator===`-`)&&dc(e.argument,t,n);if(e.type===`BinaryExpression`)return yc(e)?uc(e,t,n):!1;if(e.type!==`Identifier`)return!1;let i=t.get(e);if(i===void 0||n.has(i))return!1;let a=lc(i);return a===void 0?!1:(n.add(i),dc(a,t,n))}function fc(e){let t=new Map;return ie(e,e=>{for(let n of e.references)t.set(n.identifier,e)}),t}function pc(e){return e.imported.type===`Identifier`?e.imported.name:e.imported.value}function mc(e,t,n){let{name:r}=n.local;rc.has(t)&&n.type===`ImportSpecifier`&&pc(n)===`expect`&&e.set(r,`expect`),ic.has(t)&&(n.type===`ImportDefaultSpecifier`||n.type===`ImportNamespaceSpecifier`?e.set(r,`assert`):tc.has(pc(n))&&e.set(r,`function`))}function hc(e){let t=new Map;for(let n of e.body){if(n.type!==`ImportDeclaration`||typeof n.source.value!=`string`)continue;let e=n.source.value;for(let r of n.specifiers)mc(t,e,r)}return t}function gc(e,t){let n=e.arguments[t];return n===void 0||n.type===`SpreadElement`?void 0:n}function _c(e,t){if(e.callee.type===`Identifier`&&t.get(e.callee.name)===`function`){let t=gc(e,0),n=gc(e,1);return t===void 0||n===void 0?void 0:[t,n]}if(e.callee.type!==`MemberExpression`)return;let n=T(e.callee);if(n!==void 0&&tc.has(n)&&e.callee.object.type===`Identifier`&&t.get(e.callee.object.name)===`assert`){let t=gc(e,0),n=gc(e,1);return t===void 0||n===void 0?void 0:[t,n]}if(n===void 0||!nc.has(n))return;let r=e.callee.object;if(r.type===`MemberExpression`&&T(r)===`not`&&(r=r.object),r.type!==`CallExpression`||r.callee.type!==`Identifier`||t.get(r.callee.name)!==`expect`)return;let i=gc(r,0),a=gc(e,0);return i===void 0||a===void 0?void 0:[i,a]}function vc(e){let t=e.operator===`>`||e.operator===`>=`;return[{above:t,expression:e.left,threshold:e.right},{above:!t,expression:e.right,threshold:e.left}]}function yc(e){return e.type===`BinaryExpression`&&e.left.type!==`PrivateIdentifier`}function bc(e,t,n){return e.type===t.type&&n.getText(e).replaceAll(/\s+/gu,``)===n.getText(t).replaceAll(/\s+/gu,``)}function xc(e,t){if(yc(e.left)&&yc(e.right)&&!((e.operator!==`&&`||e.left.operator!==`<=`&&e.left.operator!==`>=`||e.right.operator!==`<=`&&e.right.operator!==`>=`)&&(e.operator!==`||`||e.left.operator!==`<`&&e.left.operator!==`>`||e.right.operator!==`<`&&e.right.operator!==`>`))){for(let n of vc(e.left))for(let r of vc(e.right))if(n.above!==r.above&&bc(n.expression,r.expression,t)&&bc(n.threshold,r.threshold,t))return[n.expression,n.threshold]}}const Sc=_(`no-floating-point-equality`,`general`,{create(e){return{Program(t){let n=fc(e.sourceCode),r=hc(t);function i(e){return dc(e,n,new Set)}Li(t,t=>{let n=!1;if(t.type===`BinaryExpression`&&$s.has(t.operator))n=t.left.type!==`PrivateIdentifier`&&(i(t.left)||i(t.right));else if(t.type===`LogicalExpression`){let r=xc(t,e.sourceCode);n=r!==void 0&&(i(r[0])||i(r[1]))}else if(t.type===`SwitchCase`&&t.test!==null)n=i(t.test);else if(t.type===`CallExpression`){let e=_c(t,r);n=e!==void 0&&(i(e[0])||i(e[1]))}n&&e.report({messageId:`exactFloatComparison`,node:t})})}}},meta:{docs:{description:`Disallow exact comparisons involving inexact floating-point values.`},messages:{exactFloatComparison:`Compare floating-point results within a tolerance instead of for exact equality.`},schema:[],type:`problem`}}),Cc=/^[A-Z]/u;function G(e){return Cc.test(e)}function wc(e){return e.type===`FunctionDeclaration`&&e.id!==null&&G(e.id.name)}function Tc(e){return e.type===`CallExpression`?e.callee.type===`Identifier`?e.callee.name===`memo`:e.callee.type===`MemberExpression`&&e.callee.object.type===`Identifier`&&e.callee.object.name===`React`&&e.callee.property.type===`Identifier`&&e.callee.property.name===`memo`:!1}function Ec({callee:e}){return e.type===`Identifier`?e.name===`forwardRef`||e.name===`memo`:e.type===`MemberExpression`&&e.object.type===`Identifier`&&e.object.name===`React`&&e.property.type===`Identifier`&&(e.property.name===`forwardRef`||e.property.name===`memo`)}function Dc({name:e}){return e.type===`JSXIdentifier`?e.name:e.name.name}function Oc(e,t){for(let n of e.openingElement.attributes)if(n.type===`JSXAttribute`&&n.name.type===`JSXIdentifier`&&n.name.name===t)return!0;return!1}function kc(e){if(e.type===`BinaryExpression`)switch(e.operator){case`%`:case`*`:case`**`:case`+`:case`-`:case`/`:return kc(e.left)&&kc(e.right);default:return!1}return e.type===`Identifier`||e.type===`Literal`?!0:e.type===`MemberExpression`?!e.computed&&kc(e.object):e.type===`ParenthesizedExpression`?kc(e.expression):e.type===`TemplateLiteral`?e.expressions.length===0:e.type===`UnaryExpression`&&kc(e.argument)}function Ac(e,t){return e?.type===`CallExpression`&&e.callee.type===`Identifier`&&(y(t)?e.callee.name===t:t.has(e.callee.name))}function jc(e){return e.type===`VariableDeclarator`&&e.id.type===`Identifier`&&G(e.id.name)&&e.init!==null&&(e.init.type===`ArrowFunctionExpression`||e.init.type===`FunctionExpression`)}function Mc(e){return e.loc.end.line-e.loc.start.line+1}function Nc(e){if(!(e.type!==`FunctionDeclaration`||!wc(e)||e.id===null||e.body===null)&&D(e.id)&&`name`in e.id&&y(e.id.name))return{body:e.body,name:e.id.name,nameNode:e.id}}function Pc(e){if(e.type!==`VariableDeclarator`||!jc(e)||e.init===null||!(`name`in e.id&&y(e.id.name))||e.init.type!==`ArrowFunctionExpression`&&e.init.type!==`FunctionExpression`||!D(e.init.body))return;let{name:t}=e.id;return{body:e.init.body,name:t,nameNode:e.id}}const Fc=_(`no-giant-component`,`react`,{create(e){function t(t,n,r){let i=Mc(r);i<=300||e.report({data:{lineCount:String(i),name:n},messageId:`giantComponent`,node:t})}return{FunctionDeclaration(e){let n=Nc(e);n!==void 0&&t(n.nameNode,n.name,n.body)},VariableDeclarator(e){let n=Pc(e);n!==void 0&&t(n.nameNode,n.name,n.body)}}},meta:{docs:{description:`Report React components whose bodies exceed 300 lines.`,recommended:!0},messages:{giantComponent:`Component "{{name}}" is {{lineCount}} lines — consider breaking it into smaller focused components`},type:`problem`}}),Ic=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`]);function Lc(e){if(e.type===`FunctionDeclaration`&&e.id!==null&&O(e.id.name))return e.id.name;if(e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`&&O(t.id.name))return t.id.name;if(t.type===`Property`&&t.key.type===`Identifier`&&O(t.key.name)||t.type===`MethodDefinition`&&t.key.type===`Identifier`&&O(t.key.name))return t.key.name}}function Rc(e){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`&&O(t.id.name))return t.id.name;if(t.type===`AssignmentExpression`&&t.left.type===`Identifier`&&O(t.left.name))return t.left.name;let n;if(t.type===`ExportDefaultDeclaration`&&e.arguments.length>0){let[t]=e.arguments;t?.type===`FunctionExpression`&&t.id&&O(t.id.name)&&(n=t.id.name)}return n}function zc(e){if(!Ue(e))return;let[t]=e.params;if(!t)return;let n;if(t.type===`ObjectPattern`&&(n=t),t.type===`AssignmentPattern`&&t.left.type===`ObjectPattern`&&(n=t.left),!n)return;let r=0;for(let e of n.properties)e.type===`Property`&&(r+=1);return r}function Bc(e,t){return t?.type===`TSLiteralType`}function Vc(e,t){if(!Ue(e)||e.body===null)return{maxJsxDepth:0,nullLiterals:[],stateHookCount:0};let n=0,r=0,i=[],a=0;return Li(e.body,o=>{if(!(Ic.has(o.type)&&o!==e)){if(o.type===`JSXElement`||o.type===`JSXFragment`){a+=1,a>n&&(n=a);return}if(o.type===`CallExpression`){let e=L(o);e!==void 0&&e.length>0&&t.has(e)&&(r+=1)}o.type===`Literal`&&o.value===null&&!Bc(o,o.parent)&&i.push(o)}}),{maxJsxDepth:n,nullLiterals:i,stateHookCount:r}}function Hc(e){let t={enforceTargetLines:!0,ignoreComponents:[],maxDestructuredProps:5,maxLines:200,maxStateHooks:5,maxTsxNesting:3,stateHooks:[`useState`,`useReducer`,`useBinding`],targetLines:120};if(typeof e!=`object`||!e)return t;let n=e;return{enforceTargetLines:typeof n.enforceTargetLines==`boolean`?n.enforceTargetLines:t.enforceTargetLines,ignoreComponents:Array.isArray(n.ignoreComponents)?n.ignoreComponents:t.ignoreComponents,maxDestructuredProps:b(n.maxDestructuredProps)?n.maxDestructuredProps:t.maxDestructuredProps,maxLines:b(n.maxLines)?n.maxLines:t.maxLines,maxStateHooks:b(n.maxStateHooks)?n.maxStateHooks:t.maxStateHooks,maxTsxNesting:b(n.maxTsxNesting)?n.maxTsxNesting:t.maxTsxNesting,stateHooks:Array.isArray(n.stateHooks)?n.stateHooks:t.stateHooks,targetLines:b(n.targetLines)?n.targetLines:t.targetLines}}const Uc=_(`no-god-components`,`react`,{create(e){let t=Hc(e.options[0]),n=new Set(t.ignoreComponents),r=new Set(t.stateHooks),i=new WeakSet;function a(a,o){if(n.has(o)||i.has(a))return;i.add(a);let s=a.loc,c=s.end.line-s.start.line+1;c>t.maxLines?e.report({data:{lines:String(c),max:String(t.maxLines),name:o,target:String(t.targetLines)},messageId:`exceedsMaxLines`,node:a}):t.enforceTargetLines&&c>t.targetLines&&e.report({data:{lines:String(c),max:String(t.maxLines),name:o,target:String(t.targetLines)},messageId:`exceedsTargetLines`,node:a});let l=zc(a);b(l)&&l>t.maxDestructuredProps&&e.report({data:{count:String(l),max:String(t.maxDestructuredProps),name:o},messageId:`tooManyProps`,node:a});let u=Vc(a,r);u.maxJsxDepth>t.maxTsxNesting&&e.report({data:{depth:String(u.maxJsxDepth),max:String(t.maxTsxNesting),name:o},messageId:`tsxNestingTooDeep`,node:a}),u.stateHookCount>t.maxStateHooks&&e.report({data:{count:String(u.stateHookCount),hooks:t.stateHooks.join(`, `),max:String(t.maxStateHooks),name:o},messageId:`tooManyStateHooks`,node:a});for(let t of u.nullLiterals)e.report({messageId:`nullLiteral`,node:t})}function o(e){let t=Lc(e);t!==void 0&&t.length!==0&&a(e,t)}return{ArrowFunctionExpression:o,CallExpression(e){if(!Ec(e))return;let[t]=e.arguments;if(!t||t.type!==`FunctionExpression`&&t.type!==`ArrowFunctionExpression`)return;let n=Rc(e),r=Lc(t),i=n??r;i!==void 0&&i.length!==0&&a(t,i)},FunctionDeclaration(e){e.type===`FunctionDeclaration`&&o(e)},FunctionExpression(e){e.type===`FunctionExpression`&&o(e)}}},meta:{docs:{description:`Enforce React component size and complexity limits inspired by the 'Refactor God Component' checklist.`,recommended:!1},messages:{exceedsMaxLines:`Component '{{name}}' is {{lines}} lines; max allowed is {{max}}. Split into smaller components/hooks.`,exceedsTargetLines:`Component '{{name}}' is {{lines}} lines; target is {{target}} (max {{max}}). Consider extracting hooks/components.`,nullLiteral:"Avoid `null` in components; use `undefined` instead.",tooManyProps:`Component '{{name}}' destructures {{count}} props; max allowed is {{max}}. Group props or split the component.`,tooManyStateHooks:`Component '{{name}}' has {{count}} state hooks ({{hooks}}); max allowed is {{max}}. Extract cohesive state into a custom hook.`,tsxNestingTooDeep:`Component '{{name}}' has TSX nesting depth {{depth}}; max allowed is {{max}}. Extract child components.`},schema:[{additionalProperties:!1,properties:{enforceTargetLines:{default:!0,description:`Whether to report when exceeding targetLines (soft limit).`,type:`boolean`},ignoreComponents:{default:[],description:`Component names to ignore.`,items:{type:`string`},type:`array`},maxDestructuredProps:{default:5,description:`Maximum number of destructured props in a component parameter.`,type:`number`},maxLines:{default:200,description:`Hard maximum lines for a component.`,type:`number`},maxStateHooks:{default:5,description:`Maximum number of stateful hook calls in a component.`,type:`number`},maxTsxNesting:{default:3,description:`Maximum JSX/TSX nesting depth in a component.`,type:`number`},stateHooks:{default:[`useState`,`useReducer`,`useBinding`],description:`Hook names to count toward state complexity.`,items:{type:`string`},type:`array`},targetLines:{default:120,description:`Soft target lines for a component.`,type:`number`}},type:`object`}],type:`problem`}});function Wc({callee:e}){if(e.type!==`CallExpression`)return!1;let t=e.callee;if(t.type!==`MemberExpression`)return!1;let{object:n}=t;return n.type===`Identifier`&&n.name===`Ianitor`}const Gc=_(`no-ianitor-in-function-body`,`roblox`,{create(e){let t=0;function n(){t+=1}function r(){--t}return{ArrowFunctionExpression:n,"ArrowFunctionExpression:exit":r,CallExpression(n){t===0||!Wc(n)||e.report({messageId:`hoistIanitorValidator`,node:n})},FunctionDeclaration:n,"FunctionDeclaration:exit":r,FunctionExpression:n,"FunctionExpression:exit":r}},meta:{docs:{description:`Disallow Ianitor validator creation inside function bodies. Hoist to module scope to avoid recreating validators on every call.`,recommended:!0},messages:{hoistIanitorValidator:`Ianitor validator created inside function body is slow — hoist to module scope. Example: const validator = Ianitor.keyOf(ids);`},schema:[],type:`problem`}});function Kc(e){let t=w(e);if(t.type!==`CallExpression`)return!1;let n=w(t.callee);if(n.type!==`MemberExpression`||n.computed)return!1;let r=w(n.object);return r.type===`Identifier`&&r.name===`Ianitor`&&n.property.type===`Identifier`}function qc(e){for(let{node:t}of e.defs){if(t.type!==`VariableDeclarator`)continue;let{init:e}=t;if(e!==null&&Kc(e))return!0}return!1}function Jc(e,t){let n=w(e.callee);if(n.type===`CallExpression`)return Kc(n);if(n.type===`Identifier`){let r=E(t.getScope(e),n.name);return r!==void 0&&qc(r)}return!1}function Yc(e){let t=!1;for(let n of e.properties){if(n.type!==`Property`||n.key.type!==`Identifier`)continue;let{name:e}=n.key;if(e===`error`||e===`value`)return!1;e===`success`&&(t=!0)}return t}function Xc(e){for(let t of e.properties)if(t.type===`Property`&&t.key.type===`Identifier`&&t.key.name===`success`)return t.key}const Zc=_(`no-ianitor-success-access`,`roblox`,{create(e){let{sourceCode:t}=e,n=new Set,r=new Map;function i(e){let t=r.get(e);t!==void 0&&(t.referencedFully=!0)}return{CallExpression(e){for(let t of e.arguments)if(t.type===`Identifier`){let e=r.get(t.name);e!==void 0&&(e.referencedFully=!0)}},MemberExpression({computed:n,object:i,property:a}){if(n||a.type!==`Identifier`)return;let o=w(i);if(o.type===`CallExpression`&&a.name===`success`){Jc(o,t)&&e.report({messageId:`preferCreateGuard`,node:a});return}if(o.type===`Identifier`){let e=r.get(o.name);e!==void 0&&e.properties.add(a.name)}},"Program:exit"(){for(let[,{firstSuccessNode:t,properties:n,referencedFully:i}]of r)n.has(`success`)&&!n.has(`error`)&&!n.has(`value`)&&!i&&e.report({messageId:`preferCreateGuard`,node:t})},ReturnStatement({argument:e}){e?.type===`Identifier`&&i(e.name)},VariableDeclarator({id:i,init:a}){if(a===null)return;let o=w(a);if(o.type===`CallExpression`){if(i.type===`Identifier`&&Kc(o)){n.add(i.name);return}if(i.type===`ObjectPattern`&&Jc(o,t)&&Yc(i)){let t=Xc(i);t!==void 0&&e.report({messageId:`preferCreateGuard`,node:t})}i.type===`Identifier`&&o.callee.type===`Identifier`&&n.has(o.callee.name)&&r.set(i.name,{firstSuccessNode:i,properties:new Set,referencedFully:!1})}}}},meta:{docs:{description:"Disallow accessing `.success` on Ianitor check results when the full result object is not needed."},messages:{preferCreateGuard:`Replace with Flamework.createGuard<T>(). Ianitor check results allocate a table on every call; Flamework.createGuard returns a plain boolean at runtime with zero allocation.`},schema:[],type:`suggestion`}}),Qc=[`binding`];function $c(e){if(e.type===`Identifier`)return e.name;if(e.type===`AssignmentPattern`&&e.left.type===`Identifier`)return e.left.name}function el({body:e},t){if(e.length!==1)return!1;let[n]=e;return n?.type!==`ReturnStatement`||n.argument?.type!==`Identifier`?!1:n.argument.name===t}function tl(e){if(e.params.length!==1)return;let[t]=e.params;return t===void 0?void 0:$c(t)}function nl(e){if(e.type===`ArrowFunctionExpression`){let t=tl(e);if(t===void 0)return!1;let{body:n}=e;switch(n.type){case`BlockStatement`:return el(n,t);case`Identifier`:return n.name===t;default:return!1}}if(e.type===`FunctionExpression`){let t=tl(e);return t===void 0||e.body===null?!1:el(e.body,t)}return!1}function rl(e){return L(e)===`joinBindings`}function il(e){for(let t of e.defs){if(t.node.type!==`VariableDeclarator`)continue;let{init:e}=t.node;if(e?.type===`CallExpression`&&(L(e)===`useBinding`||rl(e)||e.callee.type===`MemberExpression`&&T(e.callee)===`map`))return!0}return!1}function al(e,{object:t},n){if(t.type===`Identifier`){let r=t.name.toLowerCase();for(let e of n)if(r.includes(e.toLowerCase()))return!0;let i=E(e.getScope(t),t.name);if(i!==void 0&&il(i))return!0}return t.type===`CallExpression`&&(t.callee.type===`MemberExpression`&&T(t.callee)===`map`||rl(t))}const ol=_(`no-identity-map`,`general`,{create(e){let{sourceCode:t}=e,[n]=e.options,r=n?.bindingPatterns??Qc;return{CallExpression(n){let{callee:i}=n;if(i.type!==`MemberExpression`||i.computed||i.property.type!==`Identifier`||T(i)!==`map`||n.arguments.length!==1)return;let[a]=n.arguments;if(a===void 0||a.type===`SpreadElement`||!nl(a))return;let o=al(t,i,r);e.report({fix(e){return e.replaceText(n,t.getText(i.object))},messageId:o?`identityBindingMap`:`identityArrayMap`,node:n})}}},meta:{docs:{description:"Disallow pointless identity `.map()` calls that return the parameter unchanged"},fixable:`code`,messages:{identityArrayMap:"Pointless identity `.map()` call on Array. Use `table.clone(array)` or `[...array]` instead.",identityBindingMap:"Pointless identity `.map()` call on Binding. Use the original binding directly."},schema:[{additionalProperties:!1,properties:{bindingPatterns:{default:[...Qc],description:`Variable name patterns to recognize as Bindings (case insensitive)`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}});function sl(e){let{parent:t}=e;return t.type===`ExpressionStatement`||t.type===`ForStatement`&&t.update===e}const cl=_(`no-increment-decrement`,`general`,{create(e){let[t]=e.options,n=wi(t)&&t.allowAutofix,{sourceCode:r}=e;return{UpdateExpression(t){if(!sl(t))return;let i=r.getText(t.argument),a=t.operator===`++`?`noIncrement`:`noDecrement`;if(!n){e.report({messageId:a,node:t});return}let o=t.operator===`++`?`${i} += 1`:`${i} -= 1`;e.report({fix(e){return e.replaceText(t,o)},messageId:a,node:t})}}},meta:{docs:{description:"Disallow standalone `++` and `--` statements and for-loop update clauses.",recommended:!0},fixable:`code`,messages:{noDecrement:"Do not use standalone `--`. Use `-= 1` instead.",noIncrement:"Do not use standalone `++`. Use `+= 1` instead."},schema:[{additionalProperties:!1,properties:{allowAutofix:{default:!1,description:`Allow the fixer to replace standalone ++ and -- statements and for-loop updates.`,type:`boolean`}},type:`object`}],type:`suggestion`}});function ll(e){return e.name.type===`JSXIdentifier`?e.name.name:void 0}function ul(e){switch(e.type){case`ArrayExpression`:return`array`;case`ArrowFunctionExpression`:case`FunctionExpression`:return`function`;case`JSXElement`:case`JSXFragment`:return`JSX`;case`ObjectExpression`:return`object`;default:return}}const dl=_(`no-inline-property-on-memo-component`,`react`,{create(e){let t=new Set;return{JSXAttribute(n){if(n.value?.type!==`JSXExpressionContainer`||n.value.expression.type===`JSXEmptyExpression`)return;let r=n.parent;if(!ge(r))return;let i=ll(r);if(i===void 0||!t.has(i))return;let a=ul(n.value.expression);a!==void 0&&e.report({data:{name:i,type:a},messageId:`inlineProperty`,node:n.value.expression})},VariableDeclarator(e){e.id.type===`Identifier`&&e.init!==null&&Tc(e.init)&&t.add(e.id.name)}}},meta:{docs:{description:`Prevent inline properties from being passed to memoized components.`,recommended:!0},messages:{inlineProperty:`Inline {{type}} passed to memoized component "{{name}}" — new references cause unnecessary re-renders`},type:`problem`}}),fl={checkPrivate:!0,checkProtected:!0,checkPublic:!0};function pl(e){return x(e)?{checkPrivate:typeof e.checkPrivate!=`boolean`||e.checkPrivate,checkProtected:typeof e.checkProtected!=`boolean`||e.checkProtected,checkPublic:typeof e.checkPublic!=`boolean`||e.checkPublic}:fl}function ml(e,t){if(e.static||e.kind!==`method`)return!1;let n=e.accessibility??`public`;return!(n===`private`&&!t.checkPrivate||n===`protected`&&!t.checkProtected||n===`public`&&!t.checkPublic)}function hl(e,t){if(t.has(e))return!1;if(t.add(e),e.type===`ThisExpression`||e.type===`Super`)return!0;if(!x(e))return!1;for(let n in e)if(Object.hasOwn(e,n)&&gl(e[n],t))return!0;return!1}function gl(e,t){if(Array.isArray(e)){for(let n of e)if(D(n)&&hl(n,t))return!0;return!1}return D(e)&&hl(e,t)}function _l({value:e}){return e.type===`FunctionExpression`&&hl(e,new WeakSet)}function vl(e){return e.key.type===`Identifier`?e.key.name:`unknown`}const yl=_(`no-instance-methods-without-this`,`roblox`,{create(e){let t=pl(e.options[0]);return{MethodDefinition(n){!ml(n,t)||_l(n)||e.report({data:{methodName:vl(n)},messageId:`noInstanceMethodWithoutThis`,node:n})}}},meta:{docs:{description:`Detect instance methods that do not use 'this' and suggest converting them to standalone functions for better performance in roblox-ts.`},messages:{noInstanceMethodWithoutThis:`Method '{{methodName}}' does not use 'this' and creates unnecessary metatable overhead in roblox-ts. Convert it to a standalone function for better performance.`},schema:[{additionalProperties:!1,properties:{checkPrivate:{default:!0,description:`Check private methods (default: true)`,type:`boolean`},checkProtected:{default:!0,description:`Check protected methods (default: true)`,type:`boolean`},checkPublic:{default:!0,description:`Check public methods (default: true)`,type:`boolean`}},type:`object`}],type:`problem`}}),bl=new Set([`add`,`clear`,`copyWithin`,`delete`,`fill`,`pop`,`push`,`reverse`,`set`,`shift`,`sort`,`splice`,`unshift`]),xl=new Set([`entries`,`keys`,`values`]),Sl=new Set([`ArrowFunctionExpression`,`ClassDeclaration`,`ClassExpression`,`FunctionDeclaration`,`FunctionExpression`]);function Cl(e){if(e!=null){if(e.type===`Identifier`)return e.name;if(e.type===`ParenthesizedExpression`||e.type===`TSAsExpression`||e.type===`TSNonNullExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSTypeAssertion`)return Cl(e.expression)}}function wl(e){if(e.type===`ArrayPattern`)return Cl(e.elements[0]??void 0)}function Tl(e){if(e.left.type===`VariableDeclaration`){let[t]=e.left.declarations;return t?.id}return e.left}function El(e){return e.left.type===`VariableDeclaration`&&e.left.kind===`const`}function Dl(e){let t=w(e);if(t.type===`Identifier`)return{method:`direct`,name:t.name};if(t.type!==`CallExpression`||t.callee.type!==`MemberExpression`||t.arguments.length>0||t.callee.optional||t.callee.object.type!==`Identifier`)return;let n=T(t.callee);if(!(n===void 0||!xl.has(n)))return{method:n,name:t.callee.object.name}}function Ol(e){let t=Dl(e.right);if(t===void 0)return;if(!El(e))return{addArgumentName:void 0,deleteArgumentName:void 0,iterableName:t.name,setKeyName:void 0};let n=Tl(e);if(n===void 0)return;let r,i,a;return t.method===`entries`?(r=wl(n),i=r,a=r):t.method===`keys`?(i=Cl(n),a=i):(r=Cl(n),a=r??wl(n),i=wl(n)),{addArgumentName:r,deleteArgumentName:a,iterableName:t.name,setKeyName:i}}function kl(e,t){if(t===void 0)return!1;let[n]=e.arguments;return n!==void 0&&n.type!==`SpreadElement`&&Cl(n)===t}function Al(e,t){for(let n in e){if(n===`parent`||n===`range`||n===`loc`)continue;let r=Reflect.get(e,n);if(Array.isArray(r))for(let e of r)D(e)&&t.push(e);else D(r)&&t.push(r)}}function jl(e,t){let n=[],r=[e];for(let e of r)if(!Sl.has(e.type)){if(e.type===`CallExpression`&&e.callee.type===`MemberExpression`){let r=T(e.callee),i=w(e.callee.object);r!==void 0&&bl.has(r)&&i.type===`Identifier`&&i.name===t&&n.push({call:e,method:r,property:e.callee.property})}Al(e,r)}return n}function Ml(e,t,n){let{method:r,call:i}=e;return r===`delete`&&kl(i,t.deleteArgumentName)?!0:r===`add`&&kl(i,t.addArgumentName)||r===`set`&&kl(i,t.setKeyName)?!n.some(e=>e.call.range[0]<i.range[0]&&e.method===`delete`&&kl(e.call,t.deleteArgumentName)):!1}const Nl=_(`no-loop-iterable-mutation`,`general`,{create(e){return{"ForOfStatement:exit"(t){if(t.await)return;let n=Ol(t);if(n===void 0)return;let r=jl(t.body,n.iterableName);for(let t of r)Ml(t,n,r)||e.report({data:{iterable:n.iterableName},messageId:`noLoopIterableMutation`,node:t.property})}}},meta:{docs:{description:`Disallow mutating a loop iterable during iteration.`,recommended:!0},messages:{noLoopIterableMutation:"Do not mutate `{{iterable}}` while iterating over it."},schema:[],type:`problem`}}),Pl=[`Axes`,`BrickColor`,`CFrame`,`Color3`,`ColorSequence`,`ColorSequenceKeypoint`,`DateTime`,`Enum`,`Faces`,`NumberRange`,`NumberSequence`,`NumberSequenceKeypoint`,`PathWaypoint`,`PhysicalProperties`,`Ray`,`Rect`,`Region3`,`Region3int16`,`TweenInfo`,`UDim`,`UDim2`,`Vector2`,`Vector3`,`Vector3int16`,`Vector3int32`],Fl=new Set([`!`,`+`,`-`,`typeof`,`void`,`~`]),Il=new Set(`ArrayExpression.ArrowFunctionExpression.AssignmentExpression.AwaitExpression.BinaryExpression.CallExpression.ChainExpression.ClassExpression.ConditionalExpression.FunctionExpression.Identifier.ImportExpression.Literal.LogicalExpression.MemberExpression.MetaProperty.NewExpression.ObjectExpression.ParenthesizedExpression.SequenceExpression.Super.TaggedTemplateExpression.TemplateLiteral.ThisExpression.TSAsExpression.TSInstantiationExpression.TSNonNullExpression.TSSatisfiesExpression.TSTypeAssertion.UnaryExpression.UpdateExpression.YieldExpression`.split(`.`));function Ll(e){return Il.has(e.type)}function K(e){return e.type===`module`||e.type===`global`}function q(e){for(let t of e.defs)if(t.type===`ImportBinding`)return!0;return!1}function Rl(e){return e.type===`Variable`}function zl(e){if(!Rl(e))return;let{node:t}=e;if(t.type!==`VariableDeclarator`)return;let{parent:n}=t;if(n.type===`VariableDeclaration`&&n.kind===`const`)return t.init??void 0}function Bl(e,t){let n=E(e.getScope(t),t.name);if(!(n===void 0||!K(n.scope)))for(let e of n.defs){let t=zl(e);if(t!==void 0)return t}}function Vl(e,t){let n=E(e.getScope(t),t.name);if(n!==void 0)for(let e of n.defs){let t=zl(e);if(t!==void 0)return t}}function Hl(e,t,n){let r=w(t);if(n.has(r))return!1;if(n.add(r),r.type===`Identifier`&&r.name===`undefined`||r.type===`UnaryExpression`&&r.operator===`void`)return!0;if(r.type!==`Identifier`)return!1;let i=Vl(e,r);return i!==void 0&&Hl(e,i,n)}function Ul(e,t,n,r){return t.type===`Identifier`?!0:Ll(t)?J(e,t,n,r):!1}function Wl(e){let t=w(e);for(;t.type===`MemberExpression`;)t=w(t.object);return t.type===`Identifier`?t.name:void 0}function Gl(e,t,n,r){if(r.staticCallsRequireFactories===!0){let e=Wl(t);if(e===void 0||!r.staticGlobalFactories.has(e))return!1}let i=w(t);return i.type===`Identifier`?ql(e,i,n,r):i.type!==`MemberExpression`||!J(e,i.object,n,r)?!1:i.computed?J(e,i.property,n,r):i.property.type===`Identifier`}function Kl(e,t,n,r,i){return Gl(e,n,r,i)?t.every(t=>t.type!==`SpreadElement`&&J(e,t,r,i)):!1}function J(e,t,n,r){let i=w(t);if(n.has(i))return!1;switch(n.add(i),i.type){case`ArrayExpression`:return Xl(e,i,n,r);case`BinaryExpression`:case`LogicalExpression`:return Ll(i.left)?J(e,i.left,n,r)&&J(e,i.right,n,r):!1;case`CallExpression`:return Kl(e,i.arguments,i.callee,n,r);case`ChainExpression`:return J(e,i.expression,n,r);case`ConditionalExpression`:return J(e,i.test,n,r)&&J(e,i.consequent,n,r)&&J(e,i.alternate,n,r);case`Identifier`:return ql(e,i,n,r);case`Literal`:return!0;case`MemberExpression`:return J(e,i.object,n,r)&&(!i.computed||Ul(e,i.property,n,r));case`NewExpression`:return Kl(e,i.arguments,i.callee,n,r);case`ObjectExpression`:return Yl(e,i,n,r);case`SequenceExpression`:return i.expressions.length>0&&i.expressions.every(t=>J(e,t,n,r));case`TemplateLiteral`:return i.expressions.length===0;case`UnaryExpression`:return Fl.has(i.operator)&&J(e,i.argument,n,r);default:return!1}}function ql(e,t,n,r){let i=E(e.getScope(t),t.name);if(i===void 0)return r.staticGlobalFactories.has(t.name);if(!K(i.scope))return!1;if(q(i))return!0;for(let t of i.defs){let i=zl(t);if(i!==void 0&&J(e,i,n,r))return!0}return!1}function Jl(e){return e.type!==`PrivateIdentifier`&&e.type!==`Identifier`}function Yl(e,t,n,r){for(let i of t.properties)if(i.type!==`Property`||i.kind!==`init`||i.computed&&Jl(i.key)&&!J(e,i.key,n,r)||!J(e,i.value,n,r))return!1;return!0}function Xl(e,{elements:t},n,r){for(let i of t)if(i===null||i.type===`SpreadElement`||!J(e,i,n,r))return!1;return!0}function Zl(e){return e.type===`JSXIdentifier`?e.name:e.name.name}function Ql(e){return e===`nativeProperties`||e.endsWith(`NativeProperties`)}function $l(e){if(e.type===`Variable`&&e.node.type===`VariableDeclarator`)return e.node.init??void 0}function eu(e){let t=w(e);for(;t.type===`MemberExpression`;){let e=w(t.object);if(e.type===`Identifier`)return e;if(e.type!==`MemberExpression`)return;t=e}return t.type===`Identifier`?t:void 0}function tu(e,t){let n=w(t);if(n.type===`ObjectExpression`)return!0;let r=eu(n);if(r===void 0)return!1;let i=E(e.getScope(r),r.name);return i===void 0?!1:q(i)||K(i.scope)}function nu(e,t,n){let r=w(t);if(n.has(r))return;if(n.add(r),r.type===`ObjectExpression`)return r;if(r.type!==`Identifier`)return;let i=E(e.getScope(r),r.name);if(!(i===void 0||K(i.scope)))for(let t of i.defs){let r=$l(t);if(r===void 0)continue;let i=nu(e,r,n);if(i!==void 0)return i}}const ru=_(`no-native-properties-spread`,`roblox`,{create(e){let{sourceCode:t}=e;function n(n,r){for(let i of n.properties){if(i.type!==`SpreadElement`||!tu(t,i.argument))continue;let n=t.getText(i.argument);e.report({data:`propertyName`in r?{prop:r.propertyName,source:n}:{source:n},messageId:r.messageId,node:i})}}return{JSXAttribute(e){let r=Zl(e.name);if(r===void 0||!Ql(r))return;let{value:i}=e;if(i?.type!==`JSXExpressionContainer`)return;let{expression:a}=i;if(a.type===`JSXEmptyExpression`)return;let o=nu(t,a,new Set);o!==void 0&&n(o,{messageId:`noNativePropertiesSpread`,propertyName:r})},JSXSpreadAttribute(e){let r=nu(t,e.argument,new Set);r!==void 0&&n(r,{messageId:`noElementSpread`})}}},meta:{docs:{description:`Disallow spreading static property bags into nativeProperties/*NativeProperties props and onto JSX elements via intermediate objects, because the spread creates a new copied table every render.`,recommended:!0},messages:{noElementSpread:`Spreading static property bag {{source}} through an intermediate object creates a new table every render. Inline the full object properties directly on the JSX element.`,noNativePropertiesSpread:`Spreading static property bag {{source}} into {{prop}} creates a new table every render. Pass it directly or inline the full object instead.`},schema:[],type:`problem`}});function iu(e){return e.parent.type===`ExpressionStatement`?!0:e.parent.type!==`UnaryExpression`||e.parent.operator!==`void`?!1:e.parent.parent.type===`ExpressionStatement`}function au(e,t,n,r){if(_r(e,t))for(let t of e.specifiers){if(t.type===`ImportSpecifier`){de(t.imported,`useMemo`)&&n.add(t.local.name);continue}r.add(t.local.name)}}const ou=new Set([`Instance`]);function su(e){let t=x(e)&&S(e.constructors)?new Set(e.constructors):ou,n=x(e)&&e.environment===`standard`?`standard`:`roblox-ts`,r=x(e)?e.maxHelperTraceDepth:void 0;return{constructors:t,environment:n,maxHelperTraceDepth:re(r)&&Number.isInteger(r)&&r>=0?r:4}}function cu(e){return e?.type===`CallExpression`}function lu(e,t,n){let r=e.parent;for(;r!==null;){if(Ie(r)){let{parent:e}=r;if(cu(e)&&e.arguments[0]===r){if(!pe(e,t,n)){r=e.parent;continue}return!0}}r=r.parent}return!1}function uu(e,t,n,r,i){let a=r.get(e);if(a!==void 0)return a;if(i.has(e))return new Set;i.add(e);let o=new Set;for(let a of e.defs){let e=du(a,t,n,r,i);for(let t of e)o.add(t)}return i.delete(e),r.set(e,o),o}function du(e,t,n,r,i){if(e.type===`FunctionName`)return fu(e,n);if(e.type!==`Variable`)return new Set;let{node:a}=e;if(a.type!==`VariableDeclarator`||a.init===null)return new Set;let o=w(a.init);if(Ie(o))return pu(o,n);if(o.type!==`Identifier`)return new Set;let s=E(t.getScope(o),o.name);return s===void 0?new Set:uu(s,t,n,r,i)}function fu(e,t){let{node:n}=e;return n.type===`FunctionDeclaration`?pu(n,t):new Set}function pu(e,t){let n=t.get(e)?.id;return n===void 0?new Set:new Set([n])}function mu(e,t,n,r){let i=E(t.getScope(e),e.name);return i===void 0?new Set:uu(i,t,n,r,new Set)}function hu(e,t,n,r){for(let i of t.values())for(let t of i.callIdentifiers){let a=mu(t,e,n,r);for(let e of a)i.callees.add(e)}}function gu(e,t,n){let r=new Set(e),i=[];for(let t of e)i.push({depth:0,functionId:t});let a=0;for(;a<i.length;){let e=i[a];if(a+=1,e===void 0||e.depth>=n)continue;let o=t.get(e.functionId);if(o!==void 0)for(let t of o.callees)r.has(t)||(r.add(t),i.push({depth:e.depth+1,functionId:t}))}return r}function _u(e,t,n,r,i){let a=new Set;for(let e of t){let t=r.get(e)?.id;t!==void 0&&a.add(t)}for(let t of n){let n=mu(t,e,r,i);for(let e of n)a.add(e)}return a}const vu=_(`no-new-instance-in-use-memo`,`react`,{create(e){let t=su(e.options[0]);if(t.constructors.size===0)return{};let n=hr(t.environment),r=new Set,i=new Set,a=new Map,o=new Map,s=[],c=[],l=[],u=[],d=new Map,f=0;function p(e){let t=a.get(e);if(t!==void 0)return t;let n={callIdentifiers:[],callees:new Set,id:f};return f+=1,a.set(e,n),o.set(n.id,n),n}function m(e){let t=s.at(-1);if(t===void 0)return;let n=o.get(t);n!==void 0&&n.callIdentifiers.push(e)}function h(e){s.push(p(e).id)}function g(){s.pop()}return{ArrowFunctionExpression:h,"ArrowFunctionExpression:exit":g,CallExpression(e){if(e.callee.type===`Identifier`&&m(e.callee),!pe(e,r,i))return;let[t]=e.arguments;if(t!==void 0){if(t.type===`Identifier`){l.push(t);return}Ie(t)&&u.push(t)}},FunctionDeclaration:h,"FunctionDeclaration:exit":g,FunctionExpression:h,"FunctionExpression:exit":g,ImportDeclaration(e){au(e,n,r,i)},NewExpression(e){if(e.callee.type!==`Identifier`)return;let n=e.callee.name;t.constructors.has(n)&&c.push({constructorName:n,containingFunctionId:s.at(-1),isLexicallyInsideUseMemo:lu(e,r,i),node:e})},"Program:exit"(){hu(e.sourceCode,o,a,d);let n=gu(_u(e.sourceCode,u,l,a,d),o,t.maxHelperTraceDepth);for(let t of c){let r=t.containingFunctionId!==void 0&&n.has(t.containingFunctionId);(t.isLexicallyInsideUseMemo||r)&&e.report({data:{constructorName:t.constructorName},messageId:`noNewInUseMemo`,node:t.node})}}}},meta:{docs:{description:`Disallow configured constructor calls (default: new Instance) inside React useMemo callbacks.`},messages:{noNewInUseMemo:"Avoid creating '{{constructorName}}' with `new` inside useMemo. Create it outside the memo callback or use an effect/ref pattern."},schema:[{additionalProperties:!1,properties:{constructors:{default:[...ou],description:`Constructor identifiers that should be disallowed inside useMemo callbacks.`,items:{type:`string`},type:`array`},environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},maxHelperTraceDepth:{default:4,description:`Maximum depth for tracing local helper function calls from useMemo callbacks. 0 disables helper traversal.`,minimum:0,type:`integer`}},type:`object`}],type:`problem`}}),yu=Ns({alternative:`Log`,category:`roblox`,message:`{{name}}() is a raw output function lacking log levels, timestamps, and filtering. Production systems require structured logging for debugging and monitoring. Replace {{name}}(...) with {{alternative}}.`,messageId:`noPrint`,name:`print`,ruleName:`no-print`});function bu(e,t){let n=t;for(;n;){if(n.set.has(e))return!0;n=n.upper}return!1}function xu(e){let t=new Map,n=new Set;for(let n of e.keys())t.set(n,0);function r(i,a){t.set(i,1),a.push(i);for(let o of e.get(i)??[]){let e=t.get(o);if(e===1){let e=a.lastIndexOf(o);for(let t=e;t<a.length;t+=1){let e=a[t];e!==void 0&&n.add(e)}}else e===0&&r(o,a)}a.pop(),t.set(i,2)}for(let n of e.keys())t.get(n)===0&&r(n,[]);return n}const Su=_(`no-recursive`,`general`,{create(e){let{sourceCode:t}=e,n=new Map,r=[],i=[],a=[],o=new Map;function s(e){r.push(e)}function c(){r.pop()}function l(){for(let e=r.length-1;e>=0;--e){let t=r[e];if(t!==void 0)return t}}function u(e){n.has(e)||n.set(e,new Set)}function d(){for(let e=a.length-1;e>=0;--e)if(a[e]!==void 0)return a[e]}return{ArrowFunctionExpression(){s(void 0)},"ArrowFunctionExpression:exit":c,CallExpression(e){let r=l();if(r===void 0)return;let a,s=!1;if(e.callee.type===`Identifier`?a=e.callee.name:e.callee.type===`MemberExpression`&&e.callee.object.type===`ThisExpression`&&e.callee.property.type===`Identifier`&&(a=e.callee.property.name,s=!0),a===void 0)return;let c=!1;if(s){let e=d();e!==void 0&&o.get(e)?.has(a)===!0&&(c=!0)}else{let n=t.getScope(e);c=bu(a,n)}c&&(n.get(r)?.add(a),i.push({callee:a,caller:r,node:e}))},ClassDeclaration(e){let t=e.id?.name;t!==void 0&&!o.has(t)&&o.set(t,new Set),a.push(t)},"ClassDeclaration:exit"(){a.pop()},FunctionDeclaration(e){let t=e.id?.name;t!==void 0&&t.length>0&&u(t),s(t)},"FunctionDeclaration:exit":c,FunctionExpression(e){e.id&&u(e.id.name);let{parent:t}=e;t.type===`MethodDefinition`&&t.key.type===`Identifier`?s(t.key.name):s(void 0)},"FunctionExpression:exit":c,MethodDefinition(e){let t=d();e.key.type===`Identifier`&&t!==void 0&&(o.get(t)?.add(e.key.name),u(e.key.name))},"Program:exit"(){let t=xu(n);if(t.size!==0)for(let n of i)t.has(n.caller)&&t.has(n.callee)&&e.report({messageId:`noRecursive`,node:n.node})},VariableDeclarator(e){e.id.type!==`Identifier`||e.init===null||e.init.type!==`FunctionExpression`&&e.init.type!==`ArrowFunctionExpression`||(u(e.id.name),s(e.id.name))},"VariableDeclarator:exit"(e){e.id.type!==`Identifier`||e.init===null||e.init.type!==`FunctionExpression`&&e.init.type!==`ArrowFunctionExpression`||c()}}},meta:{docs:{description:`Disallow recursive function calls to prevent stack overflow.`},messages:{noRecursive:`Recursion is not allowed (JPL Power of 10). Use iteration instead — a loop or explicit stack.`},schema:[{additionalProperties:!1,properties:{},type:`object`}]}}),Cu=new f({extensions:[`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.cjs`,`.json`,`.node`]}),wu={found:!1};function Tu(e,t){if(!e.startsWith(`.`))return wu;let{path:n}=Cu.sync(r(t),e);return n===void 0||n===``?wu:{found:!0,path:n}}const Eu=`uiaspectratioconstraint`,Du=new Set([`ButtonSpritesheet`,`GenericSpritesheet`,`LabelSpritesheet`]);function Ou({openingElement:e}){let{name:t}=e;return t.type===`JSXIdentifier`?t.name:void 0}function ku(e){let t=!1;return Li(e,e=>{t||e.type===`JSXElement`&&Ou(e)===Eu&&(t=!0)}),t}function Au(e){if(e.type===`FunctionDeclaration`)return e.id?.name;if(Ie(e)){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`)return t.id.name}}function ju(e){if(e.body.type!==`BlockStatement`)return w(e.body)}function Mu(e){for(let t of e.defs){if(t.type!==`ImportBinding`)continue;let{parent:e}=t.node;if(e?.type===`ImportDeclaration`&&y(e.source.value))return e.source.value}}const Nu=new Map;function Pu(e,t){if(!e.startsWith(`.`))return!1;let n=Tu(e,t);if(!n.found)return!1;let r=Nu.get(n.path);if(r!==void 0)return r;try{let e=u(n.path,`utf8`).includes(`<uiaspectratioconstraint`);return Nu.set(n.path,e),e}catch{return Nu.set(n.path,!1),!1}}function Fu(e){for(let t of e.openingElement.attributes)if(t.type===`JSXAttribute`&&t.name.type===`JSXIdentifier`&&t.name.name===`scaled`&&t.value?.type===`JSXExpressionContainer`&&t.value.expression.type===`Literal`&&t.value.expression.value===!1)return!0;return!1}function Iu(e){return e.type===`JSXElement`?Ou(e)===Eu:e.type===`JSXExpressionContainer`&&e.expression.type===`Identifier`&&e.expression.name===`UI_ASPECT_RATIO_CONSTRAINT`}function Lu(e,t,n,r){if(t.has(e))return!0;if(n===void 0)return!1;let i=n.set.get(e);if(i===void 0||!q(i))return!1;let a=Mu(i);return a!==void 0&&(Pu(a,r)||Du.has(e))}const Ru=_(`no-redundant-aspect-ratio-constraint`,`roblox`,{create(e){let{filename:t,sourceCode:n}=e,r=new Set,i=[],a;return{ArrowFunctionExpression(e){let t=Au(e),n=ju(e);t===void 0||n===void 0||n.type!==`JSXElement`&&n.type!==`JSXFragment`||ku(n)&&r.add(t)},FunctionDeclaration(e){let t=Au(e);if(t===void 0||e.body?.body.length!==1)return;let[n]=e.body.body;n?.type===`ReturnStatement`&&n.argument!==null&&ku(n.argument)&&r.add(t)},ImportDeclaration(e){a??=e},JSXElement(e){i.push(e)},"Program:exit"(){let o;a!==void 0&&(o=n.getScope(a));for(let n of i){let i=Ou(n);if(i!==void 0&&!(!Lu(i,r,o,t)||Fu(n)))for(let t of n.children)Iu(t)&&e.report({messageId:`redundantAspectRatioConstraint`,node:t})}}}},meta:{docs:{description:`Disallow redundant uiaspectratioconstraint children inside components that already manage their own aspect ratio internally.`},messages:{redundantAspectRatioConstraint:`This component already renders a uiaspectratioconstraint internally. Passing one as a child is redundant and will cause layout issues.`},schema:[],type:`problem`}}),zu=new Set([`JSXElement`,`ReactElement`,`ReactNode`]),Bu=new Set([`ChainExpression`,`ParenthesizedExpression`,`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]),Vu=/^use[A-Z]/u;function Hu(e){return Vu.test(e)}function Uu(e){if(e?.type!==`TSTypeReference`)return!1;let{typeName:t}=e;return t.type===`Identifier`?zu.has(t.name):t.type===`TSQualifiedName`&&zu.has(t.right.name)}function Wu({returnType:e}){return e?.typeAnnotation??void 0}function Gu(e){if(e.type===`ArrowFunctionExpression`&&(e.body.type===`JSXElement`||e.body.type===`JSXFragment`))return!0;if(e.body===null)return!1;let t=!1;return Ri(e.body,e=>{if(t||e.type!==`ReturnStatement`)return;let{argument:n}=e;n!==null&&(n.type===`JSXElement`||n.type===`JSXFragment`)&&(t=!0)}),t}function Ku({parent:e}){return e.type===`CallExpression`||e.type===`JSXExpressionContainer`||e.type===`ArrayExpression`}function qu(e){if(e.parent?.type===`VariableDeclarator`&&e.parent.id.type===`Identifier`)return e.parent.id.name}function Ju(e){return e.type===`Identifier`?e.name:void 0}function Yu(e){let t=e;for(;t!==void 0&&Bu.has(t.type);)t=t.parent??void 0;return t}function Xu(e){let t=Yu(e.parent??void 0);return t?.type===`Property`&&$u(t.value)===e}function Zu(e){let t=Yu(e.parent??void 0);return t?.type===`JSXExpressionContainer`&&t.parent.type===`JSXAttribute`&&$u(t.expression)===e}function Qu(e){let t=Yu(e.parent??void 0);return t?.type===`CallExpression`&&t.arguments.some(t=>$u(t)===e)}function $u(e){let t=e;for(;ed(t);)t=t.expression;return t}function ed(e){return Bu.has(e.type)}function td(e,t){if(t.type===`FunctionDeclaration`){let n=e.getDeclaredVariables(t);return n.length>0?n[0]:void 0}let{parent:n}=t;if(n.type!==`VariableDeclarator`)return;let r=e.getDeclaredVariables(n);return r.length>0?r[0]:void 0}function nd(e,t){let n=td(t,e);if(n===void 0)return!1;let r=!1;for(let e of n.references)if(!e.isWrite()&&(r=!0,!(Xu(e.identifier)||Zu(e.identifier)||Qu(e.identifier))))return!1;return r}const rd=_(`no-render-helper-functions`,`react`,{create(e){let t=0;function n(t,n){e.report({data:{functionName:n},messageId:`noRenderHelper`,node:t})}function r(e){return e===void 0||G(e)||Hu(e)}function i(t,i){let a=Ju(i.id);if(r(a)||nd(t,e.sourceCode))return;let o=le(i.id),s=o!==void 0&&Uu(o.typeAnnotation),c=Uu(Wu(t));(s||c||Gu(t))&&a!==void 0&&n(i,a)}function a(e){let t=e.type===`FunctionExpression`?e.id?.name:void 0;r(t)||(Uu(Wu(e))||Gu(e))&&t!==void 0&&n(e,t)}function o(e){let{parent:n}=e,r=qu(e);if(r!==void 0&&G(r)){--t;return}if(!(t>0||Ku(e))){if(n.type===`VariableDeclarator`){i(e,n);return}n.type===`ReturnStatement`&&a(e)}}return{ArrowFunctionExpression(e){let n=qu(e);n!==void 0&&G(n)&&(t+=1)},"ArrowFunctionExpression:exit":o,FunctionDeclaration({id:e}){e!==null&&G(e.name)&&(t+=1)},"FunctionDeclaration:exit"(r){if(r.id===null)return;let i=r.id.name;if(G(i)){--t;return}t>0||Hu(i)||nd(r,e.sourceCode)||(Uu(Wu(r))||Gu(r))&&n(r,i)},FunctionExpression(e){let n=qu(e);n!==void 0&&G(n)&&(t+=1)},"FunctionExpression:exit":o}},meta:{docs:{description:`Disallow non-component functions that return JSX or React elements.`},messages:{noRenderHelper:`Convert render helper '{{functionName}}' to a React component. Functions that return JSX should be PascalCase components, not camelCase helpers.`},schema:[],type:`suggestion`}}),id=p({"message?":`string | undefined`,object:`string`,properties:p(`string[]`).readonly()}).readonly(),ad=p({"allowFiles?":p(`string[]`).readonly().or(`undefined`),"checkComputed?":`boolean | undefined`,restrictions:id.array().readonly()}).readonly(),od={matchBase:!0},sd={dot:!0,magicalBraces:!0};function cd(e){return e.replaceAll(`\\`,`/`)}function ld(e){let t=cd(e);if(!a(e))return[t];let n=cd(s(process.cwd(),e));return n.length===0||n.startsWith(`..`)?[t]:[t,n]}function ud(e,t){let n=new m(e,t),r=n.hasMagic();return{hasMagic:r,matches:r?e=>n.match(e):t=>t===e}}function dd(e){let t=new Set,n=[],r=0;for(let i of e){let e=ud(i,sd);e.hasMagic?n[r++]=e.matches:t.add(i)}return e=>t.has(e)||n.some(t=>t(e))}function fd(e){return{matchesObject:ud(e.object,sd).matches,matchesProperty:dd(e.properties),message:e.message}}function pd(e){let[t]=e.options;if(!ad.allows(t))return{checkComputed:!0,isAllowedFile:!1,restrictions:[]};let{allowFiles:n,checkComputed:r,restrictions:i}=t,a=ld(e.filename),o=n?.some(e=>a.some(t=>h(t,e,od)))??!1;return{checkComputed:r??!0,isAllowedFile:o,restrictions:i.map(fd)}}const md=_(`no-restricted-property-assignment`,`general`,{create(e){let{checkComputed:t,isAllowedFile:n,restrictions:r}=pd(e);function i(i,a){if(n||!M(i)||i.computed&&!t||i.object.type!==`Identifier`)return;let o=T(i);if(o!==void 0){for(let t of r)if(t.matchesObject(i.object.name)&&t.matchesProperty(o)){t.message===void 0?e.report({data:{object:i.object.name,property:o},messageId:`restricted`,node:a}):e.report({data:{message:t.message},messageId:`restrictedCustom`,node:a});return}}}return{AssignmentExpression(e){i(e.left,e)},UpdateExpression(e){i(e.argument,e)}}},meta:{docs:{description:`Disallow assignment to restricted object properties.`,recommended:!0},messages:{restricted:`Assignment to '{{object}}.{{property}}' is not permitted.`,restrictedCustom:`{{message}}`},schema:[{additionalProperties:!1,properties:{allowFiles:{items:{type:`string`},type:`array`},checkComputed:{default:!0,type:`boolean`},restrictions:{items:{additionalProperties:!1,properties:{message:{type:`string`},object:{type:`string`},properties:{items:{type:`string`},minItems:1,type:`array`}},required:[`object`,`properties`],type:`object`},type:`array`}},required:[`restrictions`],type:`object`}],type:`problem`}}),hd=/\.spec\.(?:ts|tsx)$/u,gd=_(`no-spec-file-extension`,`naming`,{createOnce(e){return{Program(t){let{filename:n}=e;n&&hd.test(n)&&e.report({messageId:`noSpecFileExtension`,node:t})}}},meta:{docs:{description:`Disallow the .spec.{ts,tsx} file extension for test files. Use .test.{ts,tsx} instead.`,recommended:!0},messages:{noSpecFileExtension:`Test files must use .test.ts or .test.tsx instead of .spec.ts or .spec.tsx. Rename this file to use the .test extension.`},schema:[],type:`problem`}}),_d=`Fragment`;function vd(e,t){if(e===void 0)return!1;for(let n of e.defs)if(xr(n,t)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0;return!1}function yd(e,t,n){if(e===void 0)return!1;for(let r of e.defs)if(xr(r,n)&&r.node.type===`ImportSpecifier`&&me(r.node)===t)return!0;return!1}function bd(e,t,n){let{callee:r}=t;return r.type===`Identifier`?yd(E(e.getScope(r),r.name),`createElement`,n):r.type!==`MemberExpression`||r.computed||T(r)!==`createElement`||r.object.type!==`Identifier`?!1:vd(E(e.getScope(r.object),r.object.name),n)}function xd(e){return e.type===`Literal`&&y(e.value)}function Sd(e,t){if(q(e))return O(t)||t===_d;if(!K(e.scope)||!O(t)&&t!==_d)return!1;for(let t of e.defs){if(t.type===`FunctionName`||t.type===`ClassName`)return!0;if(t.type!==`Variable`||t.node.type!==`VariableDeclarator`)continue;let e=t.node.init??void 0;if(e!==void 0&&(Ie(e)||e.type===`ClassExpression`))return!0}return!1}function Cd(e,t,n){let r=E(e.getScope(t),t.name);return yd(r,_d,n)?!0:r!==void 0&&Sd(r,t.name)}function wd(e){let t=e;for(;;){if(t.computed)return;if(t.object.type===`Identifier`)return t.object;if(t.object.type!==`MemberExpression`)return;t=t.object}}function Td(e){if(e.computed)return;let t=T(e);if(t!==void 0)return e.object.type===`MemberExpression`&&Td(e.object)===void 0?void 0:t}function Ed(e,t,n){let r=wd(t);if(r===void 0)return!1;let i=Td(t);if(i===void 0)return!1;let a=E(e.getScope(r),r.name);return vd(a,n)&&i===_d?!0:a===void 0||!q(a)?!1:O(i)}function Dd(e,t,n){return t.type===`SpreadElement`?!1:xd(t)?!0:t.type===`Identifier`?Cd(e,t,n):t.type===`MemberExpression`&&Ed(e,t,n)}const Od=_(`no-static-react-create-element`,`react`,{create(e){let t=gr(e.options[0]),{sourceCode:n}=e;return{CallExpression(r){if(!bd(n,r,t))return;let[i]=r.arguments;i!==void 0&&Dd(n,i,t)&&e.report({messageId:`useJsx`,node:r})}}},meta:{docs:{description:`Require JSX for static React.createElement calls.`,recommended:!0},messages:{useJsx:`Use JSX instead of static React.createElement calls.`},schema:[{additionalProperties:!1,properties:{environment:dr},type:`object`}],type:`problem`}});function kd(e,t){let n=w(t);if(n.type!==`CallExpression`||n.optional)return!1;let r=w(n.callee);if(r.type!==`MemberExpression`||r.optional||T(r)!==`create`)return!1;let i=w(r.object);return i.type!==`Identifier`||i.name!==`table`?!1:!ae(e,i,`table`)}function Ad(e,t){let n=w(t);if(n.type!==`NewExpression`||n.arguments.length!==1&&n.arguments.length!==2)return!1;let r=w(n.callee);return r.type!==`Identifier`||r.name!==`Array`?!1:!ae(e,r,`Array`)}const jd=_(`no-table-create-map`,`roblox`,{create(e){return{CallExpression(t){if(t.optional)return;let n=w(t.callee);if(n.type!==`MemberExpression`||n.optional||T(n)!==`map`)return;let r=w(n.object);(kd(e.sourceCode,r)||Ad(e.sourceCode,r))&&e.report({messageId:`avoidConstructThenMap`,node:t})}}},meta:{docs:{description:`Disallow map(...) directly on table.create(...) and new Array(...) constructor patterns in roblox-ts.`},messages:{avoidConstructThenMap:`Do not map directly on table.create(...) or new Array(...). Allocate first, then write by index in a loop.`},schema:[],type:`suggestion`}});function Md(e){let{callee:t}=e;if(t.type!==`MemberExpression`||T(t)!==`await`||t.object.type!==`CallExpression`)return!1;let n=t.object.callee;return n.type!==`MemberExpression`||n.object.type!==`Identifier`||n.object.name!==`Promise`?!1:T(n)===`delay`}const Nd=_(`no-task-wait`,`roblox`,{createOnce(e){return{CallExpression(t){if(Md(t)){e.report({messageId:`noPromiseDelayAwait`,node:t});return}let{callee:n}=t;n.type===`MemberExpression`&&n.object.type===`Identifier`&&n.object.name===`task`&&T(n)===`wait`&&e.report({messageId:`noTaskWait`,node:t})}}},meta:{docs:{description:`Disallow task.wait() and Promise.delay(...).await() calls.`},messages:{noPromiseDelayAwait:`Do not use Promise.delay(...).await() in tests. Advance deterministic schedulers or wait for the actual condition instead.`,noTaskWait:`Do not use task.wait() in tests. Advance deterministic schedulers or wait for the actual condition instead.`},schema:[],type:`problem`}});function Pd(e){return e===!1||e===0||e===``||e==null||e===0n}const Fd=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`ClassExpression`,`FunctionExpression`,`NewExpression`,`ObjectExpression`]),Id=new Set([`toBe`]),Ld=new Set([`toEqual`,`toStrictEqual`]),Rd=new Map([[`toBeDefined`,`defined`],[`toBeFalsy`,`falsy`],[`toBeNull`,`null`],[`toBeTruthy`,`truthy`],[`toBeUndefined`,`undefined`]]),zd=new Set([`deepStrictEqual`,`notDeepStrictEqual`,`notStrictEqual`,`strictEqual`]),Bd=new Set([`deepEqual`,`equal`,`notDeepEqual`,`notEqual`]);function Vd(e){return e.type===`Literal`&&`regex`in e||Fd.has(e.type)}function Hd(e){if(e.type===`Literal`){if(e.value===null)return{value:null};if(typeof e.value==`string`||typeof e.value==`number`||typeof e.value==`boolean`||typeof e.value==`bigint`)return{value:e.value}}}function Ud(e){let t=e;for(;t.type===`ChainExpression`||t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSInstantiationExpression`||t.type===`TSNonNullExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`;)t=t.expression;return t}function Wd(e,t,n){if(t.operator===`void`)return{value:void 0};if(t.operator===`typeof`){let r=Kd(e,t.argument,n);return r===void 0?void 0:{value:typeof r.value}}let r=Kd(e,t.argument,n);if(r!==void 0){if(t.operator===`!`)return{value:Pd(r.value)};if(typeof r.value==`number`){if(t.operator===`+`)return{value:r.value};if(t.operator===`-`)return{value:-r.value}}}}function Gd(e,t,n){if(t.name===`undefined`)return{value:void 0};let[r]=E(e.getScope(t),t.name)?.defs??[];if(r?.type===`Variable`&&r.node.type===`VariableDeclarator`&&r.node.init!==null&&r.parent?.type===`VariableDeclaration`&&r.parent.kind===`const`)return Kd(e,r.node.init,n)}function Kd(e,t,n){let r=Ud(t);if(n.has(r))return;n.add(r);let i=Hd(r);if(i!==void 0)return i;if(r.type===`UnaryExpression`)return Wd(e,r,n);if(r.type===`Identifier`)return Gd(e,r,n)}function qd(e,t){return e===`truthy`?!Pd(t):e===`falsy`?Pd(t):e===`defined`?t!==void 0:e===`undefined`?t===void 0:t===null}function Jd(e){return e===`truthy`||e===`defined`}function Yd(e,t,n){return Object.is(t,n)}function Xd(e){return e.callee.type===`Identifier`&&e.callee.name===`expect`}function Zd(e){if(e.callee.type!==`MemberExpression`)return;let t=e.callee.object;if(t.type===`MemberExpression`&&T(t)===`not`&&(t=t.object),!(t.type!==`CallExpression`||!Xd(t)))return t}function Qd(e){if(e.callee.type!==`MemberExpression`)return!1;let{object:t}=e.callee;return t.type===`MemberExpression`&&T(t)===`not`}function $d(e,t){let n=e.arguments[t];if(n!==void 0&&n.type!==`SpreadElement`)return Ud(n)}function ef(e,t,n,r){let i=Kd(e.sourceCode,t,new Set);if(i!==void 0&&qd(n,i.value)!==r){e.report({messageId:`issue`,node:t});return}Vd(t)&&Jd(n)!==r&&e.report({messageId:`freshPredicate`,node:t})}function tf(e,t,n,r,i,a){if(r&&(Vd(t)||Vd(n))){e.report({data:{matcher:a},messageId:`freshIdentity`,node:Vd(t)?t:n});return}let o=Kd(e.sourceCode,t,new Set),s=Kd(e.sourceCode,n,new Set);o!==void 0&&s!==void 0&&Yd(r,o.value,s.value)!==i&&e.report({messageId:`issue`,node:t})}function nf(e,t){let n=Zd(t);if(n===void 0||t.callee.type!==`MemberExpression`)return;let r=T(t.callee);if(r===void 0)return;let i=$d(n,0);if(i===void 0)return;let a=Qd(t),o=Rd.get(r);if(o!==void 0){ef(e,i,o,a);return}let s=Id.has(r);if(!(s||Ld.has(r)))return;let c=$d(t,0);c!==void 0&&tf(e,i,c,s,a,a?`not.toEqual`:`toEqual`)}function rf(e,t){if(t.callee.type!==`MemberExpression`||t.callee.object.type!==`Identifier`||t.callee.object.name!==`assert`)return;let n=T(t.callee);if(n===void 0)return;let r=$d(t,0);if(r===void 0)return;if(n===`ok`||n===`notOk`){let t=Kd(e.sourceCode,r,new Set),i=n===`ok`;t!==void 0&&!!t.value===i&&e.report({messageId:`issue`,node:r});return}let i=$d(t,1);if(i===void 0)return;let a=zd.has(n);if(!(a||Bd.has(n)))return;let o=n.startsWith(`not`);tf(e,r,i,a,o,o?`notDeepStrictEqual`:`deepStrictEqual`)}const af=_(`no-trivial-assertions`,`general`,{create(e){return{CallExpression(t){if(Zd(t)!==void 0){nf(e,t);return}rf(e,t)}}},meta:{docs:{description:`Disallow assertions that always succeed or compare against freshly created values.`,recommended:!0},messages:{freshIdentity:"Use `{{matcher}}` instead; freshly-created values are never identical to other values.",freshPredicate:`Replace this assertion; the value is freshly created here, so the result is independent of the code under test.`,issue:`Replace this assertion; it always succeeds.`},schema:[],type:`problem`}}),of=_(`no-underscore-react-props`,`react`,{createOnce(e){return{JSXAttribute(t){t.name.type!==`JSXIdentifier`||!t.name.name.startsWith(`_`)||e.report({data:{propName:t.name.name},messageId:`noUnderscoreReactProperty`,node:t.name})}}},meta:{docs:{description:`Ban React property names that begin with an underscore in JSX.`},messages:{noUnderscoreReactProperty:`React prop '{{propName}}' starts with '_'. Remove the leading underscore from the prop name.`},schema:[],type:`problem`}}),sf=/@(?:link|linkcode|linkplain|see)\s+\{?(?<identifier>\w+)/gu,cf=/\{@(?:link|linkcode|linkplain|see)\s+(?<identifier>\w+)/gu,lf=/[@{](?:type|typedef|param|returns?|template|augments|extends|implements)\s+(?<annotation>[^}]*)/gu,uf=/\b(?<identifier>\w+)\b/gu;function df(e){return e.type===`ImportDefaultSpecifier`||e.type===`ImportNamespaceSpecifier`||e.type===`ImportSpecifier`}function ff(e){let t=new Set;for(let n of e)n.type===`Block`&&(pf(n.value,t),mf(n.value,t));return t}function pf(e,t){for(let n of[sf,cf])for(let r of e.matchAll(n)){let e=r.groups?.identifier;e!==void 0&&t.add(e)}}function mf(e,t){for(let n of e.matchAll(lf)){let e=n.groups?.annotation;if(e!==void 0)for(let n of e.matchAll(uf)){let e=n.groups?.identifier;e!==void 0&&t.add(e)}}}function hf(e,t,n,r){if(t.specifiers.length===1)return r.remove(t);let i=e.getTokenAfter(n);if(t.specifiers[0]===n&&i?.value===`,`){let t=e.getTokenBefore(n);if(t!==null)return[r.removeRange([t.range[1],n.range[0]]),r.remove(n),r.remove(i)]}if(i?.value===`,`)return r.removeRange([n.range[0],i.range[1]]);let a=e.getTokenBefore(n);return a?.value===`,`?r.removeRange([a.range[0],n.range[1]]):r.remove(n)}const gf=_(`no-unused-imports`,`general`,{create(e){let{sourceCode:t}=e,n=e.options[0]?.checkJSDoc??!0,r=n?ff(t.getAllComments()):new Set,i=[],a;return{ImportDeclaration(e){a??=e;for(let t of e.specifiers)df(t)&&i.push({identifierName:t.local.name,parent:e,specifier:t})},"Program:exit"(){if(a===void 0)return;let o=t.getScope(a);for(let{identifierName:a,parent:s,specifier:c}of i){let i=o.set.get(a);i!==void 0&&i.references.length>0||n&&r.has(a)||e.report({data:{identifierName:a},fix(e){return hf(t,s,c,e)},messageId:`unusedImport`,node:c})}}}},meta:{docs:{description:`Disallow unused imports`},fixable:`code`,messages:{unusedImport:`Import '{{identifierName}}' is defined but never used.`},schema:[{additionalProperties:!1,properties:{checkJSDoc:{default:!0,description:`Check if imports are referenced in JSDoc comments`,type:`boolean`}},type:`object`}],type:`problem`}}),_f=_(`no-unused-use-memo`,`react`,{create(e){let t=new Set,n=new Set,r=gr(e.options[0]);return{CallExpression(r){pe(r,t,n)&&iu(r)&&e.report({messageId:`unusedUseMemo`,node:r})},ImportDeclaration(e){au(e,r,t,n)}}},meta:{docs:{description:`Disallow standalone useMemo calls that ignore the memoized value.`,recommended:!0},messages:{unusedUseMemo:`useMemo results must be used. Standalone useMemo calls add overhead without preserving a value.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`problem`}});function vf(e){if(e.body===null)return;if(e.body.type!==`BlockStatement`)return e.body;if(e.body.body.length!==1)return;let[t]=e.body.body;if(t?.type===`ReturnStatement`)return t.argument??void 0}const yf=_(`no-use-memo-simple-expression`,`react`,{create(e){return{CallExpression(t){if(!Ac(t,`useMemo`))return;let n=Ii(t);if(n===void 0)return;let r=vf(n);r===void 0||!kc(r)||e.report({messageId:`simpleMemo`,node:t})}}},meta:{docs:{description:`Disallow useMemo for expressions that are already trivial to compute.`,recommended:!0},messages:{simpleMemo:`useMemo wrapping a trivially cheap expression - memo overhead exceeds the computation`},type:`problem`}});function bf(e,t){if(e.type===`LogicalExpression`)return e.left===t;if(e.type===`ConditionalExpression`)return e.test===t;if(e.type===`SequenceExpression`){if(e.expressions.at(-1)!==t)return!1;let{parent:n}=e;return bf(n,e)}return e.type!==`ExpressionStatement`&&e.type!==`ArrowFunctionExpression`&&e.type!==`UnaryExpression`&&e.type!==`AwaitExpression`&&e.type!==`ReturnStatement`&&e.type!==`ThrowStatement`}function xf(e){return bf(e.parent,e)}function Sf(e){if(e.defs.length!==1)return;let[t]=e.defs;if(t!==void 0){if(t.type===`FunctionName`&&N(t.node))return t.node;if(t.type===`Variable`&&t.node.type===`VariableDeclarator`&&t.node.init!==null&&(t.node.init.type===`FunctionExpression`||t.node.init.type===`ArrowFunctionExpression`))return t.node.init}}const Cf=_(`no-use-of-empty-return-value`,`general`,{create(e){let t=new Map,n=new Set,r=[];function i(e){if(r.push(e),e.async||e.generator){n.add(e);return}e.type===`ArrowFunctionExpression`&&e.expression&&n.add(e)}function a(){r.pop()}return{ArrowFunctionExpression:i,"ArrowFunctionExpression:exit":a,CallExpression(n){if(!xf(n)||n.callee.type!==`Identifier`)return;let r=e.sourceCode.getScope(n),i=r.references.find(e=>e.identifier===n.callee)?.resolved??E(r,n.callee.name);if(i===void 0)return;let a=Sf(i);a!==void 0&&t.set(n.callee,a)},FunctionDeclaration:i,"FunctionDeclaration:exit":a,FunctionExpression:i,"FunctionExpression:exit":a,"Program:exit"(){for(let[r,i]of t)n.has(i)||e.report({data:{name:r.name},messageId:`removeUseOfOutput`,node:r})},ReturnStatement(e){if(e.argument===null)return;let t=r.at(-1);t!==void 0&&n.add(t)}}},meta:{docs:{description:`Disallow using the return value of functions that do not return anything.`,recommended:!0},messages:{removeUseOfOutput:`Remove this use of the output from "{{name}}"; "{{name}}" doesn't return anything.`},schema:[],type:`problem`}}),wf=/^[A-Z][A-Z0-9_]*$/u,Tf={staticGlobalFactories:new Set(Pl)},Ef=[String.raw`^Array\b`,String.raw`^Object\b`,String.raw`^Map\b`,String.raw`^Set\b`,String.raw`^WeakMap\b`,String.raw`^WeakSet\b`];function Df(e){let t=[],n=0,r=[e];for(;r.length>0;){let e=r.pop();if(e===void 0)break;e.type!==`global`&&(t[n++]=e);for(let t of e.childScopes)r.push(t)}return t}function Of(e){return Ie(e)||e.type===`ClassExpression`}const kf=new Set([`ArrayExpression`,`ObjectExpression`,`JSXElement`,`JSXFragment`]);function Af(e,t,n){if(kf.has(e.type))return!0;if(e.type!==`CallExpression`&&e.type!==`NewExpression`)return!1;let r=n.getText(e.callee);for(let e of t)if(e.test(r))return!0;return!1}function jf(e){return e.type===`Program`||e.type===`BlockStatement`}function Mf(e){switch(e.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return Mf(e.expression);case`Identifier`:return e.name;case`MemberExpression`:return Mf(e.object);default:return}}function Y(e,t){switch(e.type){case`ArrayExpression`:return Nf(e,t);case`BinaryExpression`:case`LogicalExpression`:return Pf(e,t);case`CallExpression`:case`NewExpression`:return Ff(e,t);case`ChainExpression`:return Y(e.expression,t);case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return Y(e.expression,t);case`ConditionalExpression`:return If(e,t);case`MemberExpression`:return Lf(e,t);case`ObjectExpression`:return Rf(e,t);case`SequenceExpression`:return!1;case`SpreadElement`:return!1;case`TemplateLiteral`:return zf(e.expressions,t);case`UnaryExpression`:return Y(e.argument,t);default:return!0}}function Nf(e,t){for(let n of e.elements)if(n===null||!Y(n,t))return!1;return!0}function Pf(e,t){return Y(e.left,t)&&Y(e.right,t)}function Ff(e,t){let n=Mf(e.callee);return n===void 0||!t.has(n)||!Y(e.callee,t)?!1:zf(e.arguments,t)}function If(e,t){return Y(e.test,t)&&Y(e.consequent,t)&&Y(e.alternate,t)}function Lf(e,t){return Y(e.object,t)&&(!e.computed||Y(e.property,t))}function Rf(e,t){for(let n of e.properties)if(n.type!==`Property`||n.computed&&!Y(n.key,t)||!Y(n.value,t))return!1;return!0}function zf(e,t){for(let n of e)if(!Y(n,t))return!1;return!0}function Bf(e,t){return t.type===`Literal`||J(e,t,new Set,Tf)&&Y(t,Tf.staticGlobalFactories)}function Vf(e,t){let n=t;for(;n.type===`ParenthesizedExpression`;)n=n.expression;return e.getText(n)}function Hf(e,t){let{parent:n}=e;if(!jf(n))return!1;let{body:r}=n;for(let n=0;n<r.length;n+=1)if(r[n]===e)return r[n+1]===t;return!1}function Uf(e,t){let[n]=t.range;for(;n>0;){let t=e[n-1];if(t===` `||t===` `){--n;continue}break}let[,r]=t.range,i=r;for(;i<e.length;){let t=e[i];if(t===`
9
- `||t===`\r`){i+=1;continue}break}return[n,i]}function Wf(e){let t=e.parent,n=e;for(;t!==null;){if(k(t)&&t.init===n)return t;n=t,t=t.parent}}const Gf=_(`no-useless-constants`,`general`,{create(e){let{sourceCode:t}=e,[n]=e.options,r=(n?.ignoreCallPatterns??Ef).map(e=>new RegExp(e,`u`));function i(e){if(t.getCommentsInside(e).length>0)return!0;let n=e.loc.start.line,r=e.loc.end.line;for(let r of t.getCommentsBefore(e)){let e=r.loc.end.line;if(e===n||e===n-1)return!0}for(let n of t.getCommentsAfter(e)){let e=n.loc.start.line;if(e===r||e===r+1)return!0}return!1}function a(e,n){let r,i=0;for(let e of n.references)e.isReadOnly()&&(i+=1,r=e);if(i===1&&r!==void 0&&r.from===e&&t.getScope(r.identifier)===e)return r}function o(e,n){let{name:i}=n;if(!wf.test(i))return;let[o]=n.defs;if(o?.type!==`Variable`)return;let s=o.node;if(!(k(s)&&rt(s.id))||s.init===null)return;let c=o.parent;if(c===null||!Ne(c)||c.kind!==`const`||c.declarations.length!==1||Pe(c.parent))return;let l=s.init;if(Of(l)||Af(l,r,t))return;let u=a(e,n);if(u===void 0||!rt(u.identifier))return;let d=Wf(u.identifier);if(d===void 0)return;let f=d.parent;if(!(!Ne(f)||f.kind!==`const`))return{declarationNode:c,enclosingDeclaration:f,initializer:l,name:i,referenceIdentifier:u.identifier,reportNode:s.id}}function s(n){let r=[];for(let a of n.variables){let s=o(n,a);if(s===void 0)continue;let c=Hf(s.declarationNode,s.enclosingDeclaration),l=Bf(t,s.initializer),u=Y(s.initializer,Tf.staticGlobalFactories);if(!((c||l)&&u&&!i(s.declarationNode))){e.report({data:{name:s.name},messageId:`uselessConstantNoFix`,node:s.reportNode});continue}r.push({declarationNode:s.declarationNode,initializerText:Vf(t,s.initializer),name:s.name,referenceIdentifier:s.referenceIdentifier,reportNode:s.reportNode})}c(r)}function c(n){let[r]=n;r!==void 0&&e.report({data:{name:r.name,names:n.map(e=>e.name).join(`, `)},fix(e){let r=[],i=0;for(let t of n)r[i++]=e.replaceText(t.referenceIdentifier,t.initializerText);for(let a of n)r[i++]=e.removeRange(Uf(t.text,a.declarationNode));return r},messageId:n.length===1?`uselessConstant`:`uselessConstants`,node:r.reportNode})}return{"Program:exit"(e){let n=Df(t.getScope(e));for(let e of n)s(e)}}},meta:{docs:{description:`Disallow constants that do not add value.`,recommended:!0},fixable:`code`,messages:{uselessConstant:`Constant '{{name}}' is only referenced once in the same scope. Inline it directly, or move it to a higher scope if reference stability is needed.`,uselessConstantNoFix:`Constant '{{name}}' is only referenced once in the same scope. It cannot be auto-inlined because the initializer is not safely movable or the declaration has attached comments. Inline it manually, or move it to a higher scope if reference stability is needed.`,uselessConstants:`Constants '{{names}}' are only referenced once in the same scope. Inline them directly, or move them to a higher scope if reference stability is needed.`},schema:[{additionalProperties:!1,properties:{ignoreCallPatterns:{default:[...Ef],description:`Regular expression patterns for call expressions that should be ignored.`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}});var Kf={AdGui:[25,133],AdPortal:[25,133],AlignOrientation:[7,6,25,133,72,152,155,133,343,172,359,204,379,76,440,132,455,132,471,207,515,132,720,132],AlignPosition:[23,132,25,133,155,133,187,36,189,2,344,144,348,204,361,172,379,86,436,135,454,132,471,207,515,132,720,132],AngularVelocity:[21,135,25,133,155,133,359,200,455,132,459,2,720,132],Animation:[25,133],AnimationConstraint:[15,212,20,212,25,133,155,133,250,132,318,212,320,212,348,204,359,204,681,152,720,132],AnimationController:[25,133],AnimationGraphDefinition:[25,133,324,133,443,10],AnimationNodeDefinition:[25,133,396,9],Animator:[25,133,438,133],ArcHandles:[25,133,103,155,682,200,720,133],Attachment:[25,133,72,152,720,132],AudioAnalyzer:[25,133,596,133,740,16],AudioChannelMixer:[25,133,259,13],AudioChannelSplitter:[25,133,259,13],AudioChorus:[25,133,69,132,120,192,377,197,452,234],AudioCompressor:[25,133,29,186,69,132,334,200,453,227,460,186,648,177],AudioDeviceInput:[1,0,25,133,388,132,722,212],AudioDeviceOutput:[25,133],AudioDistortion:[25,133,69,132,302,193],AudioEcho:[25,133,69,132,118,212,145,200,166,193,450,200,730,200],AudioEmitter:[2,133,25,133,31,242,125,100,398,100,437,32,473,100,578,15],AudioEqualizer:[25,133,69,132,223,200,327,200,365,200],AudioFader:[25,133,69,132,722,212],AudioFilter:[25,133,69,132,175,14,193,214,198,200,446,195],AudioFlanger:[25,133,69,132,120,192,377,197,452,234],AudioGate:[25,133,29,181,69,132,460,186],AudioLimiter:[25,133,69,132,352,200,460,181],AudioListener:[2,133,25,133,31,242,125,100,398,100,437,65,473,100,578,15],AudioPitchShifter:[25,133,69,132,424,201,740,16],AudioPlayer:[25,133,34,133,36,132,326,132,432,212,661,200,722,212],AudioRecorder:[25,133],AudioReverb:[25,133,69,132,115,193,116,202,119,212,126,212,145,200,147,182,222,213,258,183,328,218,329,200,456,231,730,179],AudioSpeechToText:[25,133,155,132,630,242],AudioTextToSpeech:[25,133,326,132,424,200,432,212,597,212,630,242,661,200,721,242,722,212],AudioTremolo:[25,133,69,132,120,212,146,193,193,234,567,200,585,200,604,200],AuroraScript:[25,133],AvatarAbilityRules:[25,133],AvatarAccessoryRules:[25,133],AvatarAnimationRules:[25,133],AvatarBodyRules:[25,133],AvatarClothingRules:[25,133],AvatarCollisionRules:[25,133],AvatarRules:[25,133],BallSocketConstraint:[25,133,155,133,312,132,449,187,472,200,687,132,688,178,689,228,698,228,720,132],Beam:[25,133,68,212,109,200,110,200,155,133,162,132,307,200,308,200,551,207,643,212,644,115,646,212,731,212,732,212,745,200],BillboardGui:[4,132,9,132,25,133,35,133,68,212,96,132,131,200,132,175,155,133,159,135,160,135,308,200,345,172,468,133,554,99,555,99,556,99,557,99,558,132,580,252,582,262,613,135,614,135,744,131],BlockMesh:[25,133,400,135,538,141,711,141],BloomEffect:[25,133,155,133,246,191,580,217,648,199],BlurEffect:[25,133,155,133,580,217],BodyAngularVelocity:[21,138,25,133,359,148,410,209],BodyColors:[25,133,212,168,266,168,283,156,481,168,498,156,677,159],BodyForce:[25,133,186,136],BodyGyro:[25,133,72,152,113,232,359,149,410,221],BodyPartDescription:[25,133,28,200,53,18,102,154,215,242],BodyPosition:[25,133,113,209,348,148,410,204,436,139],BodyThrust:[25,133,186,136,321,135],BodyVelocity:[25,133,348,148,410,209,708,138],Bone:[25,133,72,152,720,132],BoolValue:[25,133,704,132],BoxHandleAdornment:[6,4,9,132,25,133,72,152,103,155,565,5,580,141,583,135,682,200,720,133,743,175],BrickColorValue:[25,133],CFrameValue:[25,133,704,152],Camera:[25,133,72,153,74,22,167,236,168,33,184,151,213,133,214,212,703,132],CanvasGroup:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,133,144,132,205,170,206,200,245,53,247,133,260,200,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,720,133,743,212],CharacterMesh:[25,133,53,18,409,200],ChorusSoundEffect:[25,133,120,187,155,133,377,193,443,200,452,193],ClickDetector:[25,133,341,223],Color3Value:[25,133,704,154],ColorCorrectionEffect:[25,133,68,200,107,200,155,133,537,200,664,170],ColorGradingEffect:[25,133,155,133,665,116],CompositeValueCurve:[25,133,111,23],CompressorSoundEffect:[25,133,29,186,155,133,199,200,443,200,453,227,460,186,648,177],ConeHandleAdornment:[6,4,9,132,25,133,72,152,103,155,220,220,226,132,449,193,565,5,583,135,682,200,720,133,743,175],Configuration:[25,133],CornerWedgePart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,107,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,146,671,173,672,193,674,107,675,54,682,200,708,135],CurveAnimation:[25,133,324,133,443,10],CustomLog:[25,133],CylinderHandleAdornment:[6,4,9,132,13,224,25,133,72,152,103,155,220,212,244,200,449,212,565,5,583,135,682,200,720,133,743,175],CylinderMesh:[25,133,400,135,538,141,711,141],CylindricalConstraint:[5,3,14,3,16,132,17,228,18,200,19,200,21,200,25,133,155,133,238,200,312,132,319,228,330,178,331,200,383,172,384,230,385,200,386,200,472,200,532,132,563,200,564,200,580,187,590,132,591,132,597,200,624,200,627,200,698,228,699,234,708,200,720,132],Decal:[25,133,35,133,103,170,161,73,531,200,682,200,695,262,696,264,743,212],DepthOfFieldEffect:[25,133,155,133,165,196,185,184,236,207,391,196],DigitsRigDescription:[25,133,239,152,240,152,241,152,242,135,243,200,366,152,367,152,368,152,369,135,370,200,419,152,420,152,421,152,422,135,423,200,516,152,517,152,518,152,519,135,520,200,576,24,653,152,654,152,655,152,656,135,657,200],DistortionSoundEffect:[25,133,155,133,302,196,443,200],DoubleConstrainedValue:[25,133,360,212,376,200],DragDetector:[23,132,25,133,138,152,142,26,155,133,202,58,257,61,341,223,346,200,347,135,348,203,359,204,371,200,372,135,406,137,418,27,470,28,471,207,535,132,679,212,680,212,702,57],Dragger:[25,133],EchoSoundEffect:[25,133,117,212,145,200,155,133,166,193,443,200,730,200],EqualizerSoundEffect:[25,133,155,133,223,200,327,176,365,174,443,200],EulerRotationCurve:[25,133,533,93],ExplorerFilter:[25,133],FaceControls:[25,133],FileMesh:[25,133,400,135,538,141,711,141],Fire:[25,133,102,166,155,133,219,240,547,161,580,234,662,212],FlangeSoundEffect:[25,133,120,192,155,133,377,197,443,200,452,234],FloatCurve:[25,133],FloorWire:[25,133,103,155,112,200,612,229,645,264,682,200,708,220,720,133,741,185],Folder:[25,133],ForceField:[25,133,720,133],Frame:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,618,38,720,133,743,212],GeneratedFolder:[25,133],Handles:[25,133,103,155,618,41,682,200,720,133],HapticEffect:[25,133,325,132,436,135,449,225,690,42],Highlight:[25,133,121,43,155,133,169,169,174,193,407,170,408,200],HingeConstraint:[5,3,17,228,19,200,21,200,25,133,155,133,312,132,330,178,383,230,386,200,449,187,472,200,564,200,591,132,624,200,698,228,720,132],Humanoid:[25,133,33,133,37,133,40,133,67,133,101,45,128,46,129,242,157,133,217,206,218,47,224,200,253,235,254,233,349,206,355,237,389,206,390,72,466,133,475,48,701,133,728,211],HumanoidController:[25,133],HumanoidDescription:[25,133,54,190,94,200,122,212,161,200,164,200,203,200,214,212,221,212,230,200,252,200,381,200,416,200,444,212,534,200,571,200,607,132,622,200,700,132,727,200,733,212],HumanoidRigDescription:[25,133,86,135,87,135,88,200,89,152,208,135,209,135,210,200,211,152,262,135,263,135,264,200,265,152,267,135,268,135,269,200,270,152,271,135,272,135,273,200,274,152,275,135,276,135,277,200,278,152,279,135,280,135,281,200,282,152,287,135,288,135,289,200,290,152,293,135,294,135,295,200,296,152,297,135,298,135,299,200,300,152,392,135,393,135,394,200,395,152,477,135,478,135,479,200,480,152,482,135,483,135,484,200,485,152,486,135,487,135,488,200,489,152,490,135,491,135,492,200,493,152,494,135,495,135,496,200,497,152,501,135,502,135,503,200,504,152,507,135,508,135,509,200,510,152,511,135,512,135,513,200,514,152,526,135,527,135,528,200,529,152,598,135,599,135,600,200,601,152,723,135,724,135,725,200,726,152],IKControl:[25,133,155,133,156,152,400,152,443,200,589,184,690,49,729,212],ImageButton:[4,133,11,262,25,133,32,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,232,262,233,262,234,200,245,53,247,133,260,200,378,132,436,252,467,91,531,200,539,95,552,133,553,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,587,241,588,212,618,21,660,257,720,133,743,212],ImageHandleAdornment:[6,4,9,132,25,133,72,152,103,167,580,264,583,135,682,200,720,133,743,175],ImageLabel:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,232,262,233,262,234,200,245,53,247,133,260,200,436,252,467,91,531,200,539,95,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,587,241,588,212,660,257,720,133,743,212],InputAction:[25,133,155,133,690,51],InputBinding:[25,133,48,62,91,133,135,62,191,62,255,62,261,62,435,200,439,193,441,62,461,188,469,212,476,62,538,212,548,62,690,52,697,62,705,264,706,141],InputContext:[25,133,155,133,443,205,579,132],IntConstrainedValue:[25,133,360,207,376,200],IntValue:[25,133,704,200],LineForce:[23,132,25,133,155,133,249,132,332,205,348,172,454,132,720,132],LineHandleAdornment:[6,4,9,132,25,133,72,152,103,155,301,234,583,135,647,212,682,200,720,133,743,175],LinearVelocity:[25,133,155,133,187,36,188,133,313,140,317,200,344,143,348,205,353,265,429,262,442,140,454,133,459,2,549,136,707,135,709,126,720,132],LocalizationTable:[25,133,593,251],MakeupDescription:[25,133,28,200,335,66,405,200],MaterialVariant:[8,7,25,133,50,67,152,212,153,170,339,68,615,207],MeshPart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,107,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,134,132,154,133,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,462,89,499,173,500,193,505,107,506,54,525,200,530,135,580,147,671,173,672,193,674,107,675,54,682,200,708,135],Model:[25,133,303,70,380,71],Motor:[25,133,70,152,71,152,124,200,155,133,361,200],Motor6D:[25,133,70,152,71,152,124,200,155,133,361,200],MotorFeature:[25,133,163,74,237,50,286,63,668,117],NoCollisionConstraint:[25,133,155,133],Noise:[25,133],NumberPose:[25,133,148,84,149,85,704,200,729,212],NumberValue:[25,133,704,200],ObjectValue:[25,133],Pants:[25,133,103,170],Part:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,567,77,580,147,671,173,672,193,674,108,675,54,682,200,708,135],ParticleEmitter:[0,135,25,133,68,212,136,200,151,75,155,133,177,133,178,249,179,81,180,82,181,212,182,212,183,132,307,200,308,200,323,132,406,83,452,215,567,78,568,79,569,212,570,80,603,262,662,212,710,200,739,132,745,200],Path2D:[25,133,97,132,103,154,647,212,720,133,743,212],PitchShiftSoundEffect:[25,133,155,133,399,201,443,200],PlaneConstraint:[25,133,155,133,720,132],PluginAction:[25,133],PointLight:[25,133,68,212,102,170,155,133,451,238,566,132],PrismaticConstraint:[5,3,25,133,155,133,312,132,319,228,331,200,383,172,385,200,472,200,563,200,580,187,591,132,597,200,627,200,699,234,708,200,720,132],ProceduralModel:[25,133,303,70,380,71,580,145],ProximityPrompt:[3,246,25,133,35,133,93,133,155,133,158,87,201,59,225,200,256,60,341,207,350,200,397,242,465,133,618,88,692,262],PyramidHandleAdornment:[6,4,9,132,25,133,72,152,103,155,220,220,565,5,577,229,580,212,583,135,682,200,720,133,743,175],RayValue:[25,133],RealtimeMedia:[25,133],RelativeGui:[25,133],RenderingTest:[25,133,72,152,104,207,105,90,106,233,123,242,167,236,417,132,447,132,448,216,463,215,572,132,658,242,663,222],ReverbSoundEffect:[25,133,116,202,119,212,126,212,145,179,155,133,443,200,730,200],RigidConstraint:[25,133,155,133,720,132],RocketPropulsion:[25,133,81,194,356,222,358,226,359,150,626,135,628,229,651,180,652,234,683,232,684,221],RodConstraint:[25,133,155,133,301,234,309,239,310,239,312,132,647,186,720,132],RopeConstraint:[25,133,155,133,301,234,472,200,647,186,720,132,734,132,735,204,736,228,737,220,738,234],Rotate:[25,133,70,152,71,152,155,133],RotateP:[25,133,49,200,70,152,71,152,155,133],RotateV:[25,133,49,200,70,152,71,152,155,133],RotationCurve:[25,133],ScreenGui:[25,133,35,133,95,133,130,200,155,133,468,133,536,94,540,96,554,99,555,99,556,99,557,99,558,132,744,131],ScrollingFrame:[4,132,11,262,25,133,35,133,39,17,41,17,46,164,47,200,55,157,56,19,58,212,79,262,80,253,96,133,144,132,150,31,229,97,245,53,247,133,260,200,436,252,531,200,541,170,542,200,543,210,545,98,546,133,552,133,554,99,555,99,556,99,557,99,558,133,561,200,580,252,581,101,714,97,715,128,720,133,743,212],Seat:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,127,132,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,567,77,580,147,671,173,672,193,674,108,675,54,682,200,708,135],SelectionBox:[25,133,103,155,316,187,620,156,621,212,682,200,720,133],SelectionPartLasso:[25,133,103,155,682,200,720,133],SelectionPointLasso:[25,133,103,155,434,135,682,200,720,133],SelectionSphere:[25,133,103,155,620,156,621,212,682,200,720,133],Shirt:[25,133,103,170],ShirtGraphic:[25,133,103,170],Sky:[25,133,83,133,382,208,586,135,605,221,619,216],Smoke:[25,133,102,170,155,133,403,193,521,212,580,212,662,212],Sound:[2,133,25,133,325,132,430,132,431,132,432,212,433,132,522,204,523,207,524,92,661,200,722,193],SoundGroup:[25,133,722,193],Sparkles:[25,133,155,133,595,163,662,212],SpecialMesh:[25,133,364,69,400,135,538,141,711,141],SphereHandleAdornment:[6,4,9,132,25,133,72,152,103,155,449,212,565,5,583,135,682,200,720,133,743,175],SpotLight:[13,239,25,133,68,212,102,170,155,133,161,73,451,211,566,132],SpringConstraint:[25,133,98,225,114,200,155,133,192,212,312,132,348,172,351,234,373,200,449,191,610,200,647,186,720,132],StringValue:[25,133,704,242],StyleDerive:[25,133,443,200],StyleLink:[25,133],StyleQuery:[25,133],StyleRule:[25,133,443,200,562,242],StyleSheet:[25,133],SunRaysEffect:[25,133,155,133,246,189,602,212],SurfaceAppearance:[8,8,25,133,102,170,152,212,153,170,467,91],SurfaceGui:[4,133,9,132,25,133,35,133,68,212,80,266,96,132,155,133,161,73,308,200,345,200,426,233,468,133,554,99,555,99,556,99,557,99,558,132,584,105,666,200,744,131,745,200],SurfaceLight:[13,239,25,133,68,212,102,170,155,133,161,73,451,211,566,132],TextBox:[4,133,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,92,133,96,132,144,132,245,53,247,133,260,200,314,212,362,175,387,132,404,242,427,160,428,242,436,252,474,132,531,200,552,133,554,99,555,99,556,99,557,99,558,132,561,200,573,133,580,252,581,101,630,250,631,158,632,111,633,133,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],TextButton:[4,133,11,262,25,133,32,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,314,212,362,175,378,132,404,242,436,252,474,132,531,200,552,133,553,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,618,21,630,243,631,158,632,111,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],TextGenerator:[25,133,550,200,623,242,629,194,670,198],TextLabel:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,314,212,362,175,404,242,436,252,474,132,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,630,247,631,158,632,111,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],Texture:[25,133,35,133,103,170,161,73,401,200,402,200,531,200,616,220,617,220,682,200,695,262,696,264,743,212],Tool:[25,133,75,133,155,133,204,152,303,70,336,132,380,71,464,133,667,242],Torque:[25,133,155,133,459,1,676,135,720,132],TorsionSpringConstraint:[25,133,98,238,114,181,155,133,311,132,312,132,342,228,359,172,449,191,472,200,610,206,720,132],Trail:[25,133,68,212,155,133,162,132,304,220,307,200,308,200,351,200,373,186,643,212,644,115],TremoloSoundEffect:[25,133,120,212,146,193,155,133,193,234,443,200],TrussPart:[12,132,25,133,30,133,42,173,43,193,44,109,45,54,61,173,62,193,64,109,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,194,173,195,193,196,109,197,54,284,173,285,193,291,109,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,109,506,54,525,200,530,135,580,146,671,173,672,193,674,109,675,54,682,200,708,135],UIAspectRatioConstraint:[25,133,26,212,27,12,133,25],UICorner:[25,133,60,259,63,259,669,259,673,259],UIDragDetector:[25,133,66,118,137,263,139,119,140,200,141,120,142,121,143,252,155,133,346,200,347,252,371,200,372,252,470,122,559,255,560,239,691,123],UIFlexItem:[25,133,176,125,207,200,251,56,575,200],UIGradient:[25,133,155,133,400,262,531,200,538,212,659,39,690,40],UIGridLayout:[25,133,84,256,85,254,170,34,171,200,227,44,592,102,606,103,712,127],UIListLayout:[25,133,170,35,227,44,228,124,251,56,411,258,592,102,712,127,713,124,742,132],UIPadding:[25,133,412,258,413,258,414,258,415,258],UIPageLayout:[22,133,25,133,90,132,148,29,149,30,170,34,200,133,227,44,411,258,544,133,592,102,678,133,686,212,712,127],UIScale:[25,133,538,212],UIShadow:[25,133,52,258,102,154,155,133,400,252,602,252,682,200,743,175],UISizeConstraint:[25,133,354,261,374,262],UIStroke:[24,11,25,133,57,258,59,20,102,154,155,133,315,64,611,104,647,212,682,200,743,212],UITableLayout:[25,133,170,35,172,132,173,132,227,44,333,110,411,252,592,102,712,127],UITextSizeConstraint:[25,133,357,206,375,212],UniversalConstraint:[25,133,155,133,312,132,342,228,449,188,472,200,720,132],ValueCurve:[25,133],Vector3Curve:[25,133],Vector3Value:[25,133,704,135],VectorForce:[23,132,25,133,155,133,186,142,459,1,720,132],VehicleSeat:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,127,132,154,133,194,173,195,193,196,107,197,54,216,133,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,356,219,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,147,608,200,609,200,649,200,650,200,671,173,672,193,674,108,675,54,676,207,682,200,685,212,708,135],VelocityMotor:[25,133,70,152,71,152,108,200,124,200,155,133,361,200],VideoDisplay:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,436,252,467,91,531,200,539,95,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,660,257,716,170,717,262,718,262,719,200,720,133,743,212],VideoFrame:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,248,55,260,200,325,132,363,129,433,132,436,252,522,204,523,212,524,92,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,661,200,720,133,722,212,743,212],VideoPlayer:[25,133,248,55,326,132,363,129,432,212,661,200,722,212],ViewportFrame:[4,132,10,165,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,234,200,245,53,247,133,260,200,305,162,306,134,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,720,133,743,212],WedgePart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,147,671,173,672,193,674,107,675,54,682,200,708,135],Weld:[25,133,70,152,71,152,155,133],WeldConstraint:[25,133],Wire:[25,133,594,248,625,245],WireframeHandleAdornment:[6,4,9,132,25,133,72,152,103,155,538,141,583,135,647,212,682,200,720,133,743,175],WorldModel:[25,133,303,70,380,71],WrapDeformer:[25,133,73,152,235,152],WrapLayer:[25,133,38,130,51,152,73,152,155,133,235,152,405,212,445,212,457,152,574,200],WrapTarget:[25,133,73,152,235,152,610,200],WrapTextureTransfer:[25,133,693,260,694,261]},qf=`Acceleration.AccessType.AcousticSimulationEnabled.ActionText.Active.ActuatorType.AdornCullingMode.AlignType.AlphaMode.AlwaysOnTop.Ambient.AnchorPoint.Anchored.Angle.AngularActuatorType.AngularDamping.AngularLimitsEnabled.AngularResponsiveness.AngularRestitution.AngularSpeed.AngularStrength.AngularVelocity.Animated.ApplyAtCenterOfMass.ApplyStrokeMode.Archivable.AspectRatio.AspectType.AssetId.Attack.AudioCanCollide.AudioInteractionGroup.AutoButtonColor.AutoJumpEnabled.AutoLoad.AutoLocalize.AutoPlay.AutoRotate.AutoSkin.AutomaticCanvasSize.AutomaticScalingEnabled.AutomaticSize.BackParamA.BackParamB.BackSurface.BackSurfaceInput.BackgroundColor3.BackgroundTransparency.Backward.BaseAngle.BaseMaterial.BindOffset.BlurRadius.BodyPart.BodyTypeScale.BorderColor3.BorderMode.BorderOffset.BorderSizePixel.BorderStrokePosition.BottomLeftRadius.BottomParamA.BottomParamB.BottomRightRadius.BottomSurface.BottomSurfaceInput.BoundingBehavior.BreakJointsOnDeath.Brightness.Bypass.C0.C1.CFrame.CageOrigin.CameraType.CanBeDropped.CanCollide.CanQuery.CanTouch.CanvasPosition.CanvasSize.CartoonFactor.CastShadow.CelestialBodiesShown.CellPadding.CellSize.ChestRangeMax.ChestRangeMin.ChestSize.ChestTposeAdjustment.Circular.ClampMagnitudeToOne.ClearTextOnFocus.ClickablePrompt.ClimbAnimation.ClipToDeviceSafeArea.ClipsDescendants.Closed.Coils.CollisionGroup.CollisionGroupId.CollisionType.Color.Color3.ComparisonDiffThreshold.ComparisonMethod.ComparisonPsnrThreshold.Contrast.CurrentAngle.CurveSize0.CurveSize1.CurveType.CycleOffset.D.Damping.DecayRatio.DecayTime.Delay.DelayTime.Density.Depth.DepthMode.DepthScale.Description.DesiredAngle.DiffractionEnabled.Diffusion.Disabled.DisplayDistanceType.DisplayName.DisplayOrder.DistanceLowerLimit.DistanceUpperLimit.DominantAxis.DoubleSided.Down.Drag.DragAxis.DragFrame.DragRelativity.DragRotation.DragSpace.DragStyle.DragUDim2.Draggable.DryLevel.Duty.EarlyDelayTime.EasingDirection.EasingStyle.ElasticBehavior.EmissionDirection.EmissiveStrength.EmissiveTint.EnableFluidForces.Enabled.EndEffectorOffset.EvaluateStateMachine.Exclusivity.ExtentsOffset.ExtentsOffsetWorldSpace.Face.FaceCamera.FaceId.FallAnimation.FarIntensity.Feedback.FieldOfView.FieldOfViewMode.FillColor.FillDirection.FillDirectionMaxCells.FillEmptySpaceColumns.FillEmptySpaceRows.FillTransparency.FilterType.FlexMode.FlipbookBlendFrames.FlipbookIncompatible.FlipbookLayout.FlipbookMode.FlipbookSizeX.FlipbookSizeY.FlipbookStartRandom.Focus.FocusDistance.Force.ForceLimitMode.ForceLimitsEnabled.ForceRelativeTo.FormFactor.Forward.FreeLength.Frequency.FrontParamA.FrontParamB.FrontSurface.FrontSurfaceInput.Gain.GainMakeup.GamepadInputEnabled.GamepadKeyCode.GamepadModeSwitchKeyCode.GraphicTShirt.Grip.GroupColor3.GroupTransparency.GrowRatio.HeadBaseRangeMax.HeadBaseRangeMin.HeadBaseSize.HeadBaseTposeAdjustment.HeadColor3.HeadLocked.HeadScale.HeadShape.HeadsUpDisplay.HealthDisplayDistance.HealthDisplayType.Heat.Height.HeightScale.HighCutFrequency.HighGain.HipHeight.HoldDuration.Hollow.HorizontalAlignment.HorizontalFlex.HorizontalScrollBarInset.IdleAnimation.ImageColor3.ImageRectOffset.ImageRectSize.ImageTransparency.ImportOrigin.InFocusRadius.InOut.InclinationAngle.Index1TposeAdjustment.Index2TposeAdjustment.Index3TposeAdjustment.IndexRange.IndexSize.InnerRadius.InputSink.Intensity.Interactable.InternalVideoUsage.InverseSquareLaw.IsKinematic.ItemLineAlignment.JumpAnimation.JumpHeight.JumpPower.KeyCode.KeyboardKeyCode.KeyboardModeSwitchKeyCode.LateDelayTime.Layout.LayoutOrder.Left.LeftAnkleRangeMax.LeftAnkleRangeMin.LeftAnkleSize.LeftAnkleTposeAdjustment.LeftArmColor3.LeftClavicleRangeMax.LeftClavicleRangeMin.LeftClavicleSize.LeftClavicleTposeAdjustment.LeftElbowRangeMax.LeftElbowRangeMin.LeftElbowSize.LeftElbowTposeAdjustment.LeftHipRangeMax.LeftHipRangeMin.LeftHipSize.LeftHipTposeAdjustment.LeftKneeRangeMax.LeftKneeRangeMin.LeftKneeSize.LeftKneeTposeAdjustment.LeftLegColor3.LeftParamA.LeftParamB.LeftRight.LeftShoulderRangeMax.LeftShoulderRangeMin.LeftShoulderSize.LeftShoulderTposeAdjustment.LeftSurface.LeftSurfaceInput.LeftToeBaseRangeMax.LeftToeBaseRangeMin.LeftToeBaseSize.LeftToeBaseTposeAdjustment.LeftWristRangeMax.LeftWristRangeMin.LeftWristSize.LeftWristTposeAdjustment.Length.Level.LevelOfDetail.Lifetime.LightColor.LightDirection.LightEmission.LightInfluence.LimitAngle0.LimitAngle1.LimitEnabled.LimitsEnabled.LineDirection.LineHeight.LineJoinMode.LineThickness.LineVelocity.LinearDamping.LinearResponsiveness.LinearStrength.Location.Locked.LockedToPart.Loop.Looped.Looping.LowGain.LowShelfFrequency.LowShelfGain.LowerAngle.LowerLimit.Magnitude.MajorAxis.MakeupGain.MakeupType.ManualActivationOnly.Massless.Material.MaterialPattern.MaterialVariant.MaxActivationDistance.MaxAngle.MaxAngularVelocity.MaxAxesForce.MaxDistance.MaxDragAngle.MaxDragTranslation.MaxForce.MaxHealth.MaxIndicatorDistance.MaxLength.MaxLevel.MaxPlanarAxesForce.MaxSize.MaxSlopeAngle.MaxSpeed.MaxTextSize.MaxThrust.MaxTorque.MaxValue.MaxVelocity.MaxVisibleGraphemes.MaximumResolution.MeshType.MidGain.Middle1TposeAdjustment.Middle2TposeAdjustment.Middle3TposeAdjustment.MiddleRange.MiddleSize.MinDragAngle.MinDragTranslation.MinLength.MinSize.MinTextSize.MinValue.Mix.Modal.Mode.ModelStreamingMode.MoodAnimation.MoonAngularSize.MotorMaxAcceleration.MotorMaxAngularAcceleration.MotorMaxForce.MotorMaxTorque.MultiLine.Muted.NameDisplayDistance.NameOcclusion.NearIntensity.NeckRangeMax.NeckRangeMin.NeckSize.NeckTposeAdjustment.NodeType.ObjectText.OcclusionEnabled.Octave.Offset.OffsetStudsU.OffsetStudsV.Opacity.OpenTypeFeatures.Order.Orientation.OutlineColor.OutlineTransparency.OverlayTextureId.P.Padding.PaddingBottom.PaddingLeft.PaddingRight.PaddingTop.Pants.PerfTest.PermissionPolicy.Pinky1TposeAdjustment.Pinky2TposeAdjustment.Pinky3TposeAdjustment.PinkyRange.PinkySize.Pitch.PivotOffset.PixelsPerStud.PlaceholderColor3.PlaceholderText.PlaneVelocity.PlayOnRemove.PlaybackRegionsEnabled.PlaybackSpeed.Playing.Point.PointerIndex.Position.PositionType.PreferLodEnabled.PressedThreshold.PrimaryAxisOnly.PrimaryModifier.PrimaryTangentAxis.Priority.ProportionScale.Puffiness.Q.QualityAuto.QualityLevel.Radius.RampTime.Range.Rate.Ratio.ReactionForceEnabled.ReactionTorqueEnabled.ReferenceFrequency.ReferenceOrigin.Reflectance.RelativeTo.Release.ReleasedThreshold.RenderFidelity.RenderingTestFrameCount.RequiresHandle.RequiresLineOfSight.RequiresNeck.ResampleMode.ResetOnSpawn.ResponseCurve.ResponseStyle.Responsiveness.Restitution.ReverbEnabled.RichText.RigType.Right.RightAnkleRangeMax.RightAnkleRangeMin.RightAnkleSize.RightAnkleTposeAdjustment.RightArmColor3.RightClavicleRangeMax.RightClavicleRangeMin.RightClavicleSize.RightClavicleTposeAdjustment.RightElbowRangeMax.RightElbowRangeMin.RightElbowSize.RightElbowTposeAdjustment.RightHipRangeMax.RightHipRangeMin.RightHipSize.RightHipTposeAdjustment.RightKneeRangeMax.RightKneeRangeMin.RightKneeSize.RightKneeTposeAdjustment.RightLegColor3.RightParamA.RightParamB.RightShoulderRangeMax.RightShoulderRangeMin.RightShoulderSize.RightShoulderTposeAdjustment.RightSurface.RightSurfaceInput.RightToeBaseRangeMax.RightToeBaseRangeMin.RightToeBaseSize.RightToeBaseTposeAdjustment.RightWristRangeMax.RightWristRangeMin.RightWristSize.RightWristTposeAdjustment.RigidityEnabled.Ring1TposeAdjustment.Ring2TposeAdjustment.Ring3TposeAdjustment.RingRange.RingSize.RiseVelocity.RollOffMaxDistance.RollOffMinDistance.RollOffMode.RootPriority.RootRangeMax.RootRangeMin.RootSize.RootTposeAdjustment.RotVelocity.Rotation.RotationAxisVisible.RotationOrder.RunAnimation.RunLocally.SafeAreaCompatibility.Saturation.Scale.ScaleType.ScreenInsets.ScrollBarImageColor3.ScrollBarImageTransparency.ScrollBarThickness.ScrollWheelInputEnabled.ScrollingDirection.ScrollingEnabled.SecondaryColor.SecondaryModifier.SecondaryTangentAxis.Seed.Segments.Selectable.Selected.SelectionBehaviorDown.SelectionBehaviorLeft.SelectionBehaviorRight.SelectionBehaviorUp.SelectionGroup.SelectionModeDragSpeed.SelectionModeRotateSpeed.SelectionOrder.Selector.ServoMaxForce.ServoMaxTorque.Shading.Shadows.Shape.ShapeInOut.ShapePartial.ShapeStyle.Shirt.ShouldSkip.ShowNativeInput.ShrinkFactor.ShrinkRatio.Side.Sides.SimulationFidelity.Sink.Size.SizeConstraint.SizeOffset.SizeRelativeOffset.SizingMode.Skew.SkyboxOrientation.SliceCenter.SliceScale.SmoothTime.SoftlockAngularServoUponReachingTarget.SoftlockServoUponReachingTarget.SortOrder.SourceLocaleId.SourceName.SparkleColor.SpectrumEnabled.Speed.SpineRangeMax.SpineRangeMin.SpineSize.SpineTposeAdjustment.Spread.SpreadAngle.Square.StarCount.StartCorner.StaticFacialAnimation.Steer.SteerFloat.Stiffness.StrokeSizingMode.StudsBetweenTextures.StudsOffset.StudsOffsetWorldSpace.StudsPerTile.StudsPerTileU.StudsPerTileV.Style.SunAngularSize.SurfaceColor3.SurfaceTransparency.SwimAnimation.SystemPrompt.TargetAngle.TargetName.TargetOffset.TargetPosition.TargetRadius.Temperature.Text.TextColor3.TextDirection.TextEditable.TextScaled.TextSize.TextStrokeColor3.TextStrokeTransparency.TextTransparency.TextTruncate.TextWrapped.TextXAlignment.TextYAlignment.TextureLength.TextureMode.TextureSize.TextureSpeed.Thickness.Threshold.Throttle.ThrottleFloat.ThrustD.ThrustP.Thumb1TposeAdjustment.Thumb2TposeAdjustment.Thumb3TposeAdjustment.ThumbRange.ThumbSize.Ticket.TileMode.TileSize.TimePosition.TimeScale.Timeout.TintColor.TonemapperPreset.ToolPunchThroughDistance.ToolTip.TopBottom.TopLeftRadius.TopP.TopParamA.TopParamB.TopRightRadius.TopSurface.TopSurfaceInput.Torque.TorsoColor3.TouchInputEnabled.TrackballRadialPullFactor.TrackballRollFactor.Transform.Transparency.TurnD.TurnP.TurnSpeed.TweenTime.TwistLimitsEnabled.TwistLowerAngle.TwistUpperAngle.Type.UIDragSpeedAxisMapping.UIOffset.UVMaxBound.UVMinBound.UVOffset.UVScale.Up.UpperAngle.UpperLimit.UseAvatarSettings.UseJumpPower.VRSwitchKeyCode.VRTiltAndRollEnabled.Value.Vector2Scale.Vector3Scale.VectorVelocity.Velocity.VelocityConstraintMode.VelocityInheritance.VertexColor.VerticalAlignment.VerticalFlex.VerticalScrollBarInset.VerticalScrollBarPosition.VideoColor3.VideoRectOffset.VideoRectSize.VideoTransparency.Visible.VoiceId.Volume.WaistRangeMax.WaistRangeMin.WaistSize.WaistTposeAdjustment.WalkAnimation.WalkSpeed.Weight.WetLevel.Width0.Width1.WidthScale.WinchEnabled.WinchForce.WinchResponsiveness.WinchSpeed.WinchTarget.WindAffectsDrag.WindowSize.WireRadius.Wraps.ZIndex.ZIndexBehavior.ZOffset`.split(`.`),Jf=[[0,`AccessModifierType`,`Deny`],[0,`ActuatorRelativeTo`,`Attachment0`],[0,`ActuatorRelativeTo`,`World`],[0,`ActuatorType`,`None`],[0,`AdornCullingMode`,`Automatic`],[0,`AdornShading`,`Default`],[0,`AlignType`,`AllAxes`],[0,`AlphaMode`,`Opaque`],[0,`AlphaMode`,`Overlay`],[0,`AnimationNodeType`,`InvalidNode`],[0,`AnimationPriority`,`Action`],[0,`ApplyStrokeMode`,`Contextual`],[0,`AspectType`,`FitWithinMaxSize`],[0,`AudioChannelLayout`,`Stereo`],[0,`AudioFilterType`,`Peak`],[0,`AudioSimulationFidelity`,`Automatic`],[0,`AudioWindowSize`,`Medium`],[0,`AutomaticSize`,`None`],[0,`BodyPart`,`Head`],[0,`BorderMode`,`Outline`],[0,`BorderStrokePosition`,`Outer`],[0,`ButtonStyle`,`Custom`],[0,`CameraType`,`Fixed`],[0,`CompositeValueCurveType`,`NumberRange`],[0,`DigitsRigDescriptionSide`,`None`],[0,`DominantAxis`,`Width`],[0,`DragDetectorDragStyle`,`TranslatePlane`],[0,`DragDetectorPermissionPolicy`,`Everybody`],[0,`DragDetectorResponseStyle`,`Physical`],[0,`EasingDirection`,`Out`],[0,`EasingStyle`,`Back`],[0,`ElasticBehavior`,`WhenScrollable`],[0,`EmitterPositionType`,`Parent`],[0,`FieldOfViewMode`,`Vertical`],[0,`FillDirection`,`Horizontal`],[0,`FillDirection`,`Vertical`],[0,`ForceLimitMode`,`Magnitude`],[0,`FormFactor`,`Brick`],[0,`FrameStyle`,`Custom`],[0,`GradientTileMode`,`Clamp`],[0,`GradientType`,`Linear`],[0,`HandlesStyle`,`Resize`],[0,`HapticEffectType`,`UIClick`],[0,`HighlightDepthMode`,`AlwaysOnTop`],[0,`HorizontalAlignment`,`Left`],[0,`HumanoidCollisionType`,`OuterBox`],[0,`HumanoidDisplayDistanceType`,`Viewer`],[0,`HumanoidHealthDisplayType`,`DisplayWhenDamaged`],[0,`HumanoidRigType`,`R6`],[0,`IKControlType`,`Transform`],[0,`InOut`,`Center`],[0,`InputActionType`,`Bool`],[0,`InputBindingType`,`Automatic`],[0,`InputSink`,`None`],[0,`InputType`,`NoInput`],[0,`InternalVideoUsage`,`Default`],[0,`ItemLineAlignment`,`Automatic`],[0,`KeyCode`,`ButtonL2`],[0,`KeyCode`,`ButtonR1`],[0,`KeyCode`,`ButtonX`],[0,`KeyCode`,`E`],[0,`KeyCode`,`LeftControl`],[0,`KeyCode`,`Unknown`],[0,`LeftRight`,`Center`],[0,`LineJoinMode`,`Round`],[0,`ListenerPositionType`,`Parent`],[0,`MakeupType`,`Face`],[0,`Material`,`Plastic`],[0,`MaterialPattern`,`Regular`],[0,`MeshType`,`Head`],[0,`ModelLevelOfDetail`,`Automatic`],[0,`ModelStreamingMode`,`Default`],[0,`NameOcclusion`,`OccludeAll`],[0,`NormalId`,`Front`],[0,`NormalId`,`Right`],[0,`NormalId`,`Top`],[0,`OrientationAlignmentMode`,`TwoAttachment`],[0,`PartType`,`Block`],[0,`ParticleEmitterShape`,`Box`],[0,`ParticleEmitterShapeInOut`,`Outward`],[0,`ParticleEmitterShapeStyle`,`Volume`],[0,`ParticleFlipbookLayout`,`None`],[0,`ParticleFlipbookMode`,`Loop`],[0,`ParticleOrientation`,`FacingCamera`],[0,`PoseEasingDirection`,`In`],[0,`PoseEasingStyle`,`Linear`],[0,`PositionAlignmentMode`,`TwoAttachment`],[0,`ProximityPromptExclusivity`,`OnePerButton`],[0,`ProximityPromptStyle`,`Default`],[0,`RenderFidelity`,`Automatic`],[0,`RenderingTestComparisonMethod`,`psnr`],[0,`ResamplerMode`,`Default`],[0,`RollOffMode`,`Inverse`],[0,`RotationOrder`,`XYZ`],[0,`SafeAreaCompatibility`,`FullscreenExtension`],[0,`ScaleType`,`Stretch`],[0,`ScreenInsets`,`CoreUISafeInsets`],[0,`ScrollBarInset`,`None`],[0,`ScrollingDirection`,`XY`],[0,`SelectionBehavior`,`Escape`],[0,`SimulationMode`,`Default`],[0,`SizeConstraint`,`RelativeXY`],[0,`SortOrder`,`Name`],[0,`StartCorner`,`TopLeft`],[0,`StrokeSizingMode`,`FixedSize`],[0,`SurfaceGuiSizingMode`,`FixedSize`],[0,`SurfaceType`,`Inlet`],[0,`SurfaceType`,`Smooth`],[0,`SurfaceType`,`Studs`],[0,`SurfaceType`,`Universal`],[0,`TableMajorAxis`,`RowMajor`],[0,`TextDirection`,`Auto`],[0,`TextTruncate`,`None`],[0,`TextXAlignment`,`Center`],[0,`TextYAlignment`,`Center`],[0,`TextureMode`,`Stretch`],[0,`TonemapperPreset`,`Default`],[0,`TopBottom`,`Center`],[0,`UIDragDetectorBoundingBehavior`,`Automatic`],[0,`UIDragDetectorDragRelativity`,`Absolute`],[0,`UIDragDetectorDragSpace`,`Parent`],[0,`UIDragDetectorDragStyle`,`TranslatePlane`],[0,`UIDragDetectorResponseStyle`,`Offset`],[0,`UIDragSpeedAxisMapping`,`XY`],[0,`UIFlexAlignment`,`None`],[0,`UIFlexMode`,`None`],[0,`VelocityConstraintMode`,`Vector`],[0,`VerticalAlignment`,`Top`],[0,`VerticalScrollBarPosition`,`Right`],[0,`VideoSampleSize`,`Full`],[0,`WrapLayerAutoSkin`,`Disabled`],[0,`ZIndexBehavior`,`Global`],[1,!1],[1,!0],[10,[-1,-1,-1]],[10,[0,0,0]],[10,[0,1,0]],[10,[0,180,90]],[10,[0,2,0]],[10,[0,50,0]],[10,[1,0,0]],[10,[1,1,1]],[10,[1e3,0,0]],[10,[1e3,1e3,1e3]],[10,[1e4,1e4,1e4]],[10,[12,12,12]],[10,[2,2,2]],[10,[4,1.2000000476837158,2]],[10,[4e3,4e3,4e3]],[10,[4e5,0,4e5]],[10,[4e5,4e5,0]],[2,[0,0,-5,1,0,0,0,1,0,0,0,1]],[2,[0,0,0,1,0,0,0,1,0,0,0,1]],[2,[0,20,20,1,0,0,0,.7071068286895752,.7071068286895752,0,-.7071068286895752,.7071068286895752]],[3,[0,0,0]],[3,[.05098039284348488,.4117647111415863,.6745098233222961]],[3,[.05098039656877518,.4117647409439087,.6745098233222961]],[3,[.10588235408067703,.16470588743686676,.2078431397676468]],[3,[.10588236153125763,.16470588743686676,.20784315466880798]],[3,[.1568627506494522,.49803924560546875,.27843138575553894]],[3,[.5,.5,.5]],[3,[.545098066329956,.3137255012989044,.21568629145622253]],[3,[.5490196347236633,.5490196347236633,.5490196347236633]],[3,[.5647059082984924,.09803922474384308,1]],[3,[.6392157077789307,.6352941393852234,.6470588445663452]],[3,[.7843137383460999,.7843137383460999,.7843137383460999]],[3,[.9254902601242065,.545098066329956,.27450981736183167]],[3,[.9490196704864502,.9529412388801575,.9529412388801575]],[3,[.9921569228172302,.917647123336792,.5529412031173706]],[3,[1,0,0]],[3,[1,1,1]],[3,[163,162,165]],[4,`inf`],[4,-.5],[4,-10],[4,-1],[4,-20],[4,-40],[4,-45],[4,-6],[4,.0010000000474974513],[4,.009999999776482582],[4,.019999999552965164],[4,.03999999910593033],[4,.05000000074505806],[4,.0625],[4,.10000000149011612],[4,.15000000596046448],[4,.20000000298023224],[4,.25],[4,.30000001192092896],[4,.4000000059604645],[4,.44999998807907104],[4,.5],[4,.699999988079071],[4,.7070000171661377],[4,.75],[4,.8500000238418579],[4,.8999999761581421],[4,.949999988079071],[4,0],[4,1.25],[4,1.5],[4,1e7],[4,1e4],[4,1e3],[4,100],[4,10],[4,11],[4,1250],[4,12],[4,16],[4,1],[4,2e4],[4,2e3],[4,20],[4,21],[4,24],[4,250],[4,25],[4,2],[4,3e3],[4,30],[4,32],[4,360],[4,3],[4,4e3],[4,40],[4,45],[4,4],[4,5e5],[4,5e3],[4,500],[4,50],[4,5],[4,7.199999809265137],[4,70],[4,89],[4,8],[4,90],[4,9],[5,[0,0,0,0]],[6,``],[6,`Button`],[6,`Default`],[6,`Input`],[6,`Interact`],[6,`Label`],[6,`Output`],[6,`Particle texture must be 1024 by 1024 to use flipbooks.`],[6,`TextBox`],[6,`en-us`],[7,[0,0,0,0]],[7,[0,0,2,0]],[7,[0,100,0,100]],[7,[0,300,0,300]],[7,[0,5,0,5]],[7,[1,0,1,0]],[8,[0,0]],[8,[0,8]],[9,[`-inf`,`-inf`]],[9,[`inf`,`inf`]],[9,[0,0]],[9,[1,0]],[9,[1,1]],[9,[1e3,1e3]],[9,[800,600]]];const Yf=new Set([`Name`,`Parent`]),Xf=new Set(Array.from(Yf,e=>e.toLowerCase())),Zf=new Map(Object.entries(Kf).map(([e])=>[e.toLowerCase(),e]));function Qf(e){let t=new Map;for(let[n,r]of Object.entries(e)){if(!fp(r))continue;let e=n.toLowerCase();t.has(e)||t.set(e,{propertyName:n,value:r})}return t}const $f=[`Enum`,`bool`,`CFrame`,`Color3`,`number`,`Rect`,`string`,`UDim2`,`UDim`,`Vector2`,`Vector3`];function ep(e){let[t]=e;if(typeof t!=`number`)return;let n=$f[t];if(n===void 0)return;let r=n===`Enum`?{enumType:e[1],type:n,value:e[2]}:{type:n,value:e[1]};return fp(r)?r:void 0}const tp=new Map([[`TextLabel`,new Map([[`text`,{propertyName:`Text`,value:{type:`string`,value:``}}]])],[`UICorner`,new Map([[`cornerradius`,{propertyName:`CornerRadius`,value:{type:`UDim`,value:[0,0]}}]])]]);function np(){let e=new Map;for(let[t,n]of Object.entries(Kf)){let r={};for(let e=0;e<n.length;e+=2){let t=n[e],i=n[e+1];if(t===void 0||i===void 0)continue;let a=qf[t],o=Jf[i],s=o===void 0?void 0:ep(o);a!==void 0&&s!==void 0&&(r[a]=s)}e.set(t,Qf(r))}return e}const rp=np();function ip(e,t){return e.type===`Identifier`&&e.name===t}function ap(e){return e.type===`Literal`&&typeof e.value==`boolean`}function op(e){if(e.type!==`JSXIdentifier`)return;let t=Zf.get(e.name.toLowerCase());if(t!==void 0&&e.name!==t)return t}function sp(e){if(e.type===`JSXIdentifier`)return e.name}function cp(e){let{value:t}=e;if(t!==null){if(t.type===`Literal`)return t;if(t.type===`JSXExpressionContainer`&&t.expression.type!==`JSXEmptyExpression`)return t.expression}}function lp(e,t){let n=t.toLowerCase(),r=tp.get(e)?.get(n);if(r!==void 0)return r;let i=rp.get(e);if(i!==void 0)return i.get(n)}function up(e){return Xf.has(e.toLowerCase())}function dp(e){return b(e)||e===`inf`||e===`-inf`}function fp(e){if(!(x(e)&&y(e.type)&&`value`in e))return!1;switch(e.type){case`bool`:return typeof e.value==`boolean`;case`CFrame`:return Array.isArray(e.value)&&e.value.length===12&&e.value.every(dp);case`Color3`:return Array.isArray(e.value)&&e.value.length===3&&e.value.every(b);case`Enum`:return y(e.enumType)&&y(e.value);case`number`:return dp(e.value);case`Rect`:case`UDim2`:return Array.isArray(e.value)&&e.value.length===4&&e.value.every(dp);case`string`:return y(e.value);case`UDim`:case`Vector2`:return Array.isArray(e.value)&&e.value.length===2&&e.value.every(dp);case`Vector3`:return Array.isArray(e.value)&&e.value.length===3&&e.value.every(dp)}return!1}function pp(e){let t=w(e);if(t.type!==`NewExpression`||!ip(t.callee,`Instance`))return;let[n]=t.arguments;if(!(n===void 0||n.type===`SpreadElement`||!ve(n)))return n.value}function mp(e,t,n=new WeakSet){if(Array.isArray(e)){for(let r of e)if(mp(r,t,n))return!0;return!1}if(!x(e)||n.has(e))return!1;if(n.add(e),e.type===`Identifier`&&e.name===t)return!0;for(let r of Object.values(e))if(mp(r,t,n))return!0;return!1}function hp(e){let t=[],n=e;for(;n.type===`MemberExpression`;){if(n.computed||n.property.type!==`Identifier`)return;t.unshift(n.property.name);let{object:e}=n;if(e.type===`Identifier`)return t.unshift(e.name),t;if(e.type!==`MemberExpression`)return;n=e}if(n.type===`Identifier`)return t.unshift(n.name),t}function gp(e){let t=hp(e);return t?.length===2&&t[0]===`math`&&t[1]===`huge`}function _p(e){return e===`inf`?1/0:e===`-inf`?-1/0:e}function vp(e,t){return _p(e)===t}function yp(e,t){if(e.length!==t.length)return!1;for(let[n,r]of e.entries()){let e=t[n];if(e===void 0||!vp(r,e))return!1}return!0}function X(e){if(Ge(e))return e.value;if(gp(e))return 1/0;if(e.type!==`UnaryExpression`||e.operator!==`+`&&e.operator!==`-`)return;let t=X(e.argument);if(t!==void 0)return e.operator===`+`?t:-t}function bp(e){if(e.length!==2)return;let[t,n]=e;if(t!==void 0&&n!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`)return[t,n]}function xp(e){if(e.length!==3)return;let[t,n,r]=e;if(t!==void 0&&n!==void 0&&r!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`&&r.type!==`SpreadElement`)return[t,n,r]}function Sp(e){if(e.length!==4)return;let[t,n,r,i]=e;if(t!==void 0&&n!==void 0&&r!==void 0&&i!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`&&r.type!==`SpreadElement`&&i.type!==`SpreadElement`)return[t,n,r,i]}function Cp(e,t,n,r){if(e.type===`MemberExpression`){let r=hp(e);return r?.length===2&&r[0]===t&&r[1]===`zero`?n:void 0}if(!(e.type!==`NewExpression`||!ip(e.callee,t)))return e.arguments.length===0?n:r(e.arguments)}function wp(e){return Cp(e,`Vector2`,[0,0],Tp)}function Tp(e){let t=bp(e);if(t===void 0)return;let[n,r]=t,i=X(n),a=X(r);if(i!==void 0&&a!==void 0)return[i,a]}function Ep(e){let t=xp(e);if(t===void 0)return;let[n,r,i]=t,a=X(n),o=X(r),s=X(i);if(a!==void 0&&o!==void 0&&s!==void 0)return[a,o,s]}function Dp(e){return Cp(e,`Vector3`,[0,0,0],Ep)}function Op(e){if(!(e.type!==`NewExpression`||!ip(e.callee,`UDim`)))return e.arguments.length===0?[0,0]:Tp(e.arguments)}function kp(e){let t=Sp(e);if(t===void 0)return;let[n,r,i,a]=t,o=X(n),s=X(r),c=X(i),l=X(a);if(o!==void 0&&s!==void 0&&c!==void 0&&l!==void 0)return[o,s,c,l]}function Ap(e){if(e.type===`CallExpression`){let t=hp(e.callee),n=Tp(e.arguments);if(t===void 0||n===void 0)return;let[r,i]=n;return t.length===2&&t[0]===`UDim2`&&t[1]===`fromOffset`?[0,r,0,i]:t.length===2&&t[0]===`UDim2`&&t[1]===`fromScale`?[r,0,i,0]:void 0}if(!(e.type!==`NewExpression`||!ip(e.callee,`UDim2`)))return e.arguments.length===0?[0,0,0,0]:kp(e.arguments)}function jp(e){if(!(e.type!==`NewExpression`||!ip(e.callee,`Rect`)))return e.arguments.length===0?[0,0,0,0]:kp(e.arguments)}function Mp(e){let[t,n,r]=e,i=X(t),a=X(n),o=X(r);if(i!==void 0&&a!==void 0&&o!==void 0)return[i,a,o]}function Np(e){if(e.type===`CallExpression`){let t=hp(e.callee),n=xp(e.arguments);if(t?.length!==2||t[0]!==`Color3`||t[1]!==`fromRGB`||n===void 0)return;let r=Mp(n);if(r===void 0)return;let[i,a,o]=r;return[Math.fround(i/255),Math.fround(a/255),Math.fround(o/255)]}if(e.type!==`NewExpression`||!ip(e.callee,`Color3`))return;if(e.arguments.length===0)return[0,0,0];let t=xp(e.arguments);if(t!==void 0)return Mp(t)}function Pp(e){if(e.type!==`NewExpression`||!ip(e.callee,`CFrame`))return;if(e.arguments.length===0)return[0,0,0,1,0,0,0,1,0,0,0,1];let t=Ep(e.arguments);if(t===void 0)return;let[n,r,i]=t;return[n,r,i,1,0,0,0,1,0,0,0,1]}function Fp(e){let t=hp(e);if(t?.length!==3||t[0]!==`Enum`)return;let[,n,r]=t;if(n!==void 0&&r!==void 0)return{enumType:n,value:r}}function Ip(e,t){switch(t.type){case`bool`:return ap(e)&&e.value===t.value;case`CFrame`:{let n=Pp(e);return n!==void 0&&yp(t.value,n)}case`Color3`:{let n=Np(e);return n!==void 0&&n[0]===t.value[0]&&n[1]===t.value[1]&&n[2]===t.value[2]}case`Enum`:{let n=Fp(e);return n!==void 0&&n.enumType===t.enumType&&n.value===t.value}case`number`:{let n=X(e);return n!==void 0&&vp(t.value,n)}case`Rect`:{let n=jp(e);return n!==void 0&&yp(t.value,n)}case`string`:return ve(e)&&e.value===t.value;case`UDim`:{let n=Op(e);return n!==void 0&&yp(t.value,n)}case`UDim2`:{let n=Ap(e);return n!==void 0&&yp(t.value,n)}case`Vector2`:{let n=wp(e);return n!==void 0&&yp(t.value,n)}case`Vector3`:{let n=Dp(e);return n!==void 0&&yp(t.value,n)}default:return!1}}const Lp=_(`no-useless-default`,`roblox`,{create(e){let{sourceCode:t}=e;function n(e){return t.getCommentsBefore(e).length>0||t.getCommentsAfter(e).length>0||t.getCommentsInside(e).length>0}function r(e){let r=t.getTokenBefore(e),i=t.getTokenAfter(e);if(n(e)||r!==null&&t.commentsExistBetween(r,e)||i!==null&&t.commentsExistBetween(e,i))return;let[a]=e.range;for(;a>0;){let e=t.text[a-1];if(e===` `||e===` `){--a;continue}break}return t=>t.removeRange([a,e.range[1]])}function i(e,r){if(e.attributes.some(e=>e.type===`JSXSpreadAttribute`))return;let i=t.getTokenBefore(r),a=t.getTokenAfter(r);if(i!==null&&!n(r)&&!t.commentsExistBetween(i,r)&&!(a!==null&&t.commentsExistBetween(r,a)))return e=>e.removeRange([i.range[1],r.range[1]])}function a(t,n,i){if(n.operator!==`=`||n.left.type!==`MemberExpression`||n.left.computed||n.left.object.type!==`Identifier`||n.left.property.type!==`Identifier`)return;let a=i.get(n.left.object.name);if(a===void 0)return;let o=n.left.property.name;if(up(o))return;let s=lp(a.className,o);if(s===void 0||!Ip(n.right,s.value))return;let c=r(t);if(c===void 0){e.report({data:{className:a.className,propertyName:s.propertyName},messageId:`uselessDefault`,node:n.left});return}e.report({data:{className:a.className,propertyName:s.propertyName},fix:c,messageId:`uselessDefault`,node:n.left})}function o(e,t){for(let[n]of t)for(let r of e.arguments)if(r.type!==`SpreadElement`&&mp(r,n)){t.delete(n);break}}function s(e,t){if(e.left.type===`Identifier`||e.left.type===`MemberExpression`)for(let[n]of t)mp(e.right,n)&&t.delete(n)}function c(e,t){if(e.argument!==null)for(let[n]of t)mp(e.argument,n)&&t.delete(n)}function l(e){let t=new Map;for(let n of e)u(n,t)}function u(e,t){if(e.type===`ExpressionStatement`){d(e,t);return}if(e.type===`ReturnStatement`){c(e,t);return}e.type===`VariableDeclaration`&&f(e,t)}function d(e,t){let n=w(e.expression);if(n.type===`AssignmentExpression`){a(e,n,t),s(n,t);return}n.type===`CallExpression`&&o(n,t)}function f(e,t){if(e.kind===`const`)for(let n of e.declarations){if(n.id.type!==`Identifier`||n.init===null)continue;let e=pp(n.init);e!==void 0&&t.set(n.id.name,{className:e})}}return{BlockStatement(e){l(e.body)},JSXOpeningElement(t){let n=op(t.name);if(n!==void 0)for(let r of t.attributes){if(r.type===`JSXSpreadAttribute`)continue;let a=sp(r.name);if(a===void 0||up(a))continue;let o=lp(n,a);if(o===void 0)continue;let s=cp(r);if(!(r.value===null&&o.value.type===`bool`&&o.value.value)&&(s===void 0||!Ip(s,o.value)))continue;let c=i(t,r);if(c===void 0){e.report({data:{className:n,propertyName:o.propertyName},messageId:`uselessDefault`,node:r});continue}e.report({data:{className:n,propertyName:o.propertyName},fix:c,messageId:`uselessDefault`,node:r})}},Program(e){l(e.body)}}},meta:{docs:{description:`Disallow Roblox JSX properties whose values already match the class defaults.`},fixable:`code`,messages:{uselessDefault:`Remove "{{propertyName}}" from {{className}}. It already matches the default value.`},schema:[],type:`suggestion`}}),Rp=[`useEffect`,`useLayoutEffect`,`useInsertionEffect`],zp=[`on`],Bp=[`useRef`],Vp=[`useState`,`useReducer`];function Hp(e){return e===void 0?{environment:`roblox-ts`,hooks:new Set(Rp),propertyCallbackPrefixes:new Set(zp),refHooks:new Set(Bp),reportAdjustState:!0,reportDerivedState:!0,reportDuplicateDeps:!0,reportEffectChain:!0,reportEmptyEffect:!0,reportEventFlag:!0,reportEventSpecificLogic:!0,reportExternalStore:!0,reportInitializeState:!0,reportLogOnly:!0,reportMixedDerivedState:!0,reportNotifyParent:!0,reportPassRefToParent:!0,reportResetState:!0,stateHooks:new Set(Vp)}:{environment:fr(e.environment)?e.environment:`roblox-ts`,hooks:new Set(S(e.hooks)?e.hooks:Rp),propertyCallbackPrefixes:new Set(S(e.propertyCallbackPrefixes)?e.propertyCallbackPrefixes:zp),refHooks:new Set(S(e.refHooks)?e.refHooks:Bp),reportAdjustState:e.reportAdjustState??!0,reportDerivedState:e.reportDerivedState??!0,reportDuplicateDeps:e.reportDuplicateDeps??!0,reportEffectChain:e.reportEffectChain??!0,reportEmptyEffect:e.reportEmptyEffect??!0,reportEventFlag:e.reportEventFlag??!0,reportEventSpecificLogic:e.reportEventSpecificLogic??!0,reportExternalStore:e.reportExternalStore??!0,reportInitializeState:e.reportInitializeState??!0,reportLogOnly:e.reportLogOnly??!0,reportMixedDerivedState:e.reportMixedDerivedState??!0,reportNotifyParent:e.reportNotifyParent??!0,reportPassRefToParent:e.reportPassRefToParent??!0,reportResetState:e.reportResetState??!0,stateHooks:new Set(S(e.stateHooks)?e.stateHooks:Vp)}}function Up(e){if(!(e.type!==`MemberExpression`||e.computed||e.object.type!==`Identifier`||e.property.type!==`Identifier`))return{objectName:e.object.name,propertyName:e.property.name}}function Wp(e){if(!(e.type!==`MemberExpression`||e.computed||e.property.type!==`Identifier`))return e.property.name}function Gp(e,t,n,r){let{callee:i}=e;if(i.type===`Identifier`)return t.has(i.name);let a=Up(i);return a!==void 0&&n.has(a.objectName)&&r.has(a.propertyName)}function Kp(e){if((e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)&&e.id!==null)return e.id.name;let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`)return t.id.name;if(`key`in t&&!(`computed`in t&&t.computed)&&D(t.key)&&t.key.type===`Identifier`)return t.key.name}function qp(e){return ne(e)&&e.startsWith(`use`)}function Jp(e){if(e.type===`ReturnStatement`)return e.argument===null;if(e.type!==`BlockStatement`||e.body.length!==1)return!1;let[t]=e.body;return t?.type===`ReturnStatement`&&t.argument===null}function Yp(e,t){if(`body`in e&&D(e.body))if(e.body.type===`BlockStatement`)for(let n of e.body.body)t.push(n);else t.push(e.body)}function Xp(e,t){if(e.type===`BlockStatement`){for(let n of e.body)t.push(n);return}if(e.type===`IfStatement`){t.push(e.consequent),e.alternate!==null&&t.push(e.alternate);return}if(e.type===`DoWhileStatement`||e.type===`ForInStatement`||e.type===`ForOfStatement`||e.type===`ForStatement`||e.type===`LabeledStatement`||e.type===`WhileStatement`||e.type===`WithStatement`){Yp(e,t);return}if(e.type===`SwitchStatement`){for(let n of e.cases)for(let e of n.consequent)t.push(e);return}if(e.type===`TryStatement`){for(let n of e.block.body)t.push(n);if(e.handler!==null)for(let n of e.handler.body.body)t.push(n);if(e.finalizer!==null)for(let n of e.finalizer.body)t.push(n)}}function Zp(e){let t=[...e.body];for(;t.length>0;){let e=t.pop();if(e!==void 0)switch(e.type){case`ArrowFunctionExpression`:continue;case`FunctionDeclaration`:continue;case`FunctionExpression`:continue;case`ReturnStatement`:if(e.argument!==null)return!0;continue;case`DoWhileStatement`:case`ForInStatement`:case`ForOfStatement`:case`ForStatement`:case`BlockStatement`:case`IfStatement`:case`LabeledStatement`:case`SwitchStatement`:case`TryStatement`:case`WhileStatement`:case`WithStatement`:Xp(e,t);continue;default:continue}}return!1}function Qp(e){if(e.length===0)return e;let[t]=e;return t?.type!==`IfStatement`||t.alternate!==null||!Jp(t.consequent)?e:e.slice(1)}function $p(e){return e.type===`ChainExpression`?e.expression:e}function Z(e){if(e.type!==`ExpressionStatement`)return;let t=$p(e.expression);return t.type===`CallExpression`?t:void 0}function em(e,t){return e.callee.type===`Identifier`&&t.has(e.callee.name)}function tm(e){return e.type===`Literal`&&e.value===!1}function nm(e){return e.type===`Literal`||e.type===`UnaryExpression`&&e.operator===`void`&&e.argument.type===`Literal`&&e.argument.value===0}function rm(e){return e.type===`ArrayExpression`&&e.elements.length===0}function im(e){return e.type===`ObjectExpression`&&e.properties.length===0}function am(e){if(e.type===`Literal`){let{value:t}=e;return t===``||t===0||t===!1||t===null}return nm(e)?!0:rm(e)||im(e)}function om(e,t){let n=Z(e);if(n?.callee.type!==`Identifier`)return;let r=t.get(n.callee.name);if(r===void 0||n.arguments.length!==1)return;let[i]=n.arguments;if(!(i===void 0||!tm(i)))return r}function sm(e,t){let n=Z(e);if(!(n===void 0||em(n,t)))return n}function cm(e,t){return e.type===`UnaryExpression`&&e.operator===`!`&&e.argument.type===`Identifier`&&e.argument.name===t}function lm(e,t){return e.type===`Identifier`&&e.name===t}function um(e){return e.type===`BlockStatement`?e.body:[e]}function dm(e,t,n){let[r,i,a]=e;if(r?.type!==`IfStatement`||r.alternate!==null||i===void 0||a===void 0)return;let o=om(i,t),s=om(a,t),c=Jp(r.consequent);if(o!==void 0&&s===void 0)return c&&cm(r.test,o)?sm(a,n)===void 0?void 0:o:void 0;if(s!==void 0&&o===void 0&&c&&cm(r.test,s))return sm(i,n)===void 0?void 0:s}function fm(e,t,n){if(e.type!==`IfStatement`||e.alternate!==null)return;let r=um(e.consequent),[i,a]=r;if(r.length!==2||i===void 0||a===void 0)return;let o=om(i,t),s=om(a,t);if(o!==void 0&&s===void 0)return lm(e.test,o)?sm(a,n)===void 0?void 0:o:void 0;if(s!==void 0&&o===void 0&&lm(e.test,s))return sm(i,n)===void 0?void 0:s}function pm(e,t,n){if(e.length===3)return dm(e,t,n);if(e.length===1){let[r]=e;return r===void 0?void 0:fm(r,t,n)}}const mm=new Set([`ArrayExpression`,`BinaryExpression`,`CallExpression`,`ChainExpression`,`ConditionalExpression`,`Identifier`,`LogicalExpression`,`MemberExpression`,`ObjectExpression`,`PrivateIdentifier`,`TemplateLiteral`,`UnaryExpression`]);function hm(e){return mm.has(e.type)}function gm(e,t){for(let n of e.elements)n!==null&&n.type!==`SpreadElement`&&t.push(n)}function _m(e,t){t.push(e.callee);for(let n of e.arguments)n.type!==`SpreadElement`&&t.push(n)}function vm(e,t){t.push(e.object),e.computed||t.push(e.property)}function ym(e,t){for(let n of e.properties)n.type===`Property`&&t.push(n.value)}function bm(e,t){switch(e.type){case`ArrayExpression`:gm(e,t);break;case`BinaryExpression`:case`LogicalExpression`:t.push(e.left,e.right);break;case`CallExpression`:_m(e,t);break;case`ChainExpression`:t.push(e.expression);break;case`ConditionalExpression`:t.push(e.test,e.consequent,e.alternate);break;case`MemberExpression`:vm(e,t);break;case`ObjectExpression`:ym(e,t);break;case`TemplateLiteral`:for(let n of e.expressions)t.push(n);break;case`UnaryExpression`:t.push(e.argument);break;default:}}function xm(e){let t=[e],n=new Set;for(;t.length>0;){let e=t.pop();if(!(e===void 0||n.has(e))){if(n.add(e),e.type===`Identifier`)return!0;bm(e,t)}}return!1}function Sm(e,t){let n=0;for(let r of e){if(r.type===`IfStatement`){if(r.alternate!==null)return;let e=Sm(um(r.consequent),t);if(e===void 0||e===0)return;n+=e;continue}let e=Z(r);if(e===void 0||!t(e))return;n+=1}return n>0?n:void 0}function Cm(e,t){return Sm(e,e=>em(e,t)?e.arguments.some(e=>e.type!==`SpreadElement`&&xm(e)):!1)}function wm(e,t,n){return Sm(e,e=>Om(e,t,n))}function Tm(e,t){for(let n of t)if(e.startsWith(n))return!0;return!1}function Em(e){return e.type===`AssignmentPattern`?e.left:e}function Dm(e,t,n,r){let i={functionId:n,isCustomHook:r,propertyCallbackIdentifiers:new Set,propertyObjectName:void 0},[a]=e.params;if(a===void 0)return i;let o=Em(a);if(o.type===`Identifier`)return i.propertyObjectName=o.name,i;if(o.type!==`ObjectPattern`)return i;for(let e of o.properties){if(e.type!==`Property`)continue;let n=Ui(e);if(n===void 0||!Tm(n,t))continue;let r=Wi(e);r!==void 0&&i.propertyCallbackIdentifiers.add(r.name)}return i}function Om(e,t,n){let{callee:r}=e;if(r.type===`Identifier`)return t.propertyCallbackIdentifiers.has(r.name);let i=Up(r);return i!==void 0&&t.propertyObjectName!==void 0&&i.objectName===t.propertyObjectName&&Tm(i.propertyName,n)}function km(e,t){let[,n]=e.arguments;if(n?.type!==`ArrayExpression`)return!1;for(let e of n.elements)if(e?.type===`Identifier`&&e.name===t)return!0;return!1}function Am(e){let t=new Set,[,n]=e.arguments;if(n?.type!==`ArrayExpression`)return t;for(let e of n.elements)e?.type===`Identifier`&&t.add(e.name);return t}function jm(e){let[,t]=e.arguments;return t===void 0||t.type===`ArrayExpression`&&t.elements.length===0}function Mm(e,t){if(e.length===0)return!1;for(let n of e){if(n.type===`IfStatement`){if(n.alternate!==null||!Mm(um(n.consequent),t))return!1;continue}if(!t(n))return!1}return!0}function Nm(e,t){let n=new Set;for(let r of e){if(r.type===`IfStatement`){let e=um(r.consequent);for(let r of Nm(e,t))n.add(r);continue}let e=Z(r);e!==void 0&&em(e,t)&&e.callee.type===`Identifier`&&n.add(e.callee.name)}return n}function Pm(e,t){let{callee:n}=e;if(n.type===`Identifier`)return t.has(n.name);let r=Up(n);return r!==void 0&&t.has(r.objectName)}function Fm(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(Fm(um(r.consequent),t,n))return!0;continue}let e=Z(r);if(e!==void 0&&!em(e,t)&&!Pm(e,n))return!0}return!1}function Im(e,t,n){return Mm(e,e=>{let r=Z(e);if(r===void 0||!em(r,t)||r.arguments.length!==1)return!1;let[i]=r.arguments;return i!==void 0&&n(i)})}function Lm(e){return e.type===`Literal`&&typeof e.value!=`object`||rm(e)||im(e)}function Rm(e,t){return Im(e,t,am)}function zm(e,t){return Im(e,t,Lm)}function Bm(e){return Mm(e,e=>{let t=Z(e);return t!==void 0&&Up(t.callee)?.objectName===`console`})}const Vm=new Set([`addEventListener`,`addListener`,`on`,`subscribe`]);function Hm(e){return e.some(e=>{let t=Z(e);if(t===void 0)return!1;let n=Wp(t.callee);return n!==void 0&&Vm.has(n)})}function Um(e,t){return e.type===`MemberExpression`&&!e.computed&&e.object.type===`Identifier`&&e.property.type===`Identifier`&&e.property.name===`current`&&t.has(e.object.name)}function Wm(e,t,n){return e.callee.type===`Identifier`&&n.has(e.callee.name)&&e.arguments.some(e=>Um(e,t))}function Gm(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(Gm(um(r.consequent),t,n))return!0;continue}let e=Z(r);if(e!==void 0&&Wm(e,t,n))return!0}return!1}function Km(e){let t=new Set,n=new Set,r=hm(e)?[e]:[];for(;r.length>0;){let e=r.pop();if(!(e===void 0||n.has(e))){if(n.add(e),e.type===`Identifier`){t.add(e.name);continue}hm(e)&&bm(e,r)}}return t}function qm(e){return e.alternate===null?[]:e.alternate.type===`BlockStatement`?e.alternate.body:[e.alternate]}function Jm(e,t,n){return[...Km(e.test)].some(e=>n.has(e)&&!t.has(e))}function Ym(e,t){return e.some(e=>{let n=Z(e);return n!==void 0&&em(n,t)})}function Xm(e,t,n,r){for(let i of e)if(i.type===`IfStatement`&&(Jm(i,n,r)&&Ym(um(i.consequent),t)||Xm(qm(i),t,n,r)))return!0;return!1}const Zm=new Set([`alert`,`confirm`,`display`,`hide`,`log`,`navigate`,`notify`,`post`,`prompt`,`redirect`,`report`,`send`,`show`,`submit`,`track`]);function Qm(e){let t=e.toLowerCase();for(let e of Zm)if(t.startsWith(e))return!0;return!1}function $m(e,t){let n=Z(e);return n===void 0||em(n,t)?!1:n.callee.type===`Identifier`?Qm(n.callee.name):n.callee.type!==`MemberExpression`||n.callee.computed||n.callee.property.type!==`Identifier`?!1:Qm(n.callee.property.name)}function eh(e,t){return[...Km(e.test)].some(e=>t.has(e))}function th(e,t,n){for(let r of e)if(r.type===`IfStatement`&&(eh(r,n)&&um(r.consequent).some(e=>$m(e,t))||r.alternate!==null&&th(qm(r),t,n)))return!0;return!1}function nh(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function rh(e,t){return`${e}:${t}`}function ih(e){if(e.body?.type===`BlockStatement`)return e.body}function ah(e){return e.body.type===`BlockStatement`}function oh(e){return e.body!==null}const sh=new Set(`addEventListener.addListener.alert.analytics.cancelAnimationFrame.clearInterval.clearTimeout.confirm.debug.delete.error.fetch.get.info.log.navigate.navigateTo.notify.observe.patch.post.prompt.put.redirect.removeEventListener.removeListener.report.requestAnimationFrame.send.setInterval.setTimeout.showNotification.submit.subscribe.track.unobserve.unsubscribe.warn`.split(`.`)),ch=[`fetch`,`send`,`post`,`track`],lh=new Set([`addEventListener`,`addListener`,`cancelAnimationFrame`,`catch`,`clearInterval`,`clearTimeout`,`finally`,`observe`,`removeEventListener`,`removeListener`,`requestAnimationFrame`,`setInterval`,`setTimeout`,`subscribe`,`then`,`unobserve`,`unsubscribe`]),uh=[`log`,`fetch`,`send`,`track`,`report`,`show`,`navigate`,`submit`,`post`,`notify`];function dh(e){for(let t of uh)if(e.startsWith(t))return!0;return!1}function fh(e){return e.object.type===`Identifier`&&e.object.name===`console`&&e.property.type===`Identifier`&&(e.property.name===`log`||e.property.name===`warn`||e.property.name===`error`||e.property.name===`info`||e.property.name===`debug`)}function ph(e){for(let t of ch)if(e.startsWith(t))return!0;return lh.has(e)}function mh(e,t,n){let{callee:r}=e;return em(e,t)?!1:r.type===`Identifier`?n.has(r.name)?!1:sh.has(r.name)||dh(r.name):r.type!==`MemberExpression`||r.computed||r.property.type!==`Identifier`||r.object.type===`Identifier`&&n.has(r.object.name)?!1:fh(r)||ph(r.property.name)}function hh(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(hh(um(r.consequent),t,n))return!0;continue}let e=Z(r);if(e!==void 0&&mh(e,t,n))return!0}return!1}const gh=_(`no-useless-use-effect`,`react`,{create(e){let t=Hp(e.options[0]),n=hr(t.environment),r=new Set,i=new Set,a=new Set,o=new Set,s=new Set,c=new Map,l=new Set,u=new Set,d=[],f=1,p=new Map,m=[];function h(e){return Gp(e,i,r,t.hooks)}function g(e){return Gp(e,a,r,t.stateHooks)}function _(e){return Gp(e,l,r,t.refHooks)}function v(e){if(e.init?.type!==`CallExpression`||!g(e.init)||e.id.type!==`ArrayPattern`)return;let{elements:t}=e.id;if(t.length<2)return;let[,n]=t;if(n==null||n.type!==`Identifier`)return;o.add(n.name);let[r]=t;r?.type===`Identifier`&&(s.add(r.name),c.set(n.name,r.name))}function ee(e){e.init?.type!==`CallExpression`||!_(e.init)||e.id.type!==`Identifier`||u.add(e.id.name)}function te(e){e.id.type===`Identifier`&&e.init!==null&&(e.init.type===`FunctionExpression`||e.init.type===`ArrowFunctionExpression`)&&p.set(e.id.name,e.init)}function y(e){let n=f;f+=1;let r=Kp(e);d.push(Dm(e,t.propertyCallbackPrefixes,n,qp(r))),e.type===`FunctionDeclaration`&&e.id!==null&&p.set(e.id.name,e)}function b(){d.pop()}function x(e){return t.reportMixedDerivedState&&e.setterCalls.size>0&&e.hasNonSetter&&!e.hasReturnCleanup?!hh(e.statements,o,e.functionContext?.propertyCallbackIdentifiers??new Set):!1}function ne(e){let{coreStatements:n,dependencyIdentifiers:r,functionContext:i,hasNonSetter:a,hasReturnCleanup:l,node:d,statements:f}=e,p=t.reportEventFlag?pm(f,c,o):void 0,m=[...r].some(e=>!(s.has(e)||o.has(e)));return[[t.reportEmptyEffect&&(f.length===0||f[0]!==void 0&&Jp(f[0])),`emptyEffect`],[t.reportInitializeState&&jm(d)&&zm(f,o),`initializeState`],[t.reportResetState&&Rm(f,o)&&m,`resetState`],[p!==void 0&&km(d,p),`eventFlag`],[t.reportEventSpecificLogic&&th(f,o,s),`eventSpecificLogic`],[t.reportAdjustState&&Xm(f,o,s,r)&&!a,`adjustState`],[t.reportDerivedState&&Cm(n,o)!==void 0,`derivedState`],[x(e),`mixedDerivedState`],[t.reportPassRefToParent&&i!==void 0&&Gm(f,u,i.propertyCallbackIdentifiers),`passRefToParent`],[t.reportNotifyParent&&i!==void 0&&!i.isCustomHook&&wm(n,i,t.propertyCallbackPrefixes)!==void 0,`notifyParent`],[t.reportExternalStore&&Hm(f)&&l,`externalStore`],[t.reportLogOnly&&Bm(f),`logOnly`]].find(([e])=>e)?.[1]}function S(t,n,r){let i=d.at(-1),a=Qp(n),s=Am(t),c=Nm(n,o),l=Fm(n,o,i?.propertyCallbackIdentifiers??new Set),u=r!==void 0&&Zp(r);m.push({depIdentifiers:s,hasNonSetterSideEffect:l,hasReturnWithCleanup:u,node:t,ownerFunctionId:i?.functionId??0,setterCalls:c,statements:n});let f=ne({coreStatements:a,dependencyIdentifiers:s,functionContext:i,hasNonSetter:l,hasReturnCleanup:u,node:t,setterCalls:c,statements:n});f!==void 0&&e.report({messageId:f,node:t})}function C(){if(!t.reportEffectChain)return;let n=re();for(let t of m)if(!(t.hasNonSetterSideEffect||t.hasReturnWithCleanup))for(let r of t.depIdentifiers){let i=rh(t.ownerFunctionId,r),a=n.get(i);if(a!==void 0&&w(a)){e.report({messageId:`effectChain`,node:t.node});return}}}function re(){let e=new Map;for(let[t,n]of m.entries())for(let r of n.setterCalls){let i=c.get(r);if(i===void 0)continue;let a=rh(n.ownerFunctionId,i),o=e.get(a);o===void 0&&(o=new Set,e.set(a,o)),o.add(t)}return e}function w(e){return e.size!==0&&[...e].every(e=>{let t=m[e];return t!==void 0&&!t.hasNonSetterSideEffect&&!t.hasReturnWithCleanup})}function T(){if(!t.reportDuplicateDeps||m.length<2)return;let e=new Set;for(let t=0;t<m.length;t+=1){if(e.has(t))continue;let n=E(t,e);n.length<2||ie(n,e)}}function E(e,t){let n=m[e];if(n===void 0||n.depIdentifiers.size===0)return[];let r=[e];for(let i=e+1;i<m.length;i+=1){let e=m[i];t.has(i)||e!==void 0&&e.ownerFunctionId===n.ownerFunctionId&&nh(n.depIdentifiers,e.depIdentifiers)&&r.push(i)}return r}function ie(t,n){for(let r of t){n.add(r);let t=m[r];t!==void 0&&e.report({messageId:`duplicateDeps`,node:t.node})}}function ae(e,t){let n=p.get(t);if(n===void 0||n.async)return;let r=ih(n);r!==void 0&&S(e,r.body.filter(e=>e.type!==`EmptyStatement`),r)}function oe(e,t){if(!t.async){if(t.type===`ArrowFunctionExpression`){if(!ah(t))return;S(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body);return}oh(t)&&S(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body)}}return{ArrowFunctionExpression:y,"ArrowFunctionExpression:exit":b,CallExpression(e){if(!h(e))return;let[t]=e.arguments;if(t!==void 0){if(t.type===`Identifier`){ae(e,t.name);return}Ue(t)&&oe(e,t)}},FunctionDeclaration:y,"FunctionDeclaration:exit":b,FunctionExpression:y,"FunctionExpression:exit":b,ImportDeclaration(e){vr(e,n,r,(e,n)=>{t.hooks.has(e)&&i.add(n),t.stateHooks.has(e)&&a.add(n),t.refHooks.has(e)&&l.add(n)})},"Program:exit"(){C(),T()},VariableDeclarator(e){v(e),ee(e),te(e)}}},meta:{docs:{description:`Disallow empty effects, duplicate dependencies, effect chains, log-only effects, derived state, external-store state sync, state initialization, reset effects, parent notifications, parent ref callbacks, and event side effects routed through state.`},messages:{adjustState:`This effect adjusts state when a prop changes. Adjust the state directly during rendering or restructure to avoid this need.`,derivedState:`This effect only derives state from properties or state. Compute the value during rendering instead of useEffect.`,duplicateDeps:`Multiple effects have identical dependency arrays. Combine them into a single effect for better performance.`,effectChain:`This effect is part of a chain of effects that only derive state from other effects. Consolidate the logic into event handlers or compute during rendering.`,emptyEffect:`This effect has an empty body and should be removed.`,eventFlag:`This effect only reacts to a state flag. Call the side effect directly in the event handler instead of toggling state.`,eventSpecificLogic:`This effect runs event-specific logic based on state. Move this logic to the event handler that triggers the state change.`,externalStore:"This effect subscribes to an external store and syncs to state. Use `useSyncExternalStore` instead.",initializeState:`This effect initializes state with a constant value. Pass the value as the useState initializer instead.`,logOnly:`This effect only contains console.log calls. Remove it (debug leftover) or move the logging to an event handler.`,mixedDerivedState:`This effect contains state setter calls that derive values from props or state mixed with other operations. Extract the setter calls and compute values during rendering.`,notifyParent:`This effect only notifies a parent via a property callback. Call the callback in the event handler instead of useEffect.`,passRefToParent:"This effect passes a ref to a parent callback. Use `forwardRef` or `useImperativeHandle` instead.",resetState:"This effect resets state when a prop changes. Pass a `key` prop to the component instead to reset all state automatically."},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:[...Rp],description:`Effect hook names checked for avoidable effect patterns.`,items:{type:`string`},type:`array`},propertyCallbackPrefixes:{default:[...zp],description:`Property name prefixes treated as event callback props.`,items:{type:`string`},type:`array`},refHooks:{default:[...Bp],description:`Ref hook names that return mutable ref objects.`,items:{type:`string`},type:`array`},reportAdjustState:{default:!0,description:`Report effects that only adjust state after render.`,type:`boolean`},reportDerivedState:{default:!0,description:`Report effects that copy derived values into state.`,type:`boolean`},reportDuplicateDeps:{default:!0,description:`Report duplicate entries in effect dependency arrays.`,type:`boolean`},reportEffectChain:{default:!0,description:`Report effects that only trigger another effect through state.`,type:`boolean`},reportEmptyEffect:{default:!0,description:`Report effects whose callback body is empty.`,type:`boolean`},reportEventFlag:{default:!0,description:`Report effects that react to event flags stored in state.`,type:`boolean`},reportEventSpecificLogic:{default:!0,description:`Report effects that move event-specific logic out of the event callback.`,type:`boolean`},reportExternalStore:{default:!0,description:`Report effects that mirror external store values into local state.`,type:`boolean`},reportInitializeState:{default:!0,description:`Report effects that only initialize state after mount.`,type:`boolean`},reportLogOnly:{default:!0,description:`Report effects that only log values.`,type:`boolean`},reportMixedDerivedState:{default:!0,description:`Report effects that mix derived-state updates with other work.`,type:`boolean`},reportNotifyParent:{default:!0,description:`Report effects that only notify a parent through a callback prop.`,type:`boolean`},reportPassRefToParent:{default:!0,description:`Report effects that only pass a ref value to a parent callback.`,type:`boolean`},reportResetState:{default:!0,description:`Report effects that reset local state when inputs change.`,type:`boolean`},stateHooks:{default:[...Vp],description:`State hook names that return [value, setter] pairs.`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}});function _h(e){return x(e)&&y(e.dependencyMode)&&(e.dependencyMode===`empty-or-omitted`||e.dependencyMode===`aggressive`)?e.dependencyMode:`non-updating`}function vh(e){let t=x(e)&&S(e.staticGlobalFactories)?e.staticGlobalFactories:Pl;return{dependencyMode:_h(e),environment:yr(e),staticGlobalFactories:new Set(t)}}function yh(e){return{staticGlobalFactories:e.staticGlobalFactories}}function bh(e){let t=Ii(e);if(t===void 0)return;let{body:n}=t;if(n===null)return;if(n.type!==`BlockStatement`)return n;if(n.body.length!==1)return;let[r]=n.body;return r?.type===`ReturnStatement`?r.argument??void 0:void 0}function xh(e,t){switch(t.dependencyMode){case`aggressive`:return!0;case`empty-or-omitted`:return e===0||e===1;case`non-updating`:return e===0||e===1||e===2;default:{let e=Error(`Unknown dependency mode: ${String(t.dependencyMode)}`);throw Error.captureStackTrace(e,xh),e}}}const Sh=_(`no-useless-use-memo`,`react`,{create(e){let t=vh(e.options[0]),n=yh(t),r=hr(t.environment),i=new Set,a=new Set;return{CallExpression(r){if(!pe(r,i,a)||iu(r)||r.arguments.length===0)return;let o=bh(r);if(o===void 0)return;let s=new Set;J(e.sourceCode,o,s,n)&&xh(Ki(e.sourceCode,r.arguments[1],s,n,Xl),t)&&e.report({messageId:`uselessUseMemo`,node:r})},ImportDeclaration(e){au(e,r,i,a)}}},meta:{docs:{description:`Disallow useMemo calls that only wrap values static enough to live at module scope.`},messages:{uselessUseMemo:`useMemo is wrapping a static value. Move the value to module scope instead of paying hook overhead for no runtime benefit.`},schema:[{additionalProperties:!1,properties:{dependencyMode:{default:`non-updating`,description:`Dependency-array mode used to decide whether a memoized value is static.`,enum:[`empty-or-omitted`,`non-updating`,`aggressive`],type:`string`},environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},staticGlobalFactories:{default:Pl,description:`Global constructors and factories whose calls are treated as static values.`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}}),Ch=[`useSpring`];function wh(e){let t=!1,n=!1;for(let r of e.properties)if(!(r.type!==`Property`||r.computed||r.key.type!==`Identifier`)&&(r.key.name===`from`&&(t=!0),r.key.name===`to`&&(n=!0),t&&n))return!0;return!1}function Th(e,t,n){let r=w(t);if(r.type===`ObjectExpression`)return n(r);if(r.type!==`Identifier`)return!1;let i=E(e.getScope(r),r.name);if(i===void 0||!K(i.scope)||q(i))return!1;for(let e of i.defs){let t=zl(e);if(t===void 0)continue;let r=w(t);if(r.type===`ObjectExpression`&&n(r))return!0}return!1}function Eh(e,t){return Th(e,t,wh)}function Dh(e,t,n,r){let i={staticGlobalFactories:r.staticGlobalFactories};return Th(e,t,t=>Yl(e,t,n,i))}function Oh(e,t){return e===0||e===2||e===1&&t.treatEmptyDepsAsViolation}function kh({callee:e},t){if(e.type===`Identifier`)return t.springHooks.has(e.name);if(e.type===`MemberExpression`&&!e.computed){let{property:n}=e;if(n.type===`Identifier`)return t.springHooks.has(n.name)}return!1}const Ah=_(`no-useless-use-spring`,`react`,{create(e){let[t]=e.options,n={springHooks:new Set(t?.springHooks??Ch),staticGlobalFactories:new Set(t?.staticGlobalFactories??Pl),treatEmptyDepsAsViolation:t?.treatEmptyDepsAsViolation??!0};return{CallExpression(t){if(!kh(t,n)||t.arguments.length===0)return;let[r]=t.arguments;if(r===void 0||r.type===`SpreadElement`)return;let i=new Set;if(!Dh(e.sourceCode,r,i,n)||Eh(e.sourceCode,r))return;let a=t.arguments.length>1?t.arguments[1]:void 0;Oh(Ki(e.sourceCode,a,i,n,Xl),n)&&e.report({messageId:`uselessSpring`,node:t})}}},meta:{docs:{description:`Disallow useSpring hooks whose config and dependencies are entirely static`},messages:{uselessSpring:`useSpring call has only static inputs and non-updating dependencies; replace it with a constant or remove the hook.`},schema:[{additionalProperties:!1,default:{springHooks:[...Ch],staticGlobalFactories:[...Pl],treatEmptyDepsAsViolation:!0},properties:{springHooks:{default:[...Ch],description:`Hook identifiers that should be treated as spring hooks`,items:{type:`string`},type:`array`},staticGlobalFactories:{default:[...Pl],description:`Global factory identifiers that are treated as static constructors`,items:{type:`string`},type:`array`},treatEmptyDepsAsViolation:{default:!0,description:`Treat static config with an empty dependency array as a violation`,type:`boolean`}},type:`object`}],type:`suggestion`}}),jh=new Set([`push`,`unshift`]),Mh=new Set([`max`,`min`]),Nh=`Math`;function Ph(e){if(!M(e))return;let t=T(e);if(t!==void 0){if(jh.has(t))return t;if(Mh.has(t))return de(e.object,Nh)?`${Nh}.${t}`:void 0}}const Fh=_(`no-variadic-spread`,`general`,{createOnce(e){return{CallExpression(t){let n=Ph(t.callee);if(n!==void 0)for(let r of t.arguments)r.type===`SpreadElement`&&w(r.argument).type!==`ArrayExpression`&&e.report({data:{method:n},messageId:`noVariadicSpread`,node:r})}}},meta:{docs:{description:`Disallow spreading a potentially unbounded array into a variadic call, because every element becomes a stack-allocated argument.`},messages:{noVariadicSpread:`Spreading an array into {{method}}() passes every element as its own stack argument, so a large array throws 'RangeError: Maximum call stack size exceeded'. Iterate the array instead.`},schema:[],type:`problem`}}),Ih=Ns({alternative:`Log`,category:`roblox`,message:`{{name}}() is a raw output function lacking log levels, timestamps, and filtering. Production systems require structured logging for debugging and monitoring. Replace {{name}}(...) with {{alternative}}.`,messageId:`noWarn`,name:`warn`,ruleName:`no-warn`}),Lh=_(`only-type-imports`,`general`,{create(e){return{ImportDeclaration(t){t.importKind!==`type`&&e.report({messageId:`onlyTypeImports`,node:t})}}},meta:{docs:{description:`Require all imports to be type-only imports. Benchmarks cannot import non-types because the benchmarker plugin will throw an error.`,recommended:!0},messages:{onlyTypeImports:"Benchmarks must use `import type` to avoid runtime imports that break the benchmarker plugin."},schema:[],type:`problem`}});function Rh(e){return!e.computed&&zh(e.value)}function zh(e){if(e===void 0)return!1;switch(e.type){case`ArrayExpression`:return e.elements.every(e=>e===null||e.type!==`SpreadElement`&&zh(e));case`CallExpression`:return e.callee.type===`MemberExpression`&&zh(e.callee.object);case`Literal`:return!0;case`MemberExpression`:return zh(e.object);case`ObjectExpression`:return e.properties.every(e=>e.type!==`SpreadElement`&&Rh(e));default:return!1}}function Bh(e){let t=e;for(;t.type===`MemberExpression`;){if(t.computed&&!Ve(t.property))return!1;t=t.object}return!0}function Vh(e){return e.type===`MethodDefinition`&&e.kind===`constructor`&&e.key.type===`Identifier`&&e.key.name===`constructor`}function Hh(e){if(e.type!==`ExpressionStatement`)return!1;let{expression:t}=e;if(t.type!==`AssignmentExpression`)return!1;let{left:n}=t;if(n.type!==`MemberExpression`||n.object.type!==`ThisExpression`)return!1;let{property:r}=n;return(r.type===`Identifier`||Ve(r))&&zh(t.right)&&Bh(n)}const Uh=_(`prefer-class-properties`,`general`,{create(e){let[t]=e.options;if(t===`never`)return{PropertyDefinition(t){t.static||e.report({messageId:`unexpectedClassProperty`,node:t})}};function n(t){for(let n of t.body.body)if(!(!Vh(n)||n.value.body===null))for(let t of n.value.body.body)Hh(t)&&e.report({messageId:`unexpectedAssignment`,node:t.expression})}return{ClassDeclaration(e){n(e)},ClassExpression(e){n(e)}}},meta:{docs:{description:`Prefer class properties to assignment of literals in constructors.`},messages:{unexpectedAssignment:`Constructor assigns a literal value to this.property. Literals are static and known at class definition time. Move to a class property declaration: propertyName = value; at class level. This clarifies intent and reduces constructor complexity.`,unexpectedClassProperty:`Class property declarations are disabled by rule configuration (mode: 'never'). Move initialization into the constructor: this.propertyName = value; inside constructor().`},schema:[{enum:[`always`,`never`],type:`string`}],type:`suggestion`}});function Wh(e){if(!K(e.scope))return!1;for(let t of e.defs){if(t.type!==`Variable`)continue;let e=t.node;if(e.type!==`VariableDeclarator`)continue;let n=e.parent;if(n.type===`VariableDeclaration`&&n.kind===`const`)return!0}return!1}function Gh(e,t){let n=E(e.getScope(t),t.name);return n===void 0?!1:q(n)||Wh(n)}function Kh(e,t){let n=E(e.getScope(t),t.name);return n===void 0?!1:q(n)||K(n.scope)}function qh(e,t){let n=t;for(;n.type===`MemberExpression`;){if(n.computed)return!1;n=w(n.object)}return n.type===`Identifier`&&Kh(e,n)}function Jh(e,t){let n=w(t);switch(n.type){case`Identifier`:return Gh(e,n);case`Literal`:return!0;case`MemberExpression`:return qh(e,n);case`TemplateLiteral`:return n.expressions.length===0;case`UnaryExpression`:return n.operator===`-`&&w(n.argument).type===`Literal`;default:return!1}}function Yh(e,t){for(let n of t.properties)if(n.type!==`Property`||n.kind!==`init`||n.computed||!Jh(e,n.value))return!1;return!0}function Xh(e,t){if(t.id.type!==`ArrayPattern`||t.init?.type!==`CallExpression`||L(t.init)!==`useReducer`)return;let n=t.id.elements[1];if(n!=null&&n.type===`Identifier`)return E(e.getScope(n),n.name)}function Zh(e){let t=e;for(;t!==void 0;){if(t.type===`Program`)return t;t=t.parent}}function Qh(e,t,n,r,i){let a=`const ${r} = ${t.getText(n)};`,{body:o}=i,s;for(let e of o){if(e.type===`ImportDeclaration`){s=e;continue}break}if(s!==void 0)return e.insertTextAfter(s,`\n\n${a}`);let[c]=o;return c===void 0?e.insertTextAfterRange([i.range[0],i.range[1]],a):e.insertTextBefore(c,`${a}\n\n`)}const $h=_(`prefer-constant-dispatch`,`react`,{create(e){let t=new Set,{sourceCode:n}=e,r=0;return{CallExpression(i){if(i.callee.type!==`Identifier`)return;let a=E(n.getScope(i.callee),i.callee.name);if(a===void 0||!t.has(a))return;let[o]=i.arguments;if(o===void 0||o.type===`SpreadElement`)return;let s=w(o);if(s.type!==`ObjectExpression`||!Yh(n,s))return;let c=Zh(s);if(c===void 0)return;let l=`PREFER_CONSTANT_ACTION_${r}`;r+=1,e.report({messageId:`preferConstantDispatch`,node:s,suggest:[{desc:`Extract to module constant \`${l}\``,fix(e){return[Qh(e,n,s,l,c),e.replaceText(s,l)]}}]})},VariableDeclarator(e){let r=Xh(n,e);r!==void 0&&t.add(r)}}},meta:{docs:{description:`Disallow inline useReducer action objects that could be module-level constants.`,recommended:!0},hasSuggestions:!0,messages:{preferConstantDispatch:`Move this inline useReducer action object to a module-level constant.`},schema:[],type:`suggestion`}}),eg=new Set([`.js`,`.jsx`,`.ts`,`.tsx`]),tg=new Set([`.git`,`.next`,`.turbo`,`__fixtures__`,`__mocks__`,`__tests__`,`coverage`,`dist`,`documentation`,`example`,`examples`,`fixture`,`fixtures`,`node_modules`,`opensrc`,`stories`,`story`,`test`,`tests`]),ng=/\bexport\s+default\b/u,rg=/\/index$/u,ig=/\.(?:[cm]?jsx?|tsx?)$/u,ag=new Map,og=new Map,sg=new Map,cg=/[.*+?^${}()|[\]\\]/gu,lg=String.raw`\$&`;function ug(e){return e.replaceAll(cg,lg)}const dg=new Map;function fg(e){return e.includes(`u`)||e.includes(`v`)?e:`${e}u`}function pg(e,t){let n=`${t}:${e}`,r=dg.get(n);if(r!==void 0)return r;let i=new RegExp(e,fg(t));if(dg.size>=64){let e=dg.keys().next().value;e!==void 0&&dg.delete(e)}return dg.set(n,i),i}function mg(e){return e.replaceAll(`\\`,`/`)}function hg(e){let t=og.get(e);if(t!==void 0)return t;let n=u(e,`utf8`);return og.set(e,n),n}function gg(e,t){let n=ug(t);return pg(`\\bexport\\s+(?:const|function|class)\\s+${n}\\b`,`u`).test(e)||pg(`\\bexport\\s*\\{[^}]*\\b${n}\\b[^}]*\\}`,`u`).test(e)?`named`:ng.test(e)&&pg(`\\b${n}\\b`,`u`).test(e)?`default`:void 0}function _g(e,t){for(let n of t)if(!pg(`\\b${ug(n)}\\b`,`u`).test(e))return!1;return!0}function vg(e){let t=sg.get(e);if(t!==void 0)return t;let n=e;for(;;){if(l(o(n,`package.json`))||l(o(n,`tsconfig.json`)))return sg.set(e,n),n;let t=r(n);if(t===n){sg.set(e,void 0);return}n=t}}function yg(e){let t=ag.get(e);if(t!==void 0)return t;let r=new Map;function a(e){for(let t of d(e,{withFileTypes:!0})){let s=t.name.toLowerCase();if(t.name.startsWith(`.`)&&t.name!==`.storybook`||tg.has(s))continue;let c=o(e,t.name);if(t.isDirectory()){a(c);continue}let l=i(t.name);if(!eg.has(l)||t.name.endsWith(`.d.ts`))continue;let u=n(t.name,l).toLowerCase(),d=r.get(u);d===void 0?r.set(u,[c]):d.push(c)}}a(e);let s=new Map;for(let[e,t]of r)s.set(e,t);return ag.set(e,s),s}function bg(e,t){let n=mg(s(r(e),t));return n=n.replace(ig,``),n=n.replace(rg,``),n.startsWith(`.`)||(n=`./${n}`),n}function xg(e){let t=vg(r(e)),n=mg(t===void 0?e:s(t,e));for(let e of n.split(`/`))if(tg.has(e.toLowerCase()))return!0;return!1}function Sg(e,t){if(xg(e))return{importStyle:void 0,matches:!1};let r=i(e);if(!eg.has(r)||e.endsWith(`.d.ts`))return{importStyle:void 0,matches:!1};let a=n(e,r).toLowerCase();if(!t.fileNames.map(e=>e.toLowerCase()).includes(a))return{importStyle:void 0,matches:!1};let o=hg(e);if(!pg(`\\b${ug(t.componentName)}\\b`,`u`).test(o)||t.markers!==void 0&&!_g(o,t.markers))return{importStyle:void 0,matches:!1};let s=gg(o,t.componentName);return s===void 0?{importStyle:void 0,matches:!1}:{importStyle:s,matches:!0}}function Cg(e,t,n){let r=e.source.value;if(!(y(r)&&r.startsWith(`.`))||t===``)return{importStyle:void 0,matches:!1};let i=Tu(r,t);return i.found?Sg(i.path,n):{importStyle:void 0,matches:!1}}function wg(e,t,n,r){if(t.matches)for(let t of e.specifiers){if(t.type===`ImportDefaultSpecifier`){r.add(t.local.name);continue}if(t.type!==`ImportSpecifier`)continue;let{imported:e}=t;(e.type===`Identifier`?e.name:e.value)===n&&r.add(t.local.name)}}function Tg(e,t){let n=vg(r(e));if(n===void 0)return{found:!1};let i=yg(n),a=new Set;for(let e of t.fileNames)for(let t of i.get(e.toLowerCase())??[])a.add(t);let o=[...a].filter(e=>Sg(e,t).matches);if(o.length!==1)return{found:!1};let[s]=o;if(s===void 0)return{found:!1};let c=Sg(s,t);return{found:!0,importSource:bg(e,s),importStyle:c.importStyle,path:s}}const Eg={componentName:`ContextStack`,fileNames:[`context-stack`],markers:[`providers`]},Dg=new Set([`.jsx`,`.tsx`]);function Og(e){return e.openingElement.name.type===`JSXMemberExpression`&&e.openingElement.name.property.name===`Provider`}function kg(e){return e.children.filter(e=>e.type===`JSXText`?e.value.trim().length>0:e.type!==`JSXExpressionContainer`||e.expression.type!==`JSXEmptyExpression`)}function Ag(e){let{parent:t}=e;if(t.type!==`JSXElement`||!Og(t))return!1;let n=kg(t);return n.length===1&&n[0]===e}function jg(e){if(!Og(e))return;let t=[e],n=e;for(;;){let e=kg(n);if(e.length!==1)break;let[r]=e;if(r?.type!==`JSXElement`||!Og(r))break;t.push(r),n=r}return t.length>1?t:void 0}function Mg(e,t){let n=!1;for(let r of e.children){if(r===t){n=!0;continue}if(r.type!==`JSXText`||r.value.trim()!==``)return!1}return n}function Ng(e){let t=0;for(let n of e){let r=e[t+1];if(r===void 0){t+=1;continue}if(!Mg(n,r))return!1;t+=1}return!0}function Pg(e,t){let n=t.getText(e.openingElement);return e.openingElement.selfClosing?n:n.endsWith(`>`)?`${n.slice(0,-1)} />`:void 0}function Fg(e,t,n){let r=[];for(let e of t){let t=Pg(e,n);if(t===void 0)return;r.push(t)}let i=t.at(-1);if(i===void 0||i.closingElement===null)return;let a=n.text.slice(i.openingElement.range[1],i.closingElement.range[0]);return`<${e} providers={[${r.join(`, `)}]}>${a}</${e}>`}const Ig=_(`prefer-context-stack`,`react`,{create(e){let{filename:t,sourceCode:n}=e,r=t===``?{found:!1}:Tg(t,Eg),a=t!==``&&Sg(t,Eg).matches,o=new Set;return{ImportDeclaration(e){wg(e,Cg(e,t,Eg),Eg.componentName,o)},JSXElement(s){if(a||Ag(s))return;let c=jg(s);if(c===void 0||o.size===0&&!r.found)return;let l=Dg.has(i(t))&&o.size===1&&Ng(c),[u]=o,d=l&&u!==void 0?Fg(u,c,n):void 0;if(d!==void 0){e.report({fix:e=>e.replaceText(s,d),messageId:`preferContextStack`,node:s});return}e.report({messageId:`preferContextStack`,node:s})}}},meta:{docs:{description:`Prefer a local ContextStack component over directly nesting multiple context providers.`},fixable:`code`,messages:{preferContextStack:"Use the local `ContextStack` component instead of nesting multiple context providers directly."},schema:[],type:`suggestion`}}),Lg=/^use[A-Z]/v;function Rg(e,t){if(e===void 0)return!1;for(let n of e.defs)if(xr(n,t)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0;return!1}function zg(e){if(typeof e!=`object`||!e)return{allowedHooks:new Set};let t=e;return{allowedHooks:new Set(S(t.allowedHooks)?t.allowedHooks:[])}}const Bg=_(`prefer-direct-hook-imports`,`react`,{create(e){let t=gr(e.options[0]),{allowedHooks:n}=zg(e.options[0]),{sourceCode:r}=e;return{CallExpression(i){let{callee:a}=i;if(a.type!==`MemberExpression`||a.computed||a.object.type!==`Identifier`||a.property.type!==`Identifier`)return;let o=a.property.name;Lg.test(o)&&(n.has(o)||Rg(E(r.getScope(a.object),a.object.name),t)&&e.report({data:{hookName:o},messageId:`preferDirectHookImport`,node:i}))}}},meta:{docs:{description:`Prefer importing React hooks directly instead of calling them via the React namespace.`,recommended:!0},messages:{preferDirectHookImport:"Import `{{hookName}}` directly instead of calling `React.{{hookName}}`."},schema:[{additionalProperties:!1,properties:{allowedHooks:{description:`Hook names that are allowed to be called via React namespace.`,items:{type:`string`},type:`array`},environment:dr},type:`object`}],type:`suggestion`}});function Vg(e){return x(e)&&b(e.maximumStatements)?e.maximumStatements:1}function Hg(e){return e.type===`IfStatement`&&e.alternate===null}function Ug(e,t){return e.type===`ExpressionStatement`&&t===0||e.type===`BlockStatement`&&e.body.length>t}function Wg(e,t){if(e.body.length!==1)return!1;let[n]=e.body;return n===void 0||!Hg(n)?!1:Ug(n.consequent,t)}const Gg=_(`prefer-early-return`,`general`,{create(e){let t=Vg(e.options[0]);function n(n){Wg(n,t)&&e.report({messageId:`preferEarlyReturn`,node:n})}return{ArrowFunctionExpression(e){e.body.type===`BlockStatement`&&n(e.body)},FunctionDeclaration(e){e.body!==null&&n(e.body)},FunctionExpression(e){e.body!==null&&n(e.body)}}},meta:{docs:{description:`Prefer early returns over full-body conditional wrapping.`,recommended:!0},messages:{preferEarlyReturn:`Function body is wrapped in a single conditional without an else branch. This increases nesting depth and cognitive load. Invert the condition and return early: if (!condition) return; then place the main logic at the top level.`},schema:[{additionalProperties:!1,properties:{maximumStatements:{default:1,description:`Maximum allowed statement count inside the guarded branch before reporting.`,minimum:0,type:`number`}},type:`object`}],type:`suggestion`}});function Kg(e){return e.type===`Identifier`&&(e.name===`it`||e.name===`test`)}function qg(e){if(e.callee.type!==`MemberExpression`||!Kg(e.callee.object))return!1;let t=T(e.callee);return t===`only`||t===`skip`}function Jg(e){return e.callee.type!==`MemberExpression`||!Kg(e.callee.object)?!1:T(e.callee)===`each`}function Yg(e){let t=e.arguments.at(-1);return t===void 0||!Ue(t)?void 0:t}function Xg(e){return e.type===`DoWhileStatement`||e.type===`ForInStatement`||e.type===`ForOfStatement`||e.type===`ForStatement`||e.type===`WhileStatement`}function Zg(e,t){return e.type===t.type&&e.range[0]===t.range[0]&&e.range[1]===t.range[1]}function Qg(e,t){return{hasCallback:e.hasCallback||t.hasCallback,hasIndeterminate:e.hasIndeterminate||t.hasIndeterminate,hasLoop:e.hasLoop||t.hasLoop}}function $g(e,t){if(Zg(e,t))return{hasCallback:!1,hasIndeterminate:!1,hasLoop:!1};let n={hasCallback:Ue(e),hasIndeterminate:Ue(e)||Xg(e)||e.type===`ConditionalExpression`||e.type===`IfStatement`||e.type===`SwitchCase`||e.type===`TryStatement`&&e.handler!==null,hasLoop:Xg(e)};return e.parent===null?n:Qg(n,$g(e.parent,t))}function e_(e){return e.callee.type===`Identifier`?Kg(e.callee):qg(e)?!0:e.callee.type===`CallExpression`&&Jg(e.callee)}function t_(e){return e_(e)?Yg(e):void 0}function n_({callee:e}){return e.type!==`MemberExpression`||e.object.type!==`Identifier`||e.object.name!==`expect`?!1:T(e)===`assertions`}function r_({callee:e}){return e.type!==`MemberExpression`||e.object.type!==`Identifier`||e.object.name!==`expect`?!1:T(e)===`hasAssertions`}function i_(e,t=[]){return e.callee.type===`Identifier`&&(e.callee.name===`expect`||t.includes(e.callee.name))}function a_(e,t=[]){let n=0,r=!1,i=!1,a=!1,o=0;return Li(e,s=>{if(s.type!==`CallExpression`||!i_(s,t))return;let c=$g(s.parent,e);if(c.hasLoop&&(i=!0),c.hasCallback&&(r=!0),c.hasIndeterminate){a=!0,o+=1;return}n+=1}),{deterministic:n,hasExpectInCallback:r,hasExpectInLoop:i,hasIndeterminate:a,indeterminate:o}}function o_(e){return Array.isArray(e)?e.filter(y):[]}function s_(e){return x(e)?{additionalAssertionFunctions:o_(e.additionalAssertionFunctions),additionalExpectCallNames:o_(e.additionalExpectCallNames),onlyFunctionsWithAsyncKeyword:e.onlyFunctionsWithAsyncKeyword===!0,onlyFunctionsWithExpectInCallback:e.onlyFunctionsWithExpectInCallback===!0,onlyFunctionsWithExpectInLoop:e.onlyFunctionsWithExpectInLoop===!0}:{additionalAssertionFunctions:[],additionalExpectCallNames:[],onlyFunctionsWithAsyncKeyword:!1,onlyFunctionsWithExpectInCallback:!1,onlyFunctionsWithExpectInLoop:!1}}function c_(e){return[...new Set([...e.additionalExpectCallNames,...e.additionalAssertionFunctions])]}function l_(e){return e.onlyFunctionsWithAsyncKeyword||e.onlyFunctionsWithExpectInCallback||e.onlyFunctionsWithExpectInLoop}function u_(e){return e.body??void 0}function d_(e){let t=u_(e);return t?.type===`BlockStatement`?t:void 0}function f_(e,t,n,r,i,a){return n+r===0?!1:!l_(t)||t.onlyFunctionsWithAsyncKeyword&&e.async||t.onlyFunctionsWithExpectInCallback&&i||t.onlyFunctionsWithExpectInLoop&&a}function p_(e){let t=d_(e);if(t===void 0)return;let[n]=t.body;if(n?.type===`ExpressionStatement`&&n.expression.type===`CallExpression`)return n.expression}function m_(e,t,n,r,i){let a=d_(t);if(a===void 0){e.report({messageId:`haveExpectAssertions`,node:n});return}let[o]=a.body;if(i){e.report({messageId:`haveExpectAssertions`,node:n,suggest:[{fix(e){return o===void 0?e.insertTextAfterRange([a.range[0],a.range[0]+1],` expect.hasAssertions();`):e.insertTextBefore(o,`expect.hasAssertions();
10
- `)},messageId:`suggestAddingHasAssertions`}]});return}e.report({messageId:`haveExpectAssertions`,node:n,suggest:[{data:{count:String(r)},fix(e){return o===void 0?e.insertTextAfterRange([a.range[0],a.range[0]+1],` expect.assertions(${r});`):e.insertTextBefore(o,`expect.assertions(${r});\n`)},messageId:`suggestAddingAssertions`}]})}function h_(e,t,n,r){if(r_(t)){t.arguments.length>0&&e.report({messageId:`hasAssertionsTakesNoArguments`,node:t});return}if(!n_(t))return;if(t.arguments.length!==1){e.report({messageId:`assertionsRequiresOneArgument`,node:t});return}let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`||!Ge(i)){e.report({messageId:`assertionsRequiresNumberArgument`,node:t});return}!r&&n>0&&i.value!==n&&e.report({data:{actual:String(n),expected:String(i.value)},messageId:`wrongAssertionCount`,node:t})}const g_=_(`prefer-expect-assertions`,`general`,{create(e){let t=s_(e.options[0]);return{CallExpression(n){if(!e_(n))return;let r=t_(n);if(r===void 0)return;let i=u_(r);if(i===void 0)return;let{deterministic:a,indeterminate:o,hasIndeterminate:s,hasExpectInCallback:c,hasExpectInLoop:l}=a_(i,c_(t));if(!f_(r,t,a,o,c,l))return;let u=p_(r);if(u!==void 0&&(n_(u)||r_(u))){if(h_(e,u,a,s),r_(u)&&u.arguments.length===0&&a>0&&!s){let[t]=d_(r)?.body??[];t!==void 0&&e.report({data:{count:String(a)},fix(e){return e.replaceText(t,`expect.assertions(${a});`)},messageId:`preferAssertionsCount`,node:u})}return}m_(e,r,n,a,s)}}},meta:{docs:{description:`Enforce expect assertion guards in tests and prefer expect.assertions(n) over expect.hasAssertions() when the count is known.`,recommended:!0},fixable:`code`,hasSuggestions:!0,messages:{assertionsRequiresNumberArgument:`This argument should be a number`,assertionsRequiresOneArgument:"`expect.assertions` expects a single argument of type number",hasAssertionsTakesNoArguments:"`expect.hasAssertions` expects no arguments",haveExpectAssertions:"Every test should have either `expect.assertions(<number of assertions>)` or `expect.hasAssertions()` as its first expression",preferAssertionsCount:"Use `expect.assertions({{count}})` instead of `expect.hasAssertions()` when the count is known",suggestAddingAssertions:"Add `expect.assertions({{count}})`",suggestAddingHasAssertions:"Add `expect.hasAssertions()`",wrongAssertionCount:`Expected {{expected}} assertions, but test has {{actual}} expect calls`},schema:[{additionalProperties:!1,properties:{additionalAssertionFunctions:{default:[],description:`Additional assertion function names counted as test assertions.`,items:{type:`string`},type:`array`},additionalExpectCallNames:{default:[],description:`Additional expect-like call names counted when checking assertion counts.`,items:{type:`string`},type:`array`},onlyFunctionsWithAsyncKeyword:{default:!1,description:`Only require assertion guards for test callbacks marked async.`,type:`boolean`},onlyFunctionsWithExpectInCallback:{default:!1,description:`Only require assertion guards when expect is called inside a nested callback.`,type:`boolean`},onlyFunctionsWithExpectInLoop:{default:!1,description:`Only require assertion guards when expect is called inside a loop.`,type:`boolean`}},type:`object`}],type:`suggestion`}});function __(e){if(!(x(e)&&`additionalHoistableComponents`in e))return new Set;let{additionalHoistableComponents:t}=e;return t===void 0||!S(t)?new Set:new Set(t)}function v_(e){if(!(x(e)&&`additionalStaticFactories`in e))return new Set;let{additionalStaticFactories:t}=e;return t===void 0||!S(t)?new Set:new Set(t)}function y_(e){let t=e;for(;t.type===`JSXMemberExpression`;)t=t.object;return t.type===`JSXIdentifier`?t.name:void 0}function b_(e,t,n){let r=E(e.sourceCode.getScope(t),n);if(r===void 0||!K(r.scope))return!1;if(q(r))return!0;for(let e of r.defs)if(e.type===`FunctionName`||e.type===`ClassName`||zl(e)!==void 0)return!0;return!1}function x_(e,t,n){let r=E(e.sourceCode.getScope(t),n);return r!==void 0&&q(r)}function S_(e,t,n,r){let{name:i}=t.openingElement;if(i.type===`JSXIdentifier`){let e=i.name.charAt(0);if(e!==``&&e===e.toLowerCase())return!0}let a=y_(i);if(a===void 0)return!1;let o=E(e.sourceCode.getScope(t),a),s=i.type===`JSXMemberExpression`;return n.has(a)?o===void 0?!s:s?x_(e,t,a):b_(e,t,a):r===`standard`?s?x_(e,t,a):b_(e,t,a):!1}function C_(e,t,n,r,i){if(i===`roblox-ts`&&t.name.type===`JSXIdentifier`&&(t.name.name===`Event`||t.name.name===`Change`))return!1;let{value:a}=t;return a===null||a.type===`Literal`?!0:a.type!==`JSXExpressionContainer`||a.expression.type===`JSXEmptyExpression`?!1:Hl(e.sourceCode,a.expression,new Set)?i===`standard`:J(e.sourceCode,a.expression,n,r)}function w_(e,t,n,r,i){for(let a of t.attributes)if(a.type===`JSXSpreadAttribute`||!C_(e,a,new Set(n),r,i))return!1;return!0}function T_(e,t,n,r,i,a){if(t.type===`JSXText`)return a===`standard`||t.value.trim().length===0;if(t.type===`JSXElement`||t.type===`JSXFragment`)return D_(e,t,new Set(n),r,i,a);if(t.type!==`JSXExpressionContainer`)return!1;if(t.expression.type===`JSXEmptyExpression`)return!0;if(t.expression.type===`JSXElement`||t.expression.type===`JSXFragment`)return D_(e,t.expression,new Set(n),r,i,a);if(t.expression.type===`Identifier`){let o=Bl(e.sourceCode,t.expression);if(o!==void 0){let t=w(o);if(t.type===`JSXElement`||t.type===`JSXFragment`)return D_(e,t,new Set(n),r,i,a)}}return J(e.sourceCode,t.expression,new Set(n),i)}function E_(e,t,n,r,i,a){for(let o of t.children)if(!T_(e,o,new Set(n),r,i,a))return!1;return!0}function D_(e,t,n,r,i,a){return n.has(t)?!1:(n.add(t),(t.type===`JSXFragment`||S_(e,t,r,a)&&w_(e,t.openingElement,n,i,a))&&E_(e,t,n,r,i,a))}function O_(e,t,n,r,i){let{parent:a}=t;for(;a.type!==`Program`;){if((a.type===`JSXElement`||a.type===`JSXFragment`)&&D_(e,a,new Set,n,r,i))return!0;({parent:a}=a)}return!1}function k_(e,t){switch(e.type){case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return e.expression===t;default:return!1}}function A_(e,t){return e.type===`JSXElement`||e.type===`JSXFragment`||e.type===`JSXExpressionContainer`&&e.expression===t}function j_(e,t){let n=t,{parent:r}=n;for(;k_(r,n)||A_(r,n);){n=r;let{parent:e}=n;if(e===null)return!1;r=e}if(r.type!==`VariableDeclarator`||r.id.type!==`Identifier`||r.init!==n||r.parent.type!==`VariableDeclaration`||r.parent.kind!==`const`)return!1;let i=E(e.sourceCode.getScope(n),r.id.name);return i!==void 0&&K(i.scope)}function M_(e,t){let n=e.sourceCode.getText(t);e.report({data:{elementText:n},messageId:`hoistableJsxElement`,node:t})}const N_=_(`prefer-hoisted-jsx-elements`,`react`,{create(e){let[t]=e.options,n=__(t),r=v_(t),i=yr(t),a={staticCallsRequireFactories:!0,staticGlobalFactories:new Set([...i===`roblox-ts`?Pl:[],...r])};function o(t){D_(e,t,new Set,n,a,i)&&(j_(e,t)||O_(e,t,n,a,i)||M_(e,t))}return{JSXElement:o,JSXFragment:o}},meta:{docs:{description:`Prefer extracting static JSX elements to module-level constants.`},messages:{hoistableJsxElement:"Extract `{{elementText}}` to a shared module-level const — this JSX element is fully static and identical elements should reuse the same const."},schema:[{additionalProperties:!1,properties:{additionalHoistableComponents:{description:`Additional component names that can be hoisted to module-level constants.`,items:{type:`string`},type:`array`},additionalStaticFactories:{description:`Additional factory functions whose return values are considered static.`,items:{type:`string`},type:`array`},environment:dr},type:`object`}],type:`suggestion`}}),P_={staticGlobalFactories:new Set(Pl)};function F_(e){let{value:t}=e;if(t?.type===`JSXExpressionContainer`&&t.expression.type!==`JSXEmptyExpression`)return t.expression}function I_(e,t){let n=t;for(;;){let{parent:r}=n;if(r===null)return!1;if(r.type===`VariableDeclarator`)return R_(e,t,r,n);let i=L_(r);if(i===void 0)return!1;n=i}}function L_(e){if(e.type===`JSXElement`||e.type===`JSXFragment`||e.type===`JSXExpressionContainer`||e.type===`ParenthesizedExpression`||e.type===`ArrayExpression`)return e}function R_(e,t,n,r){if(n.id.type!==`Identifier`||n.init!==r)return!1;let i=E(e.sourceCode.getScope(t),n.id.name);return i!==void 0&&K(i.scope)}function z_(e,t){let n=e.sourceCode.getText(t);e.report({data:{objectText:n},messageId:`hoistableObjectProp`,node:t})}function B_(e,t){if(t.properties.some(e=>e.type===`Property`&&e.computed))return;let n=new Set;if(J(e.sourceCode,t,n,P_)){z_(e,t);return}for(let n of t.properties){if(n.type!==`Property`)continue;let t=w(n.value);t.type===`ObjectExpression`&&B_(e,t)}}const V_=_(`prefer-hoisted-jsx-object-properties`,`react`,{create(e){return{JSXAttribute(t){let n=F_(t);if(n===void 0)return;let r=w(n);if(r.type!==`ObjectExpression`)return;let i=t.parent;if(i.type!==`JSXOpeningElement`)return;let a=i.parent;a.type===`JSXElement`&&I_(e,a)||B_(e,r)}}},meta:{docs:{description:`Prefer extracting inline JSX object props to module-level constants when the entire object is statically hoistable.`},messages:{hoistableObjectProp:"Extract `{{objectText}}` to a module-level const — this inline JSX prop object is fully static and causes unnecessary reference churn on every render."},schema:[],type:`suggestion`}});function H_({type:e}){return e===`Identifier`||e===`MemberExpression`||e===`CallExpression`||e===`NewExpression`||e===`ThisExpression`}function U_(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}const W_=_(`prefer-idiv`,`roblox`,{createOnce(e){return{CallExpression(t){if(t.optional)return;let n=w(t.callee);if(n.type!==`MemberExpression`||n.optional||T(n)!==`floor`)return;let r=w(n.object);if(r.type!==`Identifier`||r.name!==`math`||ae(e.sourceCode,r,`math`)||t.arguments.length!==1)return;let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`)return;let a=w(i);if(a.type!==`BinaryExpression`||a.operator!==`/`)return;let o=w(a.left),s=e.sourceCode.getText(U_(a.left)),c=H_(o)?s:`(${s})`,l=e.sourceCode.getText(U_(a.right));e.report({fix:e=>e.replaceText(t,`${c}.idiv(${l})`),messageId:`useIdiv`,node:t})}}},meta:{docs:{description:`Prefer .idiv() for integer division instead of math.floor(x / y).`,recommended:!0},fixable:`code`,messages:{useIdiv:`Use .idiv() instead of math.floor(x / y) for integer division.`},schema:[],type:`suggestion`}}),G_={componentName:`Portal`,fileNames:[`portal`],markers:[`target`]},K_=new Set([`@rbxts/react-roblox`,`react-dom`]),q_=new Set([`.jsx`,`.tsx`]);function J_(e){return e.type===`ImportBinding`}function Y_(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function X_(e){if(e===void 0)return!1;for(let t of e.defs){if(!J_(t)||t.node.type!==`ImportSpecifier`)continue;let e=Y_(t.node);if(e===void 0||!K_.has(e.source.value))continue;let{imported:n}=t.node;if(n.type===`Identifier`&&n.name===`createPortal`)return!0}return!1}function Z_(e){if(e===void 0)return!1;for(let t of e.defs){if(!J_(t)||t.node.type!==`ImportNamespaceSpecifier`)continue;let e=Y_(t.node);if(e!==void 0&&K_.has(e.source.value))return!0}return!1}function Q_(e,{callee:t}){return t.type===`Identifier`?X_(E(e.getScope(t),t.name)):t.type!==`MemberExpression`||t.computed||t.property.type!==`Identifier`||t.property.name!==`createPortal`||t.object.type!==`Identifier`?!1:Z_(E(e.getScope(t.object),t.object.name))}function $_(e,t){return e.type===`JSXElement`||e.type===`JSXFragment`?t.getText(e):`{${t.getText(e)}}`}function ev(e,t,n){if(t.arguments.length!==2)return;let[r,i]=t.arguments;if(r===void 0||i===void 0)return;let a=$_(r,n);return`<${e} target={${n.getText(i)}}>${a}</${e}>`}const tv=_(`prefer-local-portal-component`,`react`,{create(e){let{filename:t,sourceCode:n}=e,r=t===``?{found:!1}:Tg(t,G_),a=t!==``&&Sg(t,G_).matches,o=new Set;return{CallExpression(s){if(a||!Q_(n,s)||s.arguments.length!==2||!(o.size>0||r.found))return;let c=q_.has(i(t))&&o.size===1,[l]=o,u=c&&l!==void 0?ev(l,s,n):void 0;if(u!==void 0){e.report({fix:e=>e.replaceText(s,u),messageId:`preferPortalComponent`,node:s});return}e.report({messageId:`preferPortalComponent`,node:s})},ImportDeclaration(e){wg(e,Cg(e,t,G_),G_.componentName,o)}}},meta:{docs:{description:`Prefer a local Portal component over direct createPortal calls when the project already defines one.`},fixable:`code`,messages:{preferPortalComponent:"Use the local `Portal` component instead of calling `createPortal` directly."},schema:[],type:`suggestion`}});function nv(e){return e===void 0?!1:e.type===`TSTypeAnnotation`?nv(e.typeAnnotation):e.type===`TSNumberKeyword`||e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&e.typeName.name===`Number`}function rv(e){return e.type!==`PrivateIdentifier`}function iv(e){let t=w(e);return t.type===`Literal`&&!b(t.value)}function av(e){if(e.type===`Parameter`){let t=e.name;if(t.typeAnnotation!==void 0&&t.typeAnnotation!==null)return!nv(t.typeAnnotation);let{parent:n}=t;return n.type===`AssignmentPattern`&&iv(n.right)}if(e.type!==`Variable`||e.node.type!==`VariableDeclarator`)return!1;let{id:t,init:n}=e.node;return t.type===`Identifier`&&t.typeAnnotation!==void 0&&t.typeAnnotation!==null?!nv(t.typeAnnotation):n!==null&&iv(n)}function ov(e,t){let n=E(e.getScope(t),t.name);if(n===void 0)return!1;for(let e of n.defs)if(av(e))return!0;return!1}function sv(e,t){if(t.type===`ParenthesizedExpression`)return sv(e,t.expression);if(t.type===`TSAsExpression`||t.type===`TSTypeAssertion`)return!nv(t.typeAnnotation);if(iv(t))return!0;let n=w(t);return n.type===`Identifier`&&ov(e,n)}function cv(e,t){return e.getText(w(t))}function lv(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function uv(e,t){let n=lv(t);return n.type===`SequenceExpression`?`(${e.getText(n)})`:e.getText(n)}function dv(e,t){if(t.test.type!==`BinaryExpression`)return;let{alternate:n,consequent:r,test:i}=t,{left:a,operator:o,right:s}=i;if(!(rv(a)&&rv(s))||!(I(a)&&I(s))||sv(e,a)||sv(e,s))return;let c=cv(e,a),l=cv(e,s),u=cv(e,n),d=cv(e,r),f=o===`>`||o===`>=`,p=o===`<`||o===`<=`;if(f&&c===u&&l===d||p&&c===d&&l===u)return`min`;if(f&&c===d&&l===u||p&&c===u&&l===d)return`max`}const fv=_(`prefer-math-min-max`,`roblox`,{create(e){let{sourceCode:t}=e;return{ConditionalExpression(n){if(ae(t,n,`math`))return;let r=dv(t,n);if(r===void 0||n.test.type!==`BinaryExpression`)return;let{left:i,right:a}=n.test;if(!(rv(i)&&rv(a)))return;let o=uv(t,i),s=uv(t,a);e.report({fix(e){return e.replaceText(n,`math.${r}(${o}, ${s})`)},messageId:`preferMathMethod`,node:n})}}},meta:{docs:{description:`Prefer math.min() and math.max() over simple clamp-like ternaries.`,recommended:!0},fixable:`code`,messages:{preferMathMethod:"Use `math.min()` or `math.max()` instead of this ternary comparison."},schema:[],type:`suggestion`}}),pv=new Set([`ReadonlyRecord`,`Record`]);function mv(e){return e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&pv.has(e.typeName.name)}function hv(e){if(e.id.type!==`Identifier`)return;let t=le(e.id);if(t===void 0)return;let{typeAnnotation:n}=t;if(!mv(n))return;let{typeArguments:r}=n;if(r?.params.length!==2)return;let[i,a]=r.params;if(i!==void 0&&a!==void 0&&a.type===`TSLiteralType`&&a.literal.type===`Literal`&&a.literal.value===!0)return i}function gv(e){if(e?.type!==`ObjectExpression`)return!1;for(let t of e.properties)if(t.type!==`Property`||t.value.type!==`Literal`||t.value.value!==!0)return!1;return!0}const _v=_(`prefer-modding-inspect`,`roblox`,{create(e){let{sourceCode:t}=e;return{VariableDeclarator(n){if(n.id.type!==`Identifier`)return;let r=n.id.name;if(!gv(n.init))return;let i=hv(n);if(i===void 0)return;let a=t.getText(i);e.report({data:{enumType:a},fix(e){return e.replaceTextRange([n.range[0],n.range[1]],`${r} = Modding.inspect<Record<${a}, true>>()`)},messageId:`preferModdingInspect`,node:n.id})}}},meta:{docs:{description:`Prefer Modding.inspect over manually enumerating every enum member in a Record<Enum, true>.`,recommended:!0},fixable:`code`,messages:{preferModdingInspect:`Replace manual {{enumType}} enumeration with Modding.inspect<Record<{{enumType}}, true>>().`},schema:[],type:`suggestion`}}),vv=/^[A-Z][A-Z0-9_]*$/u;function yv(e){let{type:t}=e;if(t===`module`||t===`global`)return!0;if(e.upper?.type===`global`){let{block:t}=e.upper;if(t.type===`Program`&&t.sourceType===`script`)return!0}return!1}const bv=_(`prefer-module-scope-constants`,`general`,{create(e){let t=!1;return{VariableDeclaration(e){t=e.kind===`const`},"VariableDeclaration:exit"(){t=!1},VariableDeclarator(n){let{id:r}=n;if(!(r.type!==`Identifier`||!vv.test(r.name))){if(!t){e.report({messageId:`mustUseConst`,node:n});return}yv(e.sourceCode.getScope(n))||e.report({messageId:`mustBeModuleScope`,node:n})}}}},meta:{docs:{description:`Prefer screaming snake case constants at module scope or the allowed top-level wrapper scope.`},messages:{mustBeModuleScope:`You must place screaming snake case at module scope. If this is not meant to be a module-scoped variable, use camelcase instead.`,mustUseConst:"You must use `const` when defining screaming snake case variables. If this is not a constant, use camelcase instead."},schema:[],type:`suggestion`}}),xv=new Set([`end`,`loc`,`parent`,`range`,`start`]),Sv=new Set([`.jsx`,`.tsx`]),Cv=new Set([`PaddingBottom`,`PaddingLeft`,`PaddingRight`,`PaddingTop`]),wv={componentName:`DirectionalPadding`,fileNames:[`directional-padding`],markers:[`horizontal`,`vertical`]},Tv={componentName:`EqualPadding`,fileNames:[`equal-padding`],markers:[`padding`]};function Ev(e,t){return Object.is(e,t)?!0:Array.isArray(e)?Array.isArray(t)&&Dv(e,t):Array.isArray(t)||typeof e!=`object`||typeof t!=`object`||e===null||t===null||!(x(e)&&x(t))?!1:Ov(e,t)}function Dv(e,t){if(e.length!==t.length)return!1;let n=0;for(let r of e)if(!Ev(r,t[n++]))return!1;return!0}function Ov(e,t){let n=Object.entries(e).filter(([e])=>!xv.has(e)),r=Object.entries(t).filter(([e])=>!xv.has(e));if(n.length!==r.length)return!1;for(let[e,r]of n)if(!(e in t)||!Ev(r,t[e]))return!1;return!0}function kv(e){for(let t of e.children)if((t.type!==`JSXText`||t.value.trim()!==``)&&(t.type!==`JSXExpressionContainer`||t.expression.type!==`JSXEmptyExpression`))return!0;return!1}function Av({value:e}){if(e!==null){if(e.type===`JSXExpressionContainer`)switch(e.expression.type){case`JSXElement`:case`JSXEmptyExpression`:case`JSXFragment`:return;default:return w(e.expression)}return e.type===`Literal`?e:void 0}}function jv(e){let t=new Map;for(let n of e.attributes){if(n.type===`JSXSpreadAttribute`||n.name.type!==`JSXIdentifier`)return;let e=n.name.name;if(!Cv.has(e)||t.has(e)||n.value===null)return;t.set(e,n)}let n=t.get(`PaddingBottom`),r=t.get(`PaddingLeft`),i=t.get(`PaddingRight`),a=t.get(`PaddingTop`);if(n!==void 0&&r!==void 0&&i!==void 0&&a!==void 0)return{paddingBottom:n,paddingLeft:r,paddingRight:i,paddingTop:a}}function Mv({value:e},t){if(e!==null)switch(e.type){case`JSXExpressionContainer`:case`Literal`:return t.getText(e);default:return}}function Nv(e,t,n,r){let i=Mv(n.paddingTop,r);if(i===void 0)return;if(t===`preferEqualPadding`)return`<${e} padding=${i} />`;let a=Mv(n.paddingLeft,r);if(a!==void 0)return`<${e} horizontal=${i} vertical=${a} />`}function Pv(e){let t=Av(e.paddingBottom),n=Av(e.paddingLeft),r=Av(e.paddingRight),i=Av(e.paddingTop);if(t===void 0||n===void 0||r===void 0||i===void 0)return;if(Ev(i,t)&&Ev(i,n)&&Ev(i,r))return`preferEqualPadding`;let a=Ev(i,t),o=Ev(n,r);return a&&o?`preferDirectionalPadding`:void 0}function Fv(e){return e.type===`JSXIdentifier`}const Iv=_(`prefer-padding-components`,`react`,{create(e){let{filename:t}=e,n=t===``?{found:!1}:Tg(t,wv),r=t===``?{found:!1}:Tg(t,Tv),a=t!==``&&Sg(t,wv).matches,o=t!==``&&Sg(t,Tv).matches,s=new Set,c=new Set;return{ImportDeclaration(e){let n=Cg(e,t,wv),r=Cg(e,t,Tv);wg(e,n,wv.componentName,s),wg(e,r,Tv.componentName,c)},JSXElement(l){if(kv(l))return;let{openingElement:u}=l;if(!Fv(u.name)||u.name.name!==`uipadding`)return;let d=jv(u);if(d===void 0)return;let f=Pv(d);if(f===void 0||(f===`preferEqualPadding`?o:a))return;let p=f===`preferEqualPadding`?c:s,m=f===`preferEqualPadding`?r:n;if(p.size===0&&!m.found)return;let h=Sv.has(i(t))&&p.size===1,[g]=[...p],_=h&&g!==void 0?Nv(g,f,d,e.sourceCode):void 0;if(_!==void 0){e.report({fix(e){return e.replaceText(l,_)},messageId:f,node:l});return}e.report({messageId:f,node:l})}}},meta:{docs:{description:`Prefer local EqualPadding and DirectionalPadding components over matching <uipadding /> declarations.`},fixable:`code`,messages:{preferDirectionalPadding:"Use the local `DirectionalPadding` component when horizontal and vertical padding already match.",preferEqualPadding:"Use the local `EqualPadding` component when all four padding values already match."},schema:[],type:`suggestion`}});function Lv(e){return e>=`0`&&e<=`9`}function Rv(e){return e>=`a`&&e<=`z`}function zv(e){return e>=`A`&&e<=`Z`}function Bv(e){return Lv(e)||Rv(e)||zv(e)}function Vv(e,t,n){return Lv(e)!==Lv(t)||Rv(e)&&zv(t)?!0:zv(e)&&zv(t)&&n!==void 0&&Rv(n)}function Hv(e,t){let n=0;for(let r=1;r<t.length;r+=1){let i=r+1<t.length?t.charAt(r+1):void 0;Vv(t.charAt(r-1),t.charAt(r),i)&&(e.push(t.slice(n,r)),n=r)}e.push(t.slice(n))}function Uv(e){let t=[],n;for(let r=0;r<e.length;r+=1){if(Bv(e.charAt(r))){n??=r;continue}n!==void 0&&(Hv(t,e.slice(n,r)),n=void 0)}return n!==void 0&&Hv(t,e.slice(n)),t}function Wv(e){let t=Uv(e),n=``;for(let e of t)e.length!==0&&(n+=`${e.slice(0,1).toUpperCase()}${e.slice(1).toLowerCase()}`);return n}const Gv=/^\d/u;function Kv(e){if(e.id.type===`Identifier`)return e.id.name;if(!(e.id.type!==`Literal`||!y(e.id.value)))return Gv.test(e.id.value)?void 0:e.id.value}const qv=_(`prefer-pascal-case-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration(t){let n=t.id.name;Wv(n)!==n&&e.report({data:{identifier:n},messageId:`notPascalCase`,node:t.id})},TSEnumMember(t){let n=Kv(t);n!==void 0&&Wv(n)!==n&&e.report({data:{identifier:n},messageId:`notPascalCase`,node:t.id})}}},meta:{docs:{description:`Enforce PascalCase names for enums and enum members.`,recommended:!0},messages:{notPascalCase:`Enum '{{ identifier }}' uses non-standard casing. TypeScript convention requires PascalCase for enum names and members to distinguish them from variables (camelCase) and constants (UPPER_CASE). Rename to PascalCase: capitalize first letter of each word, no underscores.`},schema:[],type:`suggestion`}});function Jv(e,t){return Ge(e)&&e.value===t}function Yv(e){if(e===`ColorSequence`)return`ColorSequenceKeypoint`;if(e===`NumberSequence`)return`NumberSequenceKeypoint`}function Xv(e,t,n){if(e.type!==`NewExpression`||!Le(e,t)||e.arguments.length!==2)return;let[r,i]=e.arguments;if(r!==void 0&&r.type!==`SpreadElement`&&i!==void 0&&i.type!==`SpreadElement`)return Jv(r,n)?i:void 0}function Zv(e,t,n){if(t.arguments.length!==2)return;let[r,i]=t.arguments;if(r===void 0||r.type===`SpreadElement`||i===void 0||i.type===`SpreadElement`)return;let a=e.sourceCode.getText(r);if(a===e.sourceCode.getText(i))return{messageId:`preferSingleOverload`,replacement:`new ${n}(${a})`}}function Qv(e,t,n,r){if(t.arguments.length!==1)return;let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`||i.type!==`ArrayExpression`||i.elements.length!==2)return;let[a,o]=i.elements;if(a===void 0||o===void 0||a===null||o===null||a.type===`SpreadElement`||o.type===`SpreadElement`)return;let s=Xv(a,r,0),c=Xv(o,r,1);if(s===void 0||c===void 0)return;let l=e.sourceCode.getText(s),u=e.sourceCode.getText(c);return{messageId:l===u?`preferSingleOverload`:`preferTwoPointOverload`,replacement:l===u?`new ${n}(${l})`:`new ${n}(${l}, ${u})`}}const $v=_(`prefer-sequence-overloads`,`roblox`,{createOnce(e){return{NewExpression(t){if(t.callee.type!==`Identifier`)return;let n=t.callee.name,r=Yv(n);if(r===void 0)return;let i=Zv(e,t,n)??Qv(e,t,n,r);i!==void 0&&e.report({fix:e=>e.replaceText(t,i.replacement),messageId:i.messageId,node:t})}}},meta:{docs:{description:`Prefer direct ColorSequence and NumberSequence overloads over identical direct arguments and two-keypoint arrays.`,recommended:!0},fixable:`code`,messages:{preferSingleOverload:`Use the single-value sequence overload instead of two identical keypoints.`,preferTwoPointOverload:`Use the two-value sequence overload instead of constructing a two-keypoint array.`},schema:[],type:`suggestion`}});function ey(e){return e.length===2}function ty(e){return e.type===`MemberExpression`&&!e.computed}function ny(e,t){if(e.type!==`CallExpression`)return!1;let{callee:n}=e;if(!ty(n)||n.property.name!==t||!ey(e.arguments))return!1;let[r,i]=e.arguments;return r.type!==`SpreadElement`&&i.type!==`SpreadElement`}function ry(e,t){if(e.declarations.length!==1)return;let[n]=e.declarations;if(n===void 0)return;let{id:r,init:i}=n;if(r.type!==`Identifier`||i===null||!ny(i,t))return;let{callee:a}=i;if(!ty(a))return;let[o,s]=i.arguments;if(o!==void 0&&s!==void 0&&o.type!==`SpreadElement`&&s.type!==`SpreadElement`)return{componentNode:s,entityNode:o,node:i,queryType:t,variableDeclaration:e,variableDeclarator:n,variableName:r.name,worldNode:a.object}}const iy=new Set([`ConditionalExpression`,`DoWhileStatement`,`ForStatement`,`IfStatement`,`WhileStatement`]);function ay(e){return x(e)&&`parent`in e}function oy(e){return x(e)&&y(e.type)?e.type:void 0}function sy(e){return x(e)&&y(e.operator)?e.operator:void 0}function cy(e){return oy(e)===`LogicalExpression`&&sy(e)===`&&`}function ly(e){return x(e)&&e.type===`Identifier`&&y(e.name)}function uy(e){let{parent:t}=e;if(cy(t))return!0;let n=oy(t);if(n===void 0||!iy.has(n))return!1;let r=e;for(;r!==void 0&&r!==t&&ay(r);){let e=r.parent;if(cy(e))return!0;r=e}return!1}function dy(e){if(e.isWrite())return!1;let{identifier:t}=e;return ly(t)?uy(t):!1}function fy(e,t,n){return E(n.getScope(t),e)?.references.some(dy)??!1}function py(e,t){return e.every(e=>fy(e.variableName,e.variableDeclaration,t))}const my=/^[\s;]*$/u;function hy(e,t,n){if(e===void 0)return!0;if(n.getText(e.worldNode)!==n.getText(t.worldNode)||n.getText(e.entityNode)!==n.getText(t.entityNode)||e.queryType!==t.queryType)return!1;let[,r]=e.variableDeclaration.range,[i]=t.variableDeclaration.range,a=n.text.slice(r,i);return my.test(a)}function gy(e,t){if(e.length<2)return;let[n]=e;if(n===void 0)return;let{sourceCode:r}=t,i=r.getText(n.worldNode),a=r.getText(n.entityNode),o=e.map(e=>e.variableName),s=e.map(e=>r.getText(e.componentNode));_y(e,t,`const ${o.length===1?o[0]:`[${o.join(`, `)}]`} = ${i}.get(${a}, ${s.join(`, `)});`,`preferSingleGet`,n)}function _y(e,t,n,r,i){let a=e.at(0)?.variableDeclaration,o=e.at(-1)?.variableDeclaration;a!==void 0&&o!==void 0&&t.report({data:{fixedCode:n},fix(e){let[t]=a.range,[,r]=o.range;return e.replaceTextRange([t,r],n)},messageId:r,node:i.node})}function vy(e,t){if(e.length<2)return;let{sourceCode:n}=t;if(!py(e,n))return;let[r]=e;r!==void 0&&_y(e,t,`const hasAll = ${n.getText(r.worldNode)}.has(${n.getText(r.entityNode)}, ${e.map(e=>n.getText(e.componentNode)).join(`, `)});`,`preferSingleHas`,r)}const yy=_(`prefer-single-world-query`,`roblox`,{create(e){let{sourceCode:t}=e,n=[],r=[];function i(){n.length>=2&&gy(n,e),n=[]}function a(){r.length>=2&&vy(r,e),r=[]}function o(){i(),a()}return{":statement:not(VariableDeclaration[kind='const'])":o,"Program:exit":o,"VariableDeclaration[kind='const']"(e){let s=ry(e,`get`);if(s!==void 0){let e=n.at(-1);e!==void 0&&!hy(e,s,t)&&i(),n.push(s),a();return}let c=ry(e,`has`);if(c!==void 0){let e=r.at(-1);e!==void 0&&!hy(e,c,t)&&a(),r.push(c),i();return}o()}}},meta:{docs:{description:`Enforce combining multiple world.get() or world.has() calls into a single call for better Jecs performance.`},fixable:`code`,messages:{preferSingleGet:`Multiple world.get() calls on the same entity should be combined into a single call for better performance. Suggested fix: {{fixedCode}}`,preferSingleHas:`Multiple world.has() calls on the same entity should be combined into a single call for better performance. Suggested fix: {{fixedCode}}`},schema:[],type:`suggestion`}}),by=new Set([`alumni`,`axes`,`cacti`,`children`,`criteria`,`data`,`dice`,`feet`,`fungi`,`geese`,`indices`,`matrices`,`media`,`men`,`mice`,`octopi`,`people`,`phenomena`,`teeth`,`vertices`,`women`]),xy=new Set([`alias`,`analysis`,`axis`,`basis`,`business`,`class`,`crisis`,`glass`,`news`,`series`,`species`,`status`,`thesis`]),Sy=new Set([`args`,`components`,`controllers`,`dto`,`dtos`,`entries`,`enums`,`hooks`,`items`,`keys`,`models`,`options`,`orders`,`pages`,`parameters`,`params`,`props`,`repositories`,`services`,`settings`,`types`,`values`,`vo`,`vos`]),Cy=/[A-Z]+(?![a-z])|[A-Z]?[a-z]+|\d+/gu,wy=/^[A-Z]{2,}[sS]?$/u;function Ty(e){let t=[],n=0;for(let r of e.split(`_`)){let e=r.match(Cy);if(e!==null)for(let r of e)t[n++]=r}return t}const Ey=/^\d+$/u;function Dy(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(!(n===void 0||Ey.test(n)))return{lowercased:n.toLowerCase(),original:n}}}const Oy=/[sS]$/u,ky=/(?:ches|shes|xes|zes)$/u;function Ay(e,t){return by.has(e)||Sy.has(e)?!0:xy.has(e)?!1:wy.test(t)&&Oy.test(t)||e.endsWith(`ies`)||e.endsWith(`ves`)||ky.test(e)||e.endsWith(`s`)&&!e.endsWith(`ss`)&&!e.endsWith(`us`)&&!e.endsWith(`is`)}function jy(e){if(wy.test(e)&&Oy.test(e))return!0;let t=Dy(Ty(e));return t!==void 0&&Ay(t.lowercased,t.original)}const My=_(`prefer-singular-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration({id:t}){let{name:n}=t;jy(n)&&e.report({data:{name:n},messageId:`notSingular`,node:t})}}},meta:{docs:{description:`Prefer singular naming for enums.`,recommended:!0},messages:{notSingular:`Enum name "{{name}}" should be singular.`},schema:[],type:`suggestion`}});function Ny(e){return e.type===`JSXElement`||e.type===`JSXFragment`}function Py(e,t,n){return e.type===`Super`||t.type===`Super`?e.type===`Super`&&t.type===`Super`:Q(e,t,n)}function Fy(e,t,n){return e.type===`SpreadElement`||t.type===`SpreadElement`?e.type!==`SpreadElement`||t.type!==`SpreadElement`?!1:Q(e.argument,t.argument,n):Q(e,t,n)}function Iy(e,t,n){return e.type===`PrivateIdentifier`||t.type===`PrivateIdentifier`?e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`&&e.name===t.name:Q(e,t,n)}function Q(e,t,n){let r=w(e),i=w(t);if(r.type!==i.type)return!1;switch(r.type){case`BinaryExpression`:return i.type===`BinaryExpression`&&Ly(r,i,n);case`CallExpression`:return i.type===`CallExpression`&&Ry(r,i,n);case`Identifier`:return i.type===`Identifier`&&r.name===i.name;case`Literal`:return i.type===`Literal`&&r.value===i.value;case`LogicalExpression`:return i.type===`LogicalExpression`&&zy(r,i,n);case`MemberExpression`:return i.type===`MemberExpression`&&By(r,i,n);case`ThisExpression`:return i.type===`ThisExpression`;case`UnaryExpression`:return i.type===`UnaryExpression`&&r.operator===i.operator&&Q(r.argument,i.argument,n);default:return n.getText(r)===n.getText(i)}}function Ly(e,t,n){return e.operator===t.operator&&Iy(e.left,t.left,n)&&Iy(e.right,t.right,n)}function Ry(e,t,n){if(e.optional!==t.optional||!Py(e.callee,t.callee,n)||e.arguments.length!==t.arguments.length)return!1;for(let r=0;r<e.arguments.length;r+=1){let i=e.arguments[r],a=t.arguments[r];if(i===void 0||a===void 0||!Fy(i,a,n))return!1}return!0}function zy(e,t,n){return e.operator===t.operator&&Q(e.left,t.left,n)&&Q(e.right,t.right,n)}function By(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!Py(e.object,t.object,n)?!1:e.computed?Iy(e.property,t.property,n):Vy(e.property,t.property)}function Vy(e,t){return(e.type===`Identifier`&&t.type===`Identifier`||e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`)&&e.name===t.name}function Hy(e){let t=w(e);if(t.type===`UnaryExpression`&&t.operator===`!`)return w(t.argument)}function Uy(e){let t=w(e);if(t.type===`BinaryExpression`&&(t.operator===`===`||t.operator===`!==`))return{left:t.left,operator:t.operator,right:t.right}}function Wy(e){let t=w(e);return t.type===`Identifier`||t.type===`ThisExpression`||t.type===`Literal`}function Gy(e){return it(e)&&Wy(e)}function Ky(e,t,n){let r=Hy(e);if(r&&Q(r,t,n))return{isFixSafe:Wy(r)};let i=Hy(t);if(i&&Q(i,e,n))return{isFixSafe:Wy(i)};let a=Uy(e),o=Uy(t);if(!(a&&o)||!(a.operator===`===`&&o.operator===`!==`||a.operator===`!==`&&o.operator===`===`))return;let s=Iy(a.left,o.left,n)&&Iy(a.right,o.right,n),c=Iy(a.left,o.right,n)&&Iy(a.right,o.left,n);if(s||c)return{isFixSafe:Gy(a.left)&&Gy(a.right)&&Gy(o.left)&&Gy(o.right)}}function qy(e){return e.type===`JSXText`&&e.value.trim()===``}function Jy(e){if(e.type===`JSXExpressionContainer`&&e.expression.type!==`JSXEmptyExpression`&&e.expression.type===`LogicalExpression`&&e.expression.operator===`&&`&&Ny(e.expression.right))return{condition:e.expression.left,logical:e.expression,node:e,renderBranch:e.expression.right}}const Yy=_(`prefer-ternary-conditional-rendering`,`react`,{create(e){let{sourceCode:t}=e;function n(e,t){let n=t;for(;n<e.length;){let t=e[n];if(t===void 0||!qy(t))break;n+=1}let r=e[n];return r===void 0?void 0:Jy(r)}function r(n,r){let i=Ky(n.condition,r.condition,t);if(i!==void 0){if(i.isFixSafe){e.report({fix(e){let i=`{${t.getText(n.condition)} ? ${t.getText(n.renderBranch)} : ${t.getText(r.renderBranch)}}`;return e.replaceTextRange([n.node.range[0],r.node.range[1]],i)},messageId:`preferTernaryConditionalRendering`,node:n.logical});return}e.report({messageId:`preferTernaryConditionalRendering`,node:n.logical})}}function i(e){for(let t=0;t<e.length;t+=1){let i=e[t];if(i===void 0)continue;let a=Jy(i);if(a===void 0)continue;let o=n(e,t+1);o!==void 0&&r(a,o)}}return{JSXElement(e){i(e.children)},JSXFragment(e){i(e.children)}}},meta:{docs:{description:`Prefer ternary expressions over complementary JSX && branches.`},fixable:`code`,messages:{preferTernaryConditionalRendering:`Use a single ternary expression instead of complementary JSX && branches.`},schema:[],type:`suggestion`}});function Xy(e){return e.type===`PrivateIdentifier`}function Zy(e){return e===`+`||e===`-`||e===`*`||e===`/`||e===`%`}function Qy(e){return e.type===`BinaryExpression`&&Zy(e.operator)&&!Xy(e.left)&&!Xy(e.right)}function $y(e){switch(e.type){case`BinaryExpression`:{if(!Qy(e))return;let{left:t,right:n}=e,r=$y(t),i=$y(n);return r===void 0||i===void 0?void 0:`${r} ${e.operator} ${i}`}case`Identifier`:return e.name;case`Literal`:return re(e.value)?String(e.value):void 0;case`UnaryExpression`:{let t=$y(e.argument);return t===void 0||e.operator!==`+`&&e.operator!==`-`?void 0:`${e.operator}${t}`}default:return}}function eb(e,t,n){switch(e){case`%`:return n===0?void 0:t%n;case`*`:return t*n;case`+`:return t+n;case`-`:return t-n;case`/`:return n===0?void 0:t/n;default:return}}function tb(e){switch(e.type){case`BinaryExpression`:{if(!Qy(e))return;let{left:t,right:n}=e,r=tb(t),i=tb(n);return r===void 0||i===void 0?void 0:eb(e.operator,r,i)}case`Identifier`:return;case`Literal`:return Number(e.value);case`UnaryExpression`:{let t=tb(e.argument);return t===void 0?void 0:e.operator===`+`?t:e.operator===`-`?-t:void 0}default:return}}function nb(e){if(e.length!==4)return;let[t,n,r,i]=e;if(t===void 0||n===void 0||r===void 0||i===void 0||t.type===`SpreadElement`||n.type===`SpreadElement`||r.type===`SpreadElement`||i.type===`SpreadElement`)return;let a=$y(t),o=$y(n),s=$y(r),c=$y(i);if(a!==void 0&&o!==void 0&&s!==void 0&&c!==void 0)return{offsetXText:o,offsetYText:c,scaleXText:a,scaleYText:s}}const rb=_(`prefer-udim2-shorthand`,`roblox`,{create(e){return{NewExpression(t){if(!Le(t,`UDim2`))return;let n=nb(t.arguments);if(n===void 0)return;let[r,i,a,o]=t.arguments;if(r===void 0||i===void 0||a===void 0||o===void 0||r.type===`SpreadElement`||i.type===`SpreadElement`||a.type===`SpreadElement`||o.type===`SpreadElement`)return;let s=tb(r),c=tb(i),l=tb(a),u=tb(o);if(s!==0||c!==0||l!==0||u!==0){if(c===0&&u===0){e.report({fix(e){return e.replaceText(t,`UDim2.fromScale(${n.scaleXText}, ${n.scaleYText})`)},messageId:`preferFromScale`,node:t});return}s===0&&l===0&&e.report({fix(e){return e.replaceText(t,`UDim2.fromOffset(${n.offsetXText}, ${n.offsetYText})`)},messageId:`preferFromOffset`,node:t})}}}},meta:{docs:{description:`Prefer UDim2.fromScale() or UDim2.fromOffset() over new UDim2() when all offsets or all scales are zero.`},fixable:`code`,messages:{preferFromOffset:`Use UDim2.fromOffset() instead of new UDim2() when all scales are 0.`,preferFromScale:`Use UDim2.fromScale() instead of new UDim2() when all offsets are 0.`},schema:[],type:`suggestion`}});function ib(e,t,n){if(t.type!==`BlockStatement`)return;let r=0;for(let e of t.body)if(e.type===`VariableDeclaration`)for(let t of e.declarations)Ac(t.init,`useState`)&&(r+=1);r<5||e.report({data:{componentName:n,useStateCount:String(r)},messageId:`excessiveUseState`,node:t})}const ab=_(`prefer-use-reducer`,`react`,{create(e){return{FunctionDeclaration(t){t.id===null||!G(t.id.name)||`body`in t&&t.body&&ib(e,t.body,t.id.name)},VariableDeclarator(t){jc(t)&&t.init&&`body`in t.init&&t.init.body&&`name`in t.id&&ib(e,t.init.body,t.id.name)}}},meta:{docs:{description:`Suggest using useReducer for related state updates instead of multiple useState calls.`,recommended:!0},messages:{excessiveUseState:`Component "{{componentName}}" has {{useStateCount}} useState calls — consider useReducer for related state`},type:`problem`}}),ob=`replace`,sb=`suggestion`,cb=`A more descriptive name will do too.`,lb={args:`parameters`,char:`character`,dt:`deltaTime`,plr:`player`},ub=[`char`],db={acc:{accumulator:!0},arg:{argument:!0},args:{arguments:!0},arr:{array:!0},attr:{attribute:!0},attrs:{attributes:!0},btn:{button:!0},cb:{callback:!0},char:{character:!0},conf:{config:!0},ctx:{context:!0},cur:{current:!0},curr:{current:!0},db:{database:!0},def:{defer:!0,deferred:!0,define:!0,definition:!0},dest:{destination:!0},dev:{development:!0},dir:{direction:!0,directory:!0},dirs:{directories:!0},dist:{distance:!0},doc:{document:!0},docs:{documentation:!0,documents:!0},dst:{daylightSavingTime:!0,destination:!0,distribution:!0},dt:{dateTime:!0,deltaTime:!0},e:{error:!0,event:!0},el:{element:!0},elem:{element:!0},elems:{elements:!0},env:{environment:!0},envs:{environments:!0},err:{error:!0},ev:{event:!0},evt:{event:!0},ext:{extension:!0},exts:{extensions:!0},fn:{func:!0,function:!0},func:{function:!0},i:{index:!0},idx:{index:!0},impl:{implementation:!0},j:{index:!0},len:{length:!0},lib:{library:!0},mod:{module:!0},msg:{message:!0},num:{number:!0},obj:{object:!0},opts:{options:!0},param:{parameter:!0},params:{parameters:!0},pkg:{package:!0},plr:{player:!0},prev:{previous:!0},prod:{production:!0},prop:{property:!0},props:{properties:!0},rel:{related:!0,relationship:!0,relative:!0},req:{request:!0},res:{resource:!0,response:!0,result:!0},ret:{returnValue:!0},retval:{returnValue:!0},sep:{separator:!0},src:{source:!0},stdDev:{standardDeviation:!0},str:{string:!0},tbl:{table:!0},temp:{temporary:!0},tit:{title:!0},tmp:{temporary:!0},util:{utility:!0},utils:{utilities:!0},val:{value:!0},var:{variable:!0},vars:{variables:!0},ver:{version:!0}},fb={EmberENV:!0,defaultProps:!0,devDependencies:!0,getDerivedStateFromProps:!0,getInitialProps:!0,getServerSideProps:!0,getStaticProps:!0,iOS:!0,obj:!0,propTypes:!0,setupFilesAfterEnv:!0},pb=[`i18n`,`l10n`],mb=/(?=[A-Z])|(?<=[_.-])/u,hb=new Set(`any.as.boolean.break.case.catch.class.const.constructor.continue.debugger.declare.default.delete.do.else.enum.export.extends.false.finally.for.from.function.get.if.implements.import.in.instanceof.interface.let.module.new.null.number.of.package.private.protected.public.require.return.set.static.string.super.switch.symbol.this.throw.true.try.type.typeof.var.void.while.with.yield`.split(`.`)),gb=/^[A-Za-z]+$/u;function _b(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95}function vb(e){return e<192?_b(e):e>=12289&&e<=55295?!0:e<=767?e!==215&&e!==247:e<=8191?e>=880&&e!==894:e<=8591?e>=8204&&e<=8205||e>=8304:e<=12271?e>=11264:e<=64255?e>=63744:e<=65023?e>=64512:e<=65279?e>=65136:e<=65370?e>=65313&&e<=65338||e>=65345:e>=65382&&e<=65500}function yb(e){return!!(vb(e)||e>=48&&e<=57||e===8204||e===8205||e>=768&&e<=865||e>=8240&&e<=8266)}function bb(e){if(e.length===0||hb.has(e))return!1;let t=e.codePointAt(0);if(t===void 0||!vb(t))return!1;let n=t>65535?2:1;for(;n<e.length;){let t=e.codePointAt(n);if(t===void 0||!yb(t))return!1;n+=t>65535?2:1}return!0}function xb(e){let t=[e],n=1;for(let r of e.childScopes){let e=xb(r);for(let r of e)t[n++]=r}return t}function Sb(e,t){return!t.some(t=>E(t,e)!==void 0)}function Cb(e,t,n){let r=e;if(!(!bb(r)&&(r=`${r}_`,!bb(r)))){for(;!(Sb(r,t)&&n(r,t));)r=`${r}_`;return r}}function wb(e){let t=new Set;for(let n of e.identifiers)t.add(n);for(let{identifier:n}of e.references)t.add(n);return[...t]}function Tb(e,t){return e.range[0]===t.range[0]&&e.range[1]===t.range[1]}function Eb(e){let{parent:t}=e;return!be(t)||t.local!==e?!1:Tb(t.local,t.imported)}function Db(e){let{parent:t}=e;return!xe(t)||t.local!==e?!1:Tb(t.local,t.exported)}function Ob(e){if(!A(e))return!1;let{parent:t}=e;return Se(t)&&t.shorthand&&t.value===e}function kb(e){if(!A(e))return!1;let{parent:t}=e;if(!et(t)||t.left!==e)return!1;let n=t.parent;return Se(n)?n.shorthand:!1}function Ab(e){if(!A(e))return!1;let{parent:t}=e;if(je(t)&&t.local===e||Me(t)&&t.local===e)return!0;if(be(t)&&t.local===e){let{imported:e}=t;if(j(e)&&e.name==="default")return!0}return k(t)&&t.id===e&&t.init!==null&&nt(t.init)}function jb(e){if(!A(e))return!1;let{parent:t}=e;if(k(t)&&t.id===e){let e=t.parent;return Ne(e)?Pe(e.parent):!1}return Fe(t)&&t.id===e||Re(t)&&t.id===e||ze(t)&&t.id===e?Pe(t.parent):!1}function Mb(e){return wb(e).every(e=>!(jb(e)||he(e)))}function Nb(e,t,n){if(A(e))return Ob(e)||kb(e)?n.replaceText(e,`${e.name}: ${t}`):Eb(e)?n.replaceText(e,`${e.name} as ${t}`):Db(e)?n.replaceText(e,`${t} as ${e.name}`):n.replaceText(e,t)}function Pb(e,t,n){let r=[],i=0;for(let a of wb(e)){let e=Nb(a,t,n);e!==void 0&&(r[i++]=e)}return r}function Fb(e){if(!A(e))return!1;let{parent:t}=e;if(M(t)&&t.property===e&&!t.computed){let e=t.parent;if(Ce(e)&&e.left===t)return!0}return Se(t)&&t.key===e&&!t.computed&&!t.shorthand&&(Je(t.parent)||Ye(t.parent))||Be(t)&&t.key===e&&!t.computed||xe(t)&&t.exported===e&&t.local!==e?!0:(ke(t)||Ae(t))&&t.key===e&&!t.computed}function Ib(e){if(!A(e))return!1;let{parent:t}=e;return Se(t)&&t.key===e&&!t.computed&&!t.shorthand&&(Je(t.parent)||Ye(t.parent))}function Lb(e){if(e.type===`ImportBinding`){let{parent:t}=e;if(t!==null&&_e(t)&&ve(t.source))return t.source.value}if(e.type===`Variable`){let{node:t}=e;if(k(t)&&t.init!==null&&nt(t.init)){let[e]=t.init.arguments;if(e!==void 0&&ve(e))return e.value}}}function Rb(e){let t=Lb(e);return t!==void 0&&!t.includes(`node_modules`)&&(t.startsWith(`.`)||t.startsWith(`/`))}function zb(e,t){return e===!1?!1:e!==`internal`||Rb(t)}function Bb(e){return e.defs.length===1&&e.defs[0]?.type===`ClassName`}const Vb=/^(?:[#$./]|[~@]\/)/u;function Hb(e){return!Vb.test(e)}function Ub(e){if(e?.type!==`ImportBinding`)return!1;let{parent:t}=e;return t===null||!_e(t)||!ve(t.source)?!1:Hb(t.source.value)}function Wb(e){if(e.type===`Identifier`)return e;if(e.type===`TSQualifiedName`)return Wb(e.left)}function Gb(e,t){if(e.type===`TSImportType`)return Hb(e.source.value);if(e.type!==`TSTypeReference`)return!1;let n=Wb(e.typeName);if(n===void 0)return!1;let r=E(t.getScope(n),n.name)?.defs[0];return Ub(r)}function Kb(e){let{parent:t}=e;if(k(t)&&t.init===e)return le(t.id)?.typeAnnotation;if((t.type===`TSAsExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`)&&t.expression===e)return t.typeAnnotation}function qb(e){if(j(e))return e;if(M(e))return qb(e.object);if(We(e))return qb(e.left)}function Jb(e,t){let{parent:n}=e,r;if(M(n)&&n.property===e&&!n.computed?r=n.object:We(n)&&n.right===e&&(r=n.left),r===void 0)return!1;let i=j(r)?r:qb(r);return i===void 0||!A(i)?!1:E(t.getScope(e),i.name)?.defs[0]?.type===`ImportBinding`}function Yb(e,t){let n=e.parent;if(!ye(n))return!1;let{callee:r}=n;if(!j(r))return!1;let i=E(t.getScope(r),r.name)?.defs[0];return Ub(i)}function Xb(e,t){if(Jb(e,t))return!0;if(!Ib(e))return!1;let n=e.parent.parent;if(n===null||!Je(n))return!1;let r=Kb(n);return r!==void 0&&Gb(r,t)||Yb(n,t)}function Zb(e,t,n){return e?t:n}const Qb=/[.+^${}()|[\]\\]/gu,$b=/^\/(?<first>.+)\/(?<second>[dgimsuvy]*)$/u,ex=new WeakMap,tx=new WeakMap;function nx(e){return e===e.toUpperCase()}function rx(e){return nx(e.charAt(0))}function ix(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ax(e){return e.charAt(0).toLowerCase()+e.slice(1)}function ox(e){return e.includes(`u`)||e.includes(`v`)?e:`${e}u`}function sx(e){return e===void 0?3:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:3}function cx(e,t,n){return e===3||t===3||e===2||t===2?e!==t:e===0&&t===1||e===1&&t===1&&n===0}function lx(e){if(e.length<2)return[e];let t=[],n=0,r=sx(e.codePointAt(0));for(let i=1;i<e.length;i+=1){let a=sx(e.codePointAt(i)),o=sx(e.codePointAt(i+1));cx(r,a,o)&&(t.push(e.slice(n,i)),n=i),r=a}return t.push(e.slice(n)),t}const ux=/\$\d+/gu;function dx(e){let t=e.match(ux);if(t===null)return 0;let n=0;for(let e of t){let t=Math.trunc(Number(e.slice(1)));t>n&&(n=t)}return n}function fx(e){let t=dx(e);if(t===0)return[];let n=Array.from({length:t});for(let e=1;e<=t;e+=1)n[e-1]=RegExp(`\\$${e}`,`gu`);return n}function px(e){let t=[],n=[],r=0;for(let[i,a]of e)a&&(t[r]=ax(i),n[r]=ix(i),r+=1);return{lowerFirst:t.toSorted((e,t)=>e.localeCompare(t)),upperFirst:n.toSorted((e,t)=>e.localeCompare(t))}}function mx(e,t){if(e.startsWith(`/`)){let n=$b.exec(e);if(n?.groups!==void 0)return{matcher:{original:e,pattern:RegExp(`^${n.groups.first}$`,ox(n.groups.second??``)),replacement:t,replacementPatterns:fx(t)},type:`pattern`}}if(e.includes(`*`)||e.includes(`?`)){let n=e.replaceAll(Qb,String.raw`\$&`).replaceAll(`*`,`(.*)`).replaceAll(`?`,`(.)`),r=0,i=t.replaceAll(`*`,()=>`$${++r}`);return{matcher:{original:e,pattern:RegExp(`^${n}$`,`u`),replacement:i,replacementPatterns:fx(i)},type:`pattern`}}return{original:e,replacement:t,type:`exact`}}function hx(e,t){let n=t.exactMatchers.get(e);if(n!==void 0)return{matchedWord:e,replacement:n,shorthand:e};for(let n of t.matchers){let t=e.match(n.pattern);if(t===null)continue;let r=n.replacement,i=1;for(let e of n.replacementPatterns)r=r.replaceAll(e,t[i]??``),i+=1;return{matchedWord:e,replacement:r,shorthand:n.original}}}function gx(e,t){if(t.ignoreExact.has(e))return!0;for(let n of t.ignoreMatchers)if(n.pattern.test(e))return!0;return!1}function _x(e,t){return e===`internal`||typeof e==`boolean`?e:t}function vx(e){if(!x(e))return;let t={};for(let[n,r]of Object.entries(e))typeof r==`boolean`&&(t[n]=r);return t}function yx(e,t){return typeof e==`boolean`?e:t}function bx(e){let t=x(e)?e:void 0,n=vx(t?.allowList),r=Zb(yx(t?.extendDefaultAllowList,!0),n===void 0?fb:{...fb,...n},n??{});return new Map(Object.entries(r))}function xx(e){if(!x(e))return{};let t={};for(let[n,r]of Object.entries(e)){if(r===!1){t[n]=!1;continue}if(!x(r))continue;let e={};for(let[t,n]of Object.entries(r))typeof n==`boolean`&&(e[t]=n);t[n]=e}return t}function Sx(e){let t=x(e)?e:void 0,n=yx(t?.extendDefaultReplacements,!0),r=xx(t?.replacements),i=new Set([...Object.keys(db),...Object.keys(r)]),a=[];for(let e of i){let t=r[e],i=n?db[e]??{}:{},o=t===!1?{}:Zb(t===void 0,i,{...i,...t}),s=new Map(Object.entries(o));ex.set(s,px(s)),a.push([e,s])}return new Map(a)}function Cx(e){let t=x(e)?e:void 0,n=[];for(let e of pb)n.push(e);if(Array.isArray(t?.ignore))for(let e of t.ignore)(y(e)||e instanceof RegExp)&&n.push(e);return n.map(e=>e instanceof RegExp?e:new RegExp(e,`u`))}function wx(e){let t=x(e)?e:void 0,n=new Set(ub);if(!S(t?.allowPropertyAccess))return n;for(let e of t.allowPropertyAccess)n.add(e);return n}function Tx(e){let t=x(e)?e:void 0,n=new Map,r=new Set,i=[],a=[],o=C(t?.shorthands)?t.shorthands:{},s={...lb,...o};for(let[e,t]of Object.entries(s)){let r=mx(e,t);r.type===`exact`?n.set(r.original,r.replacement):a.push(r.matcher)}if(S(t?.ignoreShorthands))for(let e of t.ignoreShorthands){let t=mx(e,``);t.type===`exact`?r.add(t.original):i.push(t.matcher)}return{exactMatchers:n,ignoreExact:r,ignoreMatchers:i,ignoredIdentifiers:new Map,matchers:a,replacementsByIdentifier:new Map}}function Ex(e){let t=x(e)?e:void 0;return{allowList:bx(t),allowPropertyAccess:wx(t),checkDefaultAndNamespaceImports:_x(t?.checkDefaultAndNamespaceImports,`internal`),checkFilenames:yx(t?.checkFilenames,!0),checkProperties:yx(t?.checkProperties,!1),checkShorthandImports:_x(t?.checkShorthandImports,`internal`),checkShorthandProperties:yx(t?.checkShorthandProperties,!0),checkVariables:yx(t?.checkVariables,!0),ignore:Cx(t),nameReplacements:new Map,replacements:Sx(t),shorthandConfiguration:Tx(t)}}function Dx(e){return{...e,nameReplacements:new Map,shorthandConfiguration:{...e.shorthandConfiguration,ignoredIdentifiers:new Map,replacementsByIdentifier:new Map}}}function Ox(e){if(!x(e))return Ex(e);let t=tx.get(e);if(t!==void 0)return Dx(t);let n=Ex(e);return tx.set(e,n),Dx(n)}function kx(e,t){if(nx(e)||t.allowList.get(e)===!0)return[];let n=t.replacements.get(ax(e))??t.replacements.get(e)??t.replacements.get(ix(e));if(n===void 0)return[];let r=ex.get(n);return r===void 0?[]:rx(e)?r.upperFirst:r.lowerFirst}function Ax(e,t){let n=t.replacementsByIdentifier.get(e);if(n!==void 0)return n===!1?void 0:n;if(e.length===0)return;let r=lx(e),i=[];for(let e of r){let n=hx(e,t);n!==void 0&&i.push(n)}if(i.length===0){t.replacementsByIdentifier.set(e,!1);return}let a=``,o=0;for(let e of r){let t=i[o];if(t?.matchedWord===e){a+=t.replacement,o+=1;continue}a+=e}let s={matches:i,replaced:a};return t.replacementsByIdentifier.set(e,s),s}function jx(e,t){let n=t.ignoredIdentifiers.get(e);if(n!==void 0)return n;let r=gx(e,t);if(!r){let n=Ax(e,t);r=n!==void 0&&n.matches.length>0&&n.matches.every(e=>gx(e.matchedWord,t))}return t.ignoredIdentifiers.set(e,r),r}function Mx(e,t,n){if(n.has(e))return!0;for(let e of t.matches)if(!n.has(e.matchedWord))return!1;return t.matches.length>0}function Nx(e,t,n=3){let r=`${n}\0${e}`,i=t.nameReplacements.get(r);if(i!==void 0)return i;let a=Px(e,t,n);return t.nameReplacements.set(r,a),a}function Px(e,t,n){if(t.allowList.get(e)===!0||t.ignore.some(t=>t.test(e)))return{total:0};let r=Ax(e,t.shorthandConfiguration);if(r!==void 0)return jx(e,t.shorthandConfiguration)?{total:0}:{samples:[r.replaced],total:1};if(nx(e))return{total:0};let i=kx(e,t);if(i.length>0)return{samples:i.slice(0,n),total:i.length};let a=e.split(mb).filter(Boolean),o=!1,s=[],c=0;for(let e of a){let n=kx(e,t);if(n.length>0){o=!0,s[c++]=n;continue}s[c++]=[e]}if(!o)return{total:0};let l=s.reduce((e,t)=>e*t.length,1);return{samples:Fx(s,l,n).map(e=>e.join(``)),total:l}}function Fx(e,t,n){let r=Math.min(t,n),i=Array.from({length:r},(t,n)=>{let r=n,i=[];for(let t=e.length-1;t>=0;--t){let n=e[t]??[],a=r%n.length;r=(r-a)/n.length;let o=n[a];o!==void 0&&i.unshift(o)}return i});for(let e of i)for(let t=e.length-1;t>0;--t){let n=e[t]??``;gb.test(n)&&e[t-1]?.endsWith(n)===!0&&e.splice(t,1)}return i}function Ix(e,t){let n=t.replacements.get(e);if(n===void 0)return!1;let r=ex.get(n);return r!==void 0&&r.lowerFirst.length>0}function Lx(e,t,n){let{samples:r=[],total:i}=t;if(i===1)return{data:{discouragedName:e,nameTypeText:n,replacement:r[0]??``},messageId:ob};let a=r.map(e=>`\`${e}\``).join(`, `),o=i-r.length;return o>0&&(a+=`, ... (${o>99?`99+`:o} more omitted)`),{data:{discouragedName:e,nameTypeText:n,replacementsText:a},messageId:sb}}function Rx(e){return function(t,n){return n.every(n=>{let r=e.get(n);return r===void 0||!r.has(t)})}}function zx(e){let{parent:t}=e;return M(t)&&t.property===e&&!t.computed||We(t)&&t.right===e}function Bx(e,t,n,r){r({...Lx(e.name,{samples:[t],total:1},n?`property`:`variable`),node:e})}function Vx(e,t,n){return Ab(t)&&!zb(n.checkDefaultAndNamespaceImports,e)||Eb(t)&&!zb(n.checkShorthandImports,e)?!0:!n.checkShorthandProperties&&Ob(t)}function Hx(e){if(e.name!==`plr`)return;let[t]=e.defs;if(t?.type!==`Variable`||!k(t.node)||t.node.init===null)return;let{init:n}=t.node;if(M(n)&&!n.computed&&j(n.object)&&n.object.name===`Players`&&j(n.property)&&n.property.name===`LocalPlayer`)return`localPlayer`}function Ux(e,t,n,r){let i=[],a=0,o=0;for(let s of e){let e=Cb(s,t,n);if(e!==void 0){if(e!==s&&Ix(s,r)){o+=1;continue}e.length>0&&(i[a++]=e)}}return{droppedDiscouraged:o,safeSamples:i}}function Wx(e,t,n){let r=e.type===`Variable`&&k(e.node)&&e.node.init===null,i=e.type===`Parameter`&&t.scope.type===`function`&&t.scope.block.type===`ArrowFunctionExpression`,a=r||i;return(e,t)=>!(!n(e,t)||a&&e===`arguments`)}function Gx(e,t,n,r,i,a,o){for(let e of i)a.has(e)||a.set(e,new Set),a.get(e)?.add(r);e({...t,fix(e){return Pb(n,r,e)},node:o})}function Kx(e,t,n,r,i){let[a]=e.defs;if(a===void 0)return;let o=a.name;if(!j(o)||Vx(a,o,t))return;let s=Wx(a,e,r),c=Hx(e),l=c===void 0?Nx(e.name,t):{samples:[c],total:1};if(l.total===0||!l.samples)return;let{references:u}=e,d=[...u.map(e=>e.from),e.scope],{droppedDiscouraged:f,safeSamples:p}=Ux(l.samples,d,s,t),m=p.length>0?p:l.samples,h=b(l.samples.length)&&l.samples.length===l.total?Math.max(0,l.total-f):l.total,g=e.name===`fn`&&h>1?m.map(e=>e===`function_`?`function`:e):m,_=Lx(o.name,{samples:g,total:h},`variable`);if(h===1&&p.length===1&&Mb(e)){let[t]=p;if(t!==void 0){Gx(i,_,e,t,d,n,o);return}}i({..._,node:o})}function qx(e,t){if(!Bb(e)){t(e);return}if(e.scope.type===`class`){let[n]=e.defs;if(n===void 0){t(e);return}let r=n.name;if(!j(r)){t(e);return}t(e)}}function Jx(e,t){for(let n of xb(e))for(let e of n.variables)qx(e,t)}function Yx(e,t,n,r){let i=Fb(e),a=zx(e);(i||a)&&(Xb(e,r)||Xx(e,i,a,t,n)||t.checkProperties&&i&&Zx(e,t,n))}function Xx(e,t,n,r,i){let a=Ax(e.name,r.shorthandConfiguration);return a===void 0||!(t||n)?!1:(jx(e.name,r.shorthandConfiguration)||!r.checkShorthandProperties||n&&Mx(e.name,a,r.allowPropertyAccess)||Bx(e,a.replaced,!0,i),!0)}function Zx(e,t,n){let r=Nx(e.name,t);if(r.total===0)return;let i=Lx(e.name,r,`property`),a=Qx(e,r.samples);if(a!==void 0){n({...i,fix(t){return t.replaceText(e,a)},node:e});return}n({...i,node:e})}function Qx(e,t){if(t?.length!==1||!Ib(e))return;let[n]=t,{parent:r}=e;if(n!==void 0&&Se(r)&&ve(r.value)&&bb(n))return n}const $x=_(`prevent-abbreviations`,`naming`,{create(e){let t=Ox(e.options[0]),n=e.physicalFilename,r=new WeakMap,i=Rx(r),{sourceCode:a}=e;function o(n){Kx(n,t,r,i,e.report)}return{Identifier(n){!A(n)||n.name===`__proto__`||Yx(n,t,e.report,a)},JSXOpeningElement({name:n}){if(!(t.checkVariables&&he(n)&&rx(n.name)))return;let r=Nx(n.name,t);if(r.total===0)return;let i=Lx(n.name,r,`variable`);e.report({...i,node:n})},"Program:exit"(r){if(t.checkFilenames&&n!==`<input>`&&n!==`<text>`){let i=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`)),a=n.slice(i+1),o=a.lastIndexOf(`.`),s=o===-1?``:a.slice(o),c=Nx(o===-1?a:a.slice(0,o),t);if(c.total>0&&c.samples){let t=c.samples.map(e=>`${e}${s}`);e.report({...Lx(a,{samples:t,total:c.total},`filename`),node:r})}}t.checkVariables&&Jx(a.getScope(r),o)}}},meta:{docs:{description:`Prevent abbreviations.`,recommended:!1},fixable:`code`,messages:{[ob]:`The {{nameTypeText}} \`{{discouragedName}}\` should be named \`{{replacement}}\`. ${cb}`,[sb]:`Please rename the {{nameTypeText}} \`{{discouragedName}}\`. Suggested names are: {{replacementsText}}. ${cb}`},schema:[{additionalProperties:!1,properties:{allowList:{additionalProperties:{type:`boolean`},default:fb,defaultLabel:`default allow list`,description:`Names that should be allowed even when they match a discouraged abbreviation.`,type:`object`},allowPropertyAccess:{default:ub,description:`Property names that may keep abbreviated member access.`,items:{type:`string`},type:`array`},checkDefaultAndNamespaceImports:{default:`internal`,description:`Whether default and namespace import local names should be checked.`,enum:[!1,!0,`internal`]},checkFilenames:{default:!0,description:`Whether file names should be checked for abbreviations.`,type:`boolean`},checkProperties:{default:!1,description:`Whether object, member, and JSX property names should be checked.`,type:`boolean`},checkShorthandImports:{default:`internal`,description:`Whether renamed shorthand imports should be checked.`,enum:[!1,!0,`internal`]},checkShorthandProperties:{default:!0,description:`Whether shorthand object property names should be checked.`,type:`boolean`},checkVariables:{default:!0,description:`Whether variable, function, class, and component names should be checked.`,type:`boolean`},extendDefaultAllowList:{default:!0,description:`Merge configured allowList entries with the default allow list.`,type:`boolean`},extendDefaultReplacements:{default:!0,description:`Merge configured replacements with the default replacement map.`,type:`boolean`},ignore:{default:pb,description:`Names or regular expression patterns that should be ignored.`,items:{type:`string`},type:`array`},ignoreShorthands:{default:[],description:`Shorthand names that should not be reported.`,items:{type:`string`},type:`array`},replacements:{additionalProperties:{oneOf:[{enum:[!1]},{additionalProperties:{type:`boolean`},type:`object`}]},default:db,defaultLabel:`default replacement map`,description:`Replacement suggestions for discouraged names.`,type:`object`},shorthands:{additionalProperties:{type:`string`},default:lb,defaultLabel:`default shorthands`,description:`Shorthand names and the full names they should expand to.`,type:`object`}},type:`object`}],type:`suggestion`}}),eS=/^use[A-Z0-9].*$/u;function tS(e){return eS.test(e)}function nS(e){if(e.id!==null)return e.id.name}function rS(e){return e.id.type===`Identifier`?e.id.name:void 0}function iS(e){let t=nS(e);return t!==void 0&&tS(t)}function aS({parent:e}){if(e.type!==`VariableDeclarator`)return!1;let t=rS(e);return t!==void 0&&tS(t)}function oS(e,t){let n=e.get(t);if(n!==void 0&&n.length!==0)return n.at(-1)}function sS(e){for(let t=e.defs.length-1;t>=0;--t){let n=e.defs[t];if(n?.node.type===`VariableDeclarator`&&n.node.init?.type===`ArrayExpression`)return n.node.init}}function cS(e){for(let t=e.defs.length-1;t>=0;--t){let n=e.defs[t];if(n?.node.type===`VariableDeclarator`&&n.node.init?.type===`ObjectExpression`)return!0}return!1}function lS(e,t,n,r){let i=E(e.getScope(t),n);if(i!==void 0){let e=sS(i);if(e!==void 0)return e}return oS(r,n)}function uS(e,t,n){if(e.argument.type===`Identifier`){let r=lS(t,e,e.argument.name,n);return r===void 0?1:dS(r,t,n)}return e.argument.type===`ArrayExpression`?dS(e.argument,t,n):1}function dS(e,t,n){let r=0;for(let i of e.elements){if(i===null){r+=1;continue}if(i.type===`SpreadElement`){r+=uS(i,t,n);continue}r+=1}return r}function fS(e,t){let n=E(e.getScope(t),t.name);return n!==void 0&&cS(n)}function pS(e){let t=rS(e);if(t!==void 0&&e.init?.type===`ArrayExpression`)return{init:e.init,name:t}}function mS(e,t){let n=pS(e);if(n===void 0)return;let{init:r,name:i}=n,a=t.get(i)??[];a.push(r),t.set(i,a)}function hS(e,t){let n=pS(e);if(n===void 0)return;let{name:r}=n,i=t.get(r);i!==void 0&&i.length!==0&&(i.pop(),i.length===0&&t.delete(r))}const gS=_(`react-hooks-strict-return`,`react`,{create(e){let{sourceCode:t}=e,n=new Map,r=0;function i(e){iS(e)&&(r+=1)}function a(e){iS(e)&&--r}function o(e){aS(e)&&(r+=1)}function s(e){aS(e)&&--r}function c(t){e.report({data:{count:`2`},messageId:`tooManyReturnValues`,node:t})}function l(e){if(r!==0&&e.argument!==null&&e.argument.type!==`ObjectExpression`){if(e.argument.type===`Identifier`){if(fS(t,e.argument))return;let r=lS(t,e,e.argument.name,n);if(r===void 0)return;dS(r,t,n)>2&&c(e);return}e.argument.type===`ArrayExpression`&&dS(e.argument,t,n)>2&&c(e)}}return{ArrowFunctionExpression:o,"ArrowFunctionExpression:exit":s,FunctionDeclaration:i,"FunctionDeclaration:exit":a,FunctionExpression:i,"FunctionExpression:exit":a,ReturnStatement:l,VariableDeclarator(e){mS(e,n)},"VariableDeclarator:exit"(e){hS(e,n)}}},meta:{docs:{description:`Restrict React hooks to object returns or short tuples.`},messages:{tooManyReturnValues:`Hook returns more than {{count}} values. Return an object with named properties instead.`},schema:[],type:`suggestion`}});function _S(e){let{parent:t}=e;if(t.type!==`ObjectExpression`)return!1;let{parent:n}=t;return n.type===`TSSatisfiesExpression`?!0:n.type===`CallExpression`||n.type===`NewExpression`?n.arguments.some(e=>e===t):!1}const vS=_(`require-async-suffix`,`naming`,{create(e){let t=e.options[0]?.except,n=t===void 0?new Set:new Set(t);function r(t){t.name.endsWith(`Async`)||n.has(t.name)||e.report({messageId:`missingAsyncSuffix`,node:t})}return{FunctionDeclaration(e){!e.async||e.id===null||r(e.id)},MethodDefinition(e){!e.value.async||e.key.type!==`Identifier`||r(e.key)},Property(e){!e.method||e.value.type!==`FunctionExpression`||!e.value.async||e.key.type===`Identifier`&&(_S(e)||r(e.key))},PropertyDefinition(e){(e.value?.type===`ArrowFunctionExpression`||e.value?.type===`FunctionExpression`)&&(!e.value.async||e.key.type!==`Identifier`||r(e.key))},VariableDeclarator(e){e.id.type===`Identifier`&&(e.init?.type===`ArrowFunctionExpression`||e.init?.type===`FunctionExpression`)&&e.init.async&&r(e.id)}}},meta:{docs:{description:`Require async function names to end with Async.`},messages:{missingAsyncSuffix:`Async functions must have names that end with Async.`},schema:[{additionalProperties:!1,properties:{except:{items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}});function yS(e){if(!(x(e)&&`classes`in e&&x(e.classes)))return new Map;let{classes:t}=e,n=new Map;for(let[e,r]of Object.entries(t))y(r)&&n.set(e,r);return n}function bS(e){return e?.type===`module`||e?.type===`global`}function xS(e){if(e.type===`ImportDefaultSpecifier`)return e.local.name;if(e.type===`ImportSpecifier`){if(e.imported.type===`Identifier`)return e.imported.name;if(y(e.imported.value))return e.imported.value}}function SS(e,t,n){if(e.callee.type===`Identifier`){let r=t.get(e.callee.name);if(r===void 0)return;let i=n.get(r);return i===void 0?void 0:{className:r,importSource:i}}if(e.callee.type===`MemberExpression`&&e.callee.property.type===`Identifier`){let t=e.callee.property.name,r=n.get(t);return r===void 0?void 0:{className:t,importSource:r}}}function CS(e,t,n){if(!y(e.source.value))return;let r=e.source.value;for(let[i,a]of t)if(a===r)for(let t of e.specifiers)xS(t)===i&&n.set(t.local.name,i)}const wS=_(`require-module-level-instantiation`,`roblox`,{create(e){let{sourceCode:t}=e,n=yS(e.options[0]);if(n.size===0)return{};let r=new Map;return{ImportDeclaration(e){CS(e,n,r)},NewExpression(i){let a=SS(i,r,n);a!==void 0&&(bS(t.getScope(i))||e.report({data:{className:a.className,importSource:a.importSource},messageId:`mustBeModuleLevel`,node:i}))}}},meta:{docs:{description:`Require configured classes to be instantiated at module level only.`},messages:{mustBeModuleLevel:`'{{className}}' from '{{importSource}}' must be instantiated at module level only.`},schema:[{additionalProperties:!1,properties:{classes:{additionalProperties:{type:`string`},description:`Class names mapped to the import source that must be instantiated at module scope.`,type:`object`}},type:`object`}],type:`problem`}}),TS=[{allowAsync:!1,name:`useEffect`},{allowAsync:!1,name:`useLayoutEffect`},{allowAsync:!1,name:`useInsertionEffect`}];function ES(e){return x(e)&&y(e.name)&&typeof e.allowAsync==`boolean`}function DS(e){if(!x(e))return{environment:`roblox-ts`,hooks:TS};let t=fr(e.environment)?e.environment:`roblox-ts`,n=e.hooks;if(!Array.isArray(n))return{environment:t,hooks:TS};let r=[];for(let e of n)ES(e)&&r.push(e);return r.length===0?{environment:t,hooks:TS}:{environment:t,hooks:r}}function OS(e){for(let t of e.defs){let{node:e}=t;if(e.type===`FunctionDeclaration`)return{isAsync:e.async,node:e,type:`function-declaration`};if(e.type===`VariableDeclarator`){if(e.init===null)continue;if(e.init.type===`ArrowFunctionExpression`)return{isAsync:e.init.async,node:e.init,type:`arrow`};if(e.init.type===`FunctionExpression`)return{isAsync:e.init.async,node:e.init,type:`function-expression`}}}}function kS(e,t){let n=E(e.getScope(t),t.name);if(n===void 0)return!1;for(let e of n.defs){let{node:t}=e;if(t.type!==`VariableDeclarator`||t.init?.type!==`CallExpression`)continue;let n=L(t.init);if(n===`useCallback`||n===`useMemo`)return!0}return!1}const AS=_(`require-named-effect-functions`,`react`,{create(e){let{environment:t,hooks:n}=DS(e.options[0]),r=new Map(n.map(e=>[e.name,e.allowAsync])),i=new Set(r.keys()),a=t===`roblox-ts`;function o(e){let t=r.get(e);return typeof t==`boolean`&&t}function s(t,n,r){e.report({data:{hook:t},messageId:r,node:n})}function c(t,n,r){let i=E(e.sourceCode.getScope(r),r.name);if(i===void 0){kS(e.sourceCode,r)&&s(t,n,`identifierReferencesCallback`);return}let a=OS(i);if(a===void 0){kS(e.sourceCode,r)&&s(t,n,`identifierReferencesCallback`);return}l(t,n,a)}function l(e,t,n){if(n.type===`arrow`){n.isAsync&&!o(e)?s(e,t,`identifierReferencesAsyncArrow`):n.isAsync||s(e,t,`identifierReferencesArrow`);return}if(n.type===`function-expression`){u(e,t,n.node);return}n.isAsync&&!o(e)&&s(e,t,`identifierReferencesAsyncFunction`)}function u(e,t,n){n.id===null?s(e,t,`anonymousFunction`):a&&s(e,t,`functionExpression`)}function d(e,t,n){let r=n.id!==null;r&&n.async?s(e,t,`asyncFunctionExpression`):r&&a?s(e,t,`functionExpression`):!r&&n.async?s(e,t,`asyncAnonymousFunction`):r||s(e,t,`anonymousFunction`)}return{CallExpression(e){let t=L(e);if(t===void 0||!i.has(t))return;let[n]=e.arguments;if(n!==void 0){if(n.type===`Identifier`){c(t,e,n);return}if(n.type===`ArrowFunctionExpression`){n.async?s(t,e,`asyncArrowFunction`):s(t,e,`arrowFunction`);return}n.type===`FunctionExpression`&&d(t,e,n)}}}},meta:{docs:{description:`Enforce named effect functions for better debuggability. Prevents inline arrow functions in useEffect and similar hooks.`,recommended:!1},messages:{anonymousFunction:`Anonymous function passed to {{hook}}. debug.info returns empty string for anonymous functions, making stack traces useless for debugging. Extract to: function effectName() { ... } then pass effectName.`,arrowFunction:`Arrow function passed to {{hook}}. Arrow functions have no debug name and create new instances each render. Extract to: function effectName() { ... } then pass effectName.`,asyncAnonymousFunction:`Async anonymous function in {{hook}}. Two issues: (1) no debug name makes stack traces useless, (2) async effects require cancellation logic for unmount. Extract to: async function effectName() { ... } with cleanup.`,asyncArrowFunction:`Async arrow function in {{hook}}. Two issues: (1) arrow functions have no debug name, (2) async effects require cancellation logic. Extract to: async function effectName() { ... } with cleanup.`,asyncFunctionDeclaration:`Async function declaration passed to {{hook}}. Async effects require cancellation logic to handle component unmount. Implement cleanup or set allowAsync: true if cancellation is handled.`,asyncFunctionExpression:`Async function expression in {{hook}}. Async effects require cancellation logic for unmount. Extract to a named async function declaration with cleanup, then pass the reference.`,functionExpression:`Function expression passed to {{hook}}. Function expressions create new instances each render, breaking referential equality. Extract to: function effectName() { ... } at module or component top-level.`,identifierReferencesArrow:`{{hook}} receives identifier pointing to arrow function. Arrow functions have no debug name and lack referential stability. Convert to: function effectName() { ... } then pass effectName.`,identifierReferencesAsyncArrow:`{{hook}} receives identifier pointing to async arrow function. Two issues: (1) no debug name, (2) async effects require cancellation logic. Convert to: async function effectName() { ... } with cleanup.`,identifierReferencesAsyncFunction:`{{hook}} receives identifier pointing to async function. Async effects require cancellation logic for unmount. Implement cleanup or set allowAsync: true if cancellation is handled.`,identifierReferencesCallback:`{{hook}} receives identifier from useCallback/useMemo. These hooks return new references when dependencies change, causing unexpected effect re-runs. Use a stable function declaration: function effectName() { ... }`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`Environment mode: 'roblox-ts' only allows identifiers, 'standard' allows both identifiers and named function expressions`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:[...TS],description:`Hook configuration objects with name and allowAsync settings.`,items:{additionalProperties:!1,properties:{allowAsync:{description:`Whether async functions are allowed for this hook`,type:`boolean`},name:{description:`Hook name to check`,type:`string`}},required:[`name`,`allowAsync`],type:`object`},type:`array`}},type:`object`}],type:`problem`}});p({"alternatives?":p(`string[]`).readonly().or(`undefined`),closer:p(`string[]`).readonly().or(`string`),opener:`string`,"openerAlternatives?":p(`string[]`).readonly().or(`undefined`),"platform?":p(`"roblox" | undefined`),"requireSync?":`boolean | undefined`,"yieldingFunctions?":p(`string[]`).readonly().or(`undefined`)}).readonly();const jS=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]),MS=[`task.wait`,`wait`,`*.WaitForChild`,`*.*Async`];function NS(e,t){for(let n of t){let t=!1;for(let r of n)if(r.index===e.index){t=!0;break}if(!t)return!1}return!0}function PS(e,t){return t.filter(t=>t.some(t=>t.index===e.index))}function FS({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`){let t=e.object.type===`Identifier`?e.object.name:void 0,n=e.property.type===`Identifier`?e.property.name:void 0;if(t!==void 0&&n!==void 0)return`${t}.${n}`}}function IS(e){let t=[],n=0;if(S(e.closer))for(let r of e.closer)t[n++]=r;else y(e.closer)&&(t[n++]=e.closer);if(e.alternatives)for(let r of e.alternatives)t[n++]=r;return t}function LS(e){let t=[e.opener];if(e.openerAlternatives){let n=1;for(let r of e.openerAlternatives)t[n++]=r}return t}function RS(e){return e.length===0?`configured opener`:e.length===1?e[0]??`configured opener`:e.join(`' or '`)}function zS(e){return e?jS.has(e.type):!1}function BS(e){return e?.type===`SwitchStatement`}function VS(e,t){if(e.type!==`Identifier`)return;let n=t;for(;n;){if(n.type===`LabeledStatement`&&n.label.name===e.name)return n.body;n=n.parent??void 0}}function HS(e,t){let n=e.label?VS(e.label,e.parent):void 0;if(n)return zS(n)?n:void 0;let r=e.parent;for(;r;){if(zS(r))return r;if(t&&BS(r))return;r=r.parent??void 0}}function US(e){return HS(e,!0)}function WS(e){return HS(e,!1)}function GS(e){return{...e,loopAncestors:[...e.loopAncestors]}}const KS=_(`require-paired-calls`,`general`,{create(e){let[t]=e.options,n={allowConditionalClosers:t?.allowConditionalClosers??!1,allowMultipleOpeners:t?.allowMultipleOpeners??!0,maxNestingDepth:t?.maxNestingDepth??0,pairs:t?.pairs??[]},r=n.pairs.length===0?[{closer:`debug.profileend`,opener:`debug.profilebegin`,platform:`roblox`,requireSync:!0,yieldingFunctions:[...MS]}]:n.pairs,i={...n.allowConditionalClosers===void 0?{}:{allowConditionalClosers:n.allowConditionalClosers},...n.allowMultipleOpeners===void 0?{}:{allowMultipleOpeners:n.allowMultipleOpeners},...n.maxNestingDepth===void 0?{}:{maxNestingDepth:n.maxNestingDepth},pairs:r},a=[],o=[],s=0,c=[],l=!1,u=!1,d=[],f=new Map,p=new Map,m=new Map;function h(e){if(m.has(e))return m.get(e)??[];let t=[],n=0;for(let r of i.pairs){if(!LS(r).includes(e))continue;let i=IS(r);for(let e of i)t.includes(e)||(t[n++]=e)}return m.set(e,t),t}function g(){return d.length>0?d.at(-1):{asyncContext:!1,currentFunction:void 0,hasEarlyExit:!1,inCatch:!1,inConditional:!1,inFinally:!1,inLoop:!1,inTry:!1}}function _(e){let t=g();d.push({...t,...e})}function v(){d.pop()}function ee(e){let t=d.at(-1);t&&(d[d.length-1]={...t,...e})}function te(){return a.map(GS)}function y(e){f.set(e,te())}function b(e,t){return i.pairs.find(n=>(t?LS(n):IS(n)).includes(e))}function x(e,t){return t.platform===`roblox`&&(t.yieldingFunctions??MS).some(t=>{if(t.startsWith(`*.`)){let n=t.slice(2);return e.endsWith(`.${n}`)}return e===t})}function ne(e){let t=IS(e);return t.length===1?t[0]??`closer`:t.join(`' or '`)}function S(t,n){e.report({data:{closer:ne(t.config),opener:t.opener,paths:n},messageId:`unpairedOpener`,node:t.node})}function C(e){a.length=0;for(let t of e)a.push({...t})}function re(e){let t=p.get(e)??[];t.push(te()),p.set(e,t)}function w(e,t,n){for(let r of e){let e=PS(r,t);e.length<=0||e.length>=t.length||i.allowConditionalClosers===!1&&S(r,n)}}function T(e){(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`)&&(c.push([...a]),a.length=0,l=!1,u=!1,_({asyncContext:e.async,currentFunction:e,hasEarlyExit:!1,inCatch:!1,inConditional:!1,inFinally:!1,inLoop:!1,inTry:!1}))}function E(){if(a.length>0)for(let e of a)S(e,`function exit`);let e=c.pop();if(e){a.length=0;for(let t of e)a.push(t)}else a.length=0;v()}function ie(e){e.type===`IfStatement`&&(_({inConditional:!0}),y(e))}function ae(e){if(e.type!==`IfStatement`)return;v();let t=f.get(e),n=p.get(e);if(t&&n&&n.length>0){let r=e.alternate!==null;for(let e of n)for(let n of e)t.some(({index:e})=>e===n.index)||S(n,`conditional branch`);if(r){w(t,n,`not all execution paths`),a.length=0;for(let e of t)NS(e,n)&&a.push(e)}else C(t)}f.delete(e),p.delete(e)}function oe(e){let{parent:t}=e;if(t?.type===`IfStatement`){re(t);let e=f.get(t);if(!e)return;C(e)}}function se(e){let{parent:t}=e;t?.type===`IfStatement`&&re(t)}function D(e){e.type===`TryStatement`&&y(e)}function ce(t){if(t.type!==`TryStatement`)return;let n=f.get(t),r=p.get(t);if(t.finalizer){f.delete(t),p.delete(t);return}if(n&&r&&r.length>0){for(let t of n){let n=r.filter(e=>e.some(e=>e.index===t.index));if(n.length>0&&n.length<r.length&&i.allowConditionalClosers===!1){let n=IS(t.config),r=n.length===1?n[0]??`closer`:n.join(`' or '`);e.report({data:{closer:r,opener:t.opener,paths:`not all execution paths`},messageId:`unpairedOpener`,node:t.node})}}a.length=0;for(let e of n)NS(e,r)&&a.push(e)}f.delete(t),p.delete(t)}function O(){_({inTry:!0})}function k(e,t){if(e.type!==t)return;let{parent:n}=e;if(n.type===`TryStatement`){re(n);let e=f.get(n);e&&C(e)}v()}function le(e){k(e,`BlockStatement`)}function ue(){_({inCatch:!0})}function de(e){k(e,`CatchClause`)}function fe(){_({inFinally:!0})}function pe(e){e.type===`SwitchStatement`&&(_({inConditional:!0}),y(e))}function me(e){if(e.type!==`SwitchStatement`)return;v();let t=f.get(e),n=p.get(e);if(t&&n&&n.length>0)if(e.cases.some(e=>e.test===null)&&n.length===e.cases.length){w(t,n,`not all execution paths`);let e=t.filter(e=>NS(e,n));a.length=0;for(let t of e)a.push(t)}else C(t);f.delete(e),p.delete(e)}function A(e){if(e.type!==`SwitchCase`)return;let{parent:t}=e;if(t.type===`SwitchStatement`){re(t);let e=f.get(t);if(!e)return;C(e)}}function j(e){zS(e)&&(o.push(e),_({inLoop:!0}))}function he(){o.length>0&&o.pop(),v()}function ge(t){if(ee({hasEarlyExit:!0}),!(g().inFinally||a.length===0))for(let{config:n,node:r,opener:i}of a){let a=IS(n),o=a.length===1?a[0]??`closer`:a.join(`' or '`),s=t.type===`ReturnStatement`?`return`:`throw`;e.report({data:{closer:o,opener:i,paths:`${s} at line ${t.loc.start.line}`},messageId:`unpairedOpener`,node:r})}}function _e(t){if(t.type!==`BreakStatement`&&t.type!==`ContinueStatement`||a.length===0)return;let n=t.type===`ContinueStatement`?WS(t):US(t);if(n)for(let{config:r,loopAncestors:i,node:o,opener:s}of a){if(!i.some(e=>e===n))continue;let a=IS(r),c=a.length===1?a[0]??`closer`:a.join(`' or '`),l=t.type===`BreakStatement`?`break`:`continue`,u=t.loc.start.line;e.report({data:{closer:c,opener:s,paths:`${l} at line ${u}`},messageId:`unpairedOpener`,node:o})}}function ve(t,n,r){let c=i.maxNestingDepth??0;c>0&&a.length>=c&&e.report({data:{max:String(c)},messageId:`maxNestingExceeded`,node:t}),i.allowMultipleOpeners===!1&&a.length>0&&a.at(-1)?.opener===n&&e.report({data:{opener:n},messageId:`multipleOpeners`,node:t});let l={config:r,index:s++,location:t.loc,loopAncestors:[...o],node:t,opener:n};a.push(l)}function ye(t,n){let r=a.findLastIndex(e=>IS(e.config).includes(n));if(r===-1){if(l&&!u){u=!0;return}if(a.length===0){e.report({data:{closer:n},messageId:`unpairedCloser`,node:t});return}let r=RS(h(a.at(-1).opener));e.report({data:{closer:n,expected:r},messageId:`unexpectedCloser`,node:t});return}let i=a[r];if(i){if(r!==a.length-1){let r=a.at(-1);r&&e.report({data:{actual:r.opener,closer:n,expected:i.opener},messageId:`wrongOrder`,node:t})}a.splice(r,1)}}function be(t,n,r){let i=IS(r.config),a=i.length===1?i[0]??`closer`:i.join(`' or '`);e.report({data:{closer:a,yieldingFunction:n},messageId:`robloxYieldViolation`,node:t})}function xe(t){if(t.type===`AwaitExpression`||t.type===`YieldExpression`||t.type===`ForOfStatement`)for(let{config:n,opener:r}of a){if(n.requireSync!==!0)continue;let i=IS(n),a=i.length===1?i[0]??`closer`:i.join(`' or '`),o=t.type===`YieldExpression`?`yield`:`await`;e.report({data:{asyncType:o,closer:a,opener:r},messageId:`asyncViolation`,node:t})}}function Se(e){if(e.type!==`CallExpression`)return;let t=FS(e);if(t===void 0||t===``)return;let n=b(t,!0);if(n){ve(e,t,n);return}if(b(t,!1)){ye(e,t);return}for(let n of a)if(x(t,n.config)){be(e,t,n),a.length=0,l=!0;return}}return{ArrowFunctionExpression:T,"ArrowFunctionExpression:exit":E,AwaitExpression:xe,BreakStatement:_e,CallExpression:Se,CatchClause:ue,"CatchClause:exit":de,ContinueStatement:_e,DoWhileStatement:j,"DoWhileStatement:exit":he,ForInStatement:j,"ForInStatement:exit":he,ForOfStatement:e=>{e.await&&xe(e),j(e)},"ForOfStatement:exit":he,ForStatement:j,"ForStatement:exit":he,FunctionDeclaration:T,"FunctionDeclaration:exit":E,FunctionExpression:T,"FunctionExpression:exit":E,IfStatement:ie,"IfStatement > .alternate:exit":se,"IfStatement > .consequent:exit":oe,"IfStatement:exit":ae,ReturnStatement:ge,"SwitchCase:exit":A,SwitchStatement:pe,"SwitchStatement:exit":me,ThrowStatement:ge,TryStatement:D,"TryStatement > .block":O,"TryStatement > .block:exit":le,"TryStatement > .finalizer":fe,"TryStatement > .finalizer:exit":v,"TryStatement:exit":ce,WhileStatement:j,"WhileStatement:exit":he,YieldExpression:xe}},meta:{docs:{description:`Enforces balanced opener/closer function calls across all execution paths`,recommended:!1},messages:{asyncViolation:`Cannot use {{asyncType}} between '{{opener}}' and '{{closer}}' (requireSync: true)`,conditionalOpener:`Conditional opener '{{opener}}' at {{location}} may not have matching closer on all paths`,maxNestingExceeded:`Maximum nesting depth of {{max}} exceeded for paired calls`,multipleOpeners:`Multiple consecutive calls to '{{opener}}' without matching closers (allowMultipleOpeners: false)`,robloxYieldViolation:`Yielding function '{{yieldingFunction}}' auto-closes all profiles - subsequent '{{closer}}' will error`,unexpectedCloser:`Unexpected call to '{{closer}}' - expected one of: {{expected}}`,unpairedCloser:`Unexpected call to '{{closer}}' - no matching opener on stack`,unpairedOpener:`Unpaired call to '{{opener}}' - missing '{{closer}}' on {{paths}}`,wrongOrder:`Closer '{{closer}}' called out of order - expected to close '{{expected}}' but '{{actual}}' is still open`},schema:[{additionalProperties:!1,properties:{allowConditionalClosers:{default:!1,description:`Allow closer calls that appear only on some conditional paths.`,type:`boolean`},allowMultipleOpeners:{default:!0,description:`Allow repeated opener calls before matching closer calls.`,type:`boolean`},maxNestingDepth:{default:0,description:`Maximum opener nesting depth before reporting; 0 disables the limit.`,minimum:0,type:`number`},pairs:{default:[{closer:`debug.profileend`,opener:`debug.profilebegin`,platform:`roblox`,requireSync:!0,yieldingFunctions:[...MS]}],description:`Opener and closer call pairs that must stay balanced.`,items:{additionalProperties:!1,properties:{alternatives:{items:{minLength:1,type:`string`},type:`array`},closer:{oneOf:[{minLength:1,type:`string`},{items:{minLength:1,type:`string`},minItems:1,type:`array`}]},opener:{minLength:1,type:`string`},openerAlternatives:{items:{minLength:1,type:`string`},type:`array`},platform:{enum:[`roblox`],type:`string`},requireSync:{default:!1,type:`boolean`},yieldingFunctions:{items:{minLength:1,type:`string`},type:`array`}},required:[`opener`,`closer`],type:`object`},minItems:1,type:`array`}},type:`object`}],type:`problem`}}),qS={allowRootKeys:!1,ignoreCallExpressions:[`ReactTree.mount`,`CreateReactStory`,`createReactStory`,`createPlatformStory`],iterationMethods:[`map`,`filter`,`forEach`,`flatMap`,`reduce`,`reduceRight`,`some`,`every`,`find`,`findIndex`],memoizationHooks:[`useCallback`,`useMemo`]},JS=new Set([`ChainExpression`,`ParenthesizedExpression`,`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]),YS=new Set([...JS,`AwaitExpression`,`ConditionalExpression`,`LogicalExpression`,`SequenceExpression`,`SpreadElement`]),XS={iteration:!1,memoization:!1},ZS=new Set([`ConditionalExpression`,`LogicalExpression`]),QS=new Set([`BlockStatement`,`CatchClause`,`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`IfStatement`,`LabeledStatement`,`SwitchCase`,`SwitchStatement`,`TryStatement`,`WhileStatement`,`WithStatement`]);function $(e){return e.parent??void 0}function $S(e){let t=e;for(;t!==void 0&&JS.has(t.type);)t=$(t);return t}function eC(e){let t=$(e);for(;t!==void 0;){if(N(t))return t;t=$(t)}}function tC(e,t,n){let{callee:r}=e;if(r.type===`Identifier`)return{iteration:t.has(r.name),memoization:n.has(r.name)};if(r.type===`MemberExpression`&&r.property.type===`Identifier`){let{name:i}=r.property,a={iteration:t.has(i),memoization:n.has(i)};return i===`from`&&r.object.type===`Identifier`&&r.object.name===`Array`&&e.arguments.length>=2||i===`call`&&r.object.type===`MemberExpression`&&r.object.property.type===`Identifier`&&t.has(r.object.property.name)?{...a,iteration:!0}:a}return XS}function nC(e){let t=e,n=$(e);for(;n!==void 0;){if(n.type===`CallExpression`){for(let e of n.arguments)if(e===t||e.type===`SpreadElement`&&e.argument===t)return n;return}if(YS.has(n.type)){t=n,n=$(n);continue}break}}function rC(e,t){if(t.type===`FunctionDeclaration`){let n=e.getDeclaredVariables(t);return n.length>0?n[0]:void 0}let n=$(t);if(n!==void 0&&(n.type===`VariableDeclarator`||n.type===`AssignmentExpression`)){let t=e.getDeclaredVariables(n);if(t.length>0)return t[0]}}function iC(e,t){e.iteration||=t.iteration,e.memoization||=t.memoization}function aC(e,t,n){if(e.isWrite())return XS;let r=nC(e.identifier);return r===void 0||Ec(r)?XS:tC(r,t,n)}function oC(e,t,n,r){let i=nC(t);if(i!==void 0)return Ec(i)?XS:tC(i,n,r);let a=rC(e,t);if(a===void 0)return XS;let o={iteration:!1,memoization:!1};for(let e of a.references)if(iC(o,aC(e,n,r)),o.iteration&&o.memoization)return o;return o}function sC(e){let t=cC(e);return t===void 0?!1:t.type===`ReturnStatement`?uC(t):t.type===`ArrowFunctionExpression`}function cC(e){let t=lC($S($(e)));for(;t!==void 0&&ZS.has(t.type);)t=$S($(t));return lC(t)}function lC(e){return e?.type===`JSXExpressionContainer`?$S($(e)):e}function uC(e){let t=$S($(e));for(;t!==void 0&&QS.has(t.type);)t=$S($(t));return t!==void 0&&N(t)}function dC(e){if(!sC(e))return!1;let t=eC(e);if(t===void 0)return!1;let n=$S($(t));return n?.type!==`CallExpression`||Ec(n)}function fC(e,t){let n=$(e);if(n===void 0||n.type===`JSXExpressionContainer`&&(n=$(n),n===void 0))return!1;for(let e=0;e<20&&n!==void 0;e+=1){if(n.type===`CallExpression`){let{callee:e}=n;return e.type===`Identifier`?t.has(e.name):e.type===`MemberExpression`&&e.object.type===`Identifier`&&e.property.type===`Identifier`&&t.has(`${e.object.name}.${e.property.name}`)}n=$(n)}return!1}function pC(e){return e.toLowerCase().endsWith(`children`)}function mC(e){let t=$(e);if(t===void 0)return!1;for(;t!==void 0&&(t.type===`ConditionalExpression`||t.type===`LogicalExpression`);)t=$(t);if(t===void 0||t.type===`JSXExpressionContainer`&&(t=$(t),t===void 0)||t.type!==`JSXAttribute`)return!1;let n=Dc(t);return n===void 0||!pC(n)}function hC(e){let t=e,n=$(e);for(;n!==void 0&&JS.has(n.type);)t=n,n=$(n);return n===void 0?!1:n.type===`VariableDeclarator`?n.init===t:n.type===`AssignmentExpression`&&n.right===t}function gC(e,t){let n=$(e);if(n===void 0)return!1;let r=!1;for(;n!==void 0&&(n.type===t||JS.has(n.type));)n.type===t&&(r=!0),n=$(n);if(!r||n?.type!==`JSXExpressionContainer`)return!1;let i=$(n);return i===void 0?!1:i.type===`JSXElement`||i.type===`JSXFragment`}function _C(e){return gC(e,`ConditionalExpression`)}function vC(e){return gC(e,`LogicalExpression`)}const yC=_(`require-react-component-keys`,`react`,{create(e){let[t]=e.options,n={allowRootKeys:qS.allowRootKeys,ignoreCallExpressions:qS.ignoreCallExpressions,iterationMethods:qS.iterationMethods,memoizationHooks:qS.memoizationHooks,...t},r=new Set(n.ignoreCallExpressions),i=new Set(n.iterationMethods),a=new Set(n.memoizationHooks);function o(t){let o=eC(t),s=o===void 0?XS:oC(e.sourceCode,o,i,a),c=s.iteration||s.memoization;if(dC(t)&&!c){!n.allowRootKeys&&t.type===`JSXElement`&&Oc(t,`key`)&&e.report({messageId:`rootComponentWithKey`,node:t});return}if(!fC(t,r)&&!(hC(t)||mC(t)||_C(t))&&!(t.type===`JSXFragment`&&vC(t))&&!(t.type===`JSXFragment`&&s.memoization&&!s.iteration&&sC(t))){if(t.type===`JSXFragment`){e.report({messageId:`missingKey`,node:t});return}Oc(t,`key`)||e.report({messageId:`missingKey`,node:t})}}return{JSXElement:o,JSXFragment:o}},meta:{docs:{description:`Require keys on nested React JSX children, fragments, and configured iteration or memoization contexts.`},messages:{missingKey:"JSX element in list/callback lacks key prop. React Luau warns about missing keys in _G.__DEV__ mode. Add a unique `key` prop using a stable identifier (not array index).",rootComponentWithKey:"Root return has unnecessary key prop. The key gets overwritten by the parent anyway. Remove the `key` prop."},schema:[{additionalProperties:!1,properties:{allowRootKeys:{default:!1,description:`Allow key props on root component returns`,type:`boolean`},ignoreCallExpressions:{default:qS.ignoreCallExpressions,description:`Function calls where JSX arguments don't need keys`,items:{type:`string`},type:`array`},iterationMethods:{default:qS.iterationMethods,description:`Array method names that indicate iteration contexts where keys are required`,items:{type:`string`},type:`array`},memoizationHooks:{default:[`useCallback`,`useMemo`],description:`Hook names that indicate memoization contexts where keys are required`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}});function bC(e){if(e.id.type===`Identifier`)return e.id.name}function xC(e,t,n){return fe(e,t,n,`memo`)}function SC(e,t,n){return e.callee.type===`Identifier`?t.has(e.callee.name):e.callee.type!==`MemberExpression`||e.callee.property.type!==`Identifier`||e.callee.property.name!==`createContext`||e.callee.object.type!==`Identifier`?!1:n.has(e.callee.object.name)}function CC(e){let t=e;for(;t!==null;){if(t.type===`ExportNamedDeclaration`||t.type===`ExportDefaultDeclaration`)return!0;t=t.parent}return!1}function wC(e){return e.parent.type===`VariableDeclaration`?e.parent.parent.type===`ExportNamedDeclaration`||e.parent.parent.type===`ExportDefaultDeclaration`:!1}function TC(e,t,n){for(let r of e.getDeclaredVariables(t))if(r.name===n){for(let{identifier:e}of r.references)if(CC(e))return!0;return!1}return!1}function EC(e,t,n,r){return r.has(t)||wC(n)?!0:TC(e,n,t)}function DC(e,t,n){e.report({data:{variableName:n},messageId:t.kind===`context`?`missingContextDisplayName`:`missingMemoDisplayName`,node:t.node})}const OC=_(`require-react-display-names`,`react`,{create(e){let t=gr(e.options[0]),n=new Set,r=new Set,i=new Set,a=new Map,o=new Set;return{'AssignmentExpression[left.type="MemberExpression"]'(e){let{left:t}=e;if(t.type!==`MemberExpression`||t.property.type!==`Identifier`||t.property.name!==`displayName`||t.object.type!==`Identifier`)return;let n=a.get(t.object.name);n!==void 0&&(n.hasDisplayName=!0)},ExportDefaultDeclaration(t){if(t.declaration.type===`CallExpression`){if(xC(t.declaration,n,i)){e.report({messageId:`directMemoExport`,node:t});return}SC(t.declaration,r,i)&&e.report({messageId:`directContextExport`,node:t});return}t.declaration.type===`Identifier`&&o.add(t.declaration.name)},ExportNamedDeclaration(e){for(let t of e.specifiers)t.exported.type===`Identifier`&&t.exported.name==="default"&&t.local.type===`Identifier`&&o.add(t.local.name)},ImportDeclaration(e){if(_r(e,t))for(let t of e.specifiers){let{name:e}=t.local;if(t.type===`ImportSpecifier`){let i=me(t);i===`memo`&&n.add(e),i===`createContext`&&r.add(e);continue}i.add(e)}},"Program:exit"(){for(let[t,n]of a)n.hasDisplayName||EC(e.sourceCode,t,n.node,o)&&DC(e,n,t)},VariableDeclarator(e){if(e.init?.type!==`CallExpression`)return;let t=bC(e);if(t!==void 0){if(xC(e.init,n,i)){a.set(t,{hasDisplayName:!1,kind:`memo`,node:e});return}SC(e.init,r,i)&&a.set(t,{hasDisplayName:!1,kind:`context`,node:e})}}}},meta:{docs:{description:`Require displayName on exported memo components and contexts.`},messages:{directContextExport:`Directly exporting createContext() result prevents setting displayName.`,directMemoExport:`Directly exporting memo() result prevents setting displayName.`,missingContextDisplayName:`Context '{{variableName}}' must have a displayName assigned.`,missingMemoDisplayName:`Memo component '{{variableName}}' must have a displayName assigned.`},schema:[{additionalProperties:!1,properties:{environment:dr},type:`object`}],type:`problem`}});function kC(e){return x(e)&&e.metric===`statements`?`statements`:`lines`}function AC(e,t){let n=e.consequent.length;if(n===0)return!1;let[r]=e.consequent;if(r===void 0||n===1&&r.type===`BlockStatement`)return!1;if(t===`statements`)return n>1;let i=e.consequent[n-1];return i!==void 0&&r.loc.start.line!==i.loc.end.line}const jC=_(`require-switch-case-braces`,`general`,{create(e){let t=kC(e.options[0]);return{SwitchCase(n){if(!AC(n,t))return;let[r]=n.consequent,i=n.consequent.at(-1);r!==void 0&&i!==void 0&&e.report({fix(e){return[e.insertTextBefore(r,`{
8
+ `&&(t+=1);return t}const jo=_(`no-commented-code`,`general`,{create(e){let{maxLines:t=0}=e.options[0]??{};return{"Program:exit"(){let n=po(e.sourceCode.getAllComments(),e.sourceCode);for(let r of n){let n=r.value.trim();if(n===`}`||Ao(r.value)<=t||!ko(go(n),e.filename))continue;let i=r.comments.at(0),a=r.comments.at(-1);i&&a&&e.report({loc:{end:a.loc.end,start:i.loc.start},messageId:`commentedCode`,suggest:[{desc:`Remove this commented out code`,fix(e){return e.removeRange([i.range[0],a.range[1]])}}]})}}}},meta:{docs:{description:`Disallow commented-out code`,recommended:!1},hasSuggestions:!0,messages:{commentedCode:`Commented-out code creates confusion about intent and clutters the codebase. Version control preserves history, making dead code comments unnecessary. Delete the commented code entirely. If needed later, retrieve it from git history.`},schema:[{additionalProperties:!1,properties:{maxLines:{default:0,description:`Maximum number of lines of commented code allowed without reporting. Default 0 means any commented code triggers an error.`,type:`number`}},type:`object`}],type:`suggestion`}});function z(e){return{constant:!0,value:e}}function Mo(){return{constant:!1}}function No(e){return{constant:!0,value:e}}function Po(){return{constant:!1}}function Fo(e){let t=new Set;if(!e?.loopExitCalls)return t;for(let n of e.loopExitCalls)ne(n)&&t.add(n);return t}function Io(e){let t=C(e);if(t.type===`Identifier`)return t.name;if(t.type!==`MemberExpression`)return;let n=Io(t.object);if(n===void 0||n.length===0)return;let r=w(t);if(r!==void 0&&r.length!==0)return`${n}.${r}`}function Lo(e,t){if(t.size===0)return!1;let n=Io(e.callee);return n===void 0||n.length===0?!1:t.has(n)}function Ro(e,t){return B(e.type===`SpreadElement`?e.argument:e,t)}function B(e,t){if(t.size===0)return!1;let n=C(e);switch(n.type){case`ArrayExpression`:return zo(n,t);case`ArrowFunctionExpression`:case`ClassExpression`:case`FunctionExpression`:return!1;case`AssignmentExpression`:return B(n.right,t);case`AwaitExpression`:return B(n.argument,t);case`BinaryExpression`:return Bo(n,t);case`CallExpression`:return Vo(n,t);case`ConditionalExpression`:return Ho(n,t);case`LogicalExpression`:return Uo(n,t);case`MemberExpression`:return Wo(n,t);case`NewExpression`:return Go(n,t);case`SequenceExpression`:return n.expressions.some(e=>B(e,t));case`TaggedTemplateExpression`:return Ko(n,t);case`TemplateLiteral`:return n.expressions.some(e=>B(e,t));case`UnaryExpression`:case`UpdateExpression`:return B(n.argument,t);case`YieldExpression`:return n.argument?B(n.argument,t):!1;default:return!1}}function zo(e,t){for(let n of e.elements)if(n!==null&&Ro(n,t))return!0;return!1}function Bo(e,t){let{left:n}=e;return n.type!==`PrivateIdentifier`&&B(n,t)?!0:B(e.right,t)}function Vo(e,t){return Lo(e,t)||B(e.callee,t)?!0:e.arguments.some(e=>Ro(e,t))}function Ho(e,t){return B(e.test,t)||B(e.consequent,t)||B(e.alternate,t)}function Uo(e,t){return B(e.left,t)||B(e.right,t)}function Wo(e,t){return B(e.object,t)?!0:e.computed&&B(e.property,t)}function Go(e,t){return B(e.callee,t)?!0:e.arguments.some(e=>Ro(e,t))}function Ko(e,t){return B(e.tag,t)?!0:e.quasi.expressions.some(e=>B(e,t))}function qo(e){let t=C(e);switch(t.type){case`ArrayExpression`:return z([]);case`ArrowFunctionExpression`:case`ClassExpression`:case`FunctionExpression`:return z(!0);case`Identifier`:return t.name===`undefined`?z(void 0):t.name===`NaN`?z(NaN):t.name===`Infinity`?z(1/0):Mo();case`Literal`:return z(t.value);case`LogicalExpression`:return Jo(t);case`ObjectExpression`:return z({});case`SequenceExpression`:{let e=t.expressions.at(-1);return e?qo(e):Mo()}case`TemplateLiteral`:return t.expressions.length>0?Mo():t.quasis.length===0?z(``):z(t.quasis[0]?.value.cooked??``);case`UnaryExpression`:return Yo(t);default:return Mo()}}function Jo(e){let t=qo(e.left);return t.constant?e.operator===`&&`?t.value===!0?qo(e.right):z(t.value):e.operator===`||`?t.value===!0?z(t.value):qo(e.right):t.value===void 0?qo(e.right):z(t.value):Mo()}function Yo(e){if(e.operator===`typeof`)return z(`string`);if(e.operator===`void`)return z(void 0);let t=qo(e.argument);return t.constant?e.operator===`!`?z(!t.value):e.operator===`+`&&b(t.value)?z(t.value):e.operator===`-`&&b(t.value)?z(-t.value):e.operator===`~`&&b(t.value)?z(~t.value):Mo():Mo()}function V(e){let t=C(e);if(t.type===`ConditionalExpression`)return Xo(t);if(t.type===`LogicalExpression`)return Zo(t);if(t.type===`SequenceExpression`){let e=t.expressions.at(-1);return e?V(e):Po()}let n=qo(t);return n.constant?No(!!n.value):Po()}function Xo(e){let t=V(e.test);if(t.constant)return V(t.value===!0?e.consequent:e.alternate);let n=V(e.consequent),r=V(e.alternate);return n.constant&&r.constant&&n.value===r.value?n:Po()}function Zo(e){let t=V(e.left);if(!t.constant)return Po();if(e.operator===`&&`)return t.value?V(e.right):No(!1);if(e.operator===`||`)return t.value===!0?No(!0):V(e.right);let n=qo(e.left);return n.constant?n.value===void 0?V(e.right):No(!!n.value):Po()}const Qo=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function $o(e){return Qo.has(e.type)}function es(e,t){let n=t;for(;n!==null;){if(n.type===`LabeledStatement`&&n.label.name===e)return n.body;if(n.type===`Program`)return;n=n.parent}}function ts(e,t){if(e.label)return es(e.label.name,e.parent)===t;let n=e.parent;for(;n!==null;){if(n.type===`Program`||N(n)||n.type===`SwitchStatement`)return!1;if($o(n))return n===t;n=n.parent}return!1}function ns(e,t){return e?e.type===`VariableDeclaration`?e.declarations.some(e=>e.init?B(e.init,t):!1):B(e,t):!1}function rs(e,t){switch(e.type){case`DoWhileStatement`:case`WhileStatement`:return B(e.test,t);case`ForInStatement`:case`ForOfStatement`:return B(e.right,t);case`ForStatement`:return!!(ns(e.init,t)||e.test&&B(e.test,t)||e.update&&B(e.update,t));default:return!1}}function H(e,t,n){switch(e.type){case`BlockStatement`:return e.body.some(e=>H(e,t,n));case`BreakStatement`:return ts(e,t);case`DoWhileStatement`:case`WhileStatement`:return is(e,t,n);case`ExpressionStatement`:return B(e.expression,n);case`ForInStatement`:case`ForOfStatement`:return as(e,t,n);case`ForStatement`:return os(e,t,n);case`IfStatement`:return ss(e,t,n);case`LabeledStatement`:return H(e.body,t,n);case`ReturnStatement`:return!0;case`SwitchStatement`:return e.cases.some(e=>e.consequent.some(e=>H(e,t,n)));case`TryStatement`:return cs(e,t,n);case`VariableDeclaration`:return e.declarations.some(e=>e.init?B(e.init,n):!1);case`WithStatement`:return ls(e,t,n);default:return!1}}function is(e,t,n){return B(e.test,n)?!0:H(e.body,t,n)}function as(e,t,n){return B(e.right,n)?!0:H(e.body,t,n)}function os(e,t,n){return ns(e.init,n)||e.test&&B(e.test,n)||e.update&&B(e.update,n)?!0:H(e.body,t,n)}function ss(e,t,n){return H(e.consequent,t,n)?!0:e.alternate?H(e.alternate,t,n):!1}function cs(e,t,n){return!!(H(e.block,t,n)||e.handler&&H(e.handler.body,t,n)||e.finalizer&&H(e.finalizer,t,n))}function ls(e,t,n){return B(e.object,n)?!0:H(e.body,t,n)}function us(e,t,n){return e.constant?!e.value||!rs(t,n)&&!H(t.body,t,n):!1}const ds=_(`no-constant-condition-with-break`,`general`,{create(e){let t=e.options?.[0],n=Fo(x(t)?t:void 0);function r(t){V(t).constant&&e.report({messageId:`unexpected`,node:t})}function i(t,r){us(V(r),t,n)&&e.report({messageId:`unexpected`,node:r})}return{ConditionalExpression(e){r(e.test)},DoWhileStatement(e){i(e,e.test)},ForStatement(e){e.test&&i(e,e.test)},IfStatement(e){r(e.test)},WhileStatement(e){i(e,e.test)}}},meta:{docs:{description:`Disallow constant conditions, but allow constant loops that include loop exits such as break, return, or configured calls.`},messages:{unexpected:`Unexpected constant condition.`},schema:[{additionalProperties:!1,properties:{loopExitCalls:{description:`Call expressions that count as intentional loop exits inside constant loops.`,items:{minLength:1,type:`string`},type:`array`}},type:`object`}],type:`problem`}}),fs=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function ps(e){let t=e;for(;t.parent!==null;){if(t.type===`ArrowFunctionExpression`||t.type===`FunctionDeclaration`||t.type===`FunctionExpression`)return t;t=t.parent}return t}function ms(e,t){if(t.type===`IfStatement`){if(t.consequent===e)return{arm:`then`,complete:t.alternate!==null,control:t};if(t.alternate===e)return{arm:`else`,complete:!0,control:t}}if(t.type===`ConditionalExpression`){if(t.consequent===e)return{arm:`then`,complete:!0,control:t};if(t.alternate===e)return{arm:`else`,complete:!0,control:t}}}function hs(e,t){let n=ms(e,t);if(n!==void 0)return n;if(t.type===`LogicalExpression`&&t.right===e)return{arm:`right`,complete:!1,control:t};if(fs.has(t.type)&&`body`in t&&t.body===e)return{arm:`body`,complete:!1,control:t};if(e.type===`SwitchCase`&&t.type===`SwitchStatement`)return{arm:`case:${e.range[0]}`,complete:!1,control:t};if(t.type===`TryStatement`){if(t.block===e)return{arm:`try`,complete:!1,control:t};if(t.handler===e)return{arm:`catch`,complete:!1,control:t}}}function gs(e,t){let n=[],r=e;for(;r!==t&&r.parent!==null;){let e=hs(r,r.parent);e!==void 0&&n.push(e),r=r.parent}return n}function _s(e,t){return e.find(e=>e.control===t)?.arm}function vs(e,t){for(let n of e){let e=_s(t,n.control);if(e!==void 0&&e!==n.arm)return!1}return!0}function ys(e,t){let{parent:n}=e.node;return n.type===`AssignmentExpression`?n.operator!==`=`||t.some(e=>e.isRead&&js(n.right,e.node)):!1}function bs(e,t){if(t.length!==e.length)return;let n;for(let r of e)if(_s(t,r.control)!==r.arm){if(n!==void 0)return;n=r.control}if(n!==void 0&&_s(t,n)!==void 0)return e.filter(e=>e.control!==n)}function xs(e){for(let[t,n]of e.entries())for(let[r,i]of e.entries()){if(r<=t)continue;let a=bs(n,i);if(a!==void 0)return e.splice(r,1),e.splice(t,1,a),a.length===0||xs(e)}return!1}function Ss(e,t,n){let r=e.filter(e=>_s(t,e.control)===void 0);return r.length===0?!0:r.some(e=>!e.complete)?!1:(n.push(r),xs(n))}function Cs(e,t){return e.isRead&&!e.isWrite||e.isWrite&&ys(e,t)}function ws(e){let t=[],n=e.parent;for(;n!==null;){if(fs.has(n.type))t.push(n);else if(n.type===`Program`||n.type===`ArrowFunctionExpression`||n.type===`FunctionDeclaration`||n.type===`FunctionExpression`)break;n=n.parent}return t}function Ts(e,t){let n=ws(e.node),r=t.node.parent;for(;r!==null;){for(let e of n)if(e===r)return!0;if(r.type===`Program`||r.type===`ArrowFunctionExpression`||r.type===`FunctionDeclaration`||r.type===`FunctionExpression`)break;r=r.parent}return!1}function Es(e,t,n){return e.isRead&&!e.isWrite&&ps(e.node)===n&&Ts(t,e)}function Ds(e,t,n,r,i,a){if(e.node.range[0]<=t.node.range[0])return e.node.range[0]<t.node.range[0]&&Es(e,t,n)?!0:void 0;if(ps(e.node)!==n)return;let o=gs(e.node,n);if(vs(r,o))return Cs(e,a)?!0:e.isWrite&&Ss(o,r,i)?!1:void 0;if(Es(e,t,n))return!0}function Os(e,t){let n=ps(e.node),r=gs(e.node,n),i=[];for(let a of t){let o=Ds(a,e,n,r,i,t);if(o===!0)return!0;if(o===!1)return!1}return!1}function ks(e){return e.type===`Literal`?e.value===null||e.value===!1||e.value===!0||e.value===``||e.value===-1||e.value===0||e.value===1:e.type===`Identifier`?e.name===`undefined`:e.type===`ArrayExpression`?e.elements.length===0:e.type===`ObjectExpression`?e.properties.length===0:e.type===`UnaryExpression`?e.operator===`void`||ks(e.argument):!1}function As(e){let t=e;for(;t.parent!==null&&t.parent.type!==`VariableDeclarator`;){if(t.parent.type===`ObjectPattern`&&t.parent.properties.some(e=>e.type===`RestElement`))return!0;t=t.parent}return!1}function js(e,t){return e.range[0]<=t.range[0]&&e.range[1]>=t.range[1]}function Ms(e,t){let n=e.node;for(;n.parent!==null;){let e=n.parent;if(e.type===`TryStatement`&&e.block===n&&[e.handler?.body,e.finalizer].filter(e=>e!=null).some(e=>t.references.some(t=>t.isRead()&&js(e,t.identifier))))return!0;n=e}return!1}function Ns(e,t){if(!e.isWrite||t.scope.block.type===`Program`||t.name.startsWith(`_`))return!1;let{parent:n}=e.node;return n.type===`AssignmentPattern`||n.type===`UpdateExpression`||n.type===`AssignmentExpression`&&n.right.type===`Literal`&&n.right.value===null||As(e.node)||e.init&&e.writeExpression!==void 0&&ks(e.writeExpression)?!1:!Ms(e,t)}function Ps(e){let t=new Set(e.references.map(e=>ps(e.identifier)));for(let n of e.defs)t.add(ps(n.name));return e.references.some(e=>e.isRead())&&t.size>1}function Fs(e){let t=e.references.map(e=>({init:e.init,isRead:e.isRead(),isWrite:e.isWrite(),node:e.identifier,writeExpression:e.writeExpr??void 0}));for(let n of e.defs)n.type!==`Variable`||n.node.type!==`VariableDeclarator`||n.node.init===null||t.some(e=>e.node.range[0]===n.name.range[0])||t.push({init:!0,isRead:!1,isWrite:!0,node:n.name,writeExpression:n.node.init});return t.toSorted((e,t)=>e.node.range[0]-t.node.range[0])}const Is=_(`no-dead-store`,`general`,{create(e){return{Program(){ae(e.sourceCode,t=>{if(Ps(t))return;let n=Fs(t);for(let r of n)!Ns(r,t)||Os(r,n)||e.report({data:{name:t.name},messageId:`deadStore`,node:r.node})})}}},meta:{docs:{description:`Disallow assignments whose value is never read.`},messages:{deadStore:`The value assigned to "{{name}}" is never read.`},schema:[],type:`problem`}});function Ls(e){let t=`CallExpression[callee.type="Identifier"][callee.name="${e.name}"]`;return _(e.ruleName,e.category,{create(n){return{[t](t){n.report({messageId:e.messageId,node:t})}}},meta:{docs:{description:`Use ${e.alternative} instead of ${e.name}().`},messages:{[e.messageId]:e.message.replaceAll(`{{name}}`,e.name).replaceAll(`{{alternative}}`,e.alternative)},schema:[],type:`problem`}})}const Rs=Ls({alternative:`throw`,category:`general`,message:`Replace {{name}}(...) with {{alternative}}.`,messageId:`noError`,name:`error`,ruleName:`no-error`});function zs(e){let t=new Set;if(!e?.eventsImportPaths)return t;for(let n of e.eventsImportPaths)ne(n)&&t.add(n);return t}function Bs(e){switch(e.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSTypeAssertion`:return Bs(e.expression);default:return e}}function Vs(e){let t=Bs(e);if(t.type===`Identifier`)return t.name;if(t.type===`MemberExpression`)return Vs(t.object)}function Hs(e,t){let n=Bs(e.callee);if(n.type!==`MemberExpression`||w(n)!==`connect`)return;let r=Vs(n.object);if(r===void 0||!t.has(r))return;let[i]=e.arguments;if(i)switch(i.type){case`ArrowFunctionExpression`:case`FunctionExpression`:return i;default:return}}function Us(e,t){let n=Bs(e.callee);if(n.type!==`MemberExpression`)return!1;let r=Vs(n);return r!==void 0&&t.has(r)}function Ws(e,t){return e.has(t)?!1:(e.add(t),!0)}function Gs(e,t){return Ws(t.playerValues,e)}function Ks(e,t){return Ws(t.playerContainers,e)}function U(e,t){switch(e.type){case`ArrayPattern`:{let n=!1;for(let r of e.elements)r&&(n=U(r,t)||n);return n}case`AssignmentPattern`:return U(e.left,t);case`Identifier`:return Gs(e.name,t);case`ObjectPattern`:{let n=!1;for(let r of e.properties){if(r.type===`RestElement`){n=U(r.argument,t)||n;continue}n=U(r.value,t)||n}return n}case`RestElement`:return U(e.argument,t);default:return!1}}function qs(e,t,n){return t===0?!1:e.type===`Identifier`?t===2?Gs(e.name,n):Ks(e.name,n):U(e,n)}function Js(e,t,n){return e.type===`MemberExpression`||t===0?!1:e.type===`ArrayPattern`||e.type===`AssignmentPattern`||e.type===`Identifier`||e.type===`ObjectPattern`||e.type===`RestElement`?e.type===`Identifier`?t===2?Gs(e.name,n):Ks(e.name,n):U(e,n):!1}function W(e,t){let n=Bs(e);switch(n.type){case`ArrayExpression`:return Ys(n,t);case`AssignmentExpression`:return W(n.right,t);case`ConditionalExpression`:return Xs(n,t);case`Identifier`:return t.playerValues.has(n.name)?2:+!!t.playerContainers.has(n.name);case`MemberExpression`:return Zs(n,t);case`ObjectExpression`:return Qs(n,t);case`SequenceExpression`:{let e=n.expressions.at(-1);return e===void 0?0:W(e,t)}default:return 0}}function Ys(e,t){for(let n of e.elements)if(n!==null&&W(n.type===`SpreadElement`?n.argument:n,t)!==0)return 1;return 0}function Xs(e,t){let n=W(e.consequent,t);return n===W(e.alternate,t)?n:0}function Zs(e,t){return W(e.object,t)===1?2:0}function Qs(e,t){for(let n of e.properties)if(W(n.type===`SpreadElement`?n.argument:n.value,t)!==0)return 1;return 0}function $s(e,t){if(e.type===`TSParameterProperty`){U(e.parameter,t);return}U(e,t)}const ec=_(`no-events-in-events-callback`,`roblox`,{create(e){let t=zs(e.options[0]),n=new Set,r=new WeakMap,i=[];function a(){let e=i.at(-1);if(e?.callbackState&&!(e.callbackDepth>0))return e.callbackState}function o(e){if(e.type!==`FunctionDeclaration`){let t=r.get(e);if(t){i.push({callbackDepth:0,callbackState:t});return}}let t=i.at(-1);if(!t?.callbackState){i.push({callbackDepth:0,callbackState:void 0});return}i.push({callbackDepth:t.callbackDepth+1,callbackState:t.callbackState})}function s(){i.pop()}return{ArrowFunctionExpression:o,"ArrowFunctionExpression:exit":s,AssignmentExpression(e){let t=a();if(!t||e.operator!==`=`)return;let n=W(e.right,t);n!==0&&Js(e.left,n,t)},CallExpression(t){let i=Hs(t,n);if(i){let e={playerContainers:new Set,playerValues:new Set},[t]=i.params;t&&$s(t,e),r.set(i,e)}let o=a();if(!(o&&Us(t,n)))return;let[s]=t.arguments;!s||s.type===`SpreadElement`||W(s,o)!==2||e.report({messageId:`preferFunctions`,node:t})},FunctionDeclaration:o,"FunctionDeclaration:exit":s,FunctionExpression:o,"FunctionExpression:exit":s,ImportDeclaration(e){let r=e.source.value;if(t.has(r))for(let t of e.specifiers){let{name:e}=t.local;if(t.type===`ImportDefaultSpecifier`){e===`Events`&&n.add(e);continue}if(t.type===`ImportSpecifier`){if(t.imported.type===`Identifier`&&t.imported.name===`Events`){n.add(e);continue}t.imported.type===`Literal`&&t.imported.value===`Events`&&n.add(e)}}},VariableDeclarator(e){let t=a();if(!(t&&e.init))return;let n=W(e.init,t);n!==0&&qs(e.id,n,t)}}},meta:{docs:{description:`Disallow sending Events back to the same player inside an Events.connect callback; use Functions for request/response.`},messages:{preferFunctions:`Do not call Events for the same player inside an Events.connect callback. Use a Functions callback instead.`},schema:[{additionalProperties:!1,properties:{eventsImportPaths:{description:`Import paths that identify Events objects whose callbacks should be checked.`,items:{minLength:1,type:`string`},type:`array`}},required:[`eventsImportPaths`],type:`object`}],type:`problem`}}),tc=_(`no-filter-map-chain`,`general`,{create(e){return{CallExpression(t){let n=C(t.callee);if(n.type!==`MemberExpression`||w(n)!==`map`)return;let r=C(n.object);if(r.type!==`CallExpression`)return;let i=C(r.callee);i.type===`MemberExpression`&&w(i)===`filter`&&e.report({messageId:`avoidFilterMapChain`,node:t})}}},meta:{docs:{description:`Disallow map(...) directly after filter(...).`},messages:{avoidFilterMapChain:`Do not chain map(...) directly after filter(...). Combine both operations in a single loop.`},schema:[],type:`suggestion`}}),nc=/e/iu,rc=new Set([`!=`,`!==`,`==`,`===`]),ic=new Set([`+`,`-`,`*`,`%`,`**`]),ac=new Set([`deepStrictEqual`,`notDeepStrictEqual`,`notStrictEqual`,`strictEqual`]),oc=new Set([`toBe`,`toEqual`,`toStrictEqual`]),sc=new Set([`@jest/globals`,`bun:test`,`vitest`]),cc=new Set([`assert`,`assert/strict`,`node:assert`,`node:assert/strict`]);function lc(e){let t=e.replaceAll(`_`,``).toLowerCase(),n=t.indexOf(`e`),r=n===-1?t:t.slice(0,n),i=n===-1?0:Number(t.slice(n+1)),a=r.indexOf(`.`),o=a===-1?0:r.length-a-1,s=r.replace(`.`,``),c=o-i,l=BigInt(s);if(l===0n||c<=0)return!0;let u=10n**BigInt(c);for(;l%5n==0n;)l/=5n,u/=5n;return u%5n!=0n}function uc(e){if(e.type===`Literal`&&typeof e.value==`number`)return e.value;if(e.type!==`UnaryExpression`||e.operator!==`+`&&e.operator!==`-`)return;let t=e.argument.type===`Literal`?e.argument.value:void 0;if(typeof t==`number`)return e.operator===`-`?-t:t}function dc(e){let t=uc(e);if(t!==void 0)return t;if(e.type!==`BinaryExpression`||e.left.type===`PrivateIdentifier`)return;let n=dc(e.left),r=dc(e.right);if(n!==void 0&&r!==void 0){if(e.operator===`+`)return n+r;if(e.operator===`-`)return n-r;if(e.operator===`*`)return n*r;if(e.operator===`/`)return r===0?void 0:n/r;if(e.operator===`%`)return r===0?void 0:n%r;if(e.operator===`**`)return n**r}}function fc(e){let t=uc(e.left),n=uc(e.right);if(t===void 0||n===void 0||!Number.isSafeInteger(t)||!Number.isSafeInteger(n)||n===0)return!1;let r=Math.abs(n);for(;r%2==0;)r/=2;return Math.abs(t)%r!==0}function pc(e){let[t]=e.defs;if(t?.type===`Variable`&&t.node.type===`VariableDeclarator`&&t.node.init!==null&&t.parent?.type===`VariableDeclaration`&&t.parent.kind===`const`)return t.node.init}function mc(e,t,n){let r=dc(e);return r!==void 0&&Number.isSafeInteger(r)?!1:e.operator===`/`?fc(e)||hc(e.left,t,n)||hc(e.right,t,n):ic.has(e.operator)&&(hc(e.left,t,n)||hc(e.right,t,n))}function hc(e,t,n){let r=C(e);if(r!==e)return hc(r,t,n);if(e.type===`Literal`&&typeof e.value==`number`){let t=String(e.raw);return(t.includes(`.`)||nc.test(t))&&!lc(t)}if(e.type===`UnaryExpression`)return(e.operator===`+`||e.operator===`-`)&&hc(e.argument,t,n);if(e.type===`BinaryExpression`)return Cc(e)?mc(e,t,n):!1;if(e.type!==`Identifier`)return!1;let i=t.get(e);if(i===void 0||n.has(i))return!1;let a=pc(i);return a===void 0?!1:(n.add(i),hc(a,t,n))}function gc(e){let t=new Map;return ae(e,e=>{for(let n of e.references)t.set(n.identifier,e)}),t}function _c(e){return e.imported.type===`Identifier`?e.imported.name:e.imported.value}function vc(e,t,n){let{name:r}=n.local;sc.has(t)&&n.type===`ImportSpecifier`&&_c(n)===`expect`&&e.set(r,`expect`),cc.has(t)&&(n.type===`ImportDefaultSpecifier`||n.type===`ImportNamespaceSpecifier`?e.set(r,`assert`):ac.has(_c(n))&&e.set(r,`function`))}function yc(e){let t=new Map;for(let n of e.body){if(n.type!==`ImportDeclaration`||typeof n.source.value!=`string`)continue;let e=n.source.value;for(let r of n.specifiers)vc(t,e,r)}return t}function bc(e,t){let n=e.arguments[t];return n===void 0||n.type===`SpreadElement`?void 0:n}function xc(e,t){if(e.callee.type===`Identifier`&&t.get(e.callee.name)===`function`){let t=bc(e,0),n=bc(e,1);return t===void 0||n===void 0?void 0:[t,n]}if(e.callee.type!==`MemberExpression`)return;let n=w(e.callee);if(n!==void 0&&ac.has(n)&&e.callee.object.type===`Identifier`&&t.get(e.callee.object.name)===`assert`){let t=bc(e,0),n=bc(e,1);return t===void 0||n===void 0?void 0:[t,n]}if(n===void 0||!oc.has(n))return;let r=e.callee.object;if(r.type===`MemberExpression`&&w(r)===`not`&&(r=r.object),r.type!==`CallExpression`||r.callee.type!==`Identifier`||t.get(r.callee.name)!==`expect`)return;let i=bc(r,0),a=bc(e,0);return i===void 0||a===void 0?void 0:[i,a]}function Sc(e){let t=e.operator===`>`||e.operator===`>=`;return[{above:t,expression:e.left,threshold:e.right},{above:!t,expression:e.right,threshold:e.left}]}function Cc(e){return e.type===`BinaryExpression`&&e.left.type!==`PrivateIdentifier`}function wc(e,t,n){return e.type===t.type&&n.getText(e).replaceAll(/\s+/gu,``)===n.getText(t).replaceAll(/\s+/gu,``)}function Tc(e,t){if(Cc(e.left)&&Cc(e.right)&&!((e.operator!==`&&`||e.left.operator!==`<=`&&e.left.operator!==`>=`||e.right.operator!==`<=`&&e.right.operator!==`>=`)&&(e.operator!==`||`||e.left.operator!==`<`&&e.left.operator!==`>`||e.right.operator!==`<`&&e.right.operator!==`>`))){for(let n of Sc(e.left))for(let r of Sc(e.right))if(n.above!==r.above&&wc(n.expression,r.expression,t)&&wc(n.threshold,r.threshold,t))return[n.expression,n.threshold]}}const Ec=_(`no-floating-point-equality`,`general`,{create(e){return{Program(t){let n=gc(e.sourceCode),r=yc(t);function i(e){return hc(e,n,new Set)}Li(t,t=>{let n=!1;if(t.type===`BinaryExpression`&&rc.has(t.operator))n=t.left.type!==`PrivateIdentifier`&&(i(t.left)||i(t.right));else if(t.type===`LogicalExpression`){let r=Tc(t,e.sourceCode);n=r!==void 0&&(i(r[0])||i(r[1]))}else if(t.type===`SwitchCase`&&t.test!==null)n=i(t.test);else if(t.type===`CallExpression`){let e=xc(t,r);n=e!==void 0&&(i(e[0])||i(e[1]))}n&&e.report({messageId:`exactFloatComparison`,node:t})})}}},meta:{docs:{description:`Disallow exact comparisons involving inexact floating-point values.`},messages:{exactFloatComparison:`Compare floating-point results within a tolerance instead of for exact equality.`},schema:[],type:`problem`}}),Dc=/^[A-Z]/u;function G(e){return Dc.test(e)}function Oc(e){return e.type===`FunctionDeclaration`&&e.id!==null&&G(e.id.name)}function kc(e){return e.type===`CallExpression`?e.callee.type===`Identifier`?e.callee.name===`memo`:e.callee.type===`MemberExpression`&&e.callee.object.type===`Identifier`&&e.callee.object.name===`React`&&e.callee.property.type===`Identifier`&&e.callee.property.name===`memo`:!1}function Ac({callee:e}){return e.type===`Identifier`?e.name===`forwardRef`||e.name===`memo`:e.type===`MemberExpression`&&e.object.type===`Identifier`&&e.object.name===`React`&&e.property.type===`Identifier`&&(e.property.name===`forwardRef`||e.property.name===`memo`)}function jc({name:e}){return e.type===`JSXIdentifier`?e.name:e.name.name}function Mc(e,t){for(let n of e.openingElement.attributes)if(n.type===`JSXAttribute`&&n.name.type===`JSXIdentifier`&&n.name.name===t)return!0;return!1}function Nc(e){if(e.type===`BinaryExpression`)switch(e.operator){case`%`:case`*`:case`**`:case`+`:case`-`:case`/`:return Nc(e.left)&&Nc(e.right);default:return!1}return e.type===`Identifier`||e.type===`Literal`?!0:e.type===`MemberExpression`?!e.computed&&Nc(e.object):e.type===`ParenthesizedExpression`?Nc(e.expression):e.type===`TemplateLiteral`?e.expressions.length===0:e.type===`UnaryExpression`&&Nc(e.argument)}function Pc(e,t){return e?.type===`CallExpression`&&e.callee.type===`Identifier`&&(y(t)?e.callee.name===t:t.has(e.callee.name))}function Fc(e){return e.type===`VariableDeclarator`&&e.id.type===`Identifier`&&G(e.id.name)&&e.init!==null&&(e.init.type===`ArrowFunctionExpression`||e.init.type===`FunctionExpression`)}function Ic(e){return e.loc.end.line-e.loc.start.line+1}function Lc(e){if(!(e.type!==`FunctionDeclaration`||!Oc(e)||e.id===null||e.body===null)&&D(e.id)&&`name`in e.id&&y(e.id.name))return{body:e.body,name:e.id.name,nameNode:e.id}}function Rc(e){if(e.type!==`VariableDeclarator`||!Fc(e)||e.init===null||!(`name`in e.id&&y(e.id.name))||e.init.type!==`ArrowFunctionExpression`&&e.init.type!==`FunctionExpression`||!D(e.init.body))return;let{name:t}=e.id;return{body:e.init.body,name:t,nameNode:e.id}}const zc=_(`no-giant-component`,`react`,{create(e){function t(t,n,r){let i=Ic(r);i<=300||e.report({data:{lineCount:String(i),name:n},messageId:`giantComponent`,node:t})}return{FunctionDeclaration(e){let n=Lc(e);n!==void 0&&t(n.nameNode,n.name,n.body)},VariableDeclarator(e){let n=Rc(e);n!==void 0&&t(n.nameNode,n.name,n.body)}}},meta:{docs:{description:`Report React components whose bodies exceed 300 lines.`,recommended:!0},messages:{giantComponent:`Component "{{name}}" is {{lineCount}} lines — consider breaking it into smaller focused components`},type:`problem`}}),Bc=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`]);function Vc(e){if(e.type===`FunctionDeclaration`&&e.id!==null&&O(e.id.name))return e.id.name;if(e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`&&O(t.id.name))return t.id.name;if(t.type===`Property`&&t.key.type===`Identifier`&&O(t.key.name)||t.type===`MethodDefinition`&&t.key.type===`Identifier`&&O(t.key.name))return t.key.name}}function Hc(e){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`&&O(t.id.name))return t.id.name;if(t.type===`AssignmentExpression`&&t.left.type===`Identifier`&&O(t.left.name))return t.left.name;let n;if(t.type===`ExportDefaultDeclaration`&&e.arguments.length>0){let[t]=e.arguments;t?.type===`FunctionExpression`&&t.id&&O(t.id.name)&&(n=t.id.name)}return n}function Uc(e){if(!Ue(e))return;let[t]=e.params;if(!t)return;let n;if(t.type===`ObjectPattern`&&(n=t),t.type===`AssignmentPattern`&&t.left.type===`ObjectPattern`&&(n=t.left),!n)return;let r=0;for(let e of n.properties)e.type===`Property`&&(r+=1);return r}function Wc(e,t){return t?.type===`TSLiteralType`}function Gc(e,t){if(!Ue(e)||e.body===null)return{maxJsxDepth:0,nullLiterals:[],stateHookCount:0};let n=0,r=0,i=[],a=0;return Li(e.body,o=>{if(!(Bc.has(o.type)&&o!==e)){if(o.type===`JSXElement`||o.type===`JSXFragment`){a+=1,a>n&&(n=a);return}if(o.type===`CallExpression`){let e=L(o);e!==void 0&&e.length>0&&t.has(e)&&(r+=1)}o.type===`Literal`&&o.value===null&&!Wc(o,o.parent)&&i.push(o)}}),{maxJsxDepth:n,nullLiterals:i,stateHookCount:r}}function Kc(e){let t={enforceTargetLines:!0,ignoreComponents:[],maxDestructuredProps:5,maxLines:200,maxStateHooks:5,maxTsxNesting:3,stateHooks:[`useState`,`useReducer`,`useBinding`],targetLines:120};if(typeof e!=`object`||!e)return t;let n=e;return{enforceTargetLines:typeof n.enforceTargetLines==`boolean`?n.enforceTargetLines:t.enforceTargetLines,ignoreComponents:Array.isArray(n.ignoreComponents)?n.ignoreComponents:t.ignoreComponents,maxDestructuredProps:b(n.maxDestructuredProps)?n.maxDestructuredProps:t.maxDestructuredProps,maxLines:b(n.maxLines)?n.maxLines:t.maxLines,maxStateHooks:b(n.maxStateHooks)?n.maxStateHooks:t.maxStateHooks,maxTsxNesting:b(n.maxTsxNesting)?n.maxTsxNesting:t.maxTsxNesting,stateHooks:Array.isArray(n.stateHooks)?n.stateHooks:t.stateHooks,targetLines:b(n.targetLines)?n.targetLines:t.targetLines}}const qc=_(`no-god-components`,`react`,{create(e){let t=Kc(e.options[0]),n=new Set(t.ignoreComponents),r=new Set(t.stateHooks),i=new WeakSet;function a(a,o){if(n.has(o)||i.has(a))return;i.add(a);let s=a.loc,c=s.end.line-s.start.line+1;c>t.maxLines?e.report({data:{lines:String(c),max:String(t.maxLines),name:o,target:String(t.targetLines)},messageId:`exceedsMaxLines`,node:a}):t.enforceTargetLines&&c>t.targetLines&&e.report({data:{lines:String(c),max:String(t.maxLines),name:o,target:String(t.targetLines)},messageId:`exceedsTargetLines`,node:a});let l=Uc(a);b(l)&&l>t.maxDestructuredProps&&e.report({data:{count:String(l),max:String(t.maxDestructuredProps),name:o},messageId:`tooManyProps`,node:a});let u=Gc(a,r);u.maxJsxDepth>t.maxTsxNesting&&e.report({data:{depth:String(u.maxJsxDepth),max:String(t.maxTsxNesting),name:o},messageId:`tsxNestingTooDeep`,node:a}),u.stateHookCount>t.maxStateHooks&&e.report({data:{count:String(u.stateHookCount),hooks:t.stateHooks.join(`, `),max:String(t.maxStateHooks),name:o},messageId:`tooManyStateHooks`,node:a});for(let t of u.nullLiterals)e.report({messageId:`nullLiteral`,node:t})}function o(e){let t=Vc(e);t!==void 0&&t.length!==0&&a(e,t)}return{ArrowFunctionExpression:o,CallExpression(e){if(!Ac(e))return;let[t]=e.arguments;if(!t||t.type!==`FunctionExpression`&&t.type!==`ArrowFunctionExpression`)return;let n=Hc(e),r=Vc(t),i=n??r;i!==void 0&&i.length!==0&&a(t,i)},FunctionDeclaration(e){e.type===`FunctionDeclaration`&&o(e)},FunctionExpression(e){e.type===`FunctionExpression`&&o(e)}}},meta:{docs:{description:`Enforce React component size and complexity limits inspired by the 'Refactor God Component' checklist.`,recommended:!1},messages:{exceedsMaxLines:`Component '{{name}}' is {{lines}} lines; max allowed is {{max}}. Split into smaller components/hooks.`,exceedsTargetLines:`Component '{{name}}' is {{lines}} lines; target is {{target}} (max {{max}}). Consider extracting hooks/components.`,nullLiteral:"Avoid `null` in components; use `undefined` instead.",tooManyProps:`Component '{{name}}' destructures {{count}} props; max allowed is {{max}}. Group props or split the component.`,tooManyStateHooks:`Component '{{name}}' has {{count}} state hooks ({{hooks}}); max allowed is {{max}}. Extract cohesive state into a custom hook.`,tsxNestingTooDeep:`Component '{{name}}' has TSX nesting depth {{depth}}; max allowed is {{max}}. Extract child components.`},schema:[{additionalProperties:!1,properties:{enforceTargetLines:{default:!0,description:`Whether to report when exceeding targetLines (soft limit).`,type:`boolean`},ignoreComponents:{default:[],description:`Component names to ignore.`,items:{type:`string`},type:`array`},maxDestructuredProps:{default:5,description:`Maximum number of destructured props in a component parameter.`,type:`number`},maxLines:{default:200,description:`Hard maximum lines for a component.`,type:`number`},maxStateHooks:{default:5,description:`Maximum number of stateful hook calls in a component.`,type:`number`},maxTsxNesting:{default:3,description:`Maximum JSX/TSX nesting depth in a component.`,type:`number`},stateHooks:{default:[`useState`,`useReducer`,`useBinding`],description:`Hook names to count toward state complexity.`,items:{type:`string`},type:`array`},targetLines:{default:120,description:`Soft target lines for a component.`,type:`number`}},type:`object`}],type:`problem`}});function Jc({callee:e}){if(e.type!==`CallExpression`)return!1;let t=e.callee;if(t.type!==`MemberExpression`)return!1;let{object:n}=t;return n.type===`Identifier`&&n.name===`Ianitor`}const Yc=_(`no-ianitor-in-function-body`,`roblox`,{create(e){let t=0;function n(){t+=1}function r(){--t}return{ArrowFunctionExpression:n,"ArrowFunctionExpression:exit":r,CallExpression(n){t===0||!Jc(n)||e.report({messageId:`hoistIanitorValidator`,node:n})},FunctionDeclaration:n,"FunctionDeclaration:exit":r,FunctionExpression:n,"FunctionExpression:exit":r}},meta:{docs:{description:`Disallow Ianitor validator creation inside function bodies. Hoist to module scope to avoid recreating validators on every call.`,recommended:!0},messages:{hoistIanitorValidator:`Ianitor validator created inside function body is slow — hoist to module scope. Example: const validator = Ianitor.keyOf(ids);`},schema:[],type:`problem`}});function Xc(e){let t=C(e);if(t.type!==`CallExpression`)return!1;let n=C(t.callee);if(n.type!==`MemberExpression`||n.computed)return!1;let r=C(n.object);return r.type===`Identifier`&&r.name===`Ianitor`&&n.property.type===`Identifier`}function Zc(e){for(let{node:t}of e.defs){if(t.type!==`VariableDeclarator`)continue;let{init:e}=t;if(e!==null&&Xc(e))return!0}return!1}function Qc(e,t){let n=C(e.callee);if(n.type===`CallExpression`)return Xc(n);if(n.type===`Identifier`){let r=T(t.getScope(e),n.name);return r!==void 0&&Zc(r)}return!1}function $c(e){let t=!1;for(let n of e.properties){if(n.type!==`Property`||n.key.type!==`Identifier`)continue;let{name:e}=n.key;if(e===`error`||e===`value`)return!1;e===`success`&&(t=!0)}return t}function el(e){for(let t of e.properties)if(t.type===`Property`&&t.key.type===`Identifier`&&t.key.name===`success`)return t.key}const tl=_(`no-ianitor-success-access`,`roblox`,{create(e){let{sourceCode:t}=e,n=new Set,r=new Map;function i(e){let t=r.get(e);t!==void 0&&(t.referencedFully=!0)}return{CallExpression(e){for(let t of e.arguments)if(t.type===`Identifier`){let e=r.get(t.name);e!==void 0&&(e.referencedFully=!0)}},MemberExpression({computed:n,object:i,property:a}){if(n||a.type!==`Identifier`)return;let o=C(i);if(o.type===`CallExpression`&&a.name===`success`){Qc(o,t)&&e.report({messageId:`preferCreateGuard`,node:a});return}if(o.type===`Identifier`){let e=r.get(o.name);e!==void 0&&e.properties.add(a.name)}},"Program:exit"(){for(let[,{firstSuccessNode:t,properties:n,referencedFully:i}]of r)n.has(`success`)&&!n.has(`error`)&&!n.has(`value`)&&!i&&e.report({messageId:`preferCreateGuard`,node:t})},ReturnStatement({argument:e}){e?.type===`Identifier`&&i(e.name)},VariableDeclarator({id:i,init:a}){if(a===null)return;let o=C(a);if(o.type===`CallExpression`){if(i.type===`Identifier`&&Xc(o)){n.add(i.name);return}if(i.type===`ObjectPattern`&&Qc(o,t)&&$c(i)){let t=el(i);t!==void 0&&e.report({messageId:`preferCreateGuard`,node:t})}i.type===`Identifier`&&o.callee.type===`Identifier`&&n.has(o.callee.name)&&r.set(i.name,{firstSuccessNode:i,properties:new Set,referencedFully:!1})}}}},meta:{docs:{description:"Disallow accessing `.success` on Ianitor check results when the full result object is not needed."},messages:{preferCreateGuard:`Replace with Flamework.createGuard<T>(). Ianitor check results allocate a table on every call; Flamework.createGuard returns a plain boolean at runtime with zero allocation.`},schema:[],type:`suggestion`}}),nl=[`binding`];function rl(e){if(e.type===`Identifier`)return e.name;if(e.type===`AssignmentPattern`&&e.left.type===`Identifier`)return e.left.name}function il({body:e},t){if(e.length!==1)return!1;let[n]=e;return n?.type!==`ReturnStatement`||n.argument?.type!==`Identifier`?!1:n.argument.name===t}function al(e){if(e.params.length!==1)return;let[t]=e.params;return t===void 0?void 0:rl(t)}function ol(e){if(e.type===`ArrowFunctionExpression`){let t=al(e);if(t===void 0)return!1;let{body:n}=e;switch(n.type){case`BlockStatement`:return il(n,t);case`Identifier`:return n.name===t;default:return!1}}if(e.type===`FunctionExpression`){let t=al(e);return t===void 0||e.body===null?!1:il(e.body,t)}return!1}function sl(e){return L(e)===`joinBindings`}function cl(e){for(let t of e.defs){if(t.node.type!==`VariableDeclarator`)continue;let{init:e}=t.node;if(e?.type===`CallExpression`&&(L(e)===`useBinding`||sl(e)||e.callee.type===`MemberExpression`&&w(e.callee)===`map`))return!0}return!1}function ll(e,{object:t},n){if(t.type===`Identifier`){let r=t.name.toLowerCase();for(let e of n)if(r.includes(e.toLowerCase()))return!0;let i=T(e.getScope(t),t.name);if(i!==void 0&&cl(i))return!0}return t.type===`CallExpression`&&(t.callee.type===`MemberExpression`&&w(t.callee)===`map`||sl(t))}const ul=_(`no-identity-map`,`general`,{create(e){let{sourceCode:t}=e,[n]=e.options,r=n?.bindingPatterns??nl;return{CallExpression(n){let{callee:i}=n;if(i.type!==`MemberExpression`||i.computed||i.property.type!==`Identifier`||w(i)!==`map`||n.arguments.length!==1)return;let[a]=n.arguments;if(a===void 0||a.type===`SpreadElement`||!ol(a))return;let o=ll(t,i,r);e.report({fix(e){return e.replaceText(n,t.getText(i.object))},messageId:o?`identityBindingMap`:`identityArrayMap`,node:n})}}},meta:{docs:{description:"Disallow pointless identity `.map()` calls that return the parameter unchanged"},fixable:`code`,messages:{identityArrayMap:"Pointless identity `.map()` call on Array. Use `table.clone(array)` or `[...array]` instead.",identityBindingMap:"Pointless identity `.map()` call on Binding. Use the original binding directly."},schema:[{additionalProperties:!1,properties:{bindingPatterns:{default:[...nl],description:`Variable name patterns to recognize as Bindings (case insensitive)`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}});function dl(e){let{parent:t}=e;return t.type===`ExpressionStatement`||t.type===`ForStatement`&&t.update===e}const fl=_(`no-increment-decrement`,`general`,{create(e){let[t]=e.options,n=wi(t)&&t.allowAutofix,{sourceCode:r}=e;return{UpdateExpression(t){if(!dl(t))return;let i=r.getText(t.argument),a=t.operator===`++`?`noIncrement`:`noDecrement`;if(!n){e.report({messageId:a,node:t});return}let o=t.operator===`++`?`${i} += 1`:`${i} -= 1`;e.report({fix(e){return e.replaceText(t,o)},messageId:a,node:t})}}},meta:{docs:{description:"Disallow standalone `++` and `--` statements and for-loop update clauses.",recommended:!0},fixable:`code`,messages:{noDecrement:"Do not use standalone `--`. Use `-= 1` instead.",noIncrement:"Do not use standalone `++`. Use `+= 1` instead."},schema:[{additionalProperties:!1,properties:{allowAutofix:{default:!1,description:`Allow the fixer to replace standalone ++ and -- statements and for-loop updates.`,type:`boolean`}},type:`object`}],type:`suggestion`}});function pl(e){return e.name.type===`JSXIdentifier`?e.name.name:void 0}function ml(e){switch(e.type){case`ArrayExpression`:return`array`;case`ArrowFunctionExpression`:case`FunctionExpression`:return`function`;case`JSXElement`:case`JSXFragment`:return`JSX`;case`ObjectExpression`:return`object`;default:return}}const hl=_(`no-inline-property-on-memo-component`,`react`,{create(e){let t=new Set;return{JSXAttribute(n){if(n.value?.type!==`JSXExpressionContainer`||n.value.expression.type===`JSXEmptyExpression`)return;let r=n.parent;if(!ge(r))return;let i=pl(r);if(i===void 0||!t.has(i))return;let a=ml(n.value.expression);a!==void 0&&e.report({data:{name:i,type:a},messageId:`inlineProperty`,node:n.value.expression})},VariableDeclarator(e){e.id.type===`Identifier`&&e.init!==null&&kc(e.init)&&t.add(e.id.name)}}},meta:{docs:{description:`Prevent inline properties from being passed to memoized components.`,recommended:!0},messages:{inlineProperty:`Inline {{type}} passed to memoized component "{{name}}" — new references cause unnecessary re-renders`},type:`problem`}}),gl={checkPrivate:!0,checkProtected:!0,checkPublic:!0};function _l(e){return x(e)?{checkPrivate:typeof e.checkPrivate!=`boolean`||e.checkPrivate,checkProtected:typeof e.checkProtected!=`boolean`||e.checkProtected,checkPublic:typeof e.checkPublic!=`boolean`||e.checkPublic}:gl}function vl(e,t){if(e.static||e.kind!==`method`||e.value.type!==`FunctionExpression`)return!1;let n=e.accessibility??`public`;return!(n===`private`&&!t.checkPrivate||n===`protected`&&!t.checkProtected||n===`public`&&!t.checkPublic)}function yl(e,t){if(t.has(e))return!1;if(t.add(e),e.type===`ThisExpression`||e.type===`Super`)return!0;if(!x(e))return!1;for(let n in e)if(Object.hasOwn(e,n)&&bl(e[n],t))return!0;return!1}function bl(e,t){if(Array.isArray(e)){for(let n of e)if(D(n)&&yl(n,t))return!0;return!1}return D(e)&&yl(e,t)}function xl({value:e}){return yl(e,new WeakSet)}function Sl(e){return e.key.type===`Identifier`?e.key.name:`unknown`}const Cl=_(`no-instance-methods-without-this`,`roblox`,{create(e){let t=_l(e.options[0]);return{MethodDefinition(n){!vl(n,t)||xl(n)||e.report({data:{methodName:Sl(n)},messageId:`noInstanceMethodWithoutThis`,node:n})}}},meta:{docs:{description:`Detect instance methods that do not use 'this' and suggest converting them to standalone functions for better performance in roblox-ts.`},messages:{noInstanceMethodWithoutThis:`Method '{{methodName}}' does not use 'this' and creates unnecessary metatable overhead in roblox-ts. Convert it to a standalone function for better performance.`},schema:[{additionalProperties:!1,properties:{checkPrivate:{default:!0,description:`Check private methods (default: true)`,type:`boolean`},checkProtected:{default:!0,description:`Check protected methods (default: true)`,type:`boolean`},checkPublic:{default:!0,description:`Check public methods (default: true)`,type:`boolean`}},type:`object`}],type:`problem`}}),wl=new Set([`add`,`clear`,`copyWithin`,`delete`,`fill`,`pop`,`push`,`reverse`,`set`,`shift`,`sort`,`splice`,`unshift`]),Tl=new Set([`entries`,`keys`,`values`]),El=new Set([`ArrowFunctionExpression`,`ClassDeclaration`,`ClassExpression`,`FunctionDeclaration`,`FunctionExpression`]);function Dl(e){if(e!=null){if(e.type===`Identifier`)return e.name;if(e.type===`ParenthesizedExpression`||e.type===`TSAsExpression`||e.type===`TSNonNullExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSTypeAssertion`)return Dl(e.expression)}}function Ol(e){if(e.type===`ArrayPattern`)return Dl(e.elements[0]??void 0)}function kl(e){if(e.left.type===`VariableDeclaration`){let[t]=e.left.declarations;return t?.id}return e.left}function Al(e){return e.left.type===`VariableDeclaration`&&e.left.kind===`const`}function jl(e){let t=C(e);if(t.type===`Identifier`)return{method:`direct`,name:t.name};if(t.type!==`CallExpression`||t.callee.type!==`MemberExpression`||t.arguments.length>0||t.callee.optional||t.callee.object.type!==`Identifier`)return;let n=w(t.callee);if(!(n===void 0||!Tl.has(n)))return{method:n,name:t.callee.object.name}}function Ml(e){let t=jl(e.right);if(t===void 0)return;if(!Al(e))return{addArgumentName:void 0,deleteArgumentName:void 0,iterableName:t.name,setKeyName:void 0};let n=kl(e);if(n===void 0)return;let r,i,a;return t.method===`entries`?(r=Ol(n),i=r,a=r):t.method===`keys`?(i=Dl(n),a=i):(r=Dl(n),a=r??Ol(n),i=Ol(n)),{addArgumentName:r,deleteArgumentName:a,iterableName:t.name,setKeyName:i}}function Nl(e,t){if(t===void 0)return!1;let[n]=e.arguments;return n!==void 0&&n.type!==`SpreadElement`&&Dl(n)===t}function Pl(e,t){for(let n in e){if(n===`parent`||n===`range`||n===`loc`)continue;let r=Reflect.get(e,n);if(Array.isArray(r))for(let e of r)D(e)&&t.push(e);else D(r)&&t.push(r)}}function Fl(e,t){let n=[],r=[e];for(let e of r)if(!El.has(e.type)){if(e.type===`CallExpression`&&e.callee.type===`MemberExpression`){let r=w(e.callee),i=C(e.callee.object);r!==void 0&&wl.has(r)&&i.type===`Identifier`&&i.name===t&&n.push({call:e,method:r,property:e.callee.property})}Pl(e,r)}return n}function Il(e,t,n){let{method:r,call:i}=e;return r===`delete`&&Nl(i,t.deleteArgumentName)?!0:r===`add`&&Nl(i,t.addArgumentName)||r===`set`&&Nl(i,t.setKeyName)?!n.some(e=>e.call.range[0]<i.range[0]&&e.method===`delete`&&Nl(e.call,t.deleteArgumentName)):!1}const Ll=_(`no-loop-iterable-mutation`,`general`,{create(e){return{"ForOfStatement:exit"(t){if(t.await)return;let n=Ml(t);if(n===void 0)return;let r=Fl(t.body,n.iterableName);for(let t of r)Il(t,n,r)||e.report({data:{iterable:n.iterableName},messageId:`noLoopIterableMutation`,node:t.property})}}},meta:{docs:{description:`Disallow mutating a loop iterable during iteration.`,recommended:!0},messages:{noLoopIterableMutation:"Do not mutate `{{iterable}}` while iterating over it."},schema:[],type:`problem`}}),Rl=[`Axes`,`BrickColor`,`CFrame`,`Color3`,`ColorSequence`,`ColorSequenceKeypoint`,`DateTime`,`Enum`,`Faces`,`NumberRange`,`NumberSequence`,`NumberSequenceKeypoint`,`PathWaypoint`,`PhysicalProperties`,`Ray`,`Rect`,`Region3`,`Region3int16`,`TweenInfo`,`UDim`,`UDim2`,`Vector2`,`Vector3`,`Vector3int16`,`Vector3int32`],zl=new Set([`!`,`+`,`-`,`typeof`,`void`,`~`]),Bl=new Set(`ArrayExpression.ArrowFunctionExpression.AssignmentExpression.AwaitExpression.BinaryExpression.CallExpression.ChainExpression.ClassExpression.ConditionalExpression.FunctionExpression.Identifier.ImportExpression.Literal.LogicalExpression.MemberExpression.MetaProperty.NewExpression.ObjectExpression.ParenthesizedExpression.SequenceExpression.Super.TaggedTemplateExpression.TemplateLiteral.ThisExpression.TSAsExpression.TSInstantiationExpression.TSNonNullExpression.TSSatisfiesExpression.TSTypeAssertion.UnaryExpression.UpdateExpression.YieldExpression`.split(`.`));function Vl(e){return Bl.has(e.type)}function K(e){return e.type===`module`||e.type===`global`}function q(e){for(let t of e.defs)if(t.type===`ImportBinding`)return!0;return!1}function Hl(e){return e.type===`Variable`}function Ul(e){if(!Hl(e))return;let{node:t}=e;if(t.type!==`VariableDeclarator`)return;let{parent:n}=t;if(n.type===`VariableDeclaration`&&n.kind===`const`)return t.init??void 0}function Wl(e,t){let n=T(e.getScope(t),t.name);if(!(n===void 0||!K(n.scope)))for(let e of n.defs){let t=Ul(e);if(t!==void 0)return t}}function Gl(e,t){let n=T(e.getScope(t),t.name);if(n!==void 0)for(let e of n.defs){let t=Ul(e);if(t!==void 0)return t}}function Kl(e,t,n){let r=C(t);if(n.has(r))return!1;if(n.add(r),r.type===`Identifier`&&r.name===`undefined`||r.type===`UnaryExpression`&&r.operator===`void`)return!0;if(r.type!==`Identifier`)return!1;let i=Gl(e,r);return i!==void 0&&Kl(e,i,n)}function ql(e,t,n,r){return t.type===`Identifier`?!0:Vl(t)?J(e,t,n,r):!1}function Jl(e){let t=C(e);for(;t.type===`MemberExpression`;)t=C(t.object);return t.type===`Identifier`?t.name:void 0}function Yl(e,t,n,r){if(r.staticCallsRequireFactories===!0){let e=Jl(t);if(e===void 0||!r.staticGlobalFactories.has(e))return!1}let i=C(t);return i.type===`Identifier`?Zl(e,i,n,r):i.type!==`MemberExpression`||!J(e,i.object,n,r)?!1:i.computed?J(e,i.property,n,r):i.property.type===`Identifier`}function Xl(e,t,n,r,i){return Yl(e,n,r,i)?t.every(t=>t.type!==`SpreadElement`&&J(e,t,r,i)):!1}function J(e,t,n,r){let i=C(t);if(n.has(i))return!1;switch(n.add(i),i.type){case`ArrayExpression`:return eu(e,i,n,r);case`BinaryExpression`:case`LogicalExpression`:return Vl(i.left)?J(e,i.left,n,r)&&J(e,i.right,n,r):!1;case`CallExpression`:return Xl(e,i.arguments,i.callee,n,r);case`ChainExpression`:return J(e,i.expression,n,r);case`ConditionalExpression`:return J(e,i.test,n,r)&&J(e,i.consequent,n,r)&&J(e,i.alternate,n,r);case`Identifier`:return Zl(e,i,n,r);case`Literal`:return!0;case`MemberExpression`:return J(e,i.object,n,r)&&(!i.computed||ql(e,i.property,n,r));case`NewExpression`:return Xl(e,i.arguments,i.callee,n,r);case`ObjectExpression`:return $l(e,i,n,r);case`SequenceExpression`:return i.expressions.length>0&&i.expressions.every(t=>J(e,t,n,r));case`TemplateLiteral`:return i.expressions.length===0;case`UnaryExpression`:return zl.has(i.operator)&&J(e,i.argument,n,r);default:return!1}}function Zl(e,t,n,r){let i=T(e.getScope(t),t.name);if(i===void 0)return r.staticGlobalFactories.has(t.name);if(!K(i.scope))return!1;if(q(i))return!0;for(let t of i.defs){let i=Ul(t);if(i!==void 0&&J(e,i,n,r))return!0}return!1}function Ql(e){return e.type!==`PrivateIdentifier`&&e.type!==`Identifier`}function $l(e,t,n,r){for(let i of t.properties)if(i.type!==`Property`||i.kind!==`init`||i.computed&&Ql(i.key)&&!J(e,i.key,n,r)||!J(e,i.value,n,r))return!1;return!0}function eu(e,{elements:t},n,r){for(let i of t)if(i===null||i.type===`SpreadElement`||!J(e,i,n,r))return!1;return!0}function tu(e){return e.type===`JSXIdentifier`?e.name:e.name.name}function nu(e){return e===`nativeProperties`||e.endsWith(`NativeProperties`)}function ru(e){if(e.type===`Variable`&&e.node.type===`VariableDeclarator`)return e.node.init??void 0}function iu(e){let t=C(e);for(;t.type===`MemberExpression`;){let e=C(t.object);if(e.type===`Identifier`)return e;if(e.type!==`MemberExpression`)return;t=e}return t.type===`Identifier`?t:void 0}function au(e,t){let n=C(t);if(n.type===`ObjectExpression`)return!0;let r=iu(n);if(r===void 0)return!1;let i=T(e.getScope(r),r.name);return i===void 0?!1:q(i)||K(i.scope)}function ou(e,t,n){let r=C(t);if(n.has(r))return;if(n.add(r),r.type===`ObjectExpression`)return r;if(r.type!==`Identifier`)return;let i=T(e.getScope(r),r.name);if(!(i===void 0||K(i.scope)))for(let t of i.defs){let r=ru(t);if(r===void 0)continue;let i=ou(e,r,n);if(i!==void 0)return i}}const su=_(`no-native-properties-spread`,`roblox`,{create(e){let{sourceCode:t}=e;function n(n,r){for(let i of n.properties){if(i.type!==`SpreadElement`||!au(t,i.argument))continue;let n=t.getText(i.argument);e.report({data:`propertyName`in r?{prop:r.propertyName,source:n}:{source:n},messageId:r.messageId,node:i})}}return{JSXAttribute(e){let r=tu(e.name);if(r===void 0||!nu(r))return;let{value:i}=e;if(i?.type!==`JSXExpressionContainer`)return;let{expression:a}=i;if(a.type===`JSXEmptyExpression`)return;let o=ou(t,a,new Set);o!==void 0&&n(o,{messageId:`noNativePropertiesSpread`,propertyName:r})},JSXSpreadAttribute(e){let r=ou(t,e.argument,new Set);r!==void 0&&n(r,{messageId:`noElementSpread`})}}},meta:{docs:{description:`Disallow spreading static property bags into nativeProperties/*NativeProperties props and onto JSX elements via intermediate objects, because the spread creates a new copied table every render.`,recommended:!0},messages:{noElementSpread:`Spreading static property bag {{source}} through an intermediate object creates a new table every render. Inline the full object properties directly on the JSX element.`,noNativePropertiesSpread:`Spreading static property bag {{source}} into {{prop}} creates a new table every render. Pass it directly or inline the full object instead.`},schema:[],type:`problem`}});function cu(e){return e.parent.type===`ExpressionStatement`?!0:e.parent.type!==`UnaryExpression`||e.parent.operator!==`void`?!1:e.parent.parent.type===`ExpressionStatement`}function lu(e,t,n,r){if(_r(e,t))for(let t of e.specifiers){if(t.type===`ImportSpecifier`){de(t.imported,`useMemo`)&&n.add(t.local.name);continue}r.add(t.local.name)}}const uu=new Set([`Instance`]);function du(e){let t=x(e)&&S(e.constructors)?new Set(e.constructors):uu,n=x(e)&&e.environment===`standard`?`standard`:`roblox-ts`,r=x(e)?e.maxHelperTraceDepth:void 0;return{constructors:t,environment:n,maxHelperTraceDepth:ie(r)&&Number.isInteger(r)&&r>=0?r:4}}function fu(e){return e?.type===`CallExpression`}function pu(e,t,n){let r=e.parent;for(;r!==null;){if(Ie(r)){let{parent:e}=r;if(fu(e)&&e.arguments[0]===r){if(!pe(e,t,n)){r=e.parent;continue}return!0}}r=r.parent}return!1}function mu(e,t,n,r,i){let a=r.get(e);if(a!==void 0)return a;if(i.has(e))return new Set;i.add(e);let o=new Set;for(let a of e.defs){let e=hu(a,t,n,r,i);for(let t of e)o.add(t)}return i.delete(e),r.set(e,o),o}function hu(e,t,n,r,i){if(e.type===`FunctionName`)return gu(e,n);if(e.type!==`Variable`)return new Set;let{node:a}=e;if(a.type!==`VariableDeclarator`||a.init===null)return new Set;let o=C(a.init);if(Ie(o))return _u(o,n);if(o.type!==`Identifier`)return new Set;let s=T(t.getScope(o),o.name);return s===void 0?new Set:mu(s,t,n,r,i)}function gu(e,t){let{node:n}=e;return n.type===`FunctionDeclaration`?_u(n,t):new Set}function _u(e,t){let n=t.get(e)?.id;return n===void 0?new Set:new Set([n])}function vu(e,t,n,r){let i=T(t.getScope(e),e.name);return i===void 0?new Set:mu(i,t,n,r,new Set)}function yu(e,t,n,r){for(let i of t.values())for(let t of i.callIdentifiers){let a=vu(t,e,n,r);for(let e of a)i.callees.add(e)}}function bu(e,t,n){let r=new Set(e),i=[];for(let t of e)i.push({depth:0,functionId:t});let a=0;for(;a<i.length;){let e=i[a];if(a+=1,e===void 0||e.depth>=n)continue;let o=t.get(e.functionId);if(o!==void 0)for(let t of o.callees)r.has(t)||(r.add(t),i.push({depth:e.depth+1,functionId:t}))}return r}function xu(e,t,n,r,i){let a=new Set;for(let e of t){let t=r.get(e)?.id;t!==void 0&&a.add(t)}for(let t of n){let n=vu(t,e,r,i);for(let e of n)a.add(e)}return a}const Su=_(`no-new-instance-in-use-memo`,`react`,{create(e){let t=du(e.options[0]);if(t.constructors.size===0)return{};let n=hr(t.environment),r=new Set,i=new Set,a=new Map,o=new Map,s=[],c=[],l=[],u=[],d=new Map,f=0;function p(e){let t=a.get(e);if(t!==void 0)return t;let n={callIdentifiers:[],callees:new Set,id:f};return f+=1,a.set(e,n),o.set(n.id,n),n}function m(e){let t=s.at(-1);if(t===void 0)return;let n=o.get(t);n!==void 0&&n.callIdentifiers.push(e)}function h(e){s.push(p(e).id)}function g(){s.pop()}return{ArrowFunctionExpression:h,"ArrowFunctionExpression:exit":g,CallExpression(e){if(e.callee.type===`Identifier`&&m(e.callee),!pe(e,r,i))return;let[t]=e.arguments;if(t!==void 0){if(t.type===`Identifier`){l.push(t);return}Ie(t)&&u.push(t)}},FunctionDeclaration:h,"FunctionDeclaration:exit":g,FunctionExpression:h,"FunctionExpression:exit":g,ImportDeclaration(e){lu(e,n,r,i)},NewExpression(e){if(e.callee.type!==`Identifier`)return;let n=e.callee.name;t.constructors.has(n)&&c.push({constructorName:n,containingFunctionId:s.at(-1),isLexicallyInsideUseMemo:pu(e,r,i),node:e})},"Program:exit"(){yu(e.sourceCode,o,a,d);let n=bu(xu(e.sourceCode,u,l,a,d),o,t.maxHelperTraceDepth);for(let t of c){let r=t.containingFunctionId!==void 0&&n.has(t.containingFunctionId);(t.isLexicallyInsideUseMemo||r)&&e.report({data:{constructorName:t.constructorName},messageId:`noNewInUseMemo`,node:t.node})}}}},meta:{docs:{description:`Disallow configured constructor calls (default: new Instance) inside React useMemo callbacks.`},messages:{noNewInUseMemo:"Avoid creating '{{constructorName}}' with `new` inside useMemo. Create it outside the memo callback or use an effect/ref pattern."},schema:[{additionalProperties:!1,properties:{constructors:{default:[...uu],description:`Constructor identifiers that should be disallowed inside useMemo callbacks.`,items:{type:`string`},type:`array`},environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},maxHelperTraceDepth:{default:4,description:`Maximum depth for tracing local helper function calls from useMemo callbacks. 0 disables helper traversal.`,minimum:0,type:`integer`}},type:`object`}],type:`problem`}}),Cu=Ls({alternative:`Log`,category:`roblox`,message:`{{name}}() is a raw output function lacking log levels, timestamps, and filtering. Production systems require structured logging for debugging and monitoring. Replace {{name}}(...) with {{alternative}}.`,messageId:`noPrint`,name:`print`,ruleName:`no-print`});function wu(e,t){let n=t;for(;n;){if(n.set.has(e))return!0;n=n.upper}return!1}function Tu(e){let t=new Map,n=new Set;for(let n of e.keys())t.set(n,0);function r(i,a){t.set(i,1),a.push(i);for(let o of e.get(i)??[]){let e=t.get(o);if(e===1){let e=a.lastIndexOf(o);for(let t=e;t<a.length;t+=1){let e=a[t];e!==void 0&&n.add(e)}}else e===0&&r(o,a)}a.pop(),t.set(i,2)}for(let n of e.keys())t.get(n)===0&&r(n,[]);return n}const Eu=_(`no-recursive`,`general`,{create(e){let{sourceCode:t}=e,n=new Map,r=[],i=[],a=[],o=new Map;function s(e){r.push(e)}function c(){r.pop()}function l(){for(let e=r.length-1;e>=0;--e){let t=r[e];if(t!==void 0)return t}}function u(e){n.has(e)||n.set(e,new Set)}function d(){for(let e=a.length-1;e>=0;--e)if(a[e]!==void 0)return a[e]}return{ArrowFunctionExpression(){s(void 0)},"ArrowFunctionExpression:exit":c,CallExpression(e){let r=l();if(r===void 0)return;let a,s=!1;if(e.callee.type===`Identifier`?a=e.callee.name:e.callee.type===`MemberExpression`&&e.callee.object.type===`ThisExpression`&&e.callee.property.type===`Identifier`&&(a=e.callee.property.name,s=!0),a===void 0)return;let c=!1;if(s){let e=d();e!==void 0&&o.get(e)?.has(a)===!0&&(c=!0)}else{let n=t.getScope(e);c=wu(a,n)}c&&(n.get(r)?.add(a),i.push({callee:a,caller:r,node:e}))},ClassDeclaration(e){let t=e.id?.name;t!==void 0&&!o.has(t)&&o.set(t,new Set),a.push(t)},"ClassDeclaration:exit"(){a.pop()},FunctionDeclaration(e){let t=e.id?.name;t!==void 0&&t.length>0&&u(t),s(t)},"FunctionDeclaration:exit":c,FunctionExpression(e){e.id&&u(e.id.name);let{parent:t}=e;t.type===`MethodDefinition`&&t.key.type===`Identifier`?s(t.key.name):s(void 0)},"FunctionExpression:exit":c,MethodDefinition(e){let t=d();e.key.type===`Identifier`&&t!==void 0&&(o.get(t)?.add(e.key.name),u(e.key.name))},"Program:exit"(){let t=Tu(n);if(t.size!==0)for(let n of i)t.has(n.caller)&&t.has(n.callee)&&e.report({messageId:`noRecursive`,node:n.node})},VariableDeclarator(e){e.id.type!==`Identifier`||e.init===null||e.init.type!==`FunctionExpression`&&e.init.type!==`ArrowFunctionExpression`||(u(e.id.name),s(e.id.name))},"VariableDeclarator:exit"(e){e.id.type!==`Identifier`||e.init===null||e.init.type!==`FunctionExpression`&&e.init.type!==`ArrowFunctionExpression`||c()}}},meta:{docs:{description:`Disallow recursive function calls to prevent stack overflow.`},messages:{noRecursive:`Recursion is not allowed (JPL Power of 10). Use iteration instead — a loop or explicit stack.`},schema:[{additionalProperties:!1,properties:{},type:`object`}]}}),Du=new f({extensions:[`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.cjs`,`.json`,`.node`]}),Ou={found:!1};function ku(e,t){if(!e.startsWith(`.`))return Ou;let{path:n}=Du.sync(r(t),e);return n===void 0||n===``?Ou:{found:!0,path:n}}const Au=`uiaspectratioconstraint`,ju=new Set([`ButtonSpritesheet`,`GenericSpritesheet`,`LabelSpritesheet`]);function Mu({openingElement:e}){let{name:t}=e;return t.type===`JSXIdentifier`?t.name:void 0}function Nu(e){let t=!1;return Li(e,e=>{t||e.type===`JSXElement`&&Mu(e)===Au&&(t=!0)}),t}function Pu(e){if(e.type===`FunctionDeclaration`)return e.id?.name;if(Ie(e)){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`)return t.id.name}}function Fu(e){if(e.body.type!==`BlockStatement`)return C(e.body)}function Iu(e){for(let t of e.defs){if(t.type!==`ImportBinding`)continue;let{parent:e}=t.node;if(e?.type===`ImportDeclaration`&&y(e.source.value))return e.source.value}}const Lu=new Map;function Ru(e,t){if(!e.startsWith(`.`))return!1;let n=ku(e,t);if(!n.found)return!1;let r=Lu.get(n.path);if(r!==void 0)return r;try{let e=u(n.path,`utf8`).includes(`<uiaspectratioconstraint`);return Lu.set(n.path,e),e}catch{return Lu.set(n.path,!1),!1}}function zu(e){for(let t of e.openingElement.attributes)if(t.type===`JSXAttribute`&&t.name.type===`JSXIdentifier`&&t.name.name===`scaled`&&t.value?.type===`JSXExpressionContainer`&&t.value.expression.type===`Literal`&&t.value.expression.value===!1)return!0;return!1}function Bu(e){return e.type===`JSXElement`?Mu(e)===Au:e.type===`JSXExpressionContainer`&&e.expression.type===`Identifier`&&e.expression.name===`UI_ASPECT_RATIO_CONSTRAINT`}function Vu(e,t,n,r){if(t.has(e))return!0;if(n===void 0)return!1;let i=n.set.get(e);if(i===void 0||!q(i))return!1;let a=Iu(i);return a!==void 0&&(Ru(a,r)||ju.has(e))}const Hu=_(`no-redundant-aspect-ratio-constraint`,`roblox`,{create(e){let{filename:t,sourceCode:n}=e,r=new Set,i=[],a;return{ArrowFunctionExpression(e){let t=Pu(e),n=Fu(e);t===void 0||n===void 0||n.type!==`JSXElement`&&n.type!==`JSXFragment`||Nu(n)&&r.add(t)},FunctionDeclaration(e){let t=Pu(e);if(t===void 0||e.body?.body.length!==1)return;let[n]=e.body.body;n?.type===`ReturnStatement`&&n.argument!==null&&Nu(n.argument)&&r.add(t)},ImportDeclaration(e){a??=e},JSXElement(e){i.push(e)},"Program:exit"(){let o;a!==void 0&&(o=n.getScope(a));for(let n of i){let i=Mu(n);if(i!==void 0&&!(!Vu(i,r,o,t)||zu(n)))for(let t of n.children)Bu(t)&&e.report({messageId:`redundantAspectRatioConstraint`,node:t})}}}},meta:{docs:{description:`Disallow redundant uiaspectratioconstraint children inside components that already manage their own aspect ratio internally.`},messages:{redundantAspectRatioConstraint:`This component already renders a uiaspectratioconstraint internally. Passing one as a child is redundant and will cause layout issues.`},schema:[],type:`problem`}}),Uu=new Set([`JSXElement`,`ReactElement`,`ReactNode`]),Wu=new Set([`ChainExpression`,`ParenthesizedExpression`,`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]),Gu=/^use[A-Z]/u;function Ku(e){return Gu.test(e)}function qu(e){if(e?.type!==`TSTypeReference`)return!1;let{typeName:t}=e;return t.type===`Identifier`?Uu.has(t.name):t.type===`TSQualifiedName`&&Uu.has(t.right.name)}function Ju({returnType:e}){return e?.typeAnnotation??void 0}function Yu(e){if(e.type===`ArrowFunctionExpression`&&(e.body.type===`JSXElement`||e.body.type===`JSXFragment`))return!0;if(e.body===null)return!1;let t=!1;return Ri(e.body,e=>{if(t||e.type!==`ReturnStatement`)return;let{argument:n}=e;n!==null&&(n.type===`JSXElement`||n.type===`JSXFragment`)&&(t=!0)}),t}function Xu({parent:e}){return e.type===`CallExpression`||e.type===`JSXExpressionContainer`||e.type===`ArrayExpression`}function Zu(e){if(e.parent?.type===`VariableDeclarator`&&e.parent.id.type===`Identifier`)return e.parent.id.name}function Qu(e){return e.type===`Identifier`?e.name:void 0}function $u(e){let t=e;for(;t!==void 0&&Wu.has(t.type);)t=t.parent??void 0;return t}function ed(e){let t=$u(e.parent??void 0);return t?.type===`Property`&&rd(t.value)===e}function td(e){let t=$u(e.parent??void 0);return t?.type===`JSXExpressionContainer`&&t.parent.type===`JSXAttribute`&&rd(t.expression)===e}function nd(e){let t=$u(e.parent??void 0);return t?.type===`CallExpression`&&t.arguments.some(t=>rd(t)===e)}function rd(e){let t=e;for(;id(t);)t=t.expression;return t}function id(e){return Wu.has(e.type)}function ad(e,t){if(t.type===`FunctionDeclaration`){let n=e.getDeclaredVariables(t);return n.length>0?n[0]:void 0}let{parent:n}=t;if(n.type!==`VariableDeclarator`)return;let r=e.getDeclaredVariables(n);return r.length>0?r[0]:void 0}function od(e,t){let n=ad(t,e);if(n===void 0)return!1;let r=!1;for(let e of n.references)if(!e.isWrite()&&(r=!0,!(ed(e.identifier)||td(e.identifier)||nd(e.identifier))))return!1;return r}const sd=_(`no-render-helper-functions`,`react`,{create(e){let t=0;function n(t,n){e.report({data:{functionName:n},messageId:`noRenderHelper`,node:t})}function r(e){return e===void 0||G(e)||Ku(e)}function i(t,i){let a=Qu(i.id);if(r(a)||od(t,e.sourceCode))return;let o=le(i.id),s=o!==void 0&&qu(o.typeAnnotation),c=qu(Ju(t));(s||c||Yu(t))&&a!==void 0&&n(i,a)}function a(e){let t=e.type===`FunctionExpression`?e.id?.name:void 0;r(t)||(qu(Ju(e))||Yu(e))&&t!==void 0&&n(e,t)}function o(e){let{parent:n}=e,r=Zu(e);if(r!==void 0&&G(r)){--t;return}if(!(t>0||Xu(e))){if(n.type===`VariableDeclarator`){i(e,n);return}n.type===`ReturnStatement`&&a(e)}}return{ArrowFunctionExpression(e){let n=Zu(e);n!==void 0&&G(n)&&(t+=1)},"ArrowFunctionExpression:exit":o,FunctionDeclaration({id:e}){e!==null&&G(e.name)&&(t+=1)},"FunctionDeclaration:exit"(r){if(r.id===null)return;let i=r.id.name;if(G(i)){--t;return}t>0||Ku(i)||od(r,e.sourceCode)||(qu(Ju(r))||Yu(r))&&n(r,i)},FunctionExpression(e){let n=Zu(e);n!==void 0&&G(n)&&(t+=1)},"FunctionExpression:exit":o}},meta:{docs:{description:`Disallow non-component functions that return JSX or React elements.`},messages:{noRenderHelper:`Convert render helper '{{functionName}}' to a React component. Functions that return JSX should be PascalCase components, not camelCase helpers.`},schema:[],type:`suggestion`}}),cd=p({"message?":`string | undefined`,object:`string`,properties:p(`string[]`).readonly()}).readonly(),ld=p({"allowFiles?":p(`string[]`).readonly().or(`undefined`),"checkComputed?":`boolean | undefined`,restrictions:cd.array().readonly()}).readonly(),ud={matchBase:!0},dd={dot:!0,magicalBraces:!0};function fd(e){return e.replaceAll(`\\`,`/`)}function pd(e){let t=fd(e);if(!a(e))return[t];let n=fd(s(process.cwd(),e));return n.length===0||n.startsWith(`..`)?[t]:[t,n]}function md(e,t){let n=new m(e,t),r=n.hasMagic();return{hasMagic:r,matches:r?e=>n.match(e):t=>t===e}}function hd(e){let t=new Set,n=[],r=0;for(let i of e){let e=md(i,dd);e.hasMagic?n[r++]=e.matches:t.add(i)}return e=>t.has(e)||n.some(t=>t(e))}function gd(e){return{matchesObject:md(e.object,dd).matches,matchesProperty:hd(e.properties),message:e.message}}function _d(e){let[t]=e.options;if(!ld.allows(t))return{checkComputed:!0,isAllowedFile:!1,restrictions:[]};let{allowFiles:n,checkComputed:r,restrictions:i}=t,a=pd(e.filename),o=n?.some(e=>a.some(t=>h(t,e,ud)))??!1;return{checkComputed:r??!0,isAllowedFile:o,restrictions:i.map(gd)}}const vd=_(`no-restricted-property-assignment`,`general`,{create(e){let{checkComputed:t,isAllowedFile:n,restrictions:r}=_d(e);function i(i,a){if(n||!M(i)||i.computed&&!t||i.object.type!==`Identifier`)return;let o=w(i);if(o!==void 0){for(let t of r)if(t.matchesObject(i.object.name)&&t.matchesProperty(o)){t.message===void 0?e.report({data:{object:i.object.name,property:o},messageId:`restricted`,node:a}):e.report({data:{message:t.message},messageId:`restrictedCustom`,node:a});return}}}return{AssignmentExpression(e){i(e.left,e)},UpdateExpression(e){i(e.argument,e)}}},meta:{docs:{description:`Disallow assignment to restricted object properties.`,recommended:!0},messages:{restricted:`Assignment to '{{object}}.{{property}}' is not permitted.`,restrictedCustom:`{{message}}`},schema:[{additionalProperties:!1,properties:{allowFiles:{items:{type:`string`},type:`array`},checkComputed:{default:!0,type:`boolean`},restrictions:{items:{additionalProperties:!1,properties:{message:{type:`string`},object:{type:`string`},properties:{items:{type:`string`},minItems:1,type:`array`}},required:[`object`,`properties`],type:`object`},type:`array`}},required:[`restrictions`],type:`object`}],type:`problem`}}),yd=/\.spec\.(?:ts|tsx)$/u,bd=_(`no-spec-file-extension`,`naming`,{createOnce(e){return{Program(t){let{filename:n}=e;n&&yd.test(n)&&e.report({messageId:`noSpecFileExtension`,node:t})}}},meta:{docs:{description:`Disallow the .spec.{ts,tsx} file extension for test files. Use .test.{ts,tsx} instead.`,recommended:!0},messages:{noSpecFileExtension:`Test files must use .test.ts or .test.tsx instead of .spec.ts or .spec.tsx. Rename this file to use the .test extension.`},schema:[],type:`problem`}}),xd=`Fragment`;function Sd(e,t){if(e===void 0)return!1;for(let n of e.defs)if(xr(n,t)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0;return!1}function Cd(e,t,n){if(e===void 0)return!1;for(let r of e.defs)if(xr(r,n)&&r.node.type===`ImportSpecifier`&&me(r.node)===t)return!0;return!1}function wd(e,t,n){let{callee:r}=t;return r.type===`Identifier`?Cd(T(e.getScope(r),r.name),`createElement`,n):r.type!==`MemberExpression`||r.computed||w(r)!==`createElement`||r.object.type!==`Identifier`?!1:Sd(T(e.getScope(r.object),r.object.name),n)}function Td(e){return e.type===`Literal`&&y(e.value)}function Ed(e,t){if(q(e))return O(t)||t===xd;if(!K(e.scope)||!O(t)&&t!==xd)return!1;for(let t of e.defs){if(t.type===`FunctionName`||t.type===`ClassName`)return!0;if(t.type!==`Variable`||t.node.type!==`VariableDeclarator`)continue;let e=t.node.init??void 0;if(e!==void 0&&(Ie(e)||e.type===`ClassExpression`))return!0}return!1}function Dd(e,t,n){let r=T(e.getScope(t),t.name);return Cd(r,xd,n)?!0:r!==void 0&&Ed(r,t.name)}function Od(e){let t=e;for(;;){if(t.computed)return;if(t.object.type===`Identifier`)return t.object;if(t.object.type!==`MemberExpression`)return;t=t.object}}function kd(e){if(e.computed)return;let t=w(e);if(t!==void 0)return e.object.type===`MemberExpression`&&kd(e.object)===void 0?void 0:t}function Ad(e,t,n){let r=Od(t);if(r===void 0)return!1;let i=kd(t);if(i===void 0)return!1;let a=T(e.getScope(r),r.name);return Sd(a,n)&&i===xd?!0:a===void 0||!q(a)?!1:O(i)}function jd(e,t,n){return t.type===`SpreadElement`?!1:Td(t)?!0:t.type===`Identifier`?Dd(e,t,n):t.type===`MemberExpression`&&Ad(e,t,n)}const Md=_(`no-static-react-create-element`,`react`,{create(e){let t=gr(e.options[0]),{sourceCode:n}=e;return{CallExpression(r){if(!wd(n,r,t))return;let[i]=r.arguments;i!==void 0&&jd(n,i,t)&&e.report({messageId:`useJsx`,node:r})}}},meta:{docs:{description:`Require JSX for static React.createElement calls.`,recommended:!0},messages:{useJsx:`Use JSX instead of static React.createElement calls.`},schema:[{additionalProperties:!1,properties:{environment:dr},type:`object`}],type:`problem`}});function Nd(e,t){let n=C(t);if(n.type!==`CallExpression`||n.optional)return!1;let r=C(n.callee);if(r.type!==`MemberExpression`||r.optional||w(r)!==`create`)return!1;let i=C(r.object);return i.type!==`Identifier`||i.name!==`table`?!1:!E(e,i,`table`)}function Pd(e,t){let n=C(t);if(n.type!==`NewExpression`||n.arguments.length!==1&&n.arguments.length!==2)return!1;let r=C(n.callee);return r.type!==`Identifier`||r.name!==`Array`?!1:!E(e,r,`Array`)}const Fd=_(`no-table-create-map`,`roblox`,{create(e){return{CallExpression(t){if(t.optional)return;let n=C(t.callee);if(n.type!==`MemberExpression`||n.optional||w(n)!==`map`)return;let r=C(n.object);(Nd(e.sourceCode,r)||Pd(e.sourceCode,r))&&e.report({messageId:`avoidConstructThenMap`,node:t})}}},meta:{docs:{description:`Disallow map(...) directly on table.create(...) and new Array(...) constructor patterns in roblox-ts.`},messages:{avoidConstructThenMap:`Do not map directly on table.create(...) or new Array(...). Allocate first, then write by index in a loop.`},schema:[],type:`suggestion`}});function Id(e){let{callee:t}=e;if(t.type!==`MemberExpression`||w(t)!==`await`||t.object.type!==`CallExpression`)return!1;let n=t.object.callee;return n.type!==`MemberExpression`||n.object.type!==`Identifier`||n.object.name!==`Promise`?!1:w(n)===`delay`}const Ld=_(`no-task-wait`,`roblox`,{createOnce(e){return{CallExpression(t){if(Id(t)){e.report({messageId:`noPromiseDelayAwait`,node:t});return}let{callee:n}=t;n.type===`MemberExpression`&&n.object.type===`Identifier`&&n.object.name===`task`&&w(n)===`wait`&&e.report({messageId:`noTaskWait`,node:t})}}},meta:{docs:{description:`Disallow task.wait() and Promise.delay(...).await() calls.`},messages:{noPromiseDelayAwait:`Do not use Promise.delay(...).await() in tests. Advance deterministic schedulers or wait for the actual condition instead.`,noTaskWait:`Do not use task.wait() in tests. Advance deterministic schedulers or wait for the actual condition instead.`},schema:[],type:`problem`}});function Rd(e){return e===!1||e===0||e===``||e==null||e===0n}const zd=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`ClassExpression`,`FunctionExpression`,`NewExpression`,`ObjectExpression`]),Bd=new Set([`toBe`]),Vd=new Set([`toEqual`,`toStrictEqual`]),Hd=new Map([[`toBeDefined`,`defined`],[`toBeFalsy`,`falsy`],[`toBeNull`,`null`],[`toBeTruthy`,`truthy`],[`toBeUndefined`,`undefined`]]),Ud=new Set([`deepStrictEqual`,`notDeepStrictEqual`,`notStrictEqual`,`strictEqual`]),Wd=new Set([`deepEqual`,`equal`,`notDeepEqual`,`notEqual`]);function Gd(e){return e.type===`Literal`&&`regex`in e||zd.has(e.type)}function Kd(e){if(e.type===`Literal`){if(e.value===null)return{value:null};if(typeof e.value==`string`||typeof e.value==`number`||typeof e.value==`boolean`||typeof e.value==`bigint`)return{value:e.value}}}function qd(e){let t=e;for(;t.type===`ChainExpression`||t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSInstantiationExpression`||t.type===`TSNonNullExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`;)t=t.expression;return t}function Jd(e,t,n){if(t.operator===`void`)return{value:void 0};if(t.operator===`typeof`){let r=Xd(e,t.argument,n);return r===void 0?void 0:{value:typeof r.value}}let r=Xd(e,t.argument,n);if(r!==void 0){if(t.operator===`!`)return{value:Rd(r.value)};if(typeof r.value==`number`){if(t.operator===`+`)return{value:r.value};if(t.operator===`-`)return{value:-r.value}}}}function Yd(e,t,n){if(t.name===`undefined`)return{value:void 0};let[r]=T(e.getScope(t),t.name)?.defs??[];if(r?.type===`Variable`&&r.node.type===`VariableDeclarator`&&r.node.init!==null&&r.parent?.type===`VariableDeclaration`&&r.parent.kind===`const`)return Xd(e,r.node.init,n)}function Xd(e,t,n){let r=qd(t);if(n.has(r))return;n.add(r);let i=Kd(r);if(i!==void 0)return i;if(r.type===`UnaryExpression`)return Jd(e,r,n);if(r.type===`Identifier`)return Yd(e,r,n)}function Zd(e,t){return e===`truthy`?!Rd(t):e===`falsy`?Rd(t):e===`defined`?t!==void 0:e===`undefined`?t===void 0:t===null}function Qd(e){return e===`truthy`||e===`defined`}function $d(e,t,n){return Object.is(t,n)}function ef(e){return e.callee.type===`Identifier`&&e.callee.name===`expect`}function tf(e){if(e.callee.type!==`MemberExpression`)return;let t=e.callee.object;if(t.type===`MemberExpression`&&w(t)===`not`&&(t=t.object),!(t.type!==`CallExpression`||!ef(t)))return t}function nf(e){if(e.callee.type!==`MemberExpression`)return!1;let{object:t}=e.callee;return t.type===`MemberExpression`&&w(t)===`not`}function rf(e,t){let n=e.arguments[t];if(n!==void 0&&n.type!==`SpreadElement`)return qd(n)}function af(e,t,n,r){let i=Xd(e.sourceCode,t,new Set);if(i!==void 0&&Zd(n,i.value)!==r){e.report({messageId:`issue`,node:t});return}Gd(t)&&Qd(n)!==r&&e.report({messageId:`freshPredicate`,node:t})}function of(e,t,n,r,i,a){if(r&&(Gd(t)||Gd(n))){e.report({data:{matcher:a},messageId:`freshIdentity`,node:Gd(t)?t:n});return}let o=Xd(e.sourceCode,t,new Set),s=Xd(e.sourceCode,n,new Set);o!==void 0&&s!==void 0&&$d(r,o.value,s.value)!==i&&e.report({messageId:`issue`,node:t})}function sf(e,t){let n=tf(t);if(n===void 0||t.callee.type!==`MemberExpression`)return;let r=w(t.callee);if(r===void 0)return;let i=rf(n,0);if(i===void 0)return;let a=nf(t),o=Hd.get(r);if(o!==void 0){af(e,i,o,a);return}let s=Bd.has(r);if(!(s||Vd.has(r)))return;let c=rf(t,0);c!==void 0&&of(e,i,c,s,a,a?`not.toEqual`:`toEqual`)}function cf(e,t){if(t.callee.type!==`MemberExpression`||t.callee.object.type!==`Identifier`||t.callee.object.name!==`assert`)return;let n=w(t.callee);if(n===void 0)return;let r=rf(t,0);if(r===void 0)return;if(n===`ok`||n===`notOk`){let t=Xd(e.sourceCode,r,new Set),i=n===`ok`;t!==void 0&&!!t.value===i&&e.report({messageId:`issue`,node:r});return}let i=rf(t,1);if(i===void 0)return;let a=Ud.has(n);if(!(a||Wd.has(n)))return;let o=n.startsWith(`not`);of(e,r,i,a,o,o?`notDeepStrictEqual`:`deepStrictEqual`)}const lf=_(`no-trivial-assertions`,`general`,{create(e){return{CallExpression(t){if(tf(t)!==void 0){sf(e,t);return}cf(e,t)}}},meta:{docs:{description:`Disallow assertions that always succeed or compare against freshly created values.`,recommended:!0},messages:{freshIdentity:"Use `{{matcher}}` instead; freshly-created values are never identical to other values.",freshPredicate:`Replace this assertion; the value is freshly created here, so the result is independent of the code under test.`,issue:`Replace this assertion; it always succeeds.`},schema:[],type:`problem`}}),uf=_(`no-underscore-react-props`,`react`,{createOnce(e){return{JSXAttribute(t){t.name.type!==`JSXIdentifier`||!t.name.name.startsWith(`_`)||e.report({data:{propName:t.name.name},messageId:`noUnderscoreReactProperty`,node:t.name})}}},meta:{docs:{description:`Ban React property names that begin with an underscore in JSX.`},messages:{noUnderscoreReactProperty:`React prop '{{propName}}' starts with '_'. Remove the leading underscore from the prop name.`},schema:[],type:`problem`}}),df=/@(?:link|linkcode|linkplain|see)\s+\{?(?<identifier>\w+)/gu,ff=/\{@(?:link|linkcode|linkplain|see)\s+(?<identifier>\w+)/gu,pf=/[@{](?:type|typedef|param|returns?|template|augments|extends|implements)\s+(?<annotation>[^}]*)/gu,mf=/\b(?<identifier>\w+)\b/gu;function hf(e){return e.type===`ImportDefaultSpecifier`||e.type===`ImportNamespaceSpecifier`||e.type===`ImportSpecifier`}function gf(e){let t=new Set;for(let n of e)n.type===`Block`&&(_f(n.value,t),vf(n.value,t));return t}function _f(e,t){for(let n of[df,ff])for(let r of e.matchAll(n)){let e=r.groups?.identifier;e!==void 0&&t.add(e)}}function vf(e,t){for(let n of e.matchAll(pf)){let e=n.groups?.annotation;if(e!==void 0)for(let n of e.matchAll(mf)){let e=n.groups?.identifier;e!==void 0&&t.add(e)}}}function yf(e,t,n,r){if(t.specifiers.length===1)return r.remove(t);let i=e.getTokenAfter(n);if(t.specifiers[0]===n&&i?.value===`,`){let t=e.getTokenBefore(n);if(t!==null)return[r.removeRange([t.range[1],n.range[0]]),r.remove(n),r.remove(i)]}if(i?.value===`,`)return r.removeRange([n.range[0],i.range[1]]);let a=e.getTokenBefore(n);return a?.value===`,`?r.removeRange([a.range[0],n.range[1]]):r.remove(n)}const bf=_(`no-unused-imports`,`general`,{create(e){let{sourceCode:t}=e,n=e.options[0]?.checkJSDoc??!0,r=n?gf(t.getAllComments()):new Set,i=[],a;return{ImportDeclaration(e){a??=e;for(let t of e.specifiers)hf(t)&&i.push({identifierName:t.local.name,parent:e,specifier:t})},"Program:exit"(){if(a===void 0)return;let o=t.getScope(a);for(let{identifierName:a,parent:s,specifier:c}of i){let i=o.set.get(a);i!==void 0&&i.references.length>0||n&&r.has(a)||e.report({data:{identifierName:a},fix(e){return yf(t,s,c,e)},messageId:`unusedImport`,node:c})}}}},meta:{docs:{description:`Disallow unused imports`},fixable:`code`,messages:{unusedImport:`Import '{{identifierName}}' is defined but never used.`},schema:[{additionalProperties:!1,properties:{checkJSDoc:{default:!0,description:`Check if imports are referenced in JSDoc comments`,type:`boolean`}},type:`object`}],type:`problem`}}),xf=_(`no-unused-use-memo`,`react`,{create(e){let t=new Set,n=new Set,r=gr(e.options[0]);return{CallExpression(r){pe(r,t,n)&&cu(r)&&e.report({messageId:`unusedUseMemo`,node:r})},ImportDeclaration(e){lu(e,r,t,n)}}},meta:{docs:{description:`Disallow standalone useMemo calls that ignore the memoized value.`,recommended:!0},messages:{unusedUseMemo:`useMemo results must be used. Standalone useMemo calls add overhead without preserving a value.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`problem`}});function Sf(e){if(e.body===null)return;if(e.body.type!==`BlockStatement`)return e.body;if(e.body.body.length!==1)return;let[t]=e.body.body;if(t?.type===`ReturnStatement`)return t.argument??void 0}const Cf=_(`no-use-memo-simple-expression`,`react`,{create(e){return{CallExpression(t){if(!Pc(t,`useMemo`))return;let n=Ii(t);if(n===void 0)return;let r=Sf(n);r===void 0||!Nc(r)||e.report({messageId:`simpleMemo`,node:t})}}},meta:{docs:{description:`Disallow useMemo for expressions that are already trivial to compute.`,recommended:!0},messages:{simpleMemo:`useMemo wrapping a trivially cheap expression - memo overhead exceeds the computation`},type:`problem`}});function wf(e,t){if(e.type===`LogicalExpression`)return e.left===t;if(e.type===`ConditionalExpression`)return e.test===t;if(e.type===`SequenceExpression`){if(e.expressions.at(-1)!==t)return!1;let{parent:n}=e;return wf(n,e)}return e.type!==`ExpressionStatement`&&e.type!==`ArrowFunctionExpression`&&e.type!==`UnaryExpression`&&e.type!==`AwaitExpression`&&e.type!==`ReturnStatement`&&e.type!==`ThrowStatement`}function Tf(e){return wf(e.parent,e)}function Ef(e){if(e.defs.length!==1)return;let[t]=e.defs;if(t!==void 0){if(t.type===`FunctionName`&&N(t.node))return t.node;if(t.type===`Variable`&&t.node.type===`VariableDeclarator`&&t.node.init!==null&&(t.node.init.type===`FunctionExpression`||t.node.init.type===`ArrowFunctionExpression`))return t.node.init}}const Df=_(`no-use-of-empty-return-value`,`general`,{create(e){let t=new Map,n=new Set,r=[];function i(e){if(r.push(e),e.async||e.generator){n.add(e);return}e.type===`ArrowFunctionExpression`&&e.expression&&n.add(e)}function a(){r.pop()}return{ArrowFunctionExpression:i,"ArrowFunctionExpression:exit":a,CallExpression(n){if(!Tf(n)||n.callee.type!==`Identifier`)return;let r=e.sourceCode.getScope(n),i=r.references.find(e=>e.identifier===n.callee)?.resolved??T(r,n.callee.name);if(i===void 0)return;let a=Ef(i);a!==void 0&&t.set(n.callee,a)},FunctionDeclaration:i,"FunctionDeclaration:exit":a,FunctionExpression:i,"FunctionExpression:exit":a,"Program:exit"(){for(let[r,i]of t)n.has(i)||e.report({data:{name:r.name},messageId:`removeUseOfOutput`,node:r})},ReturnStatement(e){if(e.argument===null)return;let t=r.at(-1);t!==void 0&&n.add(t)}}},meta:{docs:{description:`Disallow using the return value of functions that do not return anything.`,recommended:!0},messages:{removeUseOfOutput:`Remove this use of the output from "{{name}}"; "{{name}}" doesn't return anything.`},schema:[],type:`problem`}}),Of=/^[A-Z][A-Z0-9_]*$/u,kf={staticGlobalFactories:new Set(Rl)},Af=[String.raw`^Array\b`,String.raw`^Object\b`,String.raw`^Map\b`,String.raw`^Set\b`,String.raw`^WeakMap\b`,String.raw`^WeakSet\b`];function jf(e){let t=[],n=0,r=[e];for(;r.length>0;){let e=r.pop();if(e===void 0)break;e.type!==`global`&&(t[n++]=e);for(let t of e.childScopes)r.push(t)}return t}function Mf(e){return Ie(e)||e.type===`ClassExpression`}const Nf=new Set([`ArrayExpression`,`ObjectExpression`,`JSXElement`,`JSXFragment`]);function Pf(e,t,n){if(Nf.has(e.type))return!0;if(e.type!==`CallExpression`&&e.type!==`NewExpression`)return!1;let r=n.getText(e.callee);for(let e of t)if(e.test(r))return!0;return!1}function Ff(e){return e.type===`Program`||e.type===`BlockStatement`}function If(e){switch(e.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return If(e.expression);case`Identifier`:return e.name;case`MemberExpression`:return If(e.object);default:return}}function Y(e,t){switch(e.type){case`ArrayExpression`:return Lf(e,t);case`BinaryExpression`:case`LogicalExpression`:return Rf(e,t);case`CallExpression`:case`NewExpression`:return zf(e,t);case`ChainExpression`:return Y(e.expression,t);case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return Y(e.expression,t);case`ConditionalExpression`:return Bf(e,t);case`MemberExpression`:return Vf(e,t);case`ObjectExpression`:return Hf(e,t);case`SequenceExpression`:return!1;case`SpreadElement`:return!1;case`TemplateLiteral`:return Uf(e.expressions,t);case`UnaryExpression`:return Y(e.argument,t);default:return!0}}function Lf(e,t){for(let n of e.elements)if(n===null||!Y(n,t))return!1;return!0}function Rf(e,t){return Y(e.left,t)&&Y(e.right,t)}function zf(e,t){let n=If(e.callee);return n===void 0||!t.has(n)||!Y(e.callee,t)?!1:Uf(e.arguments,t)}function Bf(e,t){return Y(e.test,t)&&Y(e.consequent,t)&&Y(e.alternate,t)}function Vf(e,t){return Y(e.object,t)&&(!e.computed||Y(e.property,t))}function Hf(e,t){for(let n of e.properties)if(n.type!==`Property`||n.computed&&!Y(n.key,t)||!Y(n.value,t))return!1;return!0}function Uf(e,t){for(let n of e)if(!Y(n,t))return!1;return!0}function Wf(e,t){return t.type===`Literal`||J(e,t,new Set,kf)&&Y(t,kf.staticGlobalFactories)}function Gf(e,t){let n=t;for(;n.type===`ParenthesizedExpression`;)n=n.expression;return e.getText(n)}function Kf(e,t){let{parent:n}=e;if(!Ff(n))return!1;let{body:r}=n;for(let n=0;n<r.length;n+=1)if(r[n]===e)return r[n+1]===t;return!1}function qf(e,t){let[n]=t.range;for(;n>0;){let t=e[n-1];if(t===` `||t===` `){--n;continue}break}let[,r]=t.range,i=r;for(;i<e.length;){let t=e[i];if(t===`
9
+ `||t===`\r`){i+=1;continue}break}return[n,i]}function Jf(e){let t=e.parent,n=e;for(;t!==null;){if(k(t)&&t.init===n)return t;n=t,t=t.parent}}const Yf=_(`no-useless-constants`,`general`,{create(e){let{sourceCode:t}=e,[n]=e.options,r=(n?.ignoreCallPatterns??Af).map(e=>new RegExp(e,`u`));function i(e){if(t.getCommentsInside(e).length>0)return!0;let n=e.loc.start.line,r=e.loc.end.line;for(let r of t.getCommentsBefore(e)){let e=r.loc.end.line;if(e===n||e===n-1)return!0}for(let n of t.getCommentsAfter(e)){let e=n.loc.start.line;if(e===r||e===r+1)return!0}return!1}function a(e,n){let r,i=0;for(let e of n.references)e.isReadOnly()&&(i+=1,r=e);if(i===1&&r!==void 0&&r.from===e&&t.getScope(r.identifier)===e)return r}function o(e,n){let{name:i}=n;if(!Of.test(i))return;let[o]=n.defs;if(o?.type!==`Variable`)return;let s=o.node;if(!(k(s)&&rt(s.id))||s.init===null)return;let c=o.parent;if(c===null||!Ne(c)||c.kind!==`const`||c.declarations.length!==1||Pe(c.parent))return;let l=s.init;if(Mf(l)||Pf(l,r,t))return;let u=a(e,n);if(u===void 0||!rt(u.identifier))return;let d=Jf(u.identifier);if(d===void 0)return;let f=d.parent;if(!(!Ne(f)||f.kind!==`const`))return{declarationNode:c,enclosingDeclaration:f,initializer:l,name:i,referenceIdentifier:u.identifier,reportNode:s.id}}function s(n){let r=[];for(let a of n.variables){let s=o(n,a);if(s===void 0)continue;let c=Kf(s.declarationNode,s.enclosingDeclaration),l=Wf(t,s.initializer),u=Y(s.initializer,kf.staticGlobalFactories);if(!((c||l)&&u&&!i(s.declarationNode))){e.report({data:{name:s.name},messageId:`uselessConstantNoFix`,node:s.reportNode});continue}r.push({declarationNode:s.declarationNode,initializerText:Gf(t,s.initializer),name:s.name,referenceIdentifier:s.referenceIdentifier,reportNode:s.reportNode})}c(r)}function c(n){let[r]=n;r!==void 0&&e.report({data:{name:r.name,names:n.map(e=>e.name).join(`, `)},fix(e){let r=[],i=0;for(let t of n)r[i++]=e.replaceText(t.referenceIdentifier,t.initializerText);for(let a of n)r[i++]=e.removeRange(qf(t.text,a.declarationNode));return r},messageId:n.length===1?`uselessConstant`:`uselessConstants`,node:r.reportNode})}return{"Program:exit"(e){let n=jf(t.getScope(e));for(let e of n)s(e)}}},meta:{docs:{description:`Disallow constants that do not add value.`,recommended:!0},fixable:`code`,messages:{uselessConstant:`Constant '{{name}}' is only referenced once in the same scope. Inline it directly, or move it to a higher scope if reference stability is needed.`,uselessConstantNoFix:`Constant '{{name}}' is only referenced once in the same scope. It cannot be auto-inlined because the initializer is not safely movable or the declaration has attached comments. Inline it manually, or move it to a higher scope if reference stability is needed.`,uselessConstants:`Constants '{{names}}' are only referenced once in the same scope. Inline them directly, or move them to a higher scope if reference stability is needed.`},schema:[{additionalProperties:!1,properties:{ignoreCallPatterns:{default:[...Af],description:`Regular expression patterns for call expressions that should be ignored.`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}});var Xf={AdGui:[25,133],AdPortal:[25,133],AlignOrientation:[7,6,25,133,72,152,155,133,343,172,359,204,379,76,440,132,455,132,471,207,515,132,720,132],AlignPosition:[23,132,25,133,155,133,187,36,189,2,344,144,348,204,361,172,379,86,436,135,454,132,471,207,515,132,720,132],AngularVelocity:[21,135,25,133,155,133,359,200,455,132,459,2,720,132],Animation:[25,133],AnimationConstraint:[15,212,20,212,25,133,155,133,250,132,318,212,320,212,348,204,359,204,681,152,720,132],AnimationController:[25,133],AnimationGraphDefinition:[25,133,324,133,443,10],AnimationNodeDefinition:[25,133,396,9],Animator:[25,133,438,133],ArcHandles:[25,133,103,155,682,200,720,133],Attachment:[25,133,72,152,720,132],AudioAnalyzer:[25,133,596,133,740,16],AudioChannelMixer:[25,133,259,13],AudioChannelSplitter:[25,133,259,13],AudioChorus:[25,133,69,132,120,192,377,197,452,234],AudioCompressor:[25,133,29,186,69,132,334,200,453,227,460,186,648,177],AudioDeviceInput:[1,0,25,133,388,132,722,212],AudioDeviceOutput:[25,133],AudioDistortion:[25,133,69,132,302,193],AudioEcho:[25,133,69,132,118,212,145,200,166,193,450,200,730,200],AudioEmitter:[2,133,25,133,31,242,125,100,398,100,437,32,473,100,578,15],AudioEqualizer:[25,133,69,132,223,200,327,200,365,200],AudioFader:[25,133,69,132,722,212],AudioFilter:[25,133,69,132,175,14,193,214,198,200,446,195],AudioFlanger:[25,133,69,132,120,192,377,197,452,234],AudioGate:[25,133,29,181,69,132,460,186],AudioLimiter:[25,133,69,132,352,200,460,181],AudioListener:[2,133,25,133,31,242,125,100,398,100,437,65,473,100,578,15],AudioPitchShifter:[25,133,69,132,424,201,740,16],AudioPlayer:[25,133,34,133,36,132,326,132,432,212,661,200,722,212],AudioRecorder:[25,133],AudioReverb:[25,133,69,132,115,193,116,202,119,212,126,212,145,200,147,182,222,213,258,183,328,218,329,200,456,231,730,179],AudioSpeechToText:[25,133,155,132,630,242],AudioTextToSpeech:[25,133,326,132,424,200,432,212,597,212,630,242,661,200,721,242,722,212],AudioTremolo:[25,133,69,132,120,212,146,193,193,234,567,200,585,200,604,200],AuroraScript:[25,133],AvatarAbilityRules:[25,133],AvatarAccessoryRules:[25,133],AvatarAnimationRules:[25,133],AvatarBodyRules:[25,133],AvatarClothingRules:[25,133],AvatarCollisionRules:[25,133],AvatarRules:[25,133],BallSocketConstraint:[25,133,155,133,312,132,449,187,472,200,687,132,688,178,689,228,698,228,720,132],Beam:[25,133,68,212,109,200,110,200,155,133,162,132,307,200,308,200,551,207,643,212,644,115,646,212,731,212,732,212,745,200],BillboardGui:[4,132,9,132,25,133,35,133,68,212,96,132,131,200,132,175,155,133,159,135,160,135,308,200,345,172,468,133,554,99,555,99,556,99,557,99,558,132,580,252,582,262,613,135,614,135,744,131],BlockMesh:[25,133,400,135,538,141,711,141],BloomEffect:[25,133,155,133,246,191,580,217,648,199],BlurEffect:[25,133,155,133,580,217],BodyAngularVelocity:[21,138,25,133,359,148,410,209],BodyColors:[25,133,212,168,266,168,283,156,481,168,498,156,677,159],BodyForce:[25,133,186,136],BodyGyro:[25,133,72,152,113,232,359,149,410,221],BodyPartDescription:[25,133,28,200,53,18,102,154,215,242],BodyPosition:[25,133,113,209,348,148,410,204,436,139],BodyThrust:[25,133,186,136,321,135],BodyVelocity:[25,133,348,148,410,209,708,138],Bone:[25,133,72,152,720,132],BoolValue:[25,133,704,132],BoxHandleAdornment:[6,4,9,132,25,133,72,152,103,155,565,5,580,141,583,135,682,200,720,133,743,175],BrickColorValue:[25,133],CFrameValue:[25,133,704,152],Camera:[25,133,72,153,74,22,167,236,168,33,184,151,213,133,214,212,703,132],CanvasGroup:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,133,144,132,205,170,206,200,245,53,247,133,260,200,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,720,133,743,212],CharacterMesh:[25,133,53,18,409,200],ChorusSoundEffect:[25,133,120,187,155,133,377,193,443,200,452,193],ClickDetector:[25,133,341,223],Color3Value:[25,133,704,154],ColorCorrectionEffect:[25,133,68,200,107,200,155,133,537,200,664,170],ColorGradingEffect:[25,133,155,133,665,116],CompositeValueCurve:[25,133,111,23],CompressorSoundEffect:[25,133,29,186,155,133,199,200,443,200,453,227,460,186,648,177],ConeHandleAdornment:[6,4,9,132,25,133,72,152,103,155,220,220,226,132,449,193,565,5,583,135,682,200,720,133,743,175],Configuration:[25,133],CornerWedgePart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,107,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,146,671,173,672,193,674,107,675,54,682,200,708,135],CurveAnimation:[25,133,324,133,443,10],CustomLog:[25,133],CylinderHandleAdornment:[6,4,9,132,13,224,25,133,72,152,103,155,220,212,244,200,449,212,565,5,583,135,682,200,720,133,743,175],CylinderMesh:[25,133,400,135,538,141,711,141],CylindricalConstraint:[5,3,14,3,16,132,17,228,18,200,19,200,21,200,25,133,155,133,238,200,312,132,319,228,330,178,331,200,383,172,384,230,385,200,386,200,472,200,532,132,563,200,564,200,580,187,590,132,591,132,597,200,624,200,627,200,698,228,699,234,708,200,720,132],Decal:[25,133,35,133,103,170,161,73,531,200,682,200,695,262,696,264,743,212],DepthOfFieldEffect:[25,133,155,133,165,196,185,184,236,207,391,196],DigitsRigDescription:[25,133,239,152,240,152,241,152,242,135,243,200,366,152,367,152,368,152,369,135,370,200,419,152,420,152,421,152,422,135,423,200,516,152,517,152,518,152,519,135,520,200,576,24,653,152,654,152,655,152,656,135,657,200],DistortionSoundEffect:[25,133,155,133,302,196,443,200],DoubleConstrainedValue:[25,133,360,212,376,200],DragDetector:[23,132,25,133,138,152,142,26,155,133,202,58,257,61,341,223,346,200,347,135,348,203,359,204,371,200,372,135,406,137,418,27,470,28,471,207,535,132,679,212,680,212,702,57],Dragger:[25,133],EchoSoundEffect:[25,133,117,212,145,200,155,133,166,193,443,200,730,200],EqualizerSoundEffect:[25,133,155,133,223,200,327,176,365,174,443,200],EulerRotationCurve:[25,133,533,93],ExplorerFilter:[25,133],FaceControls:[25,133],FileMesh:[25,133,400,135,538,141,711,141],Fire:[25,133,102,166,155,133,219,240,547,161,580,234,662,212],FlangeSoundEffect:[25,133,120,192,155,133,377,197,443,200,452,234],FloatCurve:[25,133],FloorWire:[25,133,103,155,112,200,612,229,645,264,682,200,708,220,720,133,741,185],Folder:[25,133],ForceField:[25,133,720,133],Frame:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,618,38,720,133,743,212],GeneratedFolder:[25,133],Handles:[25,133,103,155,618,41,682,200,720,133],HapticEffect:[25,133,325,132,436,135,449,225,690,42],Highlight:[25,133,121,43,155,133,169,169,174,193,407,170,408,200],HingeConstraint:[5,3,17,228,19,200,21,200,25,133,155,133,312,132,330,178,383,230,386,200,449,187,472,200,564,200,591,132,624,200,698,228,720,132],Humanoid:[25,133,33,133,37,133,40,133,67,133,101,45,128,46,129,242,157,133,217,206,218,47,224,200,253,235,254,233,349,206,355,237,389,206,390,72,466,133,475,48,701,133,728,211],HumanoidController:[25,133],HumanoidDescription:[25,133,54,190,94,200,122,212,161,200,164,200,203,200,214,212,221,212,230,200,252,200,381,200,416,200,444,212,534,200,571,200,607,132,622,200,700,132,727,200,733,212],HumanoidRigDescription:[25,133,86,135,87,135,88,200,89,152,208,135,209,135,210,200,211,152,262,135,263,135,264,200,265,152,267,135,268,135,269,200,270,152,271,135,272,135,273,200,274,152,275,135,276,135,277,200,278,152,279,135,280,135,281,200,282,152,287,135,288,135,289,200,290,152,293,135,294,135,295,200,296,152,297,135,298,135,299,200,300,152,392,135,393,135,394,200,395,152,477,135,478,135,479,200,480,152,482,135,483,135,484,200,485,152,486,135,487,135,488,200,489,152,490,135,491,135,492,200,493,152,494,135,495,135,496,200,497,152,501,135,502,135,503,200,504,152,507,135,508,135,509,200,510,152,511,135,512,135,513,200,514,152,526,135,527,135,528,200,529,152,598,135,599,135,600,200,601,152,723,135,724,135,725,200,726,152],IKControl:[25,133,155,133,156,152,400,152,443,200,589,184,690,49,729,212],ImageButton:[4,133,11,262,25,133,32,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,232,262,233,262,234,200,245,53,247,133,260,200,378,132,436,252,467,91,531,200,539,95,552,133,553,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,587,241,588,212,618,21,660,257,720,133,743,212],ImageHandleAdornment:[6,4,9,132,25,133,72,152,103,167,580,264,583,135,682,200,720,133,743,175],ImageLabel:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,232,262,233,262,234,200,245,53,247,133,260,200,436,252,467,91,531,200,539,95,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,587,241,588,212,660,257,720,133,743,212],InputAction:[25,133,155,133,690,51],InputBinding:[25,133,48,62,91,133,135,62,191,62,255,62,261,62,435,200,439,193,441,62,461,188,469,212,476,62,538,212,548,62,690,52,697,62,705,264,706,141],InputContext:[25,133,155,133,443,205,579,132],IntConstrainedValue:[25,133,360,207,376,200],IntValue:[25,133,704,200],LineForce:[23,132,25,133,155,133,249,132,332,205,348,172,454,132,720,132],LineHandleAdornment:[6,4,9,132,25,133,72,152,103,155,301,234,583,135,647,212,682,200,720,133,743,175],LinearVelocity:[25,133,155,133,187,36,188,133,313,140,317,200,344,143,348,205,353,265,429,262,442,140,454,133,459,2,549,136,707,135,709,126,720,132],LocalizationTable:[25,133,593,251],MakeupDescription:[25,133,28,200,335,66,405,200],MaterialVariant:[8,7,25,133,50,67,152,212,153,170,339,68,615,207],MeshPart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,107,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,134,132,154,133,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,462,89,499,173,500,193,505,107,506,54,525,200,530,135,580,147,671,173,672,193,674,107,675,54,682,200,708,135],Model:[25,133,303,70,380,71],Motor:[25,133,70,152,71,152,124,200,155,133,361,200],Motor6D:[25,133,70,152,71,152,124,200,155,133,361,200],MotorFeature:[25,133,163,74,237,50,286,63,668,117],NoCollisionConstraint:[25,133,155,133],Noise:[25,133],NumberPose:[25,133,148,84,149,85,704,200,729,212],NumberValue:[25,133,704,200],ObjectValue:[25,133],Pants:[25,133,103,170],Part:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,567,77,580,147,671,173,672,193,674,108,675,54,682,200,708,135],ParticleEmitter:[0,135,25,133,68,212,136,200,151,75,155,133,177,133,178,249,179,81,180,82,181,212,182,212,183,132,307,200,308,200,323,132,406,83,452,215,567,78,568,79,569,212,570,80,603,262,662,212,710,200,739,132,745,200],Path2D:[25,133,97,132,103,154,647,212,720,133,743,212],PitchShiftSoundEffect:[25,133,155,133,399,201,443,200],PlaneConstraint:[25,133,155,133,720,132],PluginAction:[25,133],PointLight:[25,133,68,212,102,170,155,133,451,238,566,132],PrismaticConstraint:[5,3,25,133,155,133,312,132,319,228,331,200,383,172,385,200,472,200,563,200,580,187,591,132,597,200,627,200,699,234,708,200,720,132],ProceduralModel:[25,133,303,70,380,71,580,145],ProximityPrompt:[3,246,25,133,35,133,93,133,155,133,158,87,201,59,225,200,256,60,341,207,350,200,397,242,465,133,618,88,692,262],PyramidHandleAdornment:[6,4,9,132,25,133,72,152,103,155,220,220,565,5,577,229,580,212,583,135,682,200,720,133,743,175],RayValue:[25,133],RealtimeMedia:[25,133],RelativeGui:[25,133],RenderingTest:[25,133,72,152,104,207,105,90,106,233,123,242,167,236,417,132,447,132,448,216,463,215,572,132,658,242,663,222],ReverbSoundEffect:[25,133,116,202,119,212,126,212,145,179,155,133,443,200,730,200],RigidConstraint:[25,133,155,133,720,132],RocketPropulsion:[25,133,81,194,356,222,358,226,359,150,626,135,628,229,651,180,652,234,683,232,684,221],RodConstraint:[25,133,155,133,301,234,309,239,310,239,312,132,647,186,720,132],RopeConstraint:[25,133,155,133,301,234,472,200,647,186,720,132,734,132,735,204,736,228,737,220,738,234],Rotate:[25,133,70,152,71,152,155,133],RotateP:[25,133,49,200,70,152,71,152,155,133],RotateV:[25,133,49,200,70,152,71,152,155,133],RotationCurve:[25,133],ScreenGui:[25,133,35,133,95,133,130,200,155,133,468,133,536,94,540,96,554,99,555,99,556,99,557,99,558,132,744,131],ScrollingFrame:[4,132,11,262,25,133,35,133,39,17,41,17,46,164,47,200,55,157,56,19,58,212,79,262,80,253,96,133,144,132,150,31,229,97,245,53,247,133,260,200,436,252,531,200,541,170,542,200,543,210,545,98,546,133,552,133,554,99,555,99,556,99,557,99,558,133,561,200,580,252,581,101,714,97,715,128,720,133,743,212],Seat:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,127,132,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,567,77,580,147,671,173,672,193,674,108,675,54,682,200,708,135],SelectionBox:[25,133,103,155,316,187,620,156,621,212,682,200,720,133],SelectionPartLasso:[25,133,103,155,682,200,720,133],SelectionPointLasso:[25,133,103,155,434,135,682,200,720,133],SelectionSphere:[25,133,103,155,620,156,621,212,682,200,720,133],Shirt:[25,133,103,170],ShirtGraphic:[25,133,103,170],Sky:[25,133,83,133,382,208,586,135,605,221,619,216],Smoke:[25,133,102,170,155,133,403,193,521,212,580,212,662,212],Sound:[2,133,25,133,325,132,430,132,431,132,432,212,433,132,522,204,523,207,524,92,661,200,722,193],SoundGroup:[25,133,722,193],Sparkles:[25,133,155,133,595,163,662,212],SpecialMesh:[25,133,364,69,400,135,538,141,711,141],SphereHandleAdornment:[6,4,9,132,25,133,72,152,103,155,449,212,565,5,583,135,682,200,720,133,743,175],SpotLight:[13,239,25,133,68,212,102,170,155,133,161,73,451,211,566,132],SpringConstraint:[25,133,98,225,114,200,155,133,192,212,312,132,348,172,351,234,373,200,449,191,610,200,647,186,720,132],StringValue:[25,133,704,242],StyleDerive:[25,133,443,200],StyleLink:[25,133],StyleQuery:[25,133],StyleRule:[25,133,443,200,562,242],StyleSheet:[25,133],SunRaysEffect:[25,133,155,133,246,189,602,212],SurfaceAppearance:[8,8,25,133,102,170,152,212,153,170,467,91],SurfaceGui:[4,133,9,132,25,133,35,133,68,212,80,266,96,132,155,133,161,73,308,200,345,200,426,233,468,133,554,99,555,99,556,99,557,99,558,132,584,105,666,200,744,131,745,200],SurfaceLight:[13,239,25,133,68,212,102,170,155,133,161,73,451,211,566,132],TextBox:[4,133,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,92,133,96,132,144,132,245,53,247,133,260,200,314,212,362,175,387,132,404,242,427,160,428,242,436,252,474,132,531,200,552,133,554,99,555,99,556,99,557,99,558,132,561,200,573,133,580,252,581,101,630,250,631,158,632,111,633,133,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],TextButton:[4,133,11,262,25,133,32,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,314,212,362,175,378,132,404,242,436,252,474,132,531,200,552,133,553,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,618,21,630,243,631,158,632,111,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],TextGenerator:[25,133,550,200,623,242,629,194,670,198],TextLabel:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,314,212,362,175,404,242,436,252,474,132,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,630,247,631,158,632,111,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],Texture:[25,133,35,133,103,170,161,73,401,200,402,200,531,200,616,220,617,220,682,200,695,262,696,264,743,212],Tool:[25,133,75,133,155,133,204,152,303,70,336,132,380,71,464,133,667,242],Torque:[25,133,155,133,459,1,676,135,720,132],TorsionSpringConstraint:[25,133,98,238,114,181,155,133,311,132,312,132,342,228,359,172,449,191,472,200,610,206,720,132],Trail:[25,133,68,212,155,133,162,132,304,220,307,200,308,200,351,200,373,186,643,212,644,115],TremoloSoundEffect:[25,133,120,212,146,193,155,133,193,234,443,200],TrussPart:[12,132,25,133,30,133,42,173,43,193,44,109,45,54,61,173,62,193,64,109,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,194,173,195,193,196,109,197,54,284,173,285,193,291,109,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,109,506,54,525,200,530,135,580,146,671,173,672,193,674,109,675,54,682,200,708,135],UIAspectRatioConstraint:[25,133,26,212,27,12,133,25],UICorner:[25,133,60,259,63,259,669,259,673,259],UIDragDetector:[25,133,66,118,137,263,139,119,140,200,141,120,142,121,143,252,155,133,346,200,347,252,371,200,372,252,470,122,559,255,560,239,691,123],UIFlexItem:[25,133,176,125,207,200,251,56,575,200],UIGradient:[25,133,155,133,400,262,531,200,538,212,659,39,690,40],UIGridLayout:[25,133,84,256,85,254,170,34,171,200,227,44,592,102,606,103,712,127],UIListLayout:[25,133,170,35,227,44,228,124,251,56,411,258,592,102,712,127,713,124,742,132],UIPadding:[25,133,412,258,413,258,414,258,415,258],UIPageLayout:[22,133,25,133,90,132,148,29,149,30,170,34,200,133,227,44,411,258,544,133,592,102,678,133,686,212,712,127],UIScale:[25,133,538,212],UIShadow:[25,133,52,258,102,154,155,133,400,252,602,252,682,200,743,175],UISizeConstraint:[25,133,354,261,374,262],UIStroke:[24,11,25,133,57,258,59,20,102,154,155,133,315,64,611,104,647,212,682,200,743,212],UITableLayout:[25,133,170,35,172,132,173,132,227,44,333,110,411,252,592,102,712,127],UITextSizeConstraint:[25,133,357,206,375,212],UniversalConstraint:[25,133,155,133,312,132,342,228,449,188,472,200,720,132],ValueCurve:[25,133],Vector3Curve:[25,133],Vector3Value:[25,133,704,135],VectorForce:[23,132,25,133,155,133,186,142,459,1,720,132],VehicleSeat:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,127,132,154,133,194,173,195,193,196,107,197,54,216,133,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,356,219,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,147,608,200,609,200,649,200,650,200,671,173,672,193,674,108,675,54,676,207,682,200,685,212,708,135],VelocityMotor:[25,133,70,152,71,152,108,200,124,200,155,133,361,200],VideoDisplay:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,436,252,467,91,531,200,539,95,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,660,257,716,170,717,262,718,262,719,200,720,133,743,212],VideoFrame:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,248,55,260,200,325,132,363,129,433,132,436,252,522,204,523,212,524,92,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,661,200,720,133,722,212,743,212],VideoPlayer:[25,133,248,55,326,132,363,129,432,212,661,200,722,212],ViewportFrame:[4,132,10,165,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,234,200,245,53,247,133,260,200,305,162,306,134,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,720,133,743,212],WedgePart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,147,671,173,672,193,674,107,675,54,682,200,708,135],Weld:[25,133,70,152,71,152,155,133],WeldConstraint:[25,133],Wire:[25,133,594,248,625,245],WireframeHandleAdornment:[6,4,9,132,25,133,72,152,103,155,538,141,583,135,647,212,682,200,720,133,743,175],WorldModel:[25,133,303,70,380,71],WrapDeformer:[25,133,73,152,235,152],WrapLayer:[25,133,38,130,51,152,73,152,155,133,235,152,405,212,445,212,457,152,574,200],WrapTarget:[25,133,73,152,235,152,610,200],WrapTextureTransfer:[25,133,693,260,694,261]},Zf=`Acceleration.AccessType.AcousticSimulationEnabled.ActionText.Active.ActuatorType.AdornCullingMode.AlignType.AlphaMode.AlwaysOnTop.Ambient.AnchorPoint.Anchored.Angle.AngularActuatorType.AngularDamping.AngularLimitsEnabled.AngularResponsiveness.AngularRestitution.AngularSpeed.AngularStrength.AngularVelocity.Animated.ApplyAtCenterOfMass.ApplyStrokeMode.Archivable.AspectRatio.AspectType.AssetId.Attack.AudioCanCollide.AudioInteractionGroup.AutoButtonColor.AutoJumpEnabled.AutoLoad.AutoLocalize.AutoPlay.AutoRotate.AutoSkin.AutomaticCanvasSize.AutomaticScalingEnabled.AutomaticSize.BackParamA.BackParamB.BackSurface.BackSurfaceInput.BackgroundColor3.BackgroundTransparency.Backward.BaseAngle.BaseMaterial.BindOffset.BlurRadius.BodyPart.BodyTypeScale.BorderColor3.BorderMode.BorderOffset.BorderSizePixel.BorderStrokePosition.BottomLeftRadius.BottomParamA.BottomParamB.BottomRightRadius.BottomSurface.BottomSurfaceInput.BoundingBehavior.BreakJointsOnDeath.Brightness.Bypass.C0.C1.CFrame.CageOrigin.CameraType.CanBeDropped.CanCollide.CanQuery.CanTouch.CanvasPosition.CanvasSize.CartoonFactor.CastShadow.CelestialBodiesShown.CellPadding.CellSize.ChestRangeMax.ChestRangeMin.ChestSize.ChestTposeAdjustment.Circular.ClampMagnitudeToOne.ClearTextOnFocus.ClickablePrompt.ClimbAnimation.ClipToDeviceSafeArea.ClipsDescendants.Closed.Coils.CollisionGroup.CollisionGroupId.CollisionType.Color.Color3.ComparisonDiffThreshold.ComparisonMethod.ComparisonPsnrThreshold.Contrast.CurrentAngle.CurveSize0.CurveSize1.CurveType.CycleOffset.D.Damping.DecayRatio.DecayTime.Delay.DelayTime.Density.Depth.DepthMode.DepthScale.Description.DesiredAngle.DiffractionEnabled.Diffusion.Disabled.DisplayDistanceType.DisplayName.DisplayOrder.DistanceLowerLimit.DistanceUpperLimit.DominantAxis.DoubleSided.Down.Drag.DragAxis.DragFrame.DragRelativity.DragRotation.DragSpace.DragStyle.DragUDim2.Draggable.DryLevel.Duty.EarlyDelayTime.EasingDirection.EasingStyle.ElasticBehavior.EmissionDirection.EmissiveStrength.EmissiveTint.EnableFluidForces.Enabled.EndEffectorOffset.EvaluateStateMachine.Exclusivity.ExtentsOffset.ExtentsOffsetWorldSpace.Face.FaceCamera.FaceId.FallAnimation.FarIntensity.Feedback.FieldOfView.FieldOfViewMode.FillColor.FillDirection.FillDirectionMaxCells.FillEmptySpaceColumns.FillEmptySpaceRows.FillTransparency.FilterType.FlexMode.FlipbookBlendFrames.FlipbookIncompatible.FlipbookLayout.FlipbookMode.FlipbookSizeX.FlipbookSizeY.FlipbookStartRandom.Focus.FocusDistance.Force.ForceLimitMode.ForceLimitsEnabled.ForceRelativeTo.FormFactor.Forward.FreeLength.Frequency.FrontParamA.FrontParamB.FrontSurface.FrontSurfaceInput.Gain.GainMakeup.GamepadInputEnabled.GamepadKeyCode.GamepadModeSwitchKeyCode.GraphicTShirt.Grip.GroupColor3.GroupTransparency.GrowRatio.HeadBaseRangeMax.HeadBaseRangeMin.HeadBaseSize.HeadBaseTposeAdjustment.HeadColor3.HeadLocked.HeadScale.HeadShape.HeadsUpDisplay.HealthDisplayDistance.HealthDisplayType.Heat.Height.HeightScale.HighCutFrequency.HighGain.HipHeight.HoldDuration.Hollow.HorizontalAlignment.HorizontalFlex.HorizontalScrollBarInset.IdleAnimation.ImageColor3.ImageRectOffset.ImageRectSize.ImageTransparency.ImportOrigin.InFocusRadius.InOut.InclinationAngle.Index1TposeAdjustment.Index2TposeAdjustment.Index3TposeAdjustment.IndexRange.IndexSize.InnerRadius.InputSink.Intensity.Interactable.InternalVideoUsage.InverseSquareLaw.IsKinematic.ItemLineAlignment.JumpAnimation.JumpHeight.JumpPower.KeyCode.KeyboardKeyCode.KeyboardModeSwitchKeyCode.LateDelayTime.Layout.LayoutOrder.Left.LeftAnkleRangeMax.LeftAnkleRangeMin.LeftAnkleSize.LeftAnkleTposeAdjustment.LeftArmColor3.LeftClavicleRangeMax.LeftClavicleRangeMin.LeftClavicleSize.LeftClavicleTposeAdjustment.LeftElbowRangeMax.LeftElbowRangeMin.LeftElbowSize.LeftElbowTposeAdjustment.LeftHipRangeMax.LeftHipRangeMin.LeftHipSize.LeftHipTposeAdjustment.LeftKneeRangeMax.LeftKneeRangeMin.LeftKneeSize.LeftKneeTposeAdjustment.LeftLegColor3.LeftParamA.LeftParamB.LeftRight.LeftShoulderRangeMax.LeftShoulderRangeMin.LeftShoulderSize.LeftShoulderTposeAdjustment.LeftSurface.LeftSurfaceInput.LeftToeBaseRangeMax.LeftToeBaseRangeMin.LeftToeBaseSize.LeftToeBaseTposeAdjustment.LeftWristRangeMax.LeftWristRangeMin.LeftWristSize.LeftWristTposeAdjustment.Length.Level.LevelOfDetail.Lifetime.LightColor.LightDirection.LightEmission.LightInfluence.LimitAngle0.LimitAngle1.LimitEnabled.LimitsEnabled.LineDirection.LineHeight.LineJoinMode.LineThickness.LineVelocity.LinearDamping.LinearResponsiveness.LinearStrength.Location.Locked.LockedToPart.Loop.Looped.Looping.LowGain.LowShelfFrequency.LowShelfGain.LowerAngle.LowerLimit.Magnitude.MajorAxis.MakeupGain.MakeupType.ManualActivationOnly.Massless.Material.MaterialPattern.MaterialVariant.MaxActivationDistance.MaxAngle.MaxAngularVelocity.MaxAxesForce.MaxDistance.MaxDragAngle.MaxDragTranslation.MaxForce.MaxHealth.MaxIndicatorDistance.MaxLength.MaxLevel.MaxPlanarAxesForce.MaxSize.MaxSlopeAngle.MaxSpeed.MaxTextSize.MaxThrust.MaxTorque.MaxValue.MaxVelocity.MaxVisibleGraphemes.MaximumResolution.MeshType.MidGain.Middle1TposeAdjustment.Middle2TposeAdjustment.Middle3TposeAdjustment.MiddleRange.MiddleSize.MinDragAngle.MinDragTranslation.MinLength.MinSize.MinTextSize.MinValue.Mix.Modal.Mode.ModelStreamingMode.MoodAnimation.MoonAngularSize.MotorMaxAcceleration.MotorMaxAngularAcceleration.MotorMaxForce.MotorMaxTorque.MultiLine.Muted.NameDisplayDistance.NameOcclusion.NearIntensity.NeckRangeMax.NeckRangeMin.NeckSize.NeckTposeAdjustment.NodeType.ObjectText.OcclusionEnabled.Octave.Offset.OffsetStudsU.OffsetStudsV.Opacity.OpenTypeFeatures.Order.Orientation.OutlineColor.OutlineTransparency.OverlayTextureId.P.Padding.PaddingBottom.PaddingLeft.PaddingRight.PaddingTop.Pants.PerfTest.PermissionPolicy.Pinky1TposeAdjustment.Pinky2TposeAdjustment.Pinky3TposeAdjustment.PinkyRange.PinkySize.Pitch.PivotOffset.PixelsPerStud.PlaceholderColor3.PlaceholderText.PlaneVelocity.PlayOnRemove.PlaybackRegionsEnabled.PlaybackSpeed.Playing.Point.PointerIndex.Position.PositionType.PreferLodEnabled.PressedThreshold.PrimaryAxisOnly.PrimaryModifier.PrimaryTangentAxis.Priority.ProportionScale.Puffiness.Q.QualityAuto.QualityLevel.Radius.RampTime.Range.Rate.Ratio.ReactionForceEnabled.ReactionTorqueEnabled.ReferenceFrequency.ReferenceOrigin.Reflectance.RelativeTo.Release.ReleasedThreshold.RenderFidelity.RenderingTestFrameCount.RequiresHandle.RequiresLineOfSight.RequiresNeck.ResampleMode.ResetOnSpawn.ResponseCurve.ResponseStyle.Responsiveness.Restitution.ReverbEnabled.RichText.RigType.Right.RightAnkleRangeMax.RightAnkleRangeMin.RightAnkleSize.RightAnkleTposeAdjustment.RightArmColor3.RightClavicleRangeMax.RightClavicleRangeMin.RightClavicleSize.RightClavicleTposeAdjustment.RightElbowRangeMax.RightElbowRangeMin.RightElbowSize.RightElbowTposeAdjustment.RightHipRangeMax.RightHipRangeMin.RightHipSize.RightHipTposeAdjustment.RightKneeRangeMax.RightKneeRangeMin.RightKneeSize.RightKneeTposeAdjustment.RightLegColor3.RightParamA.RightParamB.RightShoulderRangeMax.RightShoulderRangeMin.RightShoulderSize.RightShoulderTposeAdjustment.RightSurface.RightSurfaceInput.RightToeBaseRangeMax.RightToeBaseRangeMin.RightToeBaseSize.RightToeBaseTposeAdjustment.RightWristRangeMax.RightWristRangeMin.RightWristSize.RightWristTposeAdjustment.RigidityEnabled.Ring1TposeAdjustment.Ring2TposeAdjustment.Ring3TposeAdjustment.RingRange.RingSize.RiseVelocity.RollOffMaxDistance.RollOffMinDistance.RollOffMode.RootPriority.RootRangeMax.RootRangeMin.RootSize.RootTposeAdjustment.RotVelocity.Rotation.RotationAxisVisible.RotationOrder.RunAnimation.RunLocally.SafeAreaCompatibility.Saturation.Scale.ScaleType.ScreenInsets.ScrollBarImageColor3.ScrollBarImageTransparency.ScrollBarThickness.ScrollWheelInputEnabled.ScrollingDirection.ScrollingEnabled.SecondaryColor.SecondaryModifier.SecondaryTangentAxis.Seed.Segments.Selectable.Selected.SelectionBehaviorDown.SelectionBehaviorLeft.SelectionBehaviorRight.SelectionBehaviorUp.SelectionGroup.SelectionModeDragSpeed.SelectionModeRotateSpeed.SelectionOrder.Selector.ServoMaxForce.ServoMaxTorque.Shading.Shadows.Shape.ShapeInOut.ShapePartial.ShapeStyle.Shirt.ShouldSkip.ShowNativeInput.ShrinkFactor.ShrinkRatio.Side.Sides.SimulationFidelity.Sink.Size.SizeConstraint.SizeOffset.SizeRelativeOffset.SizingMode.Skew.SkyboxOrientation.SliceCenter.SliceScale.SmoothTime.SoftlockAngularServoUponReachingTarget.SoftlockServoUponReachingTarget.SortOrder.SourceLocaleId.SourceName.SparkleColor.SpectrumEnabled.Speed.SpineRangeMax.SpineRangeMin.SpineSize.SpineTposeAdjustment.Spread.SpreadAngle.Square.StarCount.StartCorner.StaticFacialAnimation.Steer.SteerFloat.Stiffness.StrokeSizingMode.StudsBetweenTextures.StudsOffset.StudsOffsetWorldSpace.StudsPerTile.StudsPerTileU.StudsPerTileV.Style.SunAngularSize.SurfaceColor3.SurfaceTransparency.SwimAnimation.SystemPrompt.TargetAngle.TargetName.TargetOffset.TargetPosition.TargetRadius.Temperature.Text.TextColor3.TextDirection.TextEditable.TextScaled.TextSize.TextStrokeColor3.TextStrokeTransparency.TextTransparency.TextTruncate.TextWrapped.TextXAlignment.TextYAlignment.TextureLength.TextureMode.TextureSize.TextureSpeed.Thickness.Threshold.Throttle.ThrottleFloat.ThrustD.ThrustP.Thumb1TposeAdjustment.Thumb2TposeAdjustment.Thumb3TposeAdjustment.ThumbRange.ThumbSize.Ticket.TileMode.TileSize.TimePosition.TimeScale.Timeout.TintColor.TonemapperPreset.ToolPunchThroughDistance.ToolTip.TopBottom.TopLeftRadius.TopP.TopParamA.TopParamB.TopRightRadius.TopSurface.TopSurfaceInput.Torque.TorsoColor3.TouchInputEnabled.TrackballRadialPullFactor.TrackballRollFactor.Transform.Transparency.TurnD.TurnP.TurnSpeed.TweenTime.TwistLimitsEnabled.TwistLowerAngle.TwistUpperAngle.Type.UIDragSpeedAxisMapping.UIOffset.UVMaxBound.UVMinBound.UVOffset.UVScale.Up.UpperAngle.UpperLimit.UseAvatarSettings.UseJumpPower.VRSwitchKeyCode.VRTiltAndRollEnabled.Value.Vector2Scale.Vector3Scale.VectorVelocity.Velocity.VelocityConstraintMode.VelocityInheritance.VertexColor.VerticalAlignment.VerticalFlex.VerticalScrollBarInset.VerticalScrollBarPosition.VideoColor3.VideoRectOffset.VideoRectSize.VideoTransparency.Visible.VoiceId.Volume.WaistRangeMax.WaistRangeMin.WaistSize.WaistTposeAdjustment.WalkAnimation.WalkSpeed.Weight.WetLevel.Width0.Width1.WidthScale.WinchEnabled.WinchForce.WinchResponsiveness.WinchSpeed.WinchTarget.WindAffectsDrag.WindowSize.WireRadius.Wraps.ZIndex.ZIndexBehavior.ZOffset`.split(`.`),Qf=[[0,`AccessModifierType`,`Deny`],[0,`ActuatorRelativeTo`,`Attachment0`],[0,`ActuatorRelativeTo`,`World`],[0,`ActuatorType`,`None`],[0,`AdornCullingMode`,`Automatic`],[0,`AdornShading`,`Default`],[0,`AlignType`,`AllAxes`],[0,`AlphaMode`,`Opaque`],[0,`AlphaMode`,`Overlay`],[0,`AnimationNodeType`,`InvalidNode`],[0,`AnimationPriority`,`Action`],[0,`ApplyStrokeMode`,`Contextual`],[0,`AspectType`,`FitWithinMaxSize`],[0,`AudioChannelLayout`,`Stereo`],[0,`AudioFilterType`,`Peak`],[0,`AudioSimulationFidelity`,`Automatic`],[0,`AudioWindowSize`,`Medium`],[0,`AutomaticSize`,`None`],[0,`BodyPart`,`Head`],[0,`BorderMode`,`Outline`],[0,`BorderStrokePosition`,`Outer`],[0,`ButtonStyle`,`Custom`],[0,`CameraType`,`Fixed`],[0,`CompositeValueCurveType`,`NumberRange`],[0,`DigitsRigDescriptionSide`,`None`],[0,`DominantAxis`,`Width`],[0,`DragDetectorDragStyle`,`TranslatePlane`],[0,`DragDetectorPermissionPolicy`,`Everybody`],[0,`DragDetectorResponseStyle`,`Physical`],[0,`EasingDirection`,`Out`],[0,`EasingStyle`,`Back`],[0,`ElasticBehavior`,`WhenScrollable`],[0,`EmitterPositionType`,`Parent`],[0,`FieldOfViewMode`,`Vertical`],[0,`FillDirection`,`Horizontal`],[0,`FillDirection`,`Vertical`],[0,`ForceLimitMode`,`Magnitude`],[0,`FormFactor`,`Brick`],[0,`FrameStyle`,`Custom`],[0,`GradientTileMode`,`Clamp`],[0,`GradientType`,`Linear`],[0,`HandlesStyle`,`Resize`],[0,`HapticEffectType`,`UIClick`],[0,`HighlightDepthMode`,`AlwaysOnTop`],[0,`HorizontalAlignment`,`Left`],[0,`HumanoidCollisionType`,`OuterBox`],[0,`HumanoidDisplayDistanceType`,`Viewer`],[0,`HumanoidHealthDisplayType`,`DisplayWhenDamaged`],[0,`HumanoidRigType`,`R6`],[0,`IKControlType`,`Transform`],[0,`InOut`,`Center`],[0,`InputActionType`,`Bool`],[0,`InputBindingType`,`Automatic`],[0,`InputSink`,`None`],[0,`InputType`,`NoInput`],[0,`InternalVideoUsage`,`Default`],[0,`ItemLineAlignment`,`Automatic`],[0,`KeyCode`,`ButtonL2`],[0,`KeyCode`,`ButtonR1`],[0,`KeyCode`,`ButtonX`],[0,`KeyCode`,`E`],[0,`KeyCode`,`LeftControl`],[0,`KeyCode`,`Unknown`],[0,`LeftRight`,`Center`],[0,`LineJoinMode`,`Round`],[0,`ListenerPositionType`,`Parent`],[0,`MakeupType`,`Face`],[0,`Material`,`Plastic`],[0,`MaterialPattern`,`Regular`],[0,`MeshType`,`Head`],[0,`ModelLevelOfDetail`,`Automatic`],[0,`ModelStreamingMode`,`Default`],[0,`NameOcclusion`,`OccludeAll`],[0,`NormalId`,`Front`],[0,`NormalId`,`Right`],[0,`NormalId`,`Top`],[0,`OrientationAlignmentMode`,`TwoAttachment`],[0,`PartType`,`Block`],[0,`ParticleEmitterShape`,`Box`],[0,`ParticleEmitterShapeInOut`,`Outward`],[0,`ParticleEmitterShapeStyle`,`Volume`],[0,`ParticleFlipbookLayout`,`None`],[0,`ParticleFlipbookMode`,`Loop`],[0,`ParticleOrientation`,`FacingCamera`],[0,`PoseEasingDirection`,`In`],[0,`PoseEasingStyle`,`Linear`],[0,`PositionAlignmentMode`,`TwoAttachment`],[0,`ProximityPromptExclusivity`,`OnePerButton`],[0,`ProximityPromptStyle`,`Default`],[0,`RenderFidelity`,`Automatic`],[0,`RenderingTestComparisonMethod`,`psnr`],[0,`ResamplerMode`,`Default`],[0,`RollOffMode`,`Inverse`],[0,`RotationOrder`,`XYZ`],[0,`SafeAreaCompatibility`,`FullscreenExtension`],[0,`ScaleType`,`Stretch`],[0,`ScreenInsets`,`CoreUISafeInsets`],[0,`ScrollBarInset`,`None`],[0,`ScrollingDirection`,`XY`],[0,`SelectionBehavior`,`Escape`],[0,`SimulationMode`,`Default`],[0,`SizeConstraint`,`RelativeXY`],[0,`SortOrder`,`Name`],[0,`StartCorner`,`TopLeft`],[0,`StrokeSizingMode`,`FixedSize`],[0,`SurfaceGuiSizingMode`,`FixedSize`],[0,`SurfaceType`,`Inlet`],[0,`SurfaceType`,`Smooth`],[0,`SurfaceType`,`Studs`],[0,`SurfaceType`,`Universal`],[0,`TableMajorAxis`,`RowMajor`],[0,`TextDirection`,`Auto`],[0,`TextTruncate`,`None`],[0,`TextXAlignment`,`Center`],[0,`TextYAlignment`,`Center`],[0,`TextureMode`,`Stretch`],[0,`TonemapperPreset`,`Default`],[0,`TopBottom`,`Center`],[0,`UIDragDetectorBoundingBehavior`,`Automatic`],[0,`UIDragDetectorDragRelativity`,`Absolute`],[0,`UIDragDetectorDragSpace`,`Parent`],[0,`UIDragDetectorDragStyle`,`TranslatePlane`],[0,`UIDragDetectorResponseStyle`,`Offset`],[0,`UIDragSpeedAxisMapping`,`XY`],[0,`UIFlexAlignment`,`None`],[0,`UIFlexMode`,`None`],[0,`VelocityConstraintMode`,`Vector`],[0,`VerticalAlignment`,`Top`],[0,`VerticalScrollBarPosition`,`Right`],[0,`VideoSampleSize`,`Full`],[0,`WrapLayerAutoSkin`,`Disabled`],[0,`ZIndexBehavior`,`Global`],[1,!1],[1,!0],[10,[-1,-1,-1]],[10,[0,0,0]],[10,[0,1,0]],[10,[0,180,90]],[10,[0,2,0]],[10,[0,50,0]],[10,[1,0,0]],[10,[1,1,1]],[10,[1e3,0,0]],[10,[1e3,1e3,1e3]],[10,[1e4,1e4,1e4]],[10,[12,12,12]],[10,[2,2,2]],[10,[4,1.2000000476837158,2]],[10,[4e3,4e3,4e3]],[10,[4e5,0,4e5]],[10,[4e5,4e5,0]],[2,[0,0,-5,1,0,0,0,1,0,0,0,1]],[2,[0,0,0,1,0,0,0,1,0,0,0,1]],[2,[0,20,20,1,0,0,0,.7071068286895752,.7071068286895752,0,-.7071068286895752,.7071068286895752]],[3,[0,0,0]],[3,[.05098039284348488,.4117647111415863,.6745098233222961]],[3,[.05098039656877518,.4117647409439087,.6745098233222961]],[3,[.10588235408067703,.16470588743686676,.2078431397676468]],[3,[.10588236153125763,.16470588743686676,.20784315466880798]],[3,[.1568627506494522,.49803924560546875,.27843138575553894]],[3,[.5,.5,.5]],[3,[.545098066329956,.3137255012989044,.21568629145622253]],[3,[.5490196347236633,.5490196347236633,.5490196347236633]],[3,[.5647059082984924,.09803922474384308,1]],[3,[.6392157077789307,.6352941393852234,.6470588445663452]],[3,[.7843137383460999,.7843137383460999,.7843137383460999]],[3,[.9254902601242065,.545098066329956,.27450981736183167]],[3,[.9490196704864502,.9529412388801575,.9529412388801575]],[3,[.9921569228172302,.917647123336792,.5529412031173706]],[3,[1,0,0]],[3,[1,1,1]],[3,[163,162,165]],[4,`inf`],[4,-.5],[4,-10],[4,-1],[4,-20],[4,-40],[4,-45],[4,-6],[4,.0010000000474974513],[4,.009999999776482582],[4,.019999999552965164],[4,.03999999910593033],[4,.05000000074505806],[4,.0625],[4,.10000000149011612],[4,.15000000596046448],[4,.20000000298023224],[4,.25],[4,.30000001192092896],[4,.4000000059604645],[4,.44999998807907104],[4,.5],[4,.699999988079071],[4,.7070000171661377],[4,.75],[4,.8500000238418579],[4,.8999999761581421],[4,.949999988079071],[4,0],[4,1.25],[4,1.5],[4,1e7],[4,1e4],[4,1e3],[4,100],[4,10],[4,11],[4,1250],[4,12],[4,16],[4,1],[4,2e4],[4,2e3],[4,20],[4,21],[4,24],[4,250],[4,25],[4,2],[4,3e3],[4,30],[4,32],[4,360],[4,3],[4,4e3],[4,40],[4,45],[4,4],[4,5e5],[4,5e3],[4,500],[4,50],[4,5],[4,7.199999809265137],[4,70],[4,89],[4,8],[4,90],[4,9],[5,[0,0,0,0]],[6,``],[6,`Button`],[6,`Default`],[6,`Input`],[6,`Interact`],[6,`Label`],[6,`Output`],[6,`Particle texture must be 1024 by 1024 to use flipbooks.`],[6,`TextBox`],[6,`en-us`],[7,[0,0,0,0]],[7,[0,0,2,0]],[7,[0,100,0,100]],[7,[0,300,0,300]],[7,[0,5,0,5]],[7,[1,0,1,0]],[8,[0,0]],[8,[0,8]],[9,[`-inf`,`-inf`]],[9,[`inf`,`inf`]],[9,[0,0]],[9,[1,0]],[9,[1,1]],[9,[1e3,1e3]],[9,[800,600]]];const $f=new Set([`Name`,`Parent`]),ep=new Set(Array.from($f,e=>e.toLowerCase())),tp=new Map(Object.entries(Xf).map(([e])=>[e.toLowerCase(),e]));function np(e){let t=new Map;for(let[n,r]of Object.entries(e)){if(!gp(r))continue;let e=n.toLowerCase();t.has(e)||t.set(e,{propertyName:n,value:r})}return t}const rp=[`Enum`,`bool`,`CFrame`,`Color3`,`number`,`Rect`,`string`,`UDim2`,`UDim`,`Vector2`,`Vector3`];function ip(e){let[t]=e;if(typeof t!=`number`)return;let n=rp[t];if(n===void 0)return;let r=n===`Enum`?{enumType:e[1],type:n,value:e[2]}:{type:n,value:e[1]};return gp(r)?r:void 0}const ap=new Map([[`TextLabel`,new Map([[`text`,{propertyName:`Text`,value:{type:`string`,value:``}}]])],[`UICorner`,new Map([[`cornerradius`,{propertyName:`CornerRadius`,value:{type:`UDim`,value:[0,0]}}]])]]);function op(){let e=new Map;for(let[t,n]of Object.entries(Xf)){let r={};for(let e=0;e<n.length;e+=2){let t=n[e],i=n[e+1];if(t===void 0||i===void 0)continue;let a=Zf[t],o=Qf[i],s=o===void 0?void 0:ip(o);a!==void 0&&s!==void 0&&(r[a]=s)}e.set(t,np(r))}return e}const sp=op();function cp(e,t){return e.type===`Identifier`&&e.name===t}function lp(e){return e.type===`Literal`&&typeof e.value==`boolean`}function up(e){if(e.type!==`JSXIdentifier`)return;let t=tp.get(e.name.toLowerCase());if(t!==void 0&&e.name!==t)return t}function dp(e){if(e.type===`JSXIdentifier`)return e.name}function fp(e){let{value:t}=e;if(t!==null){if(t.type===`Literal`)return t;if(t.type===`JSXExpressionContainer`&&t.expression.type!==`JSXEmptyExpression`)return t.expression}}function pp(e,t){let n=t.toLowerCase(),r=ap.get(e)?.get(n);if(r!==void 0)return r;let i=sp.get(e);if(i!==void 0)return i.get(n)}function mp(e){return ep.has(e.toLowerCase())}function hp(e){return b(e)||e===`inf`||e===`-inf`}function gp(e){if(!(x(e)&&y(e.type)&&`value`in e))return!1;switch(e.type){case`bool`:return typeof e.value==`boolean`;case`CFrame`:return Array.isArray(e.value)&&e.value.length===12&&e.value.every(hp);case`Color3`:return Array.isArray(e.value)&&e.value.length===3&&e.value.every(b);case`Enum`:return y(e.enumType)&&y(e.value);case`number`:return hp(e.value);case`Rect`:case`UDim2`:return Array.isArray(e.value)&&e.value.length===4&&e.value.every(hp);case`string`:return y(e.value);case`UDim`:case`Vector2`:return Array.isArray(e.value)&&e.value.length===2&&e.value.every(hp);case`Vector3`:return Array.isArray(e.value)&&e.value.length===3&&e.value.every(hp)}return!1}function _p(e){let t=C(e);if(t.type!==`NewExpression`||!cp(t.callee,`Instance`))return;let[n]=t.arguments;if(!(n===void 0||n.type===`SpreadElement`||!ve(n)))return n.value}function vp(e,t,n=new WeakSet){if(Array.isArray(e)){for(let r of e)if(vp(r,t,n))return!0;return!1}if(!x(e)||n.has(e))return!1;if(n.add(e),e.type===`Identifier`&&e.name===t)return!0;for(let r of Object.values(e))if(vp(r,t,n))return!0;return!1}function yp(e){let t=[],n=e;for(;n.type===`MemberExpression`;){if(n.computed||n.property.type!==`Identifier`)return;t.unshift(n.property.name);let{object:e}=n;if(e.type===`Identifier`)return t.unshift(e.name),t;if(e.type!==`MemberExpression`)return;n=e}if(n.type===`Identifier`)return t.unshift(n.name),t}function bp(e){let t=yp(e);return t?.length===2&&t[0]===`math`&&t[1]===`huge`}function xp(e){return e===`inf`?1/0:e===`-inf`?-1/0:e}function Sp(e,t){return xp(e)===t}function Cp(e,t){if(e.length!==t.length)return!1;for(let[n,r]of e.entries()){let e=t[n];if(e===void 0||!Sp(r,e))return!1}return!0}function X(e){if(Ge(e))return e.value;if(bp(e))return 1/0;if(e.type!==`UnaryExpression`||e.operator!==`+`&&e.operator!==`-`)return;let t=X(e.argument);if(t!==void 0)return e.operator===`+`?t:-t}function wp(e){if(e.length!==2)return;let[t,n]=e;if(t!==void 0&&n!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`)return[t,n]}function Tp(e){if(e.length!==3)return;let[t,n,r]=e;if(t!==void 0&&n!==void 0&&r!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`&&r.type!==`SpreadElement`)return[t,n,r]}function Ep(e){if(e.length!==4)return;let[t,n,r,i]=e;if(t!==void 0&&n!==void 0&&r!==void 0&&i!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`&&r.type!==`SpreadElement`&&i.type!==`SpreadElement`)return[t,n,r,i]}function Dp(e,t,n,r){if(e.type===`MemberExpression`){let r=yp(e);return r?.length===2&&r[0]===t&&r[1]===`zero`?n:void 0}if(!(e.type!==`NewExpression`||!cp(e.callee,t)))return e.arguments.length===0?n:r(e.arguments)}function Op(e){return Dp(e,`Vector2`,[0,0],kp)}function kp(e){let t=wp(e);if(t===void 0)return;let[n,r]=t,i=X(n),a=X(r);if(i!==void 0&&a!==void 0)return[i,a]}function Ap(e){let t=Tp(e);if(t===void 0)return;let[n,r,i]=t,a=X(n),o=X(r),s=X(i);if(a!==void 0&&o!==void 0&&s!==void 0)return[a,o,s]}function jp(e){return Dp(e,`Vector3`,[0,0,0],Ap)}function Mp(e){if(!(e.type!==`NewExpression`||!cp(e.callee,`UDim`)))return e.arguments.length===0?[0,0]:kp(e.arguments)}function Np(e){let t=Ep(e);if(t===void 0)return;let[n,r,i,a]=t,o=X(n),s=X(r),c=X(i),l=X(a);if(o!==void 0&&s!==void 0&&c!==void 0&&l!==void 0)return[o,s,c,l]}function Pp(e){if(e.type===`CallExpression`){let t=yp(e.callee),n=kp(e.arguments);if(t===void 0||n===void 0)return;let[r,i]=n;return t.length===2&&t[0]===`UDim2`&&t[1]===`fromOffset`?[0,r,0,i]:t.length===2&&t[0]===`UDim2`&&t[1]===`fromScale`?[r,0,i,0]:void 0}if(!(e.type!==`NewExpression`||!cp(e.callee,`UDim2`)))return e.arguments.length===0?[0,0,0,0]:Np(e.arguments)}function Fp(e){if(!(e.type!==`NewExpression`||!cp(e.callee,`Rect`)))return e.arguments.length===0?[0,0,0,0]:Np(e.arguments)}function Ip(e){let[t,n,r]=e,i=X(t),a=X(n),o=X(r);if(i!==void 0&&a!==void 0&&o!==void 0)return[i,a,o]}function Lp(e){if(e.type===`CallExpression`){let t=yp(e.callee),n=Tp(e.arguments);if(t?.length!==2||t[0]!==`Color3`||t[1]!==`fromRGB`||n===void 0)return;let r=Ip(n);if(r===void 0)return;let[i,a,o]=r;return[Math.fround(i/255),Math.fround(a/255),Math.fround(o/255)]}if(e.type!==`NewExpression`||!cp(e.callee,`Color3`))return;if(e.arguments.length===0)return[0,0,0];let t=Tp(e.arguments);if(t!==void 0)return Ip(t)}function Rp(e){if(e.type!==`NewExpression`||!cp(e.callee,`CFrame`))return;if(e.arguments.length===0)return[0,0,0,1,0,0,0,1,0,0,0,1];let t=Ap(e.arguments);if(t===void 0)return;let[n,r,i]=t;return[n,r,i,1,0,0,0,1,0,0,0,1]}function zp(e){let t=yp(e);if(t?.length!==3||t[0]!==`Enum`)return;let[,n,r]=t;if(n!==void 0&&r!==void 0)return{enumType:n,value:r}}function Bp(e,t){switch(t.type){case`bool`:return lp(e)&&e.value===t.value;case`CFrame`:{let n=Rp(e);return n!==void 0&&Cp(t.value,n)}case`Color3`:{let n=Lp(e);return n!==void 0&&n[0]===t.value[0]&&n[1]===t.value[1]&&n[2]===t.value[2]}case`Enum`:{let n=zp(e);return n!==void 0&&n.enumType===t.enumType&&n.value===t.value}case`number`:{let n=X(e);return n!==void 0&&Sp(t.value,n)}case`Rect`:{let n=Fp(e);return n!==void 0&&Cp(t.value,n)}case`string`:return ve(e)&&e.value===t.value;case`UDim`:{let n=Mp(e);return n!==void 0&&Cp(t.value,n)}case`UDim2`:{let n=Pp(e);return n!==void 0&&Cp(t.value,n)}case`Vector2`:{let n=Op(e);return n!==void 0&&Cp(t.value,n)}case`Vector3`:{let n=jp(e);return n!==void 0&&Cp(t.value,n)}default:return!1}}const Vp=_(`no-useless-default`,`roblox`,{create(e){let{sourceCode:t}=e;function n(e){return t.getCommentsBefore(e).length>0||t.getCommentsAfter(e).length>0||t.getCommentsInside(e).length>0}function r(e){let r=t.getTokenBefore(e),i=t.getTokenAfter(e);if(n(e)||r!==null&&t.commentsExistBetween(r,e)||i!==null&&t.commentsExistBetween(e,i))return;let[a]=e.range;for(;a>0;){let e=t.text[a-1];if(e===` `||e===` `){--a;continue}break}return t=>t.removeRange([a,e.range[1]])}function i(e,r){if(e.attributes.some(e=>e.type===`JSXSpreadAttribute`))return;let i=t.getTokenBefore(r),a=t.getTokenAfter(r);if(i!==null&&!n(r)&&!t.commentsExistBetween(i,r)&&!(a!==null&&t.commentsExistBetween(r,a)))return e=>e.removeRange([i.range[1],r.range[1]])}function a(t,n,i){if(n.operator!==`=`||n.left.type!==`MemberExpression`||n.left.computed||n.left.object.type!==`Identifier`||n.left.property.type!==`Identifier`)return;let a=i.get(n.left.object.name);if(a===void 0)return;let o=n.left.property.name;if(mp(o))return;let s=pp(a.className,o);if(s===void 0||!Bp(n.right,s.value))return;let c=r(t);if(c===void 0){e.report({data:{className:a.className,propertyName:s.propertyName},messageId:`uselessDefault`,node:n.left});return}e.report({data:{className:a.className,propertyName:s.propertyName},fix:c,messageId:`uselessDefault`,node:n.left})}function o(e,t){for(let[n]of t)for(let r of e.arguments)if(r.type!==`SpreadElement`&&vp(r,n)){t.delete(n);break}}function s(e,t){if(e.left.type===`Identifier`||e.left.type===`MemberExpression`)for(let[n]of t)vp(e.right,n)&&t.delete(n)}function c(e,t){if(e.argument!==null)for(let[n]of t)vp(e.argument,n)&&t.delete(n)}function l(e){let t=new Map;for(let n of e)u(n,t)}function u(e,t){if(e.type===`ExpressionStatement`){d(e,t);return}if(e.type===`ReturnStatement`){c(e,t);return}e.type===`VariableDeclaration`&&f(e,t)}function d(e,t){let n=C(e.expression);if(n.type===`AssignmentExpression`){a(e,n,t),s(n,t);return}n.type===`CallExpression`&&o(n,t)}function f(e,t){if(e.kind===`const`)for(let n of e.declarations){if(n.id.type!==`Identifier`||n.init===null)continue;let e=_p(n.init);e!==void 0&&t.set(n.id.name,{className:e})}}return{BlockStatement(e){l(e.body)},JSXOpeningElement(t){let n=up(t.name);if(n!==void 0)for(let r of t.attributes){if(r.type===`JSXSpreadAttribute`)continue;let a=dp(r.name);if(a===void 0||mp(a))continue;let o=pp(n,a);if(o===void 0)continue;let s=fp(r);if(!(r.value===null&&o.value.type===`bool`&&o.value.value)&&(s===void 0||!Bp(s,o.value)))continue;let c=i(t,r);if(c===void 0){e.report({data:{className:n,propertyName:o.propertyName},messageId:`uselessDefault`,node:r});continue}e.report({data:{className:n,propertyName:o.propertyName},fix:c,messageId:`uselessDefault`,node:r})}},Program(e){l(e.body)}}},meta:{docs:{description:`Disallow Roblox JSX properties whose values already match the class defaults.`},fixable:`code`,messages:{uselessDefault:`Remove "{{propertyName}}" from {{className}}. It already matches the default value.`},schema:[],type:`suggestion`}}),Hp=[`useEffect`,`useLayoutEffect`,`useInsertionEffect`],Up=[`on`],Wp=[`useRef`],Gp=[`useState`,`useReducer`];function Kp(e){return e===void 0?{environment:`roblox-ts`,hooks:new Set(Hp),propertyCallbackPrefixes:new Set(Up),refHooks:new Set(Wp),reportAdjustState:!0,reportDerivedState:!0,reportDuplicateDeps:!0,reportEffectChain:!0,reportEmptyEffect:!0,reportEventFlag:!0,reportEventSpecificLogic:!0,reportExternalStore:!0,reportInitializeState:!0,reportLogOnly:!0,reportMixedDerivedState:!0,reportNotifyParent:!0,reportPassRefToParent:!0,reportResetState:!0,stateHooks:new Set(Gp)}:{environment:fr(e.environment)?e.environment:`roblox-ts`,hooks:new Set(S(e.hooks)?e.hooks:Hp),propertyCallbackPrefixes:new Set(S(e.propertyCallbackPrefixes)?e.propertyCallbackPrefixes:Up),refHooks:new Set(S(e.refHooks)?e.refHooks:Wp),reportAdjustState:e.reportAdjustState??!0,reportDerivedState:e.reportDerivedState??!0,reportDuplicateDeps:e.reportDuplicateDeps??!0,reportEffectChain:e.reportEffectChain??!0,reportEmptyEffect:e.reportEmptyEffect??!0,reportEventFlag:e.reportEventFlag??!0,reportEventSpecificLogic:e.reportEventSpecificLogic??!0,reportExternalStore:e.reportExternalStore??!0,reportInitializeState:e.reportInitializeState??!0,reportLogOnly:e.reportLogOnly??!0,reportMixedDerivedState:e.reportMixedDerivedState??!0,reportNotifyParent:e.reportNotifyParent??!0,reportPassRefToParent:e.reportPassRefToParent??!0,reportResetState:e.reportResetState??!0,stateHooks:new Set(S(e.stateHooks)?e.stateHooks:Gp)}}function qp(e){if(!(e.type!==`MemberExpression`||e.computed||e.object.type!==`Identifier`||e.property.type!==`Identifier`))return{objectName:e.object.name,propertyName:e.property.name}}function Jp(e){if(!(e.type!==`MemberExpression`||e.computed||e.property.type!==`Identifier`))return e.property.name}function Yp(e,t,n,r){let{callee:i}=e;if(i.type===`Identifier`)return t.has(i.name);let a=qp(i);return a!==void 0&&n.has(a.objectName)&&r.has(a.propertyName)}function Xp(e){if((e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)&&e.id!==null)return e.id.name;let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`)return t.id.name;if(`key`in t&&!(`computed`in t&&t.computed)&&D(t.key)&&t.key.type===`Identifier`)return t.key.name}function Zp(e){return ne(e)&&e.startsWith(`use`)}function Qp(e){if(e.type===`ReturnStatement`)return e.argument===null;if(e.type!==`BlockStatement`||e.body.length!==1)return!1;let[t]=e.body;return t?.type===`ReturnStatement`&&t.argument===null}function $p(e,t){if(`body`in e&&D(e.body))if(e.body.type===`BlockStatement`)for(let n of e.body.body)t.push(n);else t.push(e.body)}function em(e,t){if(e.type===`BlockStatement`){for(let n of e.body)t.push(n);return}if(e.type===`IfStatement`){t.push(e.consequent),e.alternate!==null&&t.push(e.alternate);return}if(e.type===`DoWhileStatement`||e.type===`ForInStatement`||e.type===`ForOfStatement`||e.type===`ForStatement`||e.type===`LabeledStatement`||e.type===`WhileStatement`||e.type===`WithStatement`){$p(e,t);return}if(e.type===`SwitchStatement`){for(let n of e.cases)for(let e of n.consequent)t.push(e);return}if(e.type===`TryStatement`){for(let n of e.block.body)t.push(n);if(e.handler!==null)for(let n of e.handler.body.body)t.push(n);if(e.finalizer!==null)for(let n of e.finalizer.body)t.push(n)}}function tm(e){let t=[...e.body];for(;t.length>0;){let e=t.pop();if(e!==void 0)switch(e.type){case`ArrowFunctionExpression`:continue;case`FunctionDeclaration`:continue;case`FunctionExpression`:continue;case`ReturnStatement`:if(e.argument!==null)return!0;continue;case`DoWhileStatement`:case`ForInStatement`:case`ForOfStatement`:case`ForStatement`:case`BlockStatement`:case`IfStatement`:case`LabeledStatement`:case`SwitchStatement`:case`TryStatement`:case`WhileStatement`:case`WithStatement`:em(e,t);continue;default:continue}}return!1}function nm(e){if(e.length===0)return e;let[t]=e;return t?.type!==`IfStatement`||t.alternate!==null||!Qp(t.consequent)?e:e.slice(1)}function rm(e){return e.type===`ChainExpression`?e.expression:e}function Z(e){if(e.type!==`ExpressionStatement`)return;let t=rm(e.expression);return t.type===`CallExpression`?t:void 0}function im(e,t){return e.callee.type===`Identifier`&&t.has(e.callee.name)}function am(e){return e.type===`Literal`&&e.value===!1}function om(e){return e.type===`Literal`||e.type===`UnaryExpression`&&e.operator===`void`&&e.argument.type===`Literal`&&e.argument.value===0}function sm(e){return e.type===`ArrayExpression`&&e.elements.length===0}function cm(e){return e.type===`ObjectExpression`&&e.properties.length===0}function lm(e){if(e.type===`Literal`){let{value:t}=e;return t===``||t===0||t===!1||t===null}return om(e)?!0:sm(e)||cm(e)}function um(e,t){let n=Z(e);if(n?.callee.type!==`Identifier`)return;let r=t.get(n.callee.name);if(r===void 0||n.arguments.length!==1)return;let[i]=n.arguments;if(!(i===void 0||!am(i)))return r}function dm(e,t){let n=Z(e);if(!(n===void 0||im(n,t)))return n}function fm(e,t){return e.type===`UnaryExpression`&&e.operator===`!`&&e.argument.type===`Identifier`&&e.argument.name===t}function pm(e,t){return e.type===`Identifier`&&e.name===t}function Q(e){return e.type===`BlockStatement`?e.body:[e]}function mm(e,t,n){let[r,i,a]=e;if(r?.type!==`IfStatement`||r.alternate!==null||i===void 0||a===void 0)return;let o=um(i,t),s=um(a,t),c=Qp(r.consequent);if(o!==void 0&&s===void 0)return c&&fm(r.test,o)?dm(a,n)===void 0?void 0:o:void 0;if(s!==void 0&&o===void 0&&c&&fm(r.test,s))return dm(i,n)===void 0?void 0:s}function hm(e,t,n){if(e.type!==`IfStatement`||e.alternate!==null)return;let r=Q(e.consequent),[i,a]=r;if(r.length!==2||i===void 0||a===void 0)return;let o=um(i,t),s=um(a,t);if(o!==void 0&&s===void 0)return pm(e.test,o)?dm(a,n)===void 0?void 0:o:void 0;if(s!==void 0&&o===void 0&&pm(e.test,s))return dm(i,n)===void 0?void 0:s}function gm(e,t,n){if(e.length===3)return mm(e,t,n);if(e.length===1){let[r]=e;return r===void 0?void 0:hm(r,t,n)}}const _m=new Set([`ArrayExpression`,`BinaryExpression`,`CallExpression`,`ChainExpression`,`ConditionalExpression`,`Identifier`,`LogicalExpression`,`MemberExpression`,`ObjectExpression`,`PrivateIdentifier`,`TemplateLiteral`,`UnaryExpression`]);function vm(e){return _m.has(e.type)}function ym(e,t){for(let n of e.elements)n!==null&&n.type!==`SpreadElement`&&t.push(n)}function bm(e,t){t.push(e.callee);for(let n of e.arguments)n.type!==`SpreadElement`&&t.push(n)}function xm(e,t){t.push(e.object),e.computed||t.push(e.property)}function Sm(e,t){for(let n of e.properties)n.type===`Property`&&t.push(n.value)}function Cm(e,t){switch(e.type){case`ArrayExpression`:ym(e,t);break;case`BinaryExpression`:case`LogicalExpression`:t.push(e.left,e.right);break;case`CallExpression`:bm(e,t);break;case`ChainExpression`:t.push(e.expression);break;case`ConditionalExpression`:t.push(e.test,e.consequent,e.alternate);break;case`MemberExpression`:xm(e,t);break;case`ObjectExpression`:Sm(e,t);break;case`TemplateLiteral`:for(let n of e.expressions)t.push(n);break;case`UnaryExpression`:t.push(e.argument);break;default:}}function wm(e){let t=[e],n=new Set;for(;t.length>0;){let e=t.pop();if(!(e===void 0||n.has(e))){if(n.add(e),e.type===`Identifier`)return!0;Cm(e,t)}}return!1}function Tm(e,t){let n=0;for(let r of e){if(r.type===`IfStatement`){if(r.alternate!==null)return;let e=Tm(Q(r.consequent),t);if(e===void 0||e===0)return;n+=e;continue}let e=Z(r);if(e===void 0||!t(e))return;n+=1}return n>0?n:void 0}function Em(e,t){return Tm(e,e=>im(e,t)?e.arguments.some(e=>e.type!==`SpreadElement`&&wm(e)):!1)}function Dm(e,t,n){return Tm(e,e=>jm(e,t,n))}function Om(e,t){for(let n of t)if(e.startsWith(n))return!0;return!1}function km(e){return e.type===`AssignmentPattern`?e.left:e}function Am(e,t,n,r){let i={functionId:n,isCustomHook:r,propertyCallbackIdentifiers:new Set,propertyObjectName:void 0},[a]=e.params;if(a===void 0)return i;let o=km(a);if(o.type===`Identifier`)return i.propertyObjectName=o.name,i;if(o.type!==`ObjectPattern`)return i;for(let e of o.properties){if(e.type!==`Property`)continue;let n=Ui(e);if(n===void 0||!Om(n,t))continue;let r=Wi(e);r!==void 0&&i.propertyCallbackIdentifiers.add(r.name)}return i}function jm(e,t,n){let{callee:r}=e;if(r.type===`Identifier`)return t.propertyCallbackIdentifiers.has(r.name);let i=qp(r);return i!==void 0&&t.propertyObjectName!==void 0&&i.objectName===t.propertyObjectName&&Om(i.propertyName,n)}function Mm(e,t){let[,n]=e.arguments;if(n?.type!==`ArrayExpression`)return!1;for(let e of n.elements)if(e?.type===`Identifier`&&e.name===t)return!0;return!1}function Nm(e){let t=new Set,[,n]=e.arguments;if(n?.type!==`ArrayExpression`)return t;for(let e of n.elements)e?.type===`Identifier`&&t.add(e.name);return t}function Pm(e){let[,t]=e.arguments;return t===void 0||t.type===`ArrayExpression`&&t.elements.length===0}function Fm(e,t){if(e.length===0)return!1;for(let n of e){if(n.type===`IfStatement`){if(n.alternate!==null||!Fm(Q(n.consequent),t))return!1;continue}if(!t(n))return!1}return!0}function Im(e,t){let n=new Set;for(let r of e){if(r.type===`IfStatement`){let e=Q(r.consequent);for(let r of Im(e,t))n.add(r);continue}let e=Z(r);e!==void 0&&im(e,t)&&e.callee.type===`Identifier`&&n.add(e.callee.name)}return n}function Lm(e,t){let{callee:n}=e;if(n.type===`Identifier`)return t.has(n.name);let r=qp(n);return r!==void 0&&t.has(r.objectName)}function Rm(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(Rm(Q(r.consequent),t,n))return!0;continue}let e=Z(r);if(e!==void 0&&!im(e,t)&&!Lm(e,n))return!0}return!1}function zm(e,t,n){return Fm(e,e=>{let r=Z(e);if(r===void 0||!im(r,t)||r.arguments.length!==1)return!1;let[i]=r.arguments;return i!==void 0&&n(i)})}function Bm(e){return e.type===`Literal`&&typeof e.value!=`object`||sm(e)||cm(e)}function Vm(e,t){return zm(e,t,lm)}function Hm(e,t){return zm(e,t,Bm)}function Um(e){return Fm(e,e=>{let t=Z(e);return t!==void 0&&qp(t.callee)?.objectName===`console`})}const Wm=new Set([`addEventListener`,`addListener`,`on`,`subscribe`]);function Gm(e){return e.some(e=>{let t=Z(e);if(t===void 0)return!1;let n=Jp(t.callee);return n!==void 0&&Wm.has(n)})}function Km(e,t){return e.type===`MemberExpression`&&!e.computed&&e.object.type===`Identifier`&&e.property.type===`Identifier`&&e.property.name===`current`&&t.has(e.object.name)}function qm(e,t,n){return e.callee.type===`Identifier`&&n.has(e.callee.name)&&e.arguments.some(e=>Km(e,t))}function Jm(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(Jm(Q(r.consequent),t,n))return!0;continue}let e=Z(r);if(e!==void 0&&qm(e,t,n))return!0}return!1}function Ym(e){let t=new Set,n=new Set,r=vm(e)?[e]:[];for(;r.length>0;){let e=r.pop();if(!(e===void 0||n.has(e))){if(n.add(e),e.type===`Identifier`){t.add(e.name);continue}vm(e)&&Cm(e,r)}}return t}function Xm(e){return e.alternate===null?[]:e.alternate.type===`BlockStatement`?e.alternate.body:[e.alternate]}function Zm(e,t,n){return[...Ym(e.test)].some(e=>n.has(e)&&!t.has(e))}function Qm(e,t){return e.some(e=>{let n=Z(e);return n!==void 0&&im(n,t)})}function $m(e,t,n,r){for(let i of e)if(i.type===`IfStatement`&&(Zm(i,n,r)&&Qm(Q(i.consequent),t)||$m(Xm(i),t,n,r)))return!0;return!1}const eh=new Set([`alert`,`confirm`,`display`,`hide`,`log`,`navigate`,`notify`,`post`,`prompt`,`redirect`,`report`,`send`,`show`,`submit`,`track`]);function th(e){let t=e.toLowerCase();for(let e of eh)if(t.startsWith(e))return!0;return!1}function nh(e,t){let n=Z(e);return n===void 0||im(n,t)?!1:n.callee.type===`Identifier`?th(n.callee.name):n.callee.type!==`MemberExpression`||n.callee.computed||n.callee.property.type!==`Identifier`?!1:th(n.callee.property.name)}function rh(e,t){return[...Ym(e.test)].some(e=>t.has(e))}function ih(e,t,n){for(let r of e)if(r.type===`IfStatement`&&(rh(r,n)&&Q(r.consequent).some(e=>nh(e,t))||r.alternate!==null&&ih(Xm(r),t,n)))return!0;return!1}function ah(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function oh(e,t){return`${e}:${t}`}function sh(e){if(e.body?.type===`BlockStatement`)return e.body}function ch(e){return e.body.type===`BlockStatement`}function lh(e){return e.body!==null}const uh=new Set(`addEventListener.addListener.alert.analytics.cancelAnimationFrame.clearInterval.clearTimeout.confirm.debug.delete.error.fetch.get.info.log.navigate.navigateTo.notify.observe.patch.post.prompt.put.redirect.removeEventListener.removeListener.report.requestAnimationFrame.send.setInterval.setTimeout.showNotification.submit.subscribe.track.unobserve.unsubscribe.warn`.split(`.`)),dh=[`fetch`,`send`,`post`,`track`],fh=new Set([`addEventListener`,`addListener`,`cancelAnimationFrame`,`catch`,`clearInterval`,`clearTimeout`,`finally`,`observe`,`removeEventListener`,`removeListener`,`requestAnimationFrame`,`setInterval`,`setTimeout`,`subscribe`,`then`,`unobserve`,`unsubscribe`]),ph=[`log`,`fetch`,`send`,`track`,`report`,`show`,`navigate`,`submit`,`post`,`notify`];function mh(e){for(let t of ph)if(e.startsWith(t))return!0;return!1}function hh(e){return e.object.type===`Identifier`&&e.object.name===`console`&&e.property.type===`Identifier`&&(e.property.name===`log`||e.property.name===`warn`||e.property.name===`error`||e.property.name===`info`||e.property.name===`debug`)}function gh(e){for(let t of dh)if(e.startsWith(t))return!0;return fh.has(e)}function _h(e,t,n){let{callee:r}=e;return im(e,t)?!1:r.type===`Identifier`?n.has(r.name)?!1:uh.has(r.name)||mh(r.name):r.type!==`MemberExpression`||r.computed||r.property.type!==`Identifier`||r.object.type===`Identifier`&&n.has(r.object.name)?!1:hh(r)||gh(r.property.name)}function vh(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(vh(Q(r.consequent),t,n))return!0;continue}let e=Z(r);if(e!==void 0&&_h(e,t,n))return!0}return!1}const yh=_(`no-useless-use-effect`,`react`,{create(e){let t=Kp(e.options[0]),n=hr(t.environment),r=new Set,i=new Set,a=new Set,o=new Set,s=new Set,c=new Map,l=new Set,u=new Set,d=[],f=1,p=new Map,m=[];function h(e){return Yp(e,i,r,t.hooks)}function g(e){return Yp(e,a,r,t.stateHooks)}function _(e){return Yp(e,l,r,t.refHooks)}function v(e){if(e.init?.type!==`CallExpression`||!g(e.init)||e.id.type!==`ArrayPattern`)return;let{elements:t}=e.id;if(t.length<2)return;let[,n]=t;if(n==null||n.type!==`Identifier`)return;o.add(n.name);let[r]=t;r?.type===`Identifier`&&(s.add(r.name),c.set(n.name,r.name))}function ee(e){e.init?.type!==`CallExpression`||!_(e.init)||e.id.type!==`Identifier`||u.add(e.id.name)}function te(e){e.id.type===`Identifier`&&e.init!==null&&(e.init.type===`FunctionExpression`||e.init.type===`ArrowFunctionExpression`)&&p.set(e.id.name,e.init)}function y(e){let n=f;f+=1;let r=Xp(e);d.push(Am(e,t.propertyCallbackPrefixes,n,Zp(r))),e.type===`FunctionDeclaration`&&e.id!==null&&p.set(e.id.name,e)}function b(){d.pop()}function x(e){return t.reportMixedDerivedState&&e.setterCalls.size>0&&e.hasNonSetter&&!e.hasReturnCleanup?!vh(e.statements,o,e.functionContext?.propertyCallbackIdentifiers??new Set):!1}function ne(e){let{coreStatements:n,dependencyIdentifiers:r,functionContext:i,hasNonSetter:a,hasReturnCleanup:l,node:d,statements:f}=e,p=t.reportEventFlag?gm(f,c,o):void 0,m=[...r].some(e=>!(s.has(e)||o.has(e)));return[[t.reportEmptyEffect&&(f.length===0||f[0]!==void 0&&Qp(f[0])),`emptyEffect`],[t.reportInitializeState&&Pm(d)&&Hm(f,o),`initializeState`],[t.reportResetState&&Vm(f,o)&&m,`resetState`],[p!==void 0&&Mm(d,p),`eventFlag`],[t.reportEventSpecificLogic&&ih(f,o,s),`eventSpecificLogic`],[t.reportAdjustState&&$m(f,o,s,r)&&!a,`adjustState`],[t.reportDerivedState&&Em(n,o)!==void 0,`derivedState`],[x(e),`mixedDerivedState`],[t.reportPassRefToParent&&i!==void 0&&Jm(f,u,i.propertyCallbackIdentifiers),`passRefToParent`],[t.reportNotifyParent&&i!==void 0&&!i.isCustomHook&&Dm(n,i,t.propertyCallbackPrefixes)!==void 0,`notifyParent`],[t.reportExternalStore&&Gm(f)&&l,`externalStore`],[t.reportLogOnly&&Um(f),`logOnly`]].find(([e])=>e)?.[1]}function S(t,n,r){let i=d.at(-1),a=nm(n),s=Nm(t),c=Im(n,o),l=Rm(n,o,i?.propertyCallbackIdentifiers??new Set),u=r!==void 0&&tm(r);m.push({depIdentifiers:s,hasNonSetterSideEffect:l,hasReturnWithCleanup:u,node:t,ownerFunctionId:i?.functionId??0,setterCalls:c,statements:n});let f=ne({coreStatements:a,dependencyIdentifiers:s,functionContext:i,hasNonSetter:l,hasReturnCleanup:u,node:t,setterCalls:c,statements:n});f!==void 0&&e.report({messageId:f,node:t})}function re(){if(!t.reportEffectChain)return;let n=ie();for(let t of m)if(!(t.hasNonSetterSideEffect||t.hasReturnWithCleanup))for(let r of t.depIdentifiers){let i=oh(t.ownerFunctionId,r),a=n.get(i);if(a!==void 0&&C(a)){e.report({messageId:`effectChain`,node:t.node});return}}}function ie(){let e=new Map;for(let[t,n]of m.entries())for(let r of n.setterCalls){let i=c.get(r);if(i===void 0)continue;let a=oh(n.ownerFunctionId,i),o=e.get(a);o===void 0&&(o=new Set,e.set(a,o)),o.add(t)}return e}function C(e){return e.size!==0&&[...e].every(e=>{let t=m[e];return t!==void 0&&!t.hasNonSetterSideEffect&&!t.hasReturnWithCleanup})}function w(){if(!t.reportDuplicateDeps||m.length<2)return;let e=new Set;for(let t=0;t<m.length;t+=1){if(e.has(t))continue;let n=T(t,e);n.length<2||ae(n,e)}}function T(e,t){let n=m[e];if(n===void 0||n.depIdentifiers.size===0)return[];let r=[e];for(let i=e+1;i<m.length;i+=1){let e=m[i];t.has(i)||e!==void 0&&e.ownerFunctionId===n.ownerFunctionId&&ah(n.depIdentifiers,e.depIdentifiers)&&r.push(i)}return r}function ae(t,n){for(let r of t){n.add(r);let t=m[r];t!==void 0&&e.report({messageId:`duplicateDeps`,node:t.node})}}function E(e,t){let n=p.get(t);if(n===void 0||n.async)return;let r=sh(n);r!==void 0&&S(e,r.body.filter(e=>e.type!==`EmptyStatement`),r)}function oe(e,t){if(!t.async){if(t.type===`ArrowFunctionExpression`){if(!ch(t))return;S(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body);return}lh(t)&&S(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body)}}return{ArrowFunctionExpression:y,"ArrowFunctionExpression:exit":b,CallExpression(e){if(!h(e))return;let[t]=e.arguments;if(t!==void 0){if(t.type===`Identifier`){E(e,t.name);return}Ue(t)&&oe(e,t)}},FunctionDeclaration:y,"FunctionDeclaration:exit":b,FunctionExpression:y,"FunctionExpression:exit":b,ImportDeclaration(e){vr(e,n,r,(e,n)=>{t.hooks.has(e)&&i.add(n),t.stateHooks.has(e)&&a.add(n),t.refHooks.has(e)&&l.add(n)})},"Program:exit"(){re(),w()},VariableDeclarator(e){v(e),ee(e),te(e)}}},meta:{docs:{description:`Disallow empty effects, duplicate dependencies, effect chains, log-only effects, derived state, external-store state sync, state initialization, reset effects, parent notifications, parent ref callbacks, and event side effects routed through state.`},messages:{adjustState:`This effect adjusts state when a prop changes. Adjust the state directly during rendering or restructure to avoid this need.`,derivedState:`This effect only derives state from properties or state. Compute the value during rendering instead of useEffect.`,duplicateDeps:`Multiple effects have identical dependency arrays. Combine them into a single effect for better performance.`,effectChain:`This effect is part of a chain of effects that only derive state from other effects. Consolidate the logic into event handlers or compute during rendering.`,emptyEffect:`This effect has an empty body and should be removed.`,eventFlag:`This effect only reacts to a state flag. Call the side effect directly in the event handler instead of toggling state.`,eventSpecificLogic:`This effect runs event-specific logic based on state. Move this logic to the event handler that triggers the state change.`,externalStore:"This effect subscribes to an external store and syncs to state. Use `useSyncExternalStore` instead.",initializeState:`This effect initializes state with a constant value. Pass the value as the useState initializer instead.`,logOnly:`This effect only contains console.log calls. Remove it (debug leftover) or move the logging to an event handler.`,mixedDerivedState:`This effect contains state setter calls that derive values from props or state mixed with other operations. Extract the setter calls and compute values during rendering.`,notifyParent:`This effect only notifies a parent via a property callback. Call the callback in the event handler instead of useEffect.`,passRefToParent:"This effect passes a ref to a parent callback. Use `forwardRef` or `useImperativeHandle` instead.",resetState:"This effect resets state when a prop changes. Pass a `key` prop to the component instead to reset all state automatically."},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:[...Hp],description:`Effect hook names checked for avoidable effect patterns.`,items:{type:`string`},type:`array`},propertyCallbackPrefixes:{default:[...Up],description:`Property name prefixes treated as event callback props.`,items:{type:`string`},type:`array`},refHooks:{default:[...Wp],description:`Ref hook names that return mutable ref objects.`,items:{type:`string`},type:`array`},reportAdjustState:{default:!0,description:`Report effects that only adjust state after render.`,type:`boolean`},reportDerivedState:{default:!0,description:`Report effects that copy derived values into state.`,type:`boolean`},reportDuplicateDeps:{default:!0,description:`Report duplicate entries in effect dependency arrays.`,type:`boolean`},reportEffectChain:{default:!0,description:`Report effects that only trigger another effect through state.`,type:`boolean`},reportEmptyEffect:{default:!0,description:`Report effects whose callback body is empty.`,type:`boolean`},reportEventFlag:{default:!0,description:`Report effects that react to event flags stored in state.`,type:`boolean`},reportEventSpecificLogic:{default:!0,description:`Report effects that move event-specific logic out of the event callback.`,type:`boolean`},reportExternalStore:{default:!0,description:`Report effects that mirror external store values into local state.`,type:`boolean`},reportInitializeState:{default:!0,description:`Report effects that only initialize state after mount.`,type:`boolean`},reportLogOnly:{default:!0,description:`Report effects that only log values.`,type:`boolean`},reportMixedDerivedState:{default:!0,description:`Report effects that mix derived-state updates with other work.`,type:`boolean`},reportNotifyParent:{default:!0,description:`Report effects that only notify a parent through a callback prop.`,type:`boolean`},reportPassRefToParent:{default:!0,description:`Report effects that only pass a ref value to a parent callback.`,type:`boolean`},reportResetState:{default:!0,description:`Report effects that reset local state when inputs change.`,type:`boolean`},stateHooks:{default:[...Gp],description:`State hook names that return [value, setter] pairs.`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}});function bh(e){return x(e)&&y(e.dependencyMode)&&(e.dependencyMode===`empty-or-omitted`||e.dependencyMode===`aggressive`)?e.dependencyMode:`non-updating`}function xh(e){let t=x(e)&&S(e.staticGlobalFactories)?e.staticGlobalFactories:Rl;return{dependencyMode:bh(e),environment:yr(e),staticGlobalFactories:new Set(t)}}function Sh(e){return{staticGlobalFactories:e.staticGlobalFactories}}function Ch(e){let t=Ii(e);if(t===void 0)return;let{body:n}=t;if(n===null)return;if(n.type!==`BlockStatement`)return n;if(n.body.length!==1)return;let[r]=n.body;return r?.type===`ReturnStatement`?r.argument??void 0:void 0}function wh(e,t){switch(t.dependencyMode){case`aggressive`:return!0;case`empty-or-omitted`:return e===0||e===1;case`non-updating`:return e===0||e===1||e===2;default:{let e=Error(`Unknown dependency mode: ${String(t.dependencyMode)}`);throw Error.captureStackTrace(e,wh),e}}}const Th=_(`no-useless-use-memo`,`react`,{create(e){let t=xh(e.options[0]),n=Sh(t),r=hr(t.environment),i=new Set,a=new Set;return{CallExpression(r){if(!pe(r,i,a)||cu(r)||r.arguments.length===0)return;let o=Ch(r);if(o===void 0)return;let s=new Set;J(e.sourceCode,o,s,n)&&wh(Ki(e.sourceCode,r.arguments[1],s,n,eu),t)&&e.report({messageId:`uselessUseMemo`,node:r})},ImportDeclaration(e){lu(e,r,i,a)}}},meta:{docs:{description:`Disallow useMemo calls that only wrap values static enough to live at module scope.`},messages:{uselessUseMemo:`useMemo is wrapping a static value. Move the value to module scope instead of paying hook overhead for no runtime benefit.`},schema:[{additionalProperties:!1,properties:{dependencyMode:{default:`non-updating`,description:`Dependency-array mode used to decide whether a memoized value is static.`,enum:[`empty-or-omitted`,`non-updating`,`aggressive`],type:`string`},environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},staticGlobalFactories:{default:Rl,description:`Global constructors and factories whose calls are treated as static values.`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}}),Eh=[`useSpring`];function Dh(e){let t=!1,n=!1;for(let r of e.properties)if(!(r.type!==`Property`||r.computed||r.key.type!==`Identifier`)&&(r.key.name===`from`&&(t=!0),r.key.name===`to`&&(n=!0),t&&n))return!0;return!1}function Oh(e,t,n){let r=C(t);if(r.type===`ObjectExpression`)return n(r);if(r.type!==`Identifier`)return!1;let i=T(e.getScope(r),r.name);if(i===void 0||!K(i.scope)||q(i))return!1;for(let e of i.defs){let t=Ul(e);if(t===void 0)continue;let r=C(t);if(r.type===`ObjectExpression`&&n(r))return!0}return!1}function kh(e,t){return Oh(e,t,Dh)}function Ah(e,t,n,r){let i={staticGlobalFactories:r.staticGlobalFactories};return Oh(e,t,t=>$l(e,t,n,i))}function jh(e,t){return e===0||e===2||e===1&&t.treatEmptyDepsAsViolation}function Mh({callee:e},t){if(e.type===`Identifier`)return t.springHooks.has(e.name);if(e.type===`MemberExpression`&&!e.computed){let{property:n}=e;if(n.type===`Identifier`)return t.springHooks.has(n.name)}return!1}const Nh=_(`no-useless-use-spring`,`react`,{create(e){let[t]=e.options,n={springHooks:new Set(t?.springHooks??Eh),staticGlobalFactories:new Set(t?.staticGlobalFactories??Rl),treatEmptyDepsAsViolation:t?.treatEmptyDepsAsViolation??!0};return{CallExpression(t){if(!Mh(t,n)||t.arguments.length===0)return;let[r]=t.arguments;if(r===void 0||r.type===`SpreadElement`)return;let i=new Set;if(!Ah(e.sourceCode,r,i,n)||kh(e.sourceCode,r))return;let a=t.arguments.length>1?t.arguments[1]:void 0;jh(Ki(e.sourceCode,a,i,n,eu),n)&&e.report({messageId:`uselessSpring`,node:t})}}},meta:{docs:{description:`Disallow useSpring hooks whose config and dependencies are entirely static`},messages:{uselessSpring:`useSpring call has only static inputs and non-updating dependencies; replace it with a constant or remove the hook.`},schema:[{additionalProperties:!1,default:{springHooks:[...Eh],staticGlobalFactories:[...Rl],treatEmptyDepsAsViolation:!0},properties:{springHooks:{default:[...Eh],description:`Hook identifiers that should be treated as spring hooks`,items:{type:`string`},type:`array`},staticGlobalFactories:{default:[...Rl],description:`Global factory identifiers that are treated as static constructors`,items:{type:`string`},type:`array`},treatEmptyDepsAsViolation:{default:!0,description:`Treat static config with an empty dependency array as a violation`,type:`boolean`}},type:`object`}],type:`suggestion`}}),Ph=new Set([`push`,`unshift`]),Fh=new Set([`max`,`min`]),Ih=`Math`;function Lh(e){if(!M(e))return;let t=w(e);if(t!==void 0){if(Ph.has(t))return t;if(Fh.has(t))return de(e.object,Ih)?`${Ih}.${t}`:void 0}}const Rh=_(`no-variadic-spread`,`general`,{createOnce(e){return{CallExpression(t){let n=Lh(t.callee);if(n!==void 0)for(let r of t.arguments)r.type===`SpreadElement`&&C(r.argument).type!==`ArrayExpression`&&e.report({data:{method:n},messageId:`noVariadicSpread`,node:r})}}},meta:{docs:{description:`Disallow spreading a potentially unbounded array into a variadic call, because every element becomes a stack-allocated argument.`},messages:{noVariadicSpread:`Spreading an array into {{method}}() passes every element as its own stack argument, so a large array throws 'RangeError: Maximum call stack size exceeded'. Iterate the array instead.`},schema:[],type:`problem`}}),zh=Ls({alternative:`Log`,category:`roblox`,message:`{{name}}() is a raw output function lacking log levels, timestamps, and filtering. Production systems require structured logging for debugging and monitoring. Replace {{name}}(...) with {{alternative}}.`,messageId:`noWarn`,name:`warn`,ruleName:`no-warn`}),Bh=_(`only-type-imports`,`general`,{create(e){return{ImportDeclaration(t){t.importKind!==`type`&&e.report({messageId:`onlyTypeImports`,node:t})}}},meta:{docs:{description:`Require all imports to be type-only imports. Benchmarks cannot import non-types because the benchmarker plugin will throw an error.`,recommended:!0},messages:{onlyTypeImports:"Benchmarks must use `import type` to avoid runtime imports that break the benchmarker plugin."},schema:[],type:`problem`}});function Vh(e){return!e.computed&&Hh(e.value)}function Hh(e){if(e===void 0)return!1;switch(e.type){case`ArrayExpression`:return e.elements.every(e=>e===null||e.type!==`SpreadElement`&&Hh(e));case`CallExpression`:return e.callee.type===`MemberExpression`&&Hh(e.callee.object);case`Literal`:return!0;case`MemberExpression`:return Hh(e.object);case`ObjectExpression`:return e.properties.every(e=>e.type!==`SpreadElement`&&Vh(e));default:return!1}}function Uh(e){let t=e;for(;t.type===`MemberExpression`;){if(t.computed&&!Ve(t.property))return!1;t=t.object}return!0}function Wh(e){return e.type===`MethodDefinition`&&e.kind===`constructor`&&e.key.type===`Identifier`&&e.key.name===`constructor`}function Gh(e){if(e.type!==`ExpressionStatement`)return!1;let{expression:t}=e;if(t.type!==`AssignmentExpression`)return!1;let{left:n}=t;if(n.type!==`MemberExpression`||n.object.type!==`ThisExpression`)return!1;let{property:r}=n;return(r.type===`Identifier`||Ve(r))&&Hh(t.right)&&Uh(n)}const Kh=_(`prefer-class-properties`,`general`,{create(e){let[t]=e.options;if(t===`never`)return{PropertyDefinition(t){t.static||e.report({messageId:`unexpectedClassProperty`,node:t})}};function n(t){for(let n of t.body.body)if(!(!Wh(n)||n.value.body===null))for(let t of n.value.body.body)Gh(t)&&e.report({messageId:`unexpectedAssignment`,node:t.expression})}return{ClassDeclaration(e){n(e)},ClassExpression(e){n(e)}}},meta:{docs:{description:`Prefer class properties to assignment of literals in constructors.`},messages:{unexpectedAssignment:`Constructor assigns a literal value to this.property. Literals are static and known at class definition time. Move to a class property declaration: propertyName = value; at class level. This clarifies intent and reduces constructor complexity.`,unexpectedClassProperty:`Class property declarations are disabled by rule configuration (mode: 'never'). Move initialization into the constructor: this.propertyName = value; inside constructor().`},schema:[{enum:[`always`,`never`],type:`string`}],type:`suggestion`}});function qh(e){if(!K(e.scope))return!1;for(let t of e.defs){if(t.type!==`Variable`)continue;let e=t.node;if(e.type!==`VariableDeclarator`)continue;let n=e.parent;if(n.type===`VariableDeclaration`&&n.kind===`const`)return!0}return!1}function Jh(e,t){let n=T(e.getScope(t),t.name);return n===void 0?!1:q(n)||qh(n)}function Yh(e,t){let n=T(e.getScope(t),t.name);return n===void 0?!1:q(n)||K(n.scope)}function Xh(e,t){let n=t;for(;n.type===`MemberExpression`;){if(n.computed)return!1;n=C(n.object)}return n.type===`Identifier`&&Yh(e,n)}function Zh(e,t){let n=C(t);switch(n.type){case`Identifier`:return Jh(e,n);case`Literal`:return!0;case`MemberExpression`:return Xh(e,n);case`TemplateLiteral`:return n.expressions.length===0;case`UnaryExpression`:return n.operator===`-`&&C(n.argument).type===`Literal`;default:return!1}}function Qh(e,t){for(let n of t.properties)if(n.type!==`Property`||n.kind!==`init`||n.computed||!Zh(e,n.value))return!1;return!0}function $h(e,t){if(t.id.type!==`ArrayPattern`||t.init?.type!==`CallExpression`||L(t.init)!==`useReducer`)return;let n=t.id.elements[1];if(n!=null&&n.type===`Identifier`)return T(e.getScope(n),n.name)}function eg(e){let t=e;for(;t!==void 0;){if(t.type===`Program`)return t;t=t.parent}}function tg(e,t,n,r,i){let a=`const ${r} = ${t.getText(n)};`,{body:o}=i,s;for(let e of o){if(e.type===`ImportDeclaration`){s=e;continue}break}if(s!==void 0)return e.insertTextAfter(s,`\n\n${a}`);let[c]=o;return c===void 0?e.insertTextAfterRange([i.range[0],i.range[1]],a):e.insertTextBefore(c,`${a}\n\n`)}const ng=_(`prefer-constant-dispatch`,`react`,{create(e){let t=new Set,{sourceCode:n}=e,r=0;return{CallExpression(i){if(i.callee.type!==`Identifier`)return;let a=T(n.getScope(i.callee),i.callee.name);if(a===void 0||!t.has(a))return;let[o]=i.arguments;if(o===void 0||o.type===`SpreadElement`)return;let s=C(o);if(s.type!==`ObjectExpression`||!Qh(n,s))return;let c=eg(s);if(c===void 0)return;let l=`PREFER_CONSTANT_ACTION_${r}`;r+=1,e.report({messageId:`preferConstantDispatch`,node:s,suggest:[{desc:`Extract to module constant \`${l}\``,fix(e){return[tg(e,n,s,l,c),e.replaceText(s,l)]}}]})},VariableDeclarator(e){let r=$h(n,e);r!==void 0&&t.add(r)}}},meta:{docs:{description:`Disallow inline useReducer action objects that could be module-level constants.`,recommended:!0},hasSuggestions:!0,messages:{preferConstantDispatch:`Move this inline useReducer action object to a module-level constant.`},schema:[],type:`suggestion`}}),rg=new Set([`.js`,`.jsx`,`.ts`,`.tsx`]),ig=new Set([`.git`,`.next`,`.turbo`,`__fixtures__`,`__mocks__`,`__tests__`,`coverage`,`dist`,`documentation`,`example`,`examples`,`fixture`,`fixtures`,`node_modules`,`opensrc`,`stories`,`story`,`test`,`tests`]),ag=/\bexport\s+default\b/u,og=/\/index$/u,sg=/\.(?:[cm]?jsx?|tsx?)$/u,cg=new Map,lg=new Map,ug=new Map,dg=/[.*+?^${}()|[\]\\]/gu,fg=String.raw`\$&`;function pg(e){return e.replaceAll(dg,fg)}const mg=new Map;function hg(e){return e.includes(`u`)||e.includes(`v`)?e:`${e}u`}function gg(e,t){let n=`${t}:${e}`,r=mg.get(n);if(r!==void 0)return r;let i=new RegExp(e,hg(t));if(mg.size>=64){let e=mg.keys().next().value;e!==void 0&&mg.delete(e)}return mg.set(n,i),i}function _g(e){return e.replaceAll(`\\`,`/`)}function vg(e){let t=lg.get(e);if(t!==void 0)return t;let n=u(e,`utf8`);return lg.set(e,n),n}function yg(e,t){let n=pg(t);return gg(`\\bexport\\s+(?:const|function|class)\\s+${n}\\b`,`u`).test(e)||gg(`\\bexport\\s*\\{[^}]*\\b${n}\\b[^}]*\\}`,`u`).test(e)?`named`:ag.test(e)&&gg(`\\b${n}\\b`,`u`).test(e)?`default`:void 0}function bg(e,t){for(let n of t)if(!gg(`\\b${pg(n)}\\b`,`u`).test(e))return!1;return!0}function xg(e){let t=ug.get(e);if(t!==void 0)return t;let n=e;for(;;){if(l(o(n,`package.json`))||l(o(n,`tsconfig.json`)))return ug.set(e,n),n;let t=r(n);if(t===n){ug.set(e,void 0);return}n=t}}function Sg(e){let t=cg.get(e);if(t!==void 0)return t;let r=new Map;function a(e){for(let t of d(e,{withFileTypes:!0})){let s=t.name.toLowerCase();if(t.name.startsWith(`.`)&&t.name!==`.storybook`||ig.has(s))continue;let c=o(e,t.name);if(t.isDirectory()){a(c);continue}let l=i(t.name);if(!rg.has(l)||t.name.endsWith(`.d.ts`))continue;let u=n(t.name,l).toLowerCase(),d=r.get(u);d===void 0?r.set(u,[c]):d.push(c)}}a(e);let s=new Map;for(let[e,t]of r)s.set(e,t);return cg.set(e,s),s}function Cg(e,t){let n=_g(s(r(e),t));return n=n.replace(sg,``),n=n.replace(og,``),n.startsWith(`.`)||(n=`./${n}`),n}function wg(e){let t=xg(r(e)),n=_g(t===void 0?e:s(t,e));for(let e of n.split(`/`))if(ig.has(e.toLowerCase()))return!0;return!1}function Tg(e,t){if(wg(e))return{importStyle:void 0,matches:!1};let r=i(e);if(!rg.has(r)||e.endsWith(`.d.ts`))return{importStyle:void 0,matches:!1};let a=n(e,r).toLowerCase();if(!t.fileNames.map(e=>e.toLowerCase()).includes(a))return{importStyle:void 0,matches:!1};let o=vg(e);if(!gg(`\\b${pg(t.componentName)}\\b`,`u`).test(o)||t.markers!==void 0&&!bg(o,t.markers))return{importStyle:void 0,matches:!1};let s=yg(o,t.componentName);return s===void 0?{importStyle:void 0,matches:!1}:{importStyle:s,matches:!0}}function Eg(e,t,n){let r=e.source.value;if(!(y(r)&&r.startsWith(`.`))||t===``)return{importStyle:void 0,matches:!1};let i=ku(r,t);return i.found?Tg(i.path,n):{importStyle:void 0,matches:!1}}function Dg(e,t,n,r){if(t.matches)for(let t of e.specifiers){if(t.type===`ImportDefaultSpecifier`){r.add(t.local.name);continue}if(t.type!==`ImportSpecifier`)continue;let{imported:e}=t;(e.type===`Identifier`?e.name:e.value)===n&&r.add(t.local.name)}}function Og(e,t){let n=xg(r(e));if(n===void 0)return{found:!1};let i=Sg(n),a=new Set;for(let e of t.fileNames)for(let t of i.get(e.toLowerCase())??[])a.add(t);let o=[...a].filter(e=>Tg(e,t).matches);if(o.length!==1)return{found:!1};let[s]=o;if(s===void 0)return{found:!1};let c=Tg(s,t);return{found:!0,importSource:Cg(e,s),importStyle:c.importStyle,path:s}}const kg={componentName:`ContextStack`,fileNames:[`context-stack`],markers:[`providers`]},Ag=new Set([`.jsx`,`.tsx`]);function jg(e){return e.openingElement.name.type===`JSXMemberExpression`&&e.openingElement.name.property.name===`Provider`}function Mg(e){return e.children.filter(e=>e.type===`JSXText`?e.value.trim().length>0:e.type!==`JSXExpressionContainer`||e.expression.type!==`JSXEmptyExpression`)}function Ng(e){let{parent:t}=e;if(t.type!==`JSXElement`||!jg(t))return!1;let n=Mg(t);return n.length===1&&n[0]===e}function Pg(e){if(!jg(e))return;let t=[e],n=e;for(;;){let e=Mg(n);if(e.length!==1)break;let[r]=e;if(r?.type!==`JSXElement`||!jg(r))break;t.push(r),n=r}return t.length>1?t:void 0}function Fg(e,t){let n=!1;for(let r of e.children){if(r===t){n=!0;continue}if(r.type!==`JSXText`||r.value.trim()!==``)return!1}return n}function Ig(e){let t=0;for(let n of e){let r=e[t+1];if(r===void 0){t+=1;continue}if(!Fg(n,r))return!1;t+=1}return!0}function Lg(e,t){let n=t.getText(e.openingElement);return e.openingElement.selfClosing?n:n.endsWith(`>`)?`${n.slice(0,-1)} />`:void 0}function Rg(e,t,n){let r=[];for(let e of t){let t=Lg(e,n);if(t===void 0)return;r.push(t)}let i=t.at(-1);if(i===void 0||i.closingElement===null)return;let a=n.text.slice(i.openingElement.range[1],i.closingElement.range[0]);return`<${e} providers={[${r.join(`, `)}]}>${a}</${e}>`}const zg=_(`prefer-context-stack`,`react`,{create(e){let{filename:t,sourceCode:n}=e,r=t===``?{found:!1}:Og(t,kg),a=t!==``&&Tg(t,kg).matches,o=new Set;return{ImportDeclaration(e){Dg(e,Eg(e,t,kg),kg.componentName,o)},JSXElement(s){if(a||Ng(s))return;let c=Pg(s);if(c===void 0||o.size===0&&!r.found)return;let l=Ag.has(i(t))&&o.size===1&&Ig(c),[u]=o,d=l&&u!==void 0?Rg(u,c,n):void 0;if(d!==void 0){e.report({fix:e=>e.replaceText(s,d),messageId:`preferContextStack`,node:s});return}e.report({messageId:`preferContextStack`,node:s})}}},meta:{docs:{description:`Prefer a local ContextStack component over directly nesting multiple context providers.`},fixable:`code`,messages:{preferContextStack:"Use the local `ContextStack` component instead of nesting multiple context providers directly."},schema:[],type:`suggestion`}}),Bg=/^use[A-Z]/v;function Vg(e,t){if(e===void 0)return!1;for(let n of e.defs)if(xr(n,t)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0;return!1}function Hg(e){if(typeof e!=`object`||!e)return{allowedHooks:new Set};let t=e;return{allowedHooks:new Set(S(t.allowedHooks)?t.allowedHooks:[])}}const Ug=_(`prefer-direct-hook-imports`,`react`,{create(e){let t=gr(e.options[0]),{allowedHooks:n}=Hg(e.options[0]),{sourceCode:r}=e;return{CallExpression(i){let{callee:a}=i;if(a.type!==`MemberExpression`||a.computed||a.object.type!==`Identifier`||a.property.type!==`Identifier`)return;let o=a.property.name;Bg.test(o)&&(n.has(o)||Vg(T(r.getScope(a.object),a.object.name),t)&&e.report({data:{hookName:o},messageId:`preferDirectHookImport`,node:i}))}}},meta:{docs:{description:`Prefer importing React hooks directly instead of calling them via the React namespace.`,recommended:!0},messages:{preferDirectHookImport:"Import `{{hookName}}` directly instead of calling `React.{{hookName}}`."},schema:[{additionalProperties:!1,properties:{allowedHooks:{description:`Hook names that are allowed to be called via React namespace.`,items:{type:`string`},type:`array`},environment:dr},type:`object`}],type:`suggestion`}});function Wg(e){return x(e)&&b(e.maximumStatements)?e.maximumStatements:1}function Gg(e){return e.type===`IfStatement`&&e.alternate===null}function Kg(e,t){return e.type===`ExpressionStatement`&&t===0||e.type===`BlockStatement`&&e.body.length>t}function qg(e,t){if(e.body.length!==1)return!1;let[n]=e.body;return n===void 0||!Gg(n)?!1:Kg(n.consequent,t)}const Jg=_(`prefer-early-return`,`general`,{create(e){let t=Wg(e.options[0]);function n(n){qg(n,t)&&e.report({messageId:`preferEarlyReturn`,node:n})}return{ArrowFunctionExpression(e){e.body.type===`BlockStatement`&&n(e.body)},FunctionDeclaration(e){e.body!==null&&n(e.body)},FunctionExpression(e){e.body!==null&&n(e.body)}}},meta:{docs:{description:`Prefer early returns over full-body conditional wrapping.`,recommended:!0},messages:{preferEarlyReturn:`Function body is wrapped in a single conditional without an else branch. This increases nesting depth and cognitive load. Invert the condition and return early: if (!condition) return; then place the main logic at the top level.`},schema:[{additionalProperties:!1,properties:{maximumStatements:{default:1,description:`Maximum allowed statement count inside the guarded branch before reporting.`,minimum:0,type:`number`}},type:`object`}],type:`suggestion`}});function Yg(e){return e.type===`Identifier`&&(e.name===`it`||e.name===`test`)}function Xg(e){if(e.callee.type!==`MemberExpression`||!Yg(e.callee.object))return!1;let t=w(e.callee);return t===`only`||t===`skip`}function Zg(e){return e.callee.type!==`MemberExpression`||!Yg(e.callee.object)?!1:w(e.callee)===`each`}function Qg(e){let t=e.arguments.at(-1);return t===void 0||!Ue(t)?void 0:t}function $g(e){return e.type===`DoWhileStatement`||e.type===`ForInStatement`||e.type===`ForOfStatement`||e.type===`ForStatement`||e.type===`WhileStatement`}function e_(e,t){return e.type===t.type&&e.range[0]===t.range[0]&&e.range[1]===t.range[1]}function t_(e,t){return{hasCallback:e.hasCallback||t.hasCallback,hasIndeterminate:e.hasIndeterminate||t.hasIndeterminate,hasLoop:e.hasLoop||t.hasLoop}}function n_(e,t){if(e_(e,t))return{hasCallback:!1,hasIndeterminate:!1,hasLoop:!1};let n={hasCallback:Ue(e),hasIndeterminate:Ue(e)||$g(e)||e.type===`ConditionalExpression`||e.type===`IfStatement`||e.type===`SwitchCase`||e.type===`TryStatement`&&e.handler!==null,hasLoop:$g(e)};return e.parent===null?n:t_(n,n_(e.parent,t))}function r_(e){return e.callee.type===`Identifier`?Yg(e.callee):Xg(e)?!0:e.callee.type===`CallExpression`&&Zg(e.callee)}function i_(e){return r_(e)?Qg(e):void 0}function a_({callee:e}){return e.type!==`MemberExpression`||e.object.type!==`Identifier`||e.object.name!==`expect`?!1:w(e)===`assertions`}function o_({callee:e}){return e.type!==`MemberExpression`||e.object.type!==`Identifier`||e.object.name!==`expect`?!1:w(e)===`hasAssertions`}function s_(e,t=[]){return e.callee.type===`Identifier`&&(e.callee.name===`expect`||t.includes(e.callee.name))}function c_(e,t=[]){let n=0,r=!1,i=!1,a=!1,o=0;return Li(e,s=>{if(s.type!==`CallExpression`||!s_(s,t))return;let c=n_(s.parent,e);if(c.hasLoop&&(i=!0),c.hasCallback&&(r=!0),c.hasIndeterminate){a=!0,o+=1;return}n+=1}),{deterministic:n,hasExpectInCallback:r,hasExpectInLoop:i,hasIndeterminate:a,indeterminate:o}}function l_(e){return Array.isArray(e)?e.filter(y):[]}function u_(e){return x(e)?{additionalAssertionFunctions:l_(e.additionalAssertionFunctions),additionalExpectCallNames:l_(e.additionalExpectCallNames),onlyFunctionsWithAsyncKeyword:e.onlyFunctionsWithAsyncKeyword===!0,onlyFunctionsWithExpectInCallback:e.onlyFunctionsWithExpectInCallback===!0,onlyFunctionsWithExpectInLoop:e.onlyFunctionsWithExpectInLoop===!0}:{additionalAssertionFunctions:[],additionalExpectCallNames:[],onlyFunctionsWithAsyncKeyword:!1,onlyFunctionsWithExpectInCallback:!1,onlyFunctionsWithExpectInLoop:!1}}function d_(e){return[...new Set([...e.additionalExpectCallNames,...e.additionalAssertionFunctions])]}function f_(e){return e.onlyFunctionsWithAsyncKeyword||e.onlyFunctionsWithExpectInCallback||e.onlyFunctionsWithExpectInLoop}function p_(e){return e.body??void 0}function m_(e){let t=p_(e);return t?.type===`BlockStatement`?t:void 0}function h_(e,t,n,r,i,a){return n+r===0?!1:!f_(t)||t.onlyFunctionsWithAsyncKeyword&&e.async||t.onlyFunctionsWithExpectInCallback&&i||t.onlyFunctionsWithExpectInLoop&&a}function g_(e){let t=m_(e);if(t===void 0)return;let[n]=t.body;if(n?.type===`ExpressionStatement`&&n.expression.type===`CallExpression`)return n.expression}function __(e,t,n,r,i){let a=m_(t);if(a===void 0){e.report({messageId:`haveExpectAssertions`,node:n});return}let[o]=a.body;if(i){e.report({messageId:`haveExpectAssertions`,node:n,suggest:[{fix(e){return o===void 0?e.insertTextAfterRange([a.range[0],a.range[0]+1],` expect.hasAssertions();`):e.insertTextBefore(o,`expect.hasAssertions();
10
+ `)},messageId:`suggestAddingHasAssertions`}]});return}e.report({messageId:`haveExpectAssertions`,node:n,suggest:[{data:{count:String(r)},fix(e){return o===void 0?e.insertTextAfterRange([a.range[0],a.range[0]+1],` expect.assertions(${r});`):e.insertTextBefore(o,`expect.assertions(${r});\n`)},messageId:`suggestAddingAssertions`}]})}function v_(e,t,n,r){if(o_(t)){t.arguments.length>0&&e.report({messageId:`hasAssertionsTakesNoArguments`,node:t});return}if(!a_(t))return;if(t.arguments.length!==1){e.report({messageId:`assertionsRequiresOneArgument`,node:t});return}let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`||!Ge(i)){e.report({messageId:`assertionsRequiresNumberArgument`,node:t});return}!r&&n>0&&i.value!==n&&e.report({data:{actual:String(n),expected:String(i.value)},messageId:`wrongAssertionCount`,node:t})}const y_=_(`prefer-expect-assertions`,`general`,{create(e){let t=u_(e.options[0]);return{CallExpression(n){if(!r_(n))return;let r=i_(n);if(r===void 0)return;let i=p_(r);if(i===void 0)return;let{deterministic:a,indeterminate:o,hasIndeterminate:s,hasExpectInCallback:c,hasExpectInLoop:l}=c_(i,d_(t));if(!h_(r,t,a,o,c,l))return;let u=g_(r);if(u!==void 0&&(a_(u)||o_(u))){if(v_(e,u,a,s),o_(u)&&u.arguments.length===0&&a>0&&!s){let[t]=m_(r)?.body??[];t!==void 0&&e.report({data:{count:String(a)},fix(e){return e.replaceText(t,`expect.assertions(${a});`)},messageId:`preferAssertionsCount`,node:u})}return}__(e,r,n,a,s)}}},meta:{docs:{description:`Enforce expect assertion guards in tests and prefer expect.assertions(n) over expect.hasAssertions() when the count is known.`,recommended:!0},fixable:`code`,hasSuggestions:!0,messages:{assertionsRequiresNumberArgument:`This argument should be a number`,assertionsRequiresOneArgument:"`expect.assertions` expects a single argument of type number",hasAssertionsTakesNoArguments:"`expect.hasAssertions` expects no arguments",haveExpectAssertions:"Every test should have either `expect.assertions(<number of assertions>)` or `expect.hasAssertions()` as its first expression",preferAssertionsCount:"Use `expect.assertions({{count}})` instead of `expect.hasAssertions()` when the count is known",suggestAddingAssertions:"Add `expect.assertions({{count}})`",suggestAddingHasAssertions:"Add `expect.hasAssertions()`",wrongAssertionCount:`Expected {{expected}} assertions, but test has {{actual}} expect calls`},schema:[{additionalProperties:!1,properties:{additionalAssertionFunctions:{default:[],description:`Additional assertion function names counted as test assertions.`,items:{type:`string`},type:`array`},additionalExpectCallNames:{default:[],description:`Additional expect-like call names counted when checking assertion counts.`,items:{type:`string`},type:`array`},onlyFunctionsWithAsyncKeyword:{default:!1,description:`Only require assertion guards for test callbacks marked async.`,type:`boolean`},onlyFunctionsWithExpectInCallback:{default:!1,description:`Only require assertion guards when expect is called inside a nested callback.`,type:`boolean`},onlyFunctionsWithExpectInLoop:{default:!1,description:`Only require assertion guards when expect is called inside a loop.`,type:`boolean`}},type:`object`}],type:`suggestion`}});function b_(e){if(!(x(e)&&`additionalHoistableComponents`in e))return new Set;let{additionalHoistableComponents:t}=e;return t===void 0||!S(t)?new Set:new Set(t)}function x_(e){if(!(x(e)&&`additionalStaticFactories`in e))return new Set;let{additionalStaticFactories:t}=e;return t===void 0||!S(t)?new Set:new Set(t)}function S_(e){let t=e;for(;t.type===`JSXMemberExpression`;)t=t.object;return t.type===`JSXIdentifier`?t.name:void 0}function C_(e,t,n){let r=T(e.sourceCode.getScope(t),n);if(r===void 0||!K(r.scope))return!1;if(q(r))return!0;for(let e of r.defs)if(e.type===`FunctionName`||e.type===`ClassName`||Ul(e)!==void 0)return!0;return!1}function w_(e,t,n){let r=T(e.sourceCode.getScope(t),n);return r!==void 0&&q(r)}function T_(e,t,n,r){let{name:i}=t.openingElement;if(i.type===`JSXIdentifier`){let e=i.name.charAt(0);if(e!==``&&e===e.toLowerCase())return!0}let a=S_(i);if(a===void 0)return!1;let o=T(e.sourceCode.getScope(t),a),s=i.type===`JSXMemberExpression`;return n.has(a)?o===void 0?!s:s?w_(e,t,a):C_(e,t,a):r===`standard`?s?w_(e,t,a):C_(e,t,a):!1}function E_(e,t,n,r,i){if(i===`roblox-ts`&&t.name.type===`JSXIdentifier`&&(t.name.name===`Event`||t.name.name===`Change`))return!1;let{value:a}=t;return a===null||a.type===`Literal`?!0:a.type!==`JSXExpressionContainer`||a.expression.type===`JSXEmptyExpression`?!1:Kl(e.sourceCode,a.expression,new Set)?i===`standard`:J(e.sourceCode,a.expression,n,r)}function D_(e,t,n,r,i){for(let a of t.attributes)if(a.type===`JSXSpreadAttribute`||!E_(e,a,new Set(n),r,i))return!1;return!0}function O_(e,t,n,r,i,a){if(t.type===`JSXText`)return a===`standard`||t.value.trim().length===0;if(t.type===`JSXElement`||t.type===`JSXFragment`)return A_(e,t,new Set(n),r,i,a);if(t.type!==`JSXExpressionContainer`)return!1;if(t.expression.type===`JSXEmptyExpression`)return!0;if(t.expression.type===`JSXElement`||t.expression.type===`JSXFragment`)return A_(e,t.expression,new Set(n),r,i,a);if(t.expression.type===`Identifier`){let o=Wl(e.sourceCode,t.expression);if(o!==void 0){let t=C(o);if(t.type===`JSXElement`||t.type===`JSXFragment`)return A_(e,t,new Set(n),r,i,a)}}return J(e.sourceCode,t.expression,new Set(n),i)}function k_(e,t,n,r,i,a){for(let o of t.children)if(!O_(e,o,new Set(n),r,i,a))return!1;return!0}function A_(e,t,n,r,i,a){return n.has(t)?!1:(n.add(t),(t.type===`JSXFragment`||T_(e,t,r,a)&&D_(e,t.openingElement,n,i,a))&&k_(e,t,n,r,i,a))}function j_(e,t,n,r,i){let{parent:a}=t;for(;a.type!==`Program`;){if((a.type===`JSXElement`||a.type===`JSXFragment`)&&A_(e,a,new Set,n,r,i))return!0;({parent:a}=a)}return!1}function M_(e,t){switch(e.type){case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return e.expression===t;default:return!1}}function N_(e,t){return e.type===`JSXElement`||e.type===`JSXFragment`||e.type===`JSXExpressionContainer`&&e.expression===t}function P_(e,t){let n=t,{parent:r}=n;for(;M_(r,n)||N_(r,n);){n=r;let{parent:e}=n;if(e===null)return!1;r=e}if(r.type!==`VariableDeclarator`||r.id.type!==`Identifier`||r.init!==n||r.parent.type!==`VariableDeclaration`||r.parent.kind!==`const`)return!1;let i=T(e.sourceCode.getScope(n),r.id.name);return i!==void 0&&K(i.scope)}function F_(e,t){let n=e.sourceCode.getText(t);e.report({data:{elementText:n},messageId:`hoistableJsxElement`,node:t})}const I_=_(`prefer-hoisted-jsx-elements`,`react`,{create(e){let[t]=e.options,n=b_(t),r=x_(t),i=yr(t),a={staticCallsRequireFactories:!0,staticGlobalFactories:new Set([...i===`roblox-ts`?Rl:[],...r])};function o(t){A_(e,t,new Set,n,a,i)&&(P_(e,t)||j_(e,t,n,a,i)||F_(e,t))}return{JSXElement:o,JSXFragment:o}},meta:{docs:{description:`Prefer extracting static JSX elements to module-level constants.`},messages:{hoistableJsxElement:"Extract `{{elementText}}` to a shared module-level const — this JSX element is fully static and identical elements should reuse the same const."},schema:[{additionalProperties:!1,properties:{additionalHoistableComponents:{description:`Additional component names that can be hoisted to module-level constants.`,items:{type:`string`},type:`array`},additionalStaticFactories:{description:`Additional factory functions whose return values are considered static.`,items:{type:`string`},type:`array`},environment:dr},type:`object`}],type:`suggestion`}}),L_={staticGlobalFactories:new Set(Rl)};function R_(e){let{value:t}=e;if(t?.type===`JSXExpressionContainer`&&t.expression.type!==`JSXEmptyExpression`)return t.expression}function z_(e,t){let n=t;for(;;){let{parent:r}=n;if(r===null)return!1;if(r.type===`VariableDeclarator`)return V_(e,t,r,n);let i=B_(r);if(i===void 0)return!1;n=i}}function B_(e){if(e.type===`JSXElement`||e.type===`JSXFragment`||e.type===`JSXExpressionContainer`||e.type===`ParenthesizedExpression`||e.type===`ArrayExpression`)return e}function V_(e,t,n,r){if(n.id.type!==`Identifier`||n.init!==r)return!1;let i=T(e.sourceCode.getScope(t),n.id.name);return i!==void 0&&K(i.scope)}function H_(e,t){let n=e.sourceCode.getText(t);e.report({data:{objectText:n},messageId:`hoistableObjectProp`,node:t})}function U_(e,t){if(t.properties.some(e=>e.type===`Property`&&e.computed))return;let n=new Set;if(J(e.sourceCode,t,n,L_)){H_(e,t);return}for(let n of t.properties){if(n.type!==`Property`)continue;let t=C(n.value);t.type===`ObjectExpression`&&U_(e,t)}}const W_=_(`prefer-hoisted-jsx-object-properties`,`react`,{create(e){return{JSXAttribute(t){let n=R_(t);if(n===void 0)return;let r=C(n);if(r.type!==`ObjectExpression`)return;let i=t.parent;if(i.type!==`JSXOpeningElement`)return;let a=i.parent;a.type===`JSXElement`&&z_(e,a)||U_(e,r)}}},meta:{docs:{description:`Prefer extracting inline JSX object props to module-level constants when the entire object is statically hoistable.`},messages:{hoistableObjectProp:"Extract `{{objectText}}` to a module-level const — this inline JSX prop object is fully static and causes unnecessary reference churn on every render."},schema:[],type:`suggestion`}});function G_({type:e}){return e===`Identifier`||e===`MemberExpression`||e===`CallExpression`||e===`NewExpression`||e===`ThisExpression`}function K_(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}const q_=_(`prefer-idiv`,`roblox`,{createOnce(e){return{CallExpression(t){if(t.optional)return;let n=C(t.callee);if(n.type!==`MemberExpression`||n.optional||w(n)!==`floor`)return;let r=C(n.object);if(r.type!==`Identifier`||r.name!==`math`||E(e.sourceCode,r,`math`)||t.arguments.length!==1)return;let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`)return;let a=C(i);if(a.type!==`BinaryExpression`||a.operator!==`/`)return;let o=C(a.left),s=e.sourceCode.getText(K_(a.left)),c=G_(o)?s:`(${s})`,l=e.sourceCode.getText(K_(a.right));e.report({fix:e=>e.replaceText(t,`${c}.idiv(${l})`),messageId:`useIdiv`,node:t})}}},meta:{docs:{description:`Prefer .idiv() for integer division instead of math.floor(x / y).`,recommended:!0},fixable:`code`,messages:{useIdiv:`Use .idiv() instead of math.floor(x / y) for integer division.`},schema:[],type:`suggestion`}}),J_={componentName:`Portal`,fileNames:[`portal`],markers:[`target`]},Y_=new Set([`@rbxts/react-roblox`,`react-dom`]),X_=new Set([`.jsx`,`.tsx`]);function Z_(e){return e.type===`ImportBinding`}function Q_(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function $_(e){if(e===void 0)return!1;for(let t of e.defs){if(!Z_(t)||t.node.type!==`ImportSpecifier`)continue;let e=Q_(t.node);if(e===void 0||!Y_.has(e.source.value))continue;let{imported:n}=t.node;if(n.type===`Identifier`&&n.name===`createPortal`)return!0}return!1}function ev(e){if(e===void 0)return!1;for(let t of e.defs){if(!Z_(t)||t.node.type!==`ImportNamespaceSpecifier`)continue;let e=Q_(t.node);if(e!==void 0&&Y_.has(e.source.value))return!0}return!1}function tv(e,{callee:t}){return t.type===`Identifier`?$_(T(e.getScope(t),t.name)):t.type!==`MemberExpression`||t.computed||t.property.type!==`Identifier`||t.property.name!==`createPortal`||t.object.type!==`Identifier`?!1:ev(T(e.getScope(t.object),t.object.name))}function nv(e,t){return e.type===`JSXElement`||e.type===`JSXFragment`?t.getText(e):`{${t.getText(e)}}`}function rv(e,t,n){if(t.arguments.length!==2)return;let[r,i]=t.arguments;if(r===void 0||i===void 0)return;let a=nv(r,n);return`<${e} target={${n.getText(i)}}>${a}</${e}>`}const iv=_(`prefer-local-portal-component`,`react`,{create(e){let{filename:t,sourceCode:n}=e,r=t===``?{found:!1}:Og(t,J_),a=t!==``&&Tg(t,J_).matches,o=new Set;return{CallExpression(s){if(a||!tv(n,s)||s.arguments.length!==2||!(o.size>0||r.found))return;let c=X_.has(i(t))&&o.size===1,[l]=o,u=c&&l!==void 0?rv(l,s,n):void 0;if(u!==void 0){e.report({fix:e=>e.replaceText(s,u),messageId:`preferPortalComponent`,node:s});return}e.report({messageId:`preferPortalComponent`,node:s})},ImportDeclaration(e){Dg(e,Eg(e,t,J_),J_.componentName,o)}}},meta:{docs:{description:`Prefer a local Portal component over direct createPortal calls when the project already defines one.`},fixable:`code`,messages:{preferPortalComponent:"Use the local `Portal` component instead of calling `createPortal` directly."},schema:[],type:`suggestion`}});function av(e){return e===void 0?!1:e.type===`TSTypeAnnotation`?av(e.typeAnnotation):e.type===`TSNumberKeyword`||e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&e.typeName.name===`Number`}function ov(e){return e.type!==`PrivateIdentifier`}function sv(e){let t=C(e);return t.type===`Literal`&&!b(t.value)}function cv(e){if(e.type===`Parameter`){let t=e.name;if(t.typeAnnotation!==void 0&&t.typeAnnotation!==null)return!av(t.typeAnnotation);let{parent:n}=t;return n.type===`AssignmentPattern`&&sv(n.right)}if(e.type!==`Variable`||e.node.type!==`VariableDeclarator`)return!1;let{id:t,init:n}=e.node;return t.type===`Identifier`&&t.typeAnnotation!==void 0&&t.typeAnnotation!==null?!av(t.typeAnnotation):n!==null&&sv(n)}function lv(e,t){let n=T(e.getScope(t),t.name);if(n===void 0)return!1;for(let e of n.defs)if(cv(e))return!0;return!1}function uv(e,t){if(t.type===`ParenthesizedExpression`)return uv(e,t.expression);if(t.type===`TSAsExpression`||t.type===`TSTypeAssertion`)return!av(t.typeAnnotation);if(sv(t))return!0;let n=C(t);return n.type===`Identifier`&&lv(e,n)}function dv(e,t){return e.getText(C(t))}function fv(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function pv(e,t){let n=fv(t);return n.type===`SequenceExpression`?`(${e.getText(n)})`:e.getText(n)}function mv(e,t){if(t.test.type!==`BinaryExpression`)return;let{alternate:n,consequent:r,test:i}=t,{left:a,operator:o,right:s}=i;if(!(ov(a)&&ov(s))||!(I(a)&&I(s))||uv(e,a)||uv(e,s))return;let c=dv(e,a),l=dv(e,s),u=dv(e,n),d=dv(e,r),f=o===`>`||o===`>=`,p=o===`<`||o===`<=`;if(f&&c===u&&l===d||p&&c===d&&l===u)return`min`;if(f&&c===d&&l===u||p&&c===u&&l===d)return`max`}const hv=_(`prefer-math-min-max`,`roblox`,{create(e){let{sourceCode:t}=e;return{ConditionalExpression(n){if(E(t,n,`math`))return;let r=mv(t,n);if(r===void 0||n.test.type!==`BinaryExpression`)return;let{left:i,right:a}=n.test;if(!(ov(i)&&ov(a)))return;let o=pv(t,i),s=pv(t,a);e.report({fix(e){return e.replaceText(n,`math.${r}(${o}, ${s})`)},messageId:`preferMathMethod`,node:n})}}},meta:{docs:{description:`Prefer math.min() and math.max() over simple clamp-like ternaries.`,recommended:!0},fixable:`code`,messages:{preferMathMethod:"Use `math.min()` or `math.max()` instead of this ternary comparison."},schema:[],type:`suggestion`}}),gv=new Set([`ReadonlyRecord`,`Record`]);function _v(e){return e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&gv.has(e.typeName.name)}function vv(e){if(e.id.type!==`Identifier`)return;let t=le(e.id);if(t===void 0)return;let{typeAnnotation:n}=t;if(!_v(n))return;let{typeArguments:r}=n;if(r?.params.length!==2)return;let[i,a]=r.params;if(i!==void 0&&a!==void 0&&a.type===`TSLiteralType`&&a.literal.type===`Literal`&&a.literal.value===!0)return i}function yv(e){if(e?.type!==`ObjectExpression`)return!1;for(let t of e.properties)if(t.type!==`Property`||t.value.type!==`Literal`||t.value.value!==!0)return!1;return!0}const bv=_(`prefer-modding-inspect`,`roblox`,{create(e){let{sourceCode:t}=e;return{VariableDeclarator(n){if(n.id.type!==`Identifier`)return;let r=n.id.name;if(!yv(n.init))return;let i=vv(n);if(i===void 0)return;let a=t.getText(i);e.report({data:{enumType:a},fix(e){return e.replaceTextRange([n.range[0],n.range[1]],`${r} = Modding.inspect<Record<${a}, true>>()`)},messageId:`preferModdingInspect`,node:n.id})}}},meta:{docs:{description:`Prefer Modding.inspect over manually enumerating every enum member in a Record<Enum, true>.`,recommended:!0},fixable:`code`,messages:{preferModdingInspect:`Replace manual {{enumType}} enumeration with Modding.inspect<Record<{{enumType}}, true>>().`},schema:[],type:`suggestion`}}),xv=/^[A-Z][A-Z0-9_]*$/u;function Sv(e){let{type:t}=e;if(t===`module`||t===`global`)return!0;if(e.upper?.type===`global`){let{block:t}=e.upper;if(t.type===`Program`&&t.sourceType===`script`)return!0}return!1}const Cv=_(`prefer-module-scope-constants`,`general`,{create(e){let t=!1;return{VariableDeclaration(e){t=e.kind===`const`},"VariableDeclaration:exit"(){t=!1},VariableDeclarator(n){let{id:r}=n;if(!(r.type!==`Identifier`||!xv.test(r.name))){if(!t){e.report({messageId:`mustUseConst`,node:n});return}Sv(e.sourceCode.getScope(n))||e.report({messageId:`mustBeModuleScope`,node:n})}}}},meta:{docs:{description:`Prefer screaming snake case constants at module scope or the allowed top-level wrapper scope.`},messages:{mustBeModuleScope:`You must place screaming snake case at module scope. If this is not meant to be a module-scoped variable, use camelcase instead.`,mustUseConst:"You must use `const` when defining screaming snake case variables. If this is not a constant, use camelcase instead."},schema:[],type:`suggestion`}}),wv=new Set([`end`,`loc`,`parent`,`range`,`start`]),Tv=new Set([`.jsx`,`.tsx`]),Ev=new Set([`PaddingBottom`,`PaddingLeft`,`PaddingRight`,`PaddingTop`]),Dv={componentName:`DirectionalPadding`,fileNames:[`directional-padding`],markers:[`horizontal`,`vertical`]},Ov={componentName:`EqualPadding`,fileNames:[`equal-padding`],markers:[`padding`]};function kv(e,t){return Object.is(e,t)?!0:Array.isArray(e)?Array.isArray(t)&&Av(e,t):Array.isArray(t)||typeof e!=`object`||typeof t!=`object`||e===null||t===null||!(x(e)&&x(t))?!1:jv(e,t)}function Av(e,t){if(e.length!==t.length)return!1;let n=0;for(let r of e)if(!kv(r,t[n++]))return!1;return!0}function jv(e,t){let n=Object.entries(e).filter(([e])=>!wv.has(e)),r=Object.entries(t).filter(([e])=>!wv.has(e));if(n.length!==r.length)return!1;for(let[e,r]of n)if(!(e in t)||!kv(r,t[e]))return!1;return!0}function Mv(e){for(let t of e.children)if((t.type!==`JSXText`||t.value.trim()!==``)&&(t.type!==`JSXExpressionContainer`||t.expression.type!==`JSXEmptyExpression`))return!0;return!1}function Nv({value:e}){if(e!==null){if(e.type===`JSXExpressionContainer`)switch(e.expression.type){case`JSXElement`:case`JSXEmptyExpression`:case`JSXFragment`:return;default:return C(e.expression)}return e.type===`Literal`?e:void 0}}function Pv(e){let t=new Map;for(let n of e.attributes){if(n.type===`JSXSpreadAttribute`||n.name.type!==`JSXIdentifier`)return;let e=n.name.name;if(!Ev.has(e)||t.has(e)||n.value===null)return;t.set(e,n)}let n=t.get(`PaddingBottom`),r=t.get(`PaddingLeft`),i=t.get(`PaddingRight`),a=t.get(`PaddingTop`);if(n!==void 0&&r!==void 0&&i!==void 0&&a!==void 0)return{paddingBottom:n,paddingLeft:r,paddingRight:i,paddingTop:a}}function Fv({value:e},t){if(e!==null)switch(e.type){case`JSXExpressionContainer`:case`Literal`:return t.getText(e);default:return}}function Iv(e,t,n,r){let i=Fv(n.paddingTop,r);if(i===void 0)return;if(t===`preferEqualPadding`)return`<${e} padding=${i} />`;let a=Fv(n.paddingLeft,r);if(a!==void 0)return`<${e} horizontal=${i} vertical=${a} />`}function Lv(e){let t=Nv(e.paddingBottom),n=Nv(e.paddingLeft),r=Nv(e.paddingRight),i=Nv(e.paddingTop);if(t===void 0||n===void 0||r===void 0||i===void 0)return;if(kv(i,t)&&kv(i,n)&&kv(i,r))return`preferEqualPadding`;let a=kv(i,t),o=kv(n,r);return a&&o?`preferDirectionalPadding`:void 0}function Rv(e){return e.type===`JSXIdentifier`}const zv=_(`prefer-padding-components`,`react`,{create(e){let{filename:t}=e,n=t===``?{found:!1}:Og(t,Dv),r=t===``?{found:!1}:Og(t,Ov),a=t!==``&&Tg(t,Dv).matches,o=t!==``&&Tg(t,Ov).matches,s=new Set,c=new Set;return{ImportDeclaration(e){let n=Eg(e,t,Dv),r=Eg(e,t,Ov);Dg(e,n,Dv.componentName,s),Dg(e,r,Ov.componentName,c)},JSXElement(l){if(Mv(l))return;let{openingElement:u}=l;if(!Rv(u.name)||u.name.name!==`uipadding`)return;let d=Pv(u);if(d===void 0)return;let f=Lv(d);if(f===void 0||(f===`preferEqualPadding`?o:a))return;let p=f===`preferEqualPadding`?c:s,m=f===`preferEqualPadding`?r:n;if(p.size===0&&!m.found)return;let h=Tv.has(i(t))&&p.size===1,[g]=[...p],_=h&&g!==void 0?Iv(g,f,d,e.sourceCode):void 0;if(_!==void 0){e.report({fix(e){return e.replaceText(l,_)},messageId:f,node:l});return}e.report({messageId:f,node:l})}}},meta:{docs:{description:`Prefer local EqualPadding and DirectionalPadding components over matching <uipadding /> declarations.`},fixable:`code`,messages:{preferDirectionalPadding:"Use the local `DirectionalPadding` component when horizontal and vertical padding already match.",preferEqualPadding:"Use the local `EqualPadding` component when all four padding values already match."},schema:[],type:`suggestion`}});function Bv(e){return e>=`0`&&e<=`9`}function Vv(e){return e>=`a`&&e<=`z`}function Hv(e){return e>=`A`&&e<=`Z`}function Uv(e){return Bv(e)||Vv(e)||Hv(e)}function Wv(e,t,n){return Bv(e)!==Bv(t)||Vv(e)&&Hv(t)?!0:Hv(e)&&Hv(t)&&n!==void 0&&Vv(n)}function Gv(e,t){let n=0;for(let r=1;r<t.length;r+=1){let i=r+1<t.length?t.charAt(r+1):void 0;Wv(t.charAt(r-1),t.charAt(r),i)&&(e.push(t.slice(n,r)),n=r)}e.push(t.slice(n))}function Kv(e){let t=[],n;for(let r=0;r<e.length;r+=1){if(Uv(e.charAt(r))){n??=r;continue}n!==void 0&&(Gv(t,e.slice(n,r)),n=void 0)}return n!==void 0&&Gv(t,e.slice(n)),t}function qv(e){let t=Kv(e),n=``;for(let e of t)e.length!==0&&(n+=`${e.slice(0,1).toUpperCase()}${e.slice(1).toLowerCase()}`);return n}const Jv=/^\d/u;function Yv(e){if(e.id.type===`Identifier`)return e.id.name;if(!(e.id.type!==`Literal`||!y(e.id.value)))return Jv.test(e.id.value)?void 0:e.id.value}const Xv=_(`prefer-pascal-case-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration(t){let n=t.id.name;qv(n)!==n&&e.report({data:{identifier:n},messageId:`notPascalCase`,node:t.id})},TSEnumMember(t){let n=Yv(t);n!==void 0&&qv(n)!==n&&e.report({data:{identifier:n},messageId:`notPascalCase`,node:t.id})}}},meta:{docs:{description:`Enforce PascalCase names for enums and enum members.`,recommended:!0},messages:{notPascalCase:`Enum '{{ identifier }}' uses non-standard casing. TypeScript convention requires PascalCase for enum names and members to distinguish them from variables (camelCase) and constants (UPPER_CASE). Rename to PascalCase: capitalize first letter of each word, no underscores.`},schema:[],type:`suggestion`}});function Zv(e,t){return Ge(e)&&e.value===t}function Qv(e){if(e===`ColorSequence`)return`ColorSequenceKeypoint`;if(e===`NumberSequence`)return`NumberSequenceKeypoint`}function $v(e,t,n){if(e.type!==`NewExpression`||!Le(e,t)||e.arguments.length!==2)return;let[r,i]=e.arguments;if(r!==void 0&&r.type!==`SpreadElement`&&i!==void 0&&i.type!==`SpreadElement`)return Zv(r,n)?i:void 0}function ey(e,t,n){if(t.arguments.length!==2)return;let[r,i]=t.arguments;if(r===void 0||r.type===`SpreadElement`||i===void 0||i.type===`SpreadElement`)return;let a=e.sourceCode.getText(r);if(a===e.sourceCode.getText(i))return{messageId:`preferSingleOverload`,replacement:`new ${n}(${a})`}}function ty(e,t,n,r){if(t.arguments.length!==1)return;let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`||i.type!==`ArrayExpression`||i.elements.length!==2)return;let[a,o]=i.elements;if(a===void 0||o===void 0||a===null||o===null||a.type===`SpreadElement`||o.type===`SpreadElement`)return;let s=$v(a,r,0),c=$v(o,r,1);if(s===void 0||c===void 0)return;let l=e.sourceCode.getText(s),u=e.sourceCode.getText(c);return{messageId:l===u?`preferSingleOverload`:`preferTwoPointOverload`,replacement:l===u?`new ${n}(${l})`:`new ${n}(${l}, ${u})`}}const ny=_(`prefer-sequence-overloads`,`roblox`,{createOnce(e){return{NewExpression(t){if(t.callee.type!==`Identifier`)return;let n=t.callee.name,r=Qv(n);if(r===void 0)return;let i=ey(e,t,n)??ty(e,t,n,r);i!==void 0&&e.report({fix:e=>e.replaceText(t,i.replacement),messageId:i.messageId,node:t})}}},meta:{docs:{description:`Prefer direct ColorSequence and NumberSequence overloads over identical direct arguments and two-keypoint arrays.`,recommended:!0},fixable:`code`,messages:{preferSingleOverload:`Use the single-value sequence overload instead of two identical keypoints.`,preferTwoPointOverload:`Use the two-value sequence overload instead of constructing a two-keypoint array.`},schema:[],type:`suggestion`}});function ry(e){return e.length===2}function iy(e){return e.type===`MemberExpression`&&!e.computed}function ay(e,t){if(e.type!==`CallExpression`)return!1;let{callee:n}=e;if(!iy(n)||n.property.name!==t||!ry(e.arguments))return!1;let[r,i]=e.arguments;return r.type!==`SpreadElement`&&i.type!==`SpreadElement`}function oy(e,t){if(e.declarations.length!==1)return;let[n]=e.declarations;if(n===void 0)return;let{id:r,init:i}=n;if(r.type!==`Identifier`||i===null||!ay(i,t))return;let{callee:a}=i;if(!iy(a))return;let[o,s]=i.arguments;if(o!==void 0&&s!==void 0&&o.type!==`SpreadElement`&&s.type!==`SpreadElement`)return{componentNode:s,entityNode:o,node:i,queryType:t,variableDeclaration:e,variableDeclarator:n,variableName:r.name,worldNode:a.object}}const sy=new Set([`ConditionalExpression`,`DoWhileStatement`,`ForStatement`,`IfStatement`,`WhileStatement`]);function cy(e){return x(e)&&`parent`in e}function ly(e){return x(e)&&y(e.type)?e.type:void 0}function uy(e){return x(e)&&y(e.operator)?e.operator:void 0}function dy(e){return ly(e)===`LogicalExpression`&&uy(e)===`&&`}function fy(e){return x(e)&&e.type===`Identifier`&&y(e.name)}function py(e){let{parent:t}=e;if(dy(t))return!0;let n=ly(t);if(n===void 0||!sy.has(n))return!1;let r=e;for(;r!==void 0&&r!==t&&cy(r);){let e=r.parent;if(dy(e))return!0;r=e}return!1}function my(e){if(e.isWrite())return!1;let{identifier:t}=e;return fy(t)?py(t):!1}function hy(e,t,n){return T(n.getScope(t),e)?.references.some(my)??!1}function gy(e,t){return e.every(e=>hy(e.variableName,e.variableDeclaration,t))}const _y=/^[\s;]*$/u;function vy(e,t,n){if(e===void 0)return!0;if(n.getText(e.worldNode)!==n.getText(t.worldNode)||n.getText(e.entityNode)!==n.getText(t.entityNode)||e.queryType!==t.queryType)return!1;let[,r]=e.variableDeclaration.range,[i]=t.variableDeclaration.range,a=n.text.slice(r,i);return _y.test(a)}function yy(e,t){if(e.length<2)return;let[n]=e;if(n===void 0)return;let{sourceCode:r}=t,i=r.getText(n.worldNode),a=r.getText(n.entityNode),o=e.map(e=>e.variableName),s=e.map(e=>r.getText(e.componentNode));by(e,t,`const ${o.length===1?o[0]:`[${o.join(`, `)}]`} = ${i}.get(${a}, ${s.join(`, `)});`,`preferSingleGet`,n)}function by(e,t,n,r,i){let a=e.at(0)?.variableDeclaration,o=e.at(-1)?.variableDeclaration;a!==void 0&&o!==void 0&&t.report({data:{fixedCode:n},fix(e){let[t]=a.range,[,r]=o.range;return e.replaceTextRange([t,r],n)},messageId:r,node:i.node})}function xy(e,t){if(e.length<2)return;let{sourceCode:n}=t;if(!gy(e,n))return;let[r]=e;r!==void 0&&by(e,t,`const hasAll = ${n.getText(r.worldNode)}.has(${n.getText(r.entityNode)}, ${e.map(e=>n.getText(e.componentNode)).join(`, `)});`,`preferSingleHas`,r)}const Sy=_(`prefer-single-world-query`,`roblox`,{create(e){let{sourceCode:t}=e,n=[],r=[];function i(){n.length>=2&&yy(n,e),n=[]}function a(){r.length>=2&&xy(r,e),r=[]}function o(){i(),a()}return{":statement:not(VariableDeclaration[kind='const'])":o,"Program:exit":o,"VariableDeclaration[kind='const']"(e){let s=oy(e,`get`);if(s!==void 0){let e=n.at(-1);e!==void 0&&!vy(e,s,t)&&i(),n.push(s),a();return}let c=oy(e,`has`);if(c!==void 0){let e=r.at(-1);e!==void 0&&!vy(e,c,t)&&a(),r.push(c),i();return}o()}}},meta:{docs:{description:`Enforce combining multiple world.get() or world.has() calls into a single call for better Jecs performance.`},fixable:`code`,messages:{preferSingleGet:`Multiple world.get() calls on the same entity should be combined into a single call for better performance. Suggested fix: {{fixedCode}}`,preferSingleHas:`Multiple world.has() calls on the same entity should be combined into a single call for better performance. Suggested fix: {{fixedCode}}`},schema:[],type:`suggestion`}}),Cy=new Set([`alumni`,`axes`,`cacti`,`children`,`criteria`,`data`,`dice`,`feet`,`fungi`,`geese`,`indices`,`matrices`,`media`,`men`,`mice`,`octopi`,`people`,`phenomena`,`teeth`,`vertices`,`women`]),wy=new Set([`alias`,`analysis`,`axis`,`basis`,`business`,`class`,`crisis`,`glass`,`news`,`series`,`species`,`status`,`thesis`]),Ty=new Set([`args`,`components`,`controllers`,`dto`,`dtos`,`entries`,`enums`,`hooks`,`items`,`keys`,`models`,`options`,`orders`,`pages`,`parameters`,`params`,`props`,`repositories`,`services`,`settings`,`types`,`values`,`vo`,`vos`]),Ey=/[A-Z]+(?![a-z])|[A-Z]?[a-z]+|\d+/gu,Dy=/^[A-Z]{2,}[sS]?$/u;function Oy(e){let t=[],n=0;for(let r of e.split(`_`)){let e=r.match(Ey);if(e!==null)for(let r of e)t[n++]=r}return t}const ky=/^\d+$/u;function Ay(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(!(n===void 0||ky.test(n)))return{lowercased:n.toLowerCase(),original:n}}}const jy=/[sS]$/u,My=/(?:ches|shes|xes|zes)$/u;function Ny(e,t){return Cy.has(e)||Ty.has(e)?!0:wy.has(e)?!1:Dy.test(t)&&jy.test(t)||e.endsWith(`ies`)||e.endsWith(`ves`)||My.test(e)||e.endsWith(`s`)&&!e.endsWith(`ss`)&&!e.endsWith(`us`)&&!e.endsWith(`is`)}function Py(e){if(Dy.test(e)&&jy.test(e))return!0;let t=Ay(Oy(e));return t!==void 0&&Ny(t.lowercased,t.original)}const Fy=_(`prefer-singular-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration({id:t}){let{name:n}=t;Py(n)&&e.report({data:{name:n},messageId:`notSingular`,node:t})}}},meta:{docs:{description:`Prefer singular naming for enums.`,recommended:!0},messages:{notSingular:`Enum name "{{name}}" should be singular.`},schema:[],type:`suggestion`}});function Iy(e){return e.type===`JSXElement`||e.type===`JSXFragment`}function Ly(e,t,n){return e.type===`Super`||t.type===`Super`?e.type===`Super`&&t.type===`Super`:By(e,t,n)}function Ry(e,t,n){return e.type===`SpreadElement`||t.type===`SpreadElement`?e.type!==`SpreadElement`||t.type!==`SpreadElement`?!1:By(e.argument,t.argument,n):By(e,t,n)}function zy(e,t,n){return e.type===`PrivateIdentifier`||t.type===`PrivateIdentifier`?e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`&&e.name===t.name:By(e,t,n)}function By(e,t,n){let r=C(e),i=C(t);if(r.type!==i.type)return!1;switch(r.type){case`BinaryExpression`:return i.type===`BinaryExpression`&&Vy(r,i,n);case`CallExpression`:return i.type===`CallExpression`&&Hy(r,i,n);case`Identifier`:return i.type===`Identifier`&&r.name===i.name;case`Literal`:return i.type===`Literal`&&r.value===i.value;case`LogicalExpression`:return i.type===`LogicalExpression`&&Uy(r,i,n);case`MemberExpression`:return i.type===`MemberExpression`&&Wy(r,i,n);case`ThisExpression`:return i.type===`ThisExpression`;case`UnaryExpression`:return i.type===`UnaryExpression`&&r.operator===i.operator&&By(r.argument,i.argument,n);default:return n.getText(r)===n.getText(i)}}function Vy(e,t,n){return e.operator===t.operator&&zy(e.left,t.left,n)&&zy(e.right,t.right,n)}function Hy(e,t,n){if(e.optional!==t.optional||!Ly(e.callee,t.callee,n)||e.arguments.length!==t.arguments.length)return!1;for(let r=0;r<e.arguments.length;r+=1){let i=e.arguments[r],a=t.arguments[r];if(i===void 0||a===void 0||!Ry(i,a,n))return!1}return!0}function Uy(e,t,n){return e.operator===t.operator&&By(e.left,t.left,n)&&By(e.right,t.right,n)}function Wy(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!Ly(e.object,t.object,n)?!1:e.computed?zy(e.property,t.property,n):Gy(e.property,t.property)}function Gy(e,t){return(e.type===`Identifier`&&t.type===`Identifier`||e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`)&&e.name===t.name}function Ky(e){let t=C(e);if(t.type===`UnaryExpression`&&t.operator===`!`)return C(t.argument)}function qy(e){let t=C(e);if(t.type===`BinaryExpression`&&(t.operator===`===`||t.operator===`!==`))return{left:t.left,operator:t.operator,right:t.right}}function Jy(e){let t=C(e);return t.type===`Identifier`||t.type===`ThisExpression`||t.type===`Literal`}function Yy(e){return it(e)&&Jy(e)}function Xy(e,t,n){let r=Ky(e);if(r&&By(r,t,n))return{isFixSafe:Jy(r)};let i=Ky(t);if(i&&By(i,e,n))return{isFixSafe:Jy(i)};let a=qy(e),o=qy(t);if(!(a&&o)||!(a.operator===`===`&&o.operator===`!==`||a.operator===`!==`&&o.operator===`===`))return;let s=zy(a.left,o.left,n)&&zy(a.right,o.right,n),c=zy(a.left,o.right,n)&&zy(a.right,o.left,n);if(s||c)return{isFixSafe:Yy(a.left)&&Yy(a.right)&&Yy(o.left)&&Yy(o.right)}}function Zy(e){return e.type===`JSXText`&&e.value.trim()===``}function Qy(e){if(e.type===`JSXExpressionContainer`&&e.expression.type!==`JSXEmptyExpression`&&e.expression.type===`LogicalExpression`&&e.expression.operator===`&&`&&Iy(e.expression.right))return{condition:e.expression.left,logical:e.expression,node:e,renderBranch:e.expression.right}}const $y=_(`prefer-ternary-conditional-rendering`,`react`,{create(e){let{sourceCode:t}=e;function n(e,t){let n=t;for(;n<e.length;){let t=e[n];if(t===void 0||!Zy(t))break;n+=1}let r=e[n];return r===void 0?void 0:Qy(r)}function r(n,r){let i=Xy(n.condition,r.condition,t);if(i!==void 0){if(i.isFixSafe){e.report({fix(e){let i=`{${t.getText(n.condition)} ? ${t.getText(n.renderBranch)} : ${t.getText(r.renderBranch)}}`;return e.replaceTextRange([n.node.range[0],r.node.range[1]],i)},messageId:`preferTernaryConditionalRendering`,node:n.logical});return}e.report({messageId:`preferTernaryConditionalRendering`,node:n.logical})}}function i(e){for(let t=0;t<e.length;t+=1){let i=e[t];if(i===void 0)continue;let a=Qy(i);if(a===void 0)continue;let o=n(e,t+1);o!==void 0&&r(a,o)}}return{JSXElement(e){i(e.children)},JSXFragment(e){i(e.children)}}},meta:{docs:{description:`Prefer ternary expressions over complementary JSX && branches.`},fixable:`code`,messages:{preferTernaryConditionalRendering:`Use a single ternary expression instead of complementary JSX && branches.`},schema:[],type:`suggestion`}});function eb(e){return e.type===`PrivateIdentifier`}function tb(e){return e===`+`||e===`-`||e===`*`||e===`/`||e===`%`}function nb(e){return e.type===`BinaryExpression`&&tb(e.operator)&&!eb(e.left)&&!eb(e.right)}function rb(e){switch(e.type){case`BinaryExpression`:{if(!nb(e))return;let{left:t,right:n}=e,r=rb(t),i=rb(n);return r===void 0||i===void 0?void 0:`${r} ${e.operator} ${i}`}case`Identifier`:return e.name;case`Literal`:return ie(e.value)?String(e.value):void 0;case`UnaryExpression`:{let t=rb(e.argument);return t===void 0||e.operator!==`+`&&e.operator!==`-`?void 0:`${e.operator}${t}`}default:return}}function ib(e,t,n){switch(e){case`%`:return n===0?void 0:t%n;case`*`:return t*n;case`+`:return t+n;case`-`:return t-n;case`/`:return n===0?void 0:t/n;default:return}}function ab(e){switch(e.type){case`BinaryExpression`:{if(!nb(e))return;let{left:t,right:n}=e,r=ab(t),i=ab(n);return r===void 0||i===void 0?void 0:ib(e.operator,r,i)}case`Identifier`:return;case`Literal`:return Number(e.value);case`UnaryExpression`:{let t=ab(e.argument);return t===void 0?void 0:e.operator===`+`?t:e.operator===`-`?-t:void 0}default:return}}function ob(e){if(e.length!==4)return;let[t,n,r,i]=e;if(t===void 0||n===void 0||r===void 0||i===void 0||t.type===`SpreadElement`||n.type===`SpreadElement`||r.type===`SpreadElement`||i.type===`SpreadElement`)return;let a=rb(t),o=rb(n),s=rb(r),c=rb(i);if(a!==void 0&&o!==void 0&&s!==void 0&&c!==void 0)return{offsetXText:o,offsetYText:c,scaleXText:a,scaleYText:s}}const sb=_(`prefer-udim2-shorthand`,`roblox`,{create(e){return{NewExpression(t){if(!Le(t,`UDim2`))return;let n=ob(t.arguments);if(n===void 0)return;let[r,i,a,o]=t.arguments;if(r===void 0||i===void 0||a===void 0||o===void 0||r.type===`SpreadElement`||i.type===`SpreadElement`||a.type===`SpreadElement`||o.type===`SpreadElement`)return;let s=ab(r),c=ab(i),l=ab(a),u=ab(o);if(s!==0||c!==0||l!==0||u!==0){if(c===0&&u===0){e.report({fix(e){return e.replaceText(t,`UDim2.fromScale(${n.scaleXText}, ${n.scaleYText})`)},messageId:`preferFromScale`,node:t});return}s===0&&l===0&&e.report({fix(e){return e.replaceText(t,`UDim2.fromOffset(${n.offsetXText}, ${n.offsetYText})`)},messageId:`preferFromOffset`,node:t})}}}},meta:{docs:{description:`Prefer UDim2.fromScale() or UDim2.fromOffset() over new UDim2() when all offsets or all scales are zero.`},fixable:`code`,messages:{preferFromOffset:`Use UDim2.fromOffset() instead of new UDim2() when all scales are 0.`,preferFromScale:`Use UDim2.fromScale() instead of new UDim2() when all offsets are 0.`},schema:[],type:`suggestion`}});function cb(e,t,n){if(t.type!==`BlockStatement`)return;let r=0;for(let e of t.body)if(e.type===`VariableDeclaration`)for(let t of e.declarations)Pc(t.init,`useState`)&&(r+=1);r<5||e.report({data:{componentName:n,useStateCount:String(r)},messageId:`excessiveUseState`,node:t})}const lb=_(`prefer-use-reducer`,`react`,{create(e){return{FunctionDeclaration(t){t.id===null||!G(t.id.name)||`body`in t&&t.body&&cb(e,t.body,t.id.name)},VariableDeclarator(t){Fc(t)&&t.init&&`body`in t.init&&t.init.body&&`name`in t.id&&cb(e,t.init.body,t.id.name)}}},meta:{docs:{description:`Suggest using useReducer for related state updates instead of multiple useState calls.`,recommended:!0},messages:{excessiveUseState:`Component "{{componentName}}" has {{useStateCount}} useState calls — consider useReducer for related state`},type:`problem`}}),ub=`replace`,db=`suggestion`,fb=`A more descriptive name will do too.`,pb={args:`parameters`,char:`character`,dt:`deltaTime`,plr:`player`},mb=[`char`],hb={acc:{accumulator:!0},arg:{argument:!0},args:{arguments:!0},arr:{array:!0},attr:{attribute:!0},attrs:{attributes:!0},btn:{button:!0},cb:{callback:!0},char:{character:!0},conf:{config:!0},ctx:{context:!0},cur:{current:!0},curr:{current:!0},db:{database:!0},def:{defer:!0,deferred:!0,define:!0,definition:!0},dest:{destination:!0},dev:{development:!0},dir:{direction:!0,directory:!0},dirs:{directories:!0},dist:{distance:!0},doc:{document:!0},docs:{documentation:!0,documents:!0},dst:{daylightSavingTime:!0,destination:!0,distribution:!0},dt:{dateTime:!0,deltaTime:!0},e:{error:!0,event:!0},el:{element:!0},elem:{element:!0},elems:{elements:!0},env:{environment:!0},envs:{environments:!0},err:{error:!0},ev:{event:!0},evt:{event:!0},ext:{extension:!0},exts:{extensions:!0},fn:{func:!0,function:!0},func:{function:!0},i:{index:!0},idx:{index:!0},impl:{implementation:!0},j:{index:!0},len:{length:!0},lib:{library:!0},mod:{module:!0},msg:{message:!0},num:{number:!0},obj:{object:!0},opts:{options:!0},param:{parameter:!0},params:{parameters:!0},pkg:{package:!0},plr:{player:!0},prev:{previous:!0},prod:{production:!0},prop:{property:!0},props:{properties:!0},rel:{related:!0,relationship:!0,relative:!0},req:{request:!0},res:{resource:!0,response:!0,result:!0},ret:{returnValue:!0},retval:{returnValue:!0},sep:{separator:!0},src:{source:!0},stdDev:{standardDeviation:!0},str:{string:!0},tbl:{table:!0},temp:{temporary:!0},tit:{title:!0},tmp:{temporary:!0},util:{utility:!0},utils:{utilities:!0},val:{value:!0},var:{variable:!0},vars:{variables:!0},ver:{version:!0}},gb={EmberENV:!0,defaultProps:!0,devDependencies:!0,getDerivedStateFromProps:!0,getInitialProps:!0,getServerSideProps:!0,getStaticProps:!0,iOS:!0,obj:!0,propTypes:!0,setupFilesAfterEnv:!0},_b=[`i18n`,`l10n`],vb=/(?=[A-Z])|(?<=[_.-])/u,yb=new Set(`any.as.boolean.break.case.catch.class.const.constructor.continue.debugger.declare.default.delete.do.else.enum.export.extends.false.finally.for.from.function.get.if.implements.import.in.instanceof.interface.let.module.new.null.number.of.package.private.protected.public.require.return.set.static.string.super.switch.symbol.this.throw.true.try.type.typeof.var.void.while.with.yield`.split(`.`)),bb=/^[A-Za-z]+$/u;function xb(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95}function Sb(e){return e<192?xb(e):e>=12289&&e<=55295?!0:e<=767?e!==215&&e!==247:e<=8191?e>=880&&e!==894:e<=8591?e>=8204&&e<=8205||e>=8304:e<=12271?e>=11264:e<=64255?e>=63744:e<=65023?e>=64512:e<=65279?e>=65136:e<=65370?e>=65313&&e<=65338||e>=65345:e>=65382&&e<=65500}function Cb(e){return!!(Sb(e)||e>=48&&e<=57||e===8204||e===8205||e>=768&&e<=865||e>=8240&&e<=8266)}function wb(e){if(e.length===0||yb.has(e))return!1;let t=e.codePointAt(0);if(t===void 0||!Sb(t))return!1;let n=t>65535?2:1;for(;n<e.length;){let t=e.codePointAt(n);if(t===void 0||!Cb(t))return!1;n+=t>65535?2:1}return!0}function Tb(e){let t=[e],n=1;for(let r of e.childScopes){let e=Tb(r);for(let r of e)t[n++]=r}return t}function Eb(e,t){return!t.some(t=>T(t,e)!==void 0)}function Db(e,t,n){let r=e;if(!(!wb(r)&&(r=`${r}_`,!wb(r)))){for(;!(Eb(r,t)&&n(r,t));)r=`${r}_`;return r}}function Ob(e){let t=new Set;for(let n of e.identifiers)t.add(n);for(let{identifier:n}of e.references)t.add(n);return[...t]}function kb(e,t){return e.range[0]===t.range[0]&&e.range[1]===t.range[1]}function Ab(e){let{parent:t}=e;return!be(t)||t.local!==e?!1:kb(t.local,t.imported)}function jb(e){let{parent:t}=e;return!xe(t)||t.local!==e?!1:kb(t.local,t.exported)}function Mb(e){if(!A(e))return!1;let{parent:t}=e;return Se(t)&&t.shorthand&&t.value===e}function Nb(e){if(!A(e))return!1;let{parent:t}=e;if(!et(t)||t.left!==e)return!1;let n=t.parent;return Se(n)?n.shorthand:!1}function Pb(e){if(!A(e))return!1;let{parent:t}=e;if(je(t)&&t.local===e||Me(t)&&t.local===e)return!0;if(be(t)&&t.local===e){let{imported:e}=t;if(j(e)&&e.name==="default")return!0}return k(t)&&t.id===e&&t.init!==null&&nt(t.init)}function Fb(e){if(!A(e))return!1;let{parent:t}=e;if(k(t)&&t.id===e){let e=t.parent;return Ne(e)?Pe(e.parent):!1}return Fe(t)&&t.id===e||Re(t)&&t.id===e||ze(t)&&t.id===e?Pe(t.parent):!1}function Ib(e){return Ob(e).every(e=>!(Fb(e)||he(e)))}function Lb(e,t,n){if(A(e))return Mb(e)||Nb(e)?n.replaceText(e,`${e.name}: ${t}`):Ab(e)?n.replaceText(e,`${e.name} as ${t}`):jb(e)?n.replaceText(e,`${t} as ${e.name}`):n.replaceText(e,t)}function Rb(e,t,n){let r=[],i=0;for(let a of Ob(e)){let e=Lb(a,t,n);e!==void 0&&(r[i++]=e)}return r}function zb(e){if(!A(e))return!1;let{parent:t}=e;if(M(t)&&t.property===e&&!t.computed){let e=t.parent;if(Ce(e)&&e.left===t)return!0}return Se(t)&&t.key===e&&!t.computed&&!t.shorthand&&(Je(t.parent)||Ye(t.parent))||Be(t)&&t.key===e&&!t.computed||xe(t)&&t.exported===e&&t.local!==e?!0:(ke(t)||Ae(t))&&t.key===e&&!t.computed}function Bb(e){if(!A(e))return!1;let{parent:t}=e;return Se(t)&&t.key===e&&!t.computed&&!t.shorthand&&(Je(t.parent)||Ye(t.parent))}function Vb(e){if(e.type===`ImportBinding`){let{parent:t}=e;if(t!==null&&_e(t)&&ve(t.source))return t.source.value}if(e.type===`Variable`){let{node:t}=e;if(k(t)&&t.init!==null&&nt(t.init)){let[e]=t.init.arguments;if(e!==void 0&&ve(e))return e.value}}}function Hb(e){let t=Vb(e);return t!==void 0&&!t.includes(`node_modules`)&&(t.startsWith(`.`)||t.startsWith(`/`))}function Ub(e,t){return e===!1?!1:e!==`internal`||Hb(t)}function Wb(e){return e.defs.length===1&&e.defs[0]?.type===`ClassName`}const Gb=/^(?:[#$./]|[~@]\/)/u;function Kb(e){return!Gb.test(e)}function qb(e){if(e?.type!==`ImportBinding`)return!1;let{parent:t}=e;return t===null||!_e(t)||!ve(t.source)?!1:Kb(t.source.value)}function Jb(e){if(e.type===`Identifier`)return e;if(e.type===`TSQualifiedName`)return Jb(e.left)}function Yb(e,t){if(e.type===`TSImportType`)return Kb(e.source.value);if(e.type!==`TSTypeReference`)return!1;let n=Jb(e.typeName);if(n===void 0)return!1;let r=T(t.getScope(n),n.name)?.defs[0];return qb(r)}function Xb(e){let{parent:t}=e;if(k(t)&&t.init===e)return le(t.id)?.typeAnnotation;if((t.type===`TSAsExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`)&&t.expression===e)return t.typeAnnotation}function Zb(e){if(j(e))return e;if(M(e))return Zb(e.object);if(We(e))return Zb(e.left)}function Qb(e,t){let{parent:n}=e,r;if(M(n)&&n.property===e&&!n.computed?r=n.object:We(n)&&n.right===e&&(r=n.left),r===void 0)return!1;let i=j(r)?r:Zb(r);return i===void 0||!A(i)?!1:T(t.getScope(e),i.name)?.defs[0]?.type===`ImportBinding`}function $b(e,t){let n=e.parent;if(!ye(n))return!1;let{callee:r}=n;if(!j(r))return!1;let i=T(t.getScope(r),r.name)?.defs[0];return qb(i)}function ex(e,t){if(Qb(e,t))return!0;if(!Bb(e))return!1;let n=e.parent.parent;if(n===null||!Je(n))return!1;let r=Xb(n);return r!==void 0&&Yb(r,t)||$b(n,t)}function tx(e,t,n){return e?t:n}const nx=/[.+^${}()|[\]\\]/gu,rx=/^\/(?<first>.+)\/(?<second>[dgimsuvy]*)$/u,ix=new WeakMap,ax=new WeakMap;function ox(e){return e===e.toUpperCase()}function sx(e){return ox(e.charAt(0))}function cx(e){return e.charAt(0).toUpperCase()+e.slice(1)}function lx(e){return e.charAt(0).toLowerCase()+e.slice(1)}function ux(e){return e.includes(`u`)||e.includes(`v`)?e:`${e}u`}function dx(e){return e===void 0?3:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:3}function fx(e,t,n){return e===3||t===3||e===2||t===2?e!==t:e===0&&t===1||e===1&&t===1&&n===0}function px(e){if(e.length<2)return[e];let t=[],n=0,r=dx(e.codePointAt(0));for(let i=1;i<e.length;i+=1){let a=dx(e.codePointAt(i)),o=dx(e.codePointAt(i+1));fx(r,a,o)&&(t.push(e.slice(n,i)),n=i),r=a}return t.push(e.slice(n)),t}const mx=/\$\d+/gu;function hx(e){let t=e.match(mx);if(t===null)return 0;let n=0;for(let e of t){let t=Math.trunc(Number(e.slice(1)));t>n&&(n=t)}return n}function gx(e){let t=hx(e);if(t===0)return[];let n=Array.from({length:t});for(let e=1;e<=t;e+=1)n[e-1]=RegExp(`\\$${e}`,`gu`);return n}function _x(e){let t=[],n=[],r=0;for(let[i,a]of e)a&&(t[r]=lx(i),n[r]=cx(i),r+=1);return{lowerFirst:t.toSorted((e,t)=>e.localeCompare(t)),upperFirst:n.toSorted((e,t)=>e.localeCompare(t))}}function vx(e,t){if(e.startsWith(`/`)){let n=rx.exec(e);if(n?.groups!==void 0)return{matcher:{original:e,pattern:RegExp(`^${n.groups.first}$`,ux(n.groups.second??``)),replacement:t,replacementPatterns:gx(t)},type:`pattern`}}if(e.includes(`*`)||e.includes(`?`)){let n=e.replaceAll(nx,String.raw`\$&`).replaceAll(`*`,`(.*)`).replaceAll(`?`,`(.)`),r=0,i=t.replaceAll(`*`,()=>`$${++r}`);return{matcher:{original:e,pattern:RegExp(`^${n}$`,`u`),replacement:i,replacementPatterns:gx(i)},type:`pattern`}}return{original:e,replacement:t,type:`exact`}}function yx(e,t){let n=t.exactMatchers.get(e);if(n!==void 0)return{matchedWord:e,replacement:n,shorthand:e};for(let n of t.matchers){let t=e.match(n.pattern);if(t===null)continue;let r=n.replacement,i=1;for(let e of n.replacementPatterns)r=r.replaceAll(e,t[i]??``),i+=1;return{matchedWord:e,replacement:r,shorthand:n.original}}}function bx(e,t){if(t.ignoreExact.has(e))return!0;for(let n of t.ignoreMatchers)if(n.pattern.test(e))return!0;return!1}function xx(e,t){return e===`internal`||typeof e==`boolean`?e:t}function Sx(e){if(!x(e))return;let t={};for(let[n,r]of Object.entries(e))typeof r==`boolean`&&(t[n]=r);return t}function Cx(e,t){return typeof e==`boolean`?e:t}function wx(e){let t=x(e)?e:void 0,n=Sx(t?.allowList),r=tx(Cx(t?.extendDefaultAllowList,!0),n===void 0?gb:{...gb,...n},n??{});return new Map(Object.entries(r))}function Tx(e){if(!x(e))return{};let t={};for(let[n,r]of Object.entries(e)){if(r===!1){t[n]=!1;continue}if(!x(r))continue;let e={};for(let[t,n]of Object.entries(r))typeof n==`boolean`&&(e[t]=n);t[n]=e}return t}function Ex(e){let t=x(e)?e:void 0,n=Cx(t?.extendDefaultReplacements,!0),r=Tx(t?.replacements),i=new Set([...Object.keys(hb),...Object.keys(r)]),a=[];for(let e of i){let t=r[e],i=n?hb[e]??{}:{},o=t===!1?{}:tx(t===void 0,i,{...i,...t}),s=new Map(Object.entries(o));ix.set(s,_x(s)),a.push([e,s])}return new Map(a)}function Dx(e){let t=x(e)?e:void 0,n=[];for(let e of _b)n.push(e);if(Array.isArray(t?.ignore))for(let e of t.ignore)(y(e)||e instanceof RegExp)&&n.push(e);return n.map(e=>e instanceof RegExp?e:new RegExp(e,`u`))}function Ox(e){let t=x(e)?e:void 0,n=new Set(mb);if(!S(t?.allowPropertyAccess))return n;for(let e of t.allowPropertyAccess)n.add(e);return n}function kx(e){let t=x(e)?e:void 0,n=new Map,r=new Set,i=[],a=[],o=re(t?.shorthands)?t.shorthands:{},s={...pb,...o};for(let[e,t]of Object.entries(s)){let r=vx(e,t);r.type===`exact`?n.set(r.original,r.replacement):a.push(r.matcher)}if(S(t?.ignoreShorthands))for(let e of t.ignoreShorthands){let t=vx(e,``);t.type===`exact`?r.add(t.original):i.push(t.matcher)}return{exactMatchers:n,ignoreExact:r,ignoreMatchers:i,ignoredIdentifiers:new Map,matchers:a,replacementsByIdentifier:new Map}}function Ax(e){let t=x(e)?e:void 0;return{allowList:wx(t),allowPropertyAccess:Ox(t),checkDefaultAndNamespaceImports:xx(t?.checkDefaultAndNamespaceImports,`internal`),checkFilenames:Cx(t?.checkFilenames,!0),checkProperties:Cx(t?.checkProperties,!1),checkShorthandImports:xx(t?.checkShorthandImports,`internal`),checkShorthandProperties:Cx(t?.checkShorthandProperties,!0),checkVariables:Cx(t?.checkVariables,!0),ignore:Dx(t),nameReplacements:new Map,replacements:Ex(t),shorthandConfiguration:kx(t)}}function jx(e){return{...e,nameReplacements:new Map,shorthandConfiguration:{...e.shorthandConfiguration,ignoredIdentifiers:new Map,replacementsByIdentifier:new Map}}}function Mx(e){if(!x(e))return Ax(e);let t=ax.get(e);if(t!==void 0)return jx(t);let n=Ax(e);return ax.set(e,n),jx(n)}function Nx(e,t){if(ox(e)||t.allowList.get(e)===!0)return[];let n=t.replacements.get(lx(e))??t.replacements.get(e)??t.replacements.get(cx(e));if(n===void 0)return[];let r=ix.get(n);return r===void 0?[]:sx(e)?r.upperFirst:r.lowerFirst}function Px(e,t){let n=t.replacementsByIdentifier.get(e);if(n!==void 0)return n===!1?void 0:n;if(e.length===0)return;let r=px(e),i=[];for(let e of r){let n=yx(e,t);n!==void 0&&i.push(n)}if(i.length===0){t.replacementsByIdentifier.set(e,!1);return}let a=``,o=0;for(let e of r){let t=i[o];if(t?.matchedWord===e){a+=t.replacement,o+=1;continue}a+=e}let s={matches:i,replaced:a};return t.replacementsByIdentifier.set(e,s),s}function Fx(e,t){let n=t.ignoredIdentifiers.get(e);if(n!==void 0)return n;let r=bx(e,t);if(!r){let n=Px(e,t);r=n!==void 0&&n.matches.length>0&&n.matches.every(e=>bx(e.matchedWord,t))}return t.ignoredIdentifiers.set(e,r),r}function Ix(e,t,n){if(n.has(e))return!0;for(let e of t.matches)if(!n.has(e.matchedWord))return!1;return t.matches.length>0}function Lx(e,t,n=3){let r=`${n}\0${e}`,i=t.nameReplacements.get(r);if(i!==void 0)return i;let a=Rx(e,t,n);return t.nameReplacements.set(r,a),a}function Rx(e,t,n){if(t.allowList.get(e)===!0||t.ignore.some(t=>t.test(e)))return{total:0};let r=Px(e,t.shorthandConfiguration);if(r!==void 0)return Fx(e,t.shorthandConfiguration)?{total:0}:{samples:[r.replaced],total:1};if(ox(e))return{total:0};let i=Nx(e,t);if(i.length>0)return{samples:i.slice(0,n),total:i.length};let a=e.split(vb).filter(Boolean),o=!1,s=[],c=0;for(let e of a){let n=Nx(e,t);if(n.length>0){o=!0,s[c++]=n;continue}s[c++]=[e]}if(!o)return{total:0};let l=s.reduce((e,t)=>e*t.length,1);return{samples:zx(s,l,n).map(e=>e.join(``)),total:l}}function zx(e,t,n){let r=Math.min(t,n),i=Array.from({length:r},(t,n)=>{let r=n,i=[];for(let t=e.length-1;t>=0;--t){let n=e[t]??[],a=r%n.length;r=(r-a)/n.length;let o=n[a];o!==void 0&&i.unshift(o)}return i});for(let e of i)for(let t=e.length-1;t>0;--t){let n=e[t]??``;bb.test(n)&&e[t-1]?.endsWith(n)===!0&&e.splice(t,1)}return i}function Bx(e,t){let n=t.replacements.get(e);if(n===void 0)return!1;let r=ix.get(n);return r!==void 0&&r.lowerFirst.length>0}function Vx(e,t,n){let{samples:r=[],total:i}=t;if(i===1)return{data:{discouragedName:e,nameTypeText:n,replacement:r[0]??``},messageId:ub};let a=r.map(e=>`\`${e}\``).join(`, `),o=i-r.length;return o>0&&(a+=`, ... (${o>99?`99+`:o} more omitted)`),{data:{discouragedName:e,nameTypeText:n,replacementsText:a},messageId:db}}function Hx(e){return function(t,n){return n.every(n=>{let r=e.get(n);return r===void 0||!r.has(t)})}}function Ux(e){let{parent:t}=e;return M(t)&&t.property===e&&!t.computed||We(t)&&t.right===e}function Wx(e,t,n,r){r({...Vx(e.name,{samples:[t],total:1},n?`property`:`variable`),node:e})}function Gx(e,t,n){return Pb(t)&&!Ub(n.checkDefaultAndNamespaceImports,e)||Ab(t)&&!Ub(n.checkShorthandImports,e)?!0:!n.checkShorthandProperties&&Mb(t)}function Kx(e){if(e.name!==`plr`)return;let[t]=e.defs;if(t?.type!==`Variable`||!k(t.node)||t.node.init===null)return;let{init:n}=t.node;if(M(n)&&!n.computed&&j(n.object)&&n.object.name===`Players`&&j(n.property)&&n.property.name===`LocalPlayer`)return`localPlayer`}function qx(e,t,n,r){let i=[],a=0,o=0;for(let s of e){let e=Db(s,t,n);if(e!==void 0){if(e!==s&&Bx(s,r)){o+=1;continue}e.length>0&&(i[a++]=e)}}return{droppedDiscouraged:o,safeSamples:i}}function Jx(e,t,n){let r=e.type===`Variable`&&k(e.node)&&e.node.init===null,i=e.type===`Parameter`&&t.scope.type===`function`&&t.scope.block.type===`ArrowFunctionExpression`,a=r||i;return(e,t)=>!(!n(e,t)||a&&e===`arguments`)}function Yx(e,t,n,r,i,a,o){for(let e of i)a.has(e)||a.set(e,new Set),a.get(e)?.add(r);e({...t,fix(e){return Rb(n,r,e)},node:o})}function Xx(e,t,n,r,i){let[a]=e.defs;if(a===void 0)return;let o=a.name;if(!j(o)||Gx(a,o,t))return;let s=Jx(a,e,r),c=Kx(e),l=c===void 0?Lx(e.name,t):{samples:[c],total:1};if(l.total===0||!l.samples)return;let{references:u}=e,d=[...u.map(e=>e.from),e.scope],{droppedDiscouraged:f,safeSamples:p}=qx(l.samples,d,s,t),m=p.length>0?p:l.samples,h=b(l.samples.length)&&l.samples.length===l.total?Math.max(0,l.total-f):l.total,g=e.name===`fn`&&h>1?m.map(e=>e===`function_`?`function`:e):m,_=Vx(o.name,{samples:g,total:h},`variable`);if(h===1&&p.length===1&&Ib(e)){let[t]=p;if(t!==void 0){Yx(i,_,e,t,d,n,o);return}}i({..._,node:o})}function Zx(e,t){if(!Wb(e)){t(e);return}if(e.scope.type===`class`){let[n]=e.defs;if(n===void 0){t(e);return}let r=n.name;if(!j(r)){t(e);return}t(e)}}function Qx(e,t){for(let n of Tb(e))for(let e of n.variables)Zx(e,t)}function $x(e,t,n,r){let i=zb(e),a=Ux(e);(i||a)&&(ex(e,r)||eS(e,i,a,t,n)||t.checkProperties&&i&&tS(e,t,n))}function eS(e,t,n,r,i){let a=Px(e.name,r.shorthandConfiguration);return a===void 0||!(t||n)?!1:(Fx(e.name,r.shorthandConfiguration)||!r.checkShorthandProperties||n&&Ix(e.name,a,r.allowPropertyAccess)||Wx(e,a.replaced,!0,i),!0)}function tS(e,t,n){let r=Lx(e.name,t);if(r.total===0)return;let i=Vx(e.name,r,`property`),a=nS(e,r.samples);if(a!==void 0){n({...i,fix(t){return t.replaceText(e,a)},node:e});return}n({...i,node:e})}function nS(e,t){if(t?.length!==1||!Bb(e))return;let[n]=t,{parent:r}=e;if(n!==void 0&&Se(r)&&ve(r.value)&&wb(n))return n}const rS=_(`prevent-abbreviations`,`naming`,{create(e){let t=Mx(e.options[0]),n=e.physicalFilename,r=new WeakMap,i=Hx(r),{sourceCode:a}=e;function o(n){Xx(n,t,r,i,e.report)}return{Identifier(n){!A(n)||n.name===`__proto__`||$x(n,t,e.report,a)},JSXOpeningElement({name:n}){if(!(t.checkVariables&&he(n)&&sx(n.name)))return;let r=Lx(n.name,t);if(r.total===0)return;let i=Vx(n.name,r,`variable`);e.report({...i,node:n})},"Program:exit"(r){if(t.checkFilenames&&n!==`<input>`&&n!==`<text>`){let i=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`)),a=n.slice(i+1),o=a.lastIndexOf(`.`),s=o===-1?``:a.slice(o),c=Lx(o===-1?a:a.slice(0,o),t);if(c.total>0&&c.samples){let t=c.samples.map(e=>`${e}${s}`);e.report({...Vx(a,{samples:t,total:c.total},`filename`),node:r})}}t.checkVariables&&Qx(a.getScope(r),o)}}},meta:{docs:{description:`Prevent abbreviations.`,recommended:!1},fixable:`code`,messages:{[ub]:`The {{nameTypeText}} \`{{discouragedName}}\` should be named \`{{replacement}}\`. ${fb}`,[db]:`Please rename the {{nameTypeText}} \`{{discouragedName}}\`. Suggested names are: {{replacementsText}}. ${fb}`},schema:[{additionalProperties:!1,properties:{allowList:{additionalProperties:{type:`boolean`},default:gb,defaultLabel:`default allow list`,description:`Names that should be allowed even when they match a discouraged abbreviation.`,type:`object`},allowPropertyAccess:{default:mb,description:`Property names that may keep abbreviated member access.`,items:{type:`string`},type:`array`},checkDefaultAndNamespaceImports:{default:`internal`,description:`Whether default and namespace import local names should be checked.`,enum:[!1,!0,`internal`]},checkFilenames:{default:!0,description:`Whether file names should be checked for abbreviations.`,type:`boolean`},checkProperties:{default:!1,description:`Whether object, member, and JSX property names should be checked.`,type:`boolean`},checkShorthandImports:{default:`internal`,description:`Whether renamed shorthand imports should be checked.`,enum:[!1,!0,`internal`]},checkShorthandProperties:{default:!0,description:`Whether shorthand object property names should be checked.`,type:`boolean`},checkVariables:{default:!0,description:`Whether variable, function, class, and component names should be checked.`,type:`boolean`},extendDefaultAllowList:{default:!0,description:`Merge configured allowList entries with the default allow list.`,type:`boolean`},extendDefaultReplacements:{default:!0,description:`Merge configured replacements with the default replacement map.`,type:`boolean`},ignore:{default:_b,description:`Names or regular expression patterns that should be ignored.`,items:{type:`string`},type:`array`},ignoreShorthands:{default:[],description:`Shorthand names that should not be reported.`,items:{type:`string`},type:`array`},replacements:{additionalProperties:{oneOf:[{enum:[!1]},{additionalProperties:{type:`boolean`},type:`object`}]},default:hb,defaultLabel:`default replacement map`,description:`Replacement suggestions for discouraged names.`,type:`object`},shorthands:{additionalProperties:{type:`string`},default:pb,defaultLabel:`default shorthands`,description:`Shorthand names and the full names they should expand to.`,type:`object`}},type:`object`}],type:`suggestion`}}),iS=/^use[A-Z0-9].*$/u;function aS(e){return iS.test(e)}function oS(e){if(e.id!==null)return e.id.name}function sS(e){return e.id.type===`Identifier`?e.id.name:void 0}function cS(e){let t=oS(e);return t!==void 0&&aS(t)}function lS({parent:e}){if(e.type!==`VariableDeclarator`)return!1;let t=sS(e);return t!==void 0&&aS(t)}function uS(e,t){let n=e.get(t);if(n!==void 0&&n.length!==0)return n.at(-1)}function dS(e){for(let t=e.defs.length-1;t>=0;--t){let n=e.defs[t];if(n?.node.type===`VariableDeclarator`&&n.node.init?.type===`ArrayExpression`)return n.node.init}}function fS(e){for(let t=e.defs.length-1;t>=0;--t){let n=e.defs[t];if(n?.node.type===`VariableDeclarator`&&n.node.init?.type===`ObjectExpression`)return!0}return!1}function pS(e,t,n,r){let i=T(e.getScope(t),n);if(i!==void 0){let e=dS(i);if(e!==void 0)return e}return uS(r,n)}function mS(e,t,n){if(e.argument.type===`Identifier`){let r=pS(t,e,e.argument.name,n);return r===void 0?1:hS(r,t,n)}return e.argument.type===`ArrayExpression`?hS(e.argument,t,n):1}function hS(e,t,n){let r=0;for(let i of e.elements){if(i===null){r+=1;continue}if(i.type===`SpreadElement`){r+=mS(i,t,n);continue}r+=1}return r}function gS(e,t){let n=T(e.getScope(t),t.name);return n!==void 0&&fS(n)}function _S(e){let t=sS(e);if(t!==void 0&&e.init?.type===`ArrayExpression`)return{init:e.init,name:t}}function vS(e,t){let n=_S(e);if(n===void 0)return;let{init:r,name:i}=n,a=t.get(i)??[];a.push(r),t.set(i,a)}function yS(e,t){let n=_S(e);if(n===void 0)return;let{name:r}=n,i=t.get(r);i!==void 0&&i.length!==0&&(i.pop(),i.length===0&&t.delete(r))}const bS=_(`react-hooks-strict-return`,`react`,{create(e){let{sourceCode:t}=e,n=new Map,r=0;function i(e){cS(e)&&(r+=1)}function a(e){cS(e)&&--r}function o(e){lS(e)&&(r+=1)}function s(e){lS(e)&&--r}function c(t){e.report({data:{count:`2`},messageId:`tooManyReturnValues`,node:t})}function l(e){if(r!==0&&e.argument!==null&&e.argument.type!==`ObjectExpression`){if(e.argument.type===`Identifier`){if(gS(t,e.argument))return;let r=pS(t,e,e.argument.name,n);if(r===void 0)return;hS(r,t,n)>2&&c(e);return}e.argument.type===`ArrayExpression`&&hS(e.argument,t,n)>2&&c(e)}}return{ArrowFunctionExpression:o,"ArrowFunctionExpression:exit":s,FunctionDeclaration:i,"FunctionDeclaration:exit":a,FunctionExpression:i,"FunctionExpression:exit":a,ReturnStatement:l,VariableDeclarator(e){vS(e,n)},"VariableDeclarator:exit"(e){yS(e,n)}}},meta:{docs:{description:`Restrict React hooks to object returns or short tuples.`},messages:{tooManyReturnValues:`Hook returns more than {{count}} values. Return an object with named properties instead.`},schema:[],type:`suggestion`}});function xS(e){let{parent:t}=e;if(t.type!==`ObjectExpression`)return!1;let{parent:n}=t;return n.type===`TSSatisfiesExpression`?!0:n.type===`CallExpression`||n.type===`NewExpression`?n.arguments.some(e=>e===t):!1}const SS=_(`require-async-suffix`,`naming`,{create(e){let t=e.options[0]?.except,n=t===void 0?new Set:new Set(t);function r(t){t.name.endsWith(`Async`)||n.has(t.name)||e.report({messageId:`missingAsyncSuffix`,node:t})}return{FunctionDeclaration(e){!e.async||e.id===null||r(e.id)},MethodDefinition(e){!e.value.async||e.key.type!==`Identifier`||e.override===!0||r(e.key)},Property(e){!e.method||e.value.type!==`FunctionExpression`||!e.value.async||e.key.type!==`Identifier`||xS(e)||r(e.key)},PropertyDefinition(e){(e.value?.type===`ArrowFunctionExpression`||e.value?.type===`FunctionExpression`)&&(!e.value.async||e.key.type!==`Identifier`||e.override===!0||r(e.key))},VariableDeclarator(e){e.id.type===`Identifier`&&(e.init?.type===`ArrowFunctionExpression`||e.init?.type===`FunctionExpression`)&&e.init.async&&r(e.id)}}},meta:{docs:{description:`Require async function names to end with Async.`},messages:{missingAsyncSuffix:`Async functions must have names that end with Async.`},schema:[{additionalProperties:!1,properties:{except:{items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}});function CS(e){if(!(x(e)&&`classes`in e&&x(e.classes)))return new Map;let{classes:t}=e,n=new Map;for(let[e,r]of Object.entries(t))y(r)&&n.set(e,r);return n}function wS(e){return e?.type===`module`||e?.type===`global`}function TS(e){if(e.type===`ImportDefaultSpecifier`)return e.local.name;if(e.type===`ImportSpecifier`){if(e.imported.type===`Identifier`)return e.imported.name;if(y(e.imported.value))return e.imported.value}}function ES(e,t,n){if(e.callee.type===`Identifier`){let r=t.get(e.callee.name);if(r===void 0)return;let i=n.get(r);return i===void 0?void 0:{className:r,importSource:i}}if(e.callee.type===`MemberExpression`&&e.callee.property.type===`Identifier`){let t=e.callee.property.name,r=n.get(t);return r===void 0?void 0:{className:t,importSource:r}}}function DS(e,t,n){if(!y(e.source.value))return;let r=e.source.value;for(let[i,a]of t)if(a===r)for(let t of e.specifiers)TS(t)===i&&n.set(t.local.name,i)}const OS=_(`require-module-level-instantiation`,`roblox`,{create(e){let{sourceCode:t}=e,n=CS(e.options[0]);if(n.size===0)return{};let r=new Map;return{ImportDeclaration(e){DS(e,n,r)},NewExpression(i){let a=ES(i,r,n);a!==void 0&&(wS(t.getScope(i))||e.report({data:{className:a.className,importSource:a.importSource},messageId:`mustBeModuleLevel`,node:i}))}}},meta:{docs:{description:`Require configured classes to be instantiated at module level only.`},messages:{mustBeModuleLevel:`'{{className}}' from '{{importSource}}' must be instantiated at module level only.`},schema:[{additionalProperties:!1,properties:{classes:{additionalProperties:{type:`string`},description:`Class names mapped to the import source that must be instantiated at module scope.`,type:`object`}},type:`object`}],type:`problem`}}),kS=[{allowAsync:!1,name:`useEffect`},{allowAsync:!1,name:`useLayoutEffect`},{allowAsync:!1,name:`useInsertionEffect`}];function AS(e){return x(e)&&y(e.name)&&typeof e.allowAsync==`boolean`}function jS(e){if(!x(e))return{environment:`roblox-ts`,hooks:kS};let t=fr(e.environment)?e.environment:`roblox-ts`,n=e.hooks;if(!Array.isArray(n))return{environment:t,hooks:kS};let r=[];for(let e of n)AS(e)&&r.push(e);return r.length===0?{environment:t,hooks:kS}:{environment:t,hooks:r}}function MS(e){for(let t of e.defs){let{node:e}=t;if(e.type===`FunctionDeclaration`)return{isAsync:e.async,node:e,type:`function-declaration`};if(e.type===`VariableDeclarator`){if(e.init===null)continue;if(e.init.type===`ArrowFunctionExpression`)return{isAsync:e.init.async,node:e.init,type:`arrow`};if(e.init.type===`FunctionExpression`)return{isAsync:e.init.async,node:e.init,type:`function-expression`}}}}function NS(e,t){let n=T(e.getScope(t),t.name);if(n===void 0)return!1;for(let e of n.defs){let{node:t}=e;if(t.type!==`VariableDeclarator`||t.init?.type!==`CallExpression`)continue;let n=L(t.init);if(n===`useCallback`||n===`useMemo`)return!0}return!1}const PS=_(`require-named-effect-functions`,`react`,{create(e){let{environment:t,hooks:n}=jS(e.options[0]),r=new Map(n.map(e=>[e.name,e.allowAsync])),i=new Set(r.keys()),a=t===`roblox-ts`;function o(e){let t=r.get(e);return typeof t==`boolean`&&t}function s(t,n,r){e.report({data:{hook:t},messageId:r,node:n})}function c(t,n,r){let i=T(e.sourceCode.getScope(r),r.name);if(i===void 0){NS(e.sourceCode,r)&&s(t,n,`identifierReferencesCallback`);return}let a=MS(i);if(a===void 0){NS(e.sourceCode,r)&&s(t,n,`identifierReferencesCallback`);return}l(t,n,a)}function l(e,t,n){if(n.type===`arrow`){n.isAsync&&!o(e)?s(e,t,`identifierReferencesAsyncArrow`):n.isAsync||s(e,t,`identifierReferencesArrow`);return}if(n.type===`function-expression`){u(e,t,n.node);return}n.isAsync&&!o(e)&&s(e,t,`identifierReferencesAsyncFunction`)}function u(e,t,n){n.id===null?s(e,t,`anonymousFunction`):a&&s(e,t,`functionExpression`)}function d(e,t,n){let r=n.id!==null;r&&n.async?s(e,t,`asyncFunctionExpression`):r&&a?s(e,t,`functionExpression`):!r&&n.async?s(e,t,`asyncAnonymousFunction`):r||s(e,t,`anonymousFunction`)}return{CallExpression(e){let t=L(e);if(t===void 0||!i.has(t))return;let[n]=e.arguments;if(n!==void 0){if(n.type===`Identifier`){c(t,e,n);return}if(n.type===`ArrowFunctionExpression`){n.async?s(t,e,`asyncArrowFunction`):s(t,e,`arrowFunction`);return}n.type===`FunctionExpression`&&d(t,e,n)}}}},meta:{docs:{description:`Enforce named effect functions for better debuggability. Prevents inline arrow functions in useEffect and similar hooks.`,recommended:!1},messages:{anonymousFunction:`Anonymous function passed to {{hook}}. debug.info returns empty string for anonymous functions, making stack traces useless for debugging. Extract to: function effectName() { ... } then pass effectName.`,arrowFunction:`Arrow function passed to {{hook}}. Arrow functions have no debug name and create new instances each render. Extract to: function effectName() { ... } then pass effectName.`,asyncAnonymousFunction:`Async anonymous function in {{hook}}. Two issues: (1) no debug name makes stack traces useless, (2) async effects require cancellation logic for unmount. Extract to: async function effectName() { ... } with cleanup.`,asyncArrowFunction:`Async arrow function in {{hook}}. Two issues: (1) arrow functions have no debug name, (2) async effects require cancellation logic. Extract to: async function effectName() { ... } with cleanup.`,asyncFunctionDeclaration:`Async function declaration passed to {{hook}}. Async effects require cancellation logic to handle component unmount. Implement cleanup or set allowAsync: true if cancellation is handled.`,asyncFunctionExpression:`Async function expression in {{hook}}. Async effects require cancellation logic for unmount. Extract to a named async function declaration with cleanup, then pass the reference.`,functionExpression:`Function expression passed to {{hook}}. Function expressions create new instances each render, breaking referential equality. Extract to: function effectName() { ... } at module or component top-level.`,identifierReferencesArrow:`{{hook}} receives identifier pointing to arrow function. Arrow functions have no debug name and lack referential stability. Convert to: function effectName() { ... } then pass effectName.`,identifierReferencesAsyncArrow:`{{hook}} receives identifier pointing to async arrow function. Two issues: (1) no debug name, (2) async effects require cancellation logic. Convert to: async function effectName() { ... } with cleanup.`,identifierReferencesAsyncFunction:`{{hook}} receives identifier pointing to async function. Async effects require cancellation logic for unmount. Implement cleanup or set allowAsync: true if cancellation is handled.`,identifierReferencesCallback:`{{hook}} receives identifier from useCallback/useMemo. These hooks return new references when dependencies change, causing unexpected effect re-runs. Use a stable function declaration: function effectName() { ... }`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`Environment mode: 'roblox-ts' only allows identifiers, 'standard' allows both identifiers and named function expressions`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:[...kS],description:`Hook configuration objects with name and allowAsync settings.`,items:{additionalProperties:!1,properties:{allowAsync:{description:`Whether async functions are allowed for this hook`,type:`boolean`},name:{description:`Hook name to check`,type:`string`}},required:[`name`,`allowAsync`],type:`object`},type:`array`}},type:`object`}],type:`problem`}});p({"alternatives?":p(`string[]`).readonly().or(`undefined`),closer:p(`string[]`).readonly().or(`string`),opener:`string`,"openerAlternatives?":p(`string[]`).readonly().or(`undefined`),"platform?":p(`"roblox" | undefined`),"requireSync?":`boolean | undefined`,"yieldingFunctions?":p(`string[]`).readonly().or(`undefined`)}).readonly();const FS=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]),IS=[`task.wait`,`wait`,`*.WaitForChild`,`*.*Async`];function LS(e,t){for(let n of t){let t=!1;for(let r of n)if(r.index===e.index){t=!0;break}if(!t)return!1}return!0}function RS(e,t){return t.filter(t=>t.some(t=>t.index===e.index))}function zS({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`){let t=e.object.type===`Identifier`?e.object.name:void 0,n=e.property.type===`Identifier`?e.property.name:void 0;if(t!==void 0&&n!==void 0)return`${t}.${n}`}}function BS(e){let t=[],n=0;if(S(e.closer))for(let r of e.closer)t[n++]=r;else y(e.closer)&&(t[n++]=e.closer);if(e.alternatives)for(let r of e.alternatives)t[n++]=r;return t}function VS(e){let t=[e.opener];if(e.openerAlternatives){let n=1;for(let r of e.openerAlternatives)t[n++]=r}return t}function HS(e){return e.length===0?`configured opener`:e.length===1?e[0]??`configured opener`:e.join(`' or '`)}function US(e){return e?FS.has(e.type):!1}function WS(e){return e?.type===`SwitchStatement`}function GS(e,t){if(e.type!==`Identifier`)return;let n=t;for(;n;){if(n.type===`LabeledStatement`&&n.label.name===e.name)return n.body;n=n.parent??void 0}}function KS(e,t){let n=e.label?GS(e.label,e.parent):void 0;if(n)return US(n)?n:void 0;let r=e.parent;for(;r;){if(US(r))return r;if(t&&WS(r))return;r=r.parent??void 0}}function qS(e){return KS(e,!0)}function JS(e){return KS(e,!1)}function YS(e){return{...e,loopAncestors:[...e.loopAncestors]}}const XS=_(`require-paired-calls`,`general`,{create(e){let[t]=e.options,n={allowConditionalClosers:t?.allowConditionalClosers??!1,allowMultipleOpeners:t?.allowMultipleOpeners??!0,maxNestingDepth:t?.maxNestingDepth??0,pairs:t?.pairs??[]},r=n.pairs.length===0?[{closer:`debug.profileend`,opener:`debug.profilebegin`,platform:`roblox`,requireSync:!0,yieldingFunctions:[...IS]}]:n.pairs,i={...n.allowConditionalClosers===void 0?{}:{allowConditionalClosers:n.allowConditionalClosers},...n.allowMultipleOpeners===void 0?{}:{allowMultipleOpeners:n.allowMultipleOpeners},...n.maxNestingDepth===void 0?{}:{maxNestingDepth:n.maxNestingDepth},pairs:r},a=[],o=[],s=0,c=[],l=!1,u=!1,d=[],f=new Map,p=new Map,m=new Map;function h(e){if(m.has(e))return m.get(e)??[];let t=[],n=0;for(let r of i.pairs){if(!VS(r).includes(e))continue;let i=BS(r);for(let e of i)t.includes(e)||(t[n++]=e)}return m.set(e,t),t}function g(){return d.length>0?d.at(-1):{asyncContext:!1,currentFunction:void 0,hasEarlyExit:!1,inCatch:!1,inConditional:!1,inFinally:!1,inLoop:!1,inTry:!1}}function _(e){let t=g();d.push({...t,...e})}function v(){d.pop()}function ee(e){let t=d.at(-1);t&&(d[d.length-1]={...t,...e})}function te(){return a.map(YS)}function y(e){f.set(e,te())}function b(e,t){return i.pairs.find(n=>(t?VS(n):BS(n)).includes(e))}function x(e,t){return t.platform===`roblox`&&(t.yieldingFunctions??IS).some(t=>{if(t.startsWith(`*.`)){let n=t.slice(2);return e.endsWith(`.${n}`)}return e===t})}function ne(e){let t=BS(e);return t.length===1?t[0]??`closer`:t.join(`' or '`)}function S(t,n){e.report({data:{closer:ne(t.config),opener:t.opener,paths:n},messageId:`unpairedOpener`,node:t.node})}function re(e){a.length=0;for(let t of e)a.push({...t})}function ie(e){let t=p.get(e)??[];t.push(te()),p.set(e,t)}function C(e,t,n){for(let r of e){let e=RS(r,t);e.length<=0||e.length>=t.length||i.allowConditionalClosers===!1&&S(r,n)}}function w(e){(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`)&&(c.push([...a]),a.length=0,l=!1,u=!1,_({asyncContext:e.async,currentFunction:e,hasEarlyExit:!1,inCatch:!1,inConditional:!1,inFinally:!1,inLoop:!1,inTry:!1}))}function T(){if(a.length>0)for(let e of a)S(e,`function exit`);let e=c.pop();if(e){a.length=0;for(let t of e)a.push(t)}else a.length=0;v()}function ae(e){e.type===`IfStatement`&&(_({inConditional:!0}),y(e))}function E(e){if(e.type!==`IfStatement`)return;v();let t=f.get(e),n=p.get(e);if(t&&n&&n.length>0){let r=e.alternate!==null;for(let e of n)for(let n of e)t.some(({index:e})=>e===n.index)||S(n,`conditional branch`);if(r){C(t,n,`not all execution paths`),a.length=0;for(let e of t)LS(e,n)&&a.push(e)}else re(t)}f.delete(e),p.delete(e)}function oe(e){let{parent:t}=e;if(t?.type===`IfStatement`){ie(t);let e=f.get(t);if(!e)return;re(e)}}function se(e){let{parent:t}=e;t?.type===`IfStatement`&&ie(t)}function D(e){e.type===`TryStatement`&&y(e)}function ce(t){if(t.type!==`TryStatement`)return;let n=f.get(t),r=p.get(t);if(t.finalizer){f.delete(t),p.delete(t);return}if(n&&r&&r.length>0){for(let t of n){let n=r.filter(e=>e.some(e=>e.index===t.index));if(n.length>0&&n.length<r.length&&i.allowConditionalClosers===!1){let n=BS(t.config),r=n.length===1?n[0]??`closer`:n.join(`' or '`);e.report({data:{closer:r,opener:t.opener,paths:`not all execution paths`},messageId:`unpairedOpener`,node:t.node})}}a.length=0;for(let e of n)LS(e,r)&&a.push(e)}f.delete(t),p.delete(t)}function O(){_({inTry:!0})}function k(e,t){if(e.type!==t)return;let{parent:n}=e;if(n.type===`TryStatement`){ie(n);let e=f.get(n);e&&re(e)}v()}function le(e){k(e,`BlockStatement`)}function ue(){_({inCatch:!0})}function de(e){k(e,`CatchClause`)}function fe(){_({inFinally:!0})}function pe(e){e.type===`SwitchStatement`&&(_({inConditional:!0}),y(e))}function me(e){if(e.type!==`SwitchStatement`)return;v();let t=f.get(e),n=p.get(e);if(t&&n&&n.length>0)if(e.cases.some(e=>e.test===null)&&n.length===e.cases.length){C(t,n,`not all execution paths`);let e=t.filter(e=>LS(e,n));a.length=0;for(let t of e)a.push(t)}else re(t);f.delete(e),p.delete(e)}function A(e){if(e.type!==`SwitchCase`)return;let{parent:t}=e;if(t.type===`SwitchStatement`){ie(t);let e=f.get(t);if(!e)return;re(e)}}function j(e){US(e)&&(o.push(e),_({inLoop:!0}))}function he(){o.length>0&&o.pop(),v()}function ge(t){if(ee({hasEarlyExit:!0}),!(g().inFinally||a.length===0))for(let{config:n,node:r,opener:i}of a){let a=BS(n),o=a.length===1?a[0]??`closer`:a.join(`' or '`),s=t.type===`ReturnStatement`?`return`:`throw`;e.report({data:{closer:o,opener:i,paths:`${s} at line ${t.loc.start.line}`},messageId:`unpairedOpener`,node:r})}}function _e(t){if(t.type!==`BreakStatement`&&t.type!==`ContinueStatement`||a.length===0)return;let n=t.type===`ContinueStatement`?JS(t):qS(t);if(n)for(let{config:r,loopAncestors:i,node:o,opener:s}of a){if(!i.some(e=>e===n))continue;let a=BS(r),c=a.length===1?a[0]??`closer`:a.join(`' or '`),l=t.type===`BreakStatement`?`break`:`continue`,u=t.loc.start.line;e.report({data:{closer:c,opener:s,paths:`${l} at line ${u}`},messageId:`unpairedOpener`,node:o})}}function ve(t,n,r){let c=i.maxNestingDepth??0;c>0&&a.length>=c&&e.report({data:{max:String(c)},messageId:`maxNestingExceeded`,node:t}),i.allowMultipleOpeners===!1&&a.length>0&&a.at(-1)?.opener===n&&e.report({data:{opener:n},messageId:`multipleOpeners`,node:t});let l={config:r,index:s++,location:t.loc,loopAncestors:[...o],node:t,opener:n};a.push(l)}function ye(t,n){let r=a.findLastIndex(e=>BS(e.config).includes(n));if(r===-1){if(l&&!u){u=!0;return}if(a.length===0){e.report({data:{closer:n},messageId:`unpairedCloser`,node:t});return}let r=HS(h(a.at(-1).opener));e.report({data:{closer:n,expected:r},messageId:`unexpectedCloser`,node:t});return}let i=a[r];if(i){if(r!==a.length-1){let r=a.at(-1);r&&e.report({data:{actual:r.opener,closer:n,expected:i.opener},messageId:`wrongOrder`,node:t})}a.splice(r,1)}}function be(t,n,r){let i=BS(r.config),a=i.length===1?i[0]??`closer`:i.join(`' or '`);e.report({data:{closer:a,yieldingFunction:n},messageId:`robloxYieldViolation`,node:t})}function xe(t){if(t.type===`AwaitExpression`||t.type===`YieldExpression`||t.type===`ForOfStatement`)for(let{config:n,opener:r}of a){if(n.requireSync!==!0)continue;let i=BS(n),a=i.length===1?i[0]??`closer`:i.join(`' or '`),o=t.type===`YieldExpression`?`yield`:`await`;e.report({data:{asyncType:o,closer:a,opener:r},messageId:`asyncViolation`,node:t})}}function Se(e){if(e.type!==`CallExpression`)return;let t=zS(e);if(t===void 0||t===``)return;let n=b(t,!0);if(n){ve(e,t,n);return}if(b(t,!1)){ye(e,t);return}for(let n of a)if(x(t,n.config)){be(e,t,n),a.length=0,l=!0;return}}return{ArrowFunctionExpression:w,"ArrowFunctionExpression:exit":T,AwaitExpression:xe,BreakStatement:_e,CallExpression:Se,CatchClause:ue,"CatchClause:exit":de,ContinueStatement:_e,DoWhileStatement:j,"DoWhileStatement:exit":he,ForInStatement:j,"ForInStatement:exit":he,ForOfStatement:e=>{e.await&&xe(e),j(e)},"ForOfStatement:exit":he,ForStatement:j,"ForStatement:exit":he,FunctionDeclaration:w,"FunctionDeclaration:exit":T,FunctionExpression:w,"FunctionExpression:exit":T,IfStatement:ae,"IfStatement > .alternate:exit":se,"IfStatement > .consequent:exit":oe,"IfStatement:exit":E,ReturnStatement:ge,"SwitchCase:exit":A,SwitchStatement:pe,"SwitchStatement:exit":me,ThrowStatement:ge,TryStatement:D,"TryStatement > .block":O,"TryStatement > .block:exit":le,"TryStatement > .finalizer":fe,"TryStatement > .finalizer:exit":v,"TryStatement:exit":ce,WhileStatement:j,"WhileStatement:exit":he,YieldExpression:xe}},meta:{docs:{description:`Enforces balanced opener/closer function calls across all execution paths`,recommended:!1},messages:{asyncViolation:`Cannot use {{asyncType}} between '{{opener}}' and '{{closer}}' (requireSync: true)`,conditionalOpener:`Conditional opener '{{opener}}' at {{location}} may not have matching closer on all paths`,maxNestingExceeded:`Maximum nesting depth of {{max}} exceeded for paired calls`,multipleOpeners:`Multiple consecutive calls to '{{opener}}' without matching closers (allowMultipleOpeners: false)`,robloxYieldViolation:`Yielding function '{{yieldingFunction}}' auto-closes all profiles - subsequent '{{closer}}' will error`,unexpectedCloser:`Unexpected call to '{{closer}}' - expected one of: {{expected}}`,unpairedCloser:`Unexpected call to '{{closer}}' - no matching opener on stack`,unpairedOpener:`Unpaired call to '{{opener}}' - missing '{{closer}}' on {{paths}}`,wrongOrder:`Closer '{{closer}}' called out of order - expected to close '{{expected}}' but '{{actual}}' is still open`},schema:[{additionalProperties:!1,properties:{allowConditionalClosers:{default:!1,description:`Allow closer calls that appear only on some conditional paths.`,type:`boolean`},allowMultipleOpeners:{default:!0,description:`Allow repeated opener calls before matching closer calls.`,type:`boolean`},maxNestingDepth:{default:0,description:`Maximum opener nesting depth before reporting; 0 disables the limit.`,minimum:0,type:`number`},pairs:{default:[{closer:`debug.profileend`,opener:`debug.profilebegin`,platform:`roblox`,requireSync:!0,yieldingFunctions:[...IS]}],description:`Opener and closer call pairs that must stay balanced.`,items:{additionalProperties:!1,properties:{alternatives:{items:{minLength:1,type:`string`},type:`array`},closer:{oneOf:[{minLength:1,type:`string`},{items:{minLength:1,type:`string`},minItems:1,type:`array`}]},opener:{minLength:1,type:`string`},openerAlternatives:{items:{minLength:1,type:`string`},type:`array`},platform:{enum:[`roblox`],type:`string`},requireSync:{default:!1,type:`boolean`},yieldingFunctions:{items:{minLength:1,type:`string`},type:`array`}},required:[`opener`,`closer`],type:`object`},minItems:1,type:`array`}},type:`object`}],type:`problem`}}),ZS={allowRootKeys:!1,ignoreCallExpressions:[`ReactTree.mount`,`CreateReactStory`,`createReactStory`,`createPlatformStory`],iterationMethods:[`map`,`filter`,`forEach`,`flatMap`,`reduce`,`reduceRight`,`some`,`every`,`find`,`findIndex`],memoizationHooks:[`useCallback`,`useMemo`]},QS=new Set([`ChainExpression`,`ParenthesizedExpression`,`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]),$S=new Set([...QS,`AwaitExpression`,`ConditionalExpression`,`LogicalExpression`,`SequenceExpression`,`SpreadElement`]),eC={iteration:!1,memoization:!1},tC=new Set([`ConditionalExpression`,`LogicalExpression`]),nC=new Set([`BlockStatement`,`CatchClause`,`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`IfStatement`,`LabeledStatement`,`SwitchCase`,`SwitchStatement`,`TryStatement`,`WhileStatement`,`WithStatement`]);function $(e){return e.parent??void 0}function rC(e){let t=e;for(;t!==void 0&&QS.has(t.type);)t=$(t);return t}function iC(e){let t=$(e);for(;t!==void 0;){if(N(t))return t;t=$(t)}}function aC(e,t,n){let{callee:r}=e;if(r.type===`Identifier`)return{iteration:t.has(r.name),memoization:n.has(r.name)};if(r.type===`MemberExpression`&&r.property.type===`Identifier`){let{name:i}=r.property,a={iteration:t.has(i),memoization:n.has(i)};return i===`from`&&r.object.type===`Identifier`&&r.object.name===`Array`&&e.arguments.length>=2||i===`call`&&r.object.type===`MemberExpression`&&r.object.property.type===`Identifier`&&t.has(r.object.property.name)?{...a,iteration:!0}:a}return eC}function oC(e){let t=e,n=$(e);for(;n!==void 0;){if(n.type===`CallExpression`){for(let e of n.arguments)if(e===t||e.type===`SpreadElement`&&e.argument===t)return n;return}if($S.has(n.type)){t=n,n=$(n);continue}break}}function sC(e,t){if(t.type===`FunctionDeclaration`){let n=e.getDeclaredVariables(t);return n.length>0?n[0]:void 0}let n=$(t);if(n!==void 0&&(n.type===`VariableDeclarator`||n.type===`AssignmentExpression`)){let t=e.getDeclaredVariables(n);if(t.length>0)return t[0]}}function cC(e,t){e.iteration||=t.iteration,e.memoization||=t.memoization}function lC(e,t,n){if(e.isWrite())return eC;let r=oC(e.identifier);return r===void 0||Ac(r)?eC:aC(r,t,n)}function uC(e,t,n,r){let i=oC(t);if(i!==void 0)return Ac(i)?eC:aC(i,n,r);let a=sC(e,t);if(a===void 0)return eC;let o={iteration:!1,memoization:!1};for(let e of a.references)if(cC(o,lC(e,n,r)),o.iteration&&o.memoization)return o;return o}function dC(e){let t=fC(e);return t===void 0?!1:t.type===`ReturnStatement`?mC(t):t.type===`ArrowFunctionExpression`}function fC(e){let t=pC(rC($(e)));for(;t!==void 0&&tC.has(t.type);)t=rC($(t));return pC(t)}function pC(e){return e?.type===`JSXExpressionContainer`?rC($(e)):e}function mC(e){let t=rC($(e));for(;t!==void 0&&nC.has(t.type);)t=rC($(t));return t!==void 0&&N(t)}function hC(e){if(!dC(e))return!1;let t=iC(e);if(t===void 0)return!1;let n=rC($(t));return n?.type!==`CallExpression`||Ac(n)}function gC(e,t){let n=$(e);if(n===void 0||n.type===`JSXExpressionContainer`&&(n=$(n),n===void 0))return!1;for(let e=0;e<20&&n!==void 0;e+=1){if(n.type===`CallExpression`){let{callee:e}=n;return e.type===`Identifier`?t.has(e.name):e.type===`MemberExpression`&&e.object.type===`Identifier`&&e.property.type===`Identifier`&&t.has(`${e.object.name}.${e.property.name}`)}n=$(n)}return!1}function _C(e){return e.toLowerCase().endsWith(`children`)}function vC(e){let t=$(e);if(t===void 0)return!1;for(;t!==void 0&&(t.type===`ConditionalExpression`||t.type===`LogicalExpression`);)t=$(t);if(t===void 0||t.type===`JSXExpressionContainer`&&(t=$(t),t===void 0)||t.type!==`JSXAttribute`)return!1;let n=jc(t);return n===void 0||!_C(n)}function yC(e){let t=e,n=$(e);for(;n!==void 0&&QS.has(n.type);)t=n,n=$(n);return n===void 0?!1:n.type===`VariableDeclarator`?n.init===t:n.type===`AssignmentExpression`&&n.right===t}function bC(e,t){let n=$(e);if(n===void 0)return!1;let r=!1;for(;n!==void 0&&(n.type===t||QS.has(n.type));)n.type===t&&(r=!0),n=$(n);if(!r||n?.type!==`JSXExpressionContainer`)return!1;let i=$(n);return i===void 0?!1:i.type===`JSXElement`||i.type===`JSXFragment`}function xC(e){return bC(e,`ConditionalExpression`)}function SC(e){return bC(e,`LogicalExpression`)}const CC=_(`require-react-component-keys`,`react`,{create(e){let[t]=e.options,n={allowRootKeys:ZS.allowRootKeys,ignoreCallExpressions:ZS.ignoreCallExpressions,iterationMethods:ZS.iterationMethods,memoizationHooks:ZS.memoizationHooks,...t},r=new Set(n.ignoreCallExpressions),i=new Set(n.iterationMethods),a=new Set(n.memoizationHooks);function o(t){let o=iC(t),s=o===void 0?eC:uC(e.sourceCode,o,i,a),c=s.iteration||s.memoization;if(hC(t)&&!c){!n.allowRootKeys&&t.type===`JSXElement`&&Mc(t,`key`)&&e.report({messageId:`rootComponentWithKey`,node:t});return}if(!gC(t,r)&&!(yC(t)||vC(t)||xC(t))&&!(t.type===`JSXFragment`&&SC(t))&&!(t.type===`JSXFragment`&&s.memoization&&!s.iteration&&dC(t))){if(t.type===`JSXFragment`){e.report({messageId:`missingKey`,node:t});return}Mc(t,`key`)||e.report({messageId:`missingKey`,node:t})}}return{JSXElement:o,JSXFragment:o}},meta:{docs:{description:`Require keys on nested React JSX children, fragments, and configured iteration or memoization contexts.`},messages:{missingKey:"JSX element in list/callback lacks key prop. React Luau warns about missing keys in _G.__DEV__ mode. Add a unique `key` prop using a stable identifier (not array index).",rootComponentWithKey:"Root return has unnecessary key prop. The key gets overwritten by the parent anyway. Remove the `key` prop."},schema:[{additionalProperties:!1,properties:{allowRootKeys:{default:!1,description:`Allow key props on root component returns`,type:`boolean`},ignoreCallExpressions:{default:ZS.ignoreCallExpressions,description:`Function calls where JSX arguments don't need keys`,items:{type:`string`},type:`array`},iterationMethods:{default:ZS.iterationMethods,description:`Array method names that indicate iteration contexts where keys are required`,items:{type:`string`},type:`array`},memoizationHooks:{default:[`useCallback`,`useMemo`],description:`Hook names that indicate memoization contexts where keys are required`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}});function wC(e){if(e.id.type===`Identifier`)return e.id.name}function TC(e,t,n){return fe(e,t,n,`memo`)}function EC(e,t,n){return e.callee.type===`Identifier`?t.has(e.callee.name):e.callee.type!==`MemberExpression`||e.callee.property.type!==`Identifier`||e.callee.property.name!==`createContext`||e.callee.object.type!==`Identifier`?!1:n.has(e.callee.object.name)}function DC(e){let t=e;for(;t!==null;){if(t.type===`ExportNamedDeclaration`||t.type===`ExportDefaultDeclaration`)return!0;t=t.parent}return!1}function OC(e){return e.parent.type===`VariableDeclaration`?e.parent.parent.type===`ExportNamedDeclaration`||e.parent.parent.type===`ExportDefaultDeclaration`:!1}function kC(e,t,n){for(let r of e.getDeclaredVariables(t))if(r.name===n){for(let{identifier:e}of r.references)if(DC(e))return!0;return!1}return!1}function AC(e,t,n,r){return r.has(t)||OC(n)?!0:kC(e,n,t)}function jC(e,t,n){e.report({data:{variableName:n},messageId:t.kind===`context`?`missingContextDisplayName`:`missingMemoDisplayName`,node:t.node})}const MC=_(`require-react-display-names`,`react`,{create(e){let t=gr(e.options[0]),n=new Set,r=new Set,i=new Set,a=new Map,o=new Set;return{'AssignmentExpression[left.type="MemberExpression"]'(e){let{left:t}=e;if(t.type!==`MemberExpression`||t.property.type!==`Identifier`||t.property.name!==`displayName`||t.object.type!==`Identifier`)return;let n=a.get(t.object.name);n!==void 0&&(n.hasDisplayName=!0)},ExportDefaultDeclaration(t){if(t.declaration.type===`CallExpression`){if(TC(t.declaration,n,i)){e.report({messageId:`directMemoExport`,node:t});return}EC(t.declaration,r,i)&&e.report({messageId:`directContextExport`,node:t});return}t.declaration.type===`Identifier`&&o.add(t.declaration.name)},ExportNamedDeclaration(e){for(let t of e.specifiers)t.exported.type===`Identifier`&&t.exported.name==="default"&&t.local.type===`Identifier`&&o.add(t.local.name)},ImportDeclaration(e){if(_r(e,t))for(let t of e.specifiers){let{name:e}=t.local;if(t.type===`ImportSpecifier`){let i=me(t);i===`memo`&&n.add(e),i===`createContext`&&r.add(e);continue}i.add(e)}},"Program:exit"(){for(let[t,n]of a)n.hasDisplayName||AC(e.sourceCode,t,n.node,o)&&jC(e,n,t)},VariableDeclarator(e){if(e.init?.type!==`CallExpression`)return;let t=wC(e);if(t!==void 0){if(TC(e.init,n,i)){a.set(t,{hasDisplayName:!1,kind:`memo`,node:e});return}EC(e.init,r,i)&&a.set(t,{hasDisplayName:!1,kind:`context`,node:e})}}}},meta:{docs:{description:`Require displayName on exported memo components and contexts.`},messages:{directContextExport:`Directly exporting createContext() result prevents setting displayName.`,directMemoExport:`Directly exporting memo() result prevents setting displayName.`,missingContextDisplayName:`Context '{{variableName}}' must have a displayName assigned.`,missingMemoDisplayName:`Memo component '{{variableName}}' must have a displayName assigned.`},schema:[{additionalProperties:!1,properties:{environment:dr},type:`object`}],type:`problem`}});function NC(e){return x(e)&&e.metric===`statements`?`statements`:`lines`}function PC(e,t){let n=e.consequent.length;if(n===0)return!1;let[r]=e.consequent;if(r===void 0||n===1&&r.type===`BlockStatement`)return!1;if(t===`statements`)return n>1;let i=e.consequent[n-1];return i!==void 0&&r.loc.start.line!==i.loc.end.line}const FC=_(`require-switch-case-braces`,`general`,{create(e){let t=NC(e.options[0]);return{SwitchCase(n){if(!PC(n,t))return;let[r]=n.consequent,i=n.consequent.at(-1);r!==void 0&&i!==void 0&&e.report({fix(e){return[e.insertTextBefore(r,`{
11
11
  `),e.insertTextAfter(i,`
12
- }`)]},messageId:`wrapCaseBody`,node:r})}}},meta:{docs:{description:`Require braces around switch case bodies selected by line span or statement count.`},fixable:`code`,messages:{wrapCaseBody:`Wrap this switch case body in braces.`},schema:[{additionalProperties:!1,properties:{metric:{default:`lines`,description:`Whether to report cases by line span or by statement count.`,enum:[`lines`,`statements`],type:`string`}},type:`object`}],type:`problem`}});function MC(e){let t=e.parent;for(;t!==null;){switch(t.type){case`FunctionDeclaration`:return t.id?.name;case`FunctionExpression`:return t.id?t.id.name:NC(t);case`ArrowFunctionExpression`:return NC(t);default:break}t=t.parent}}function NC({parent:e}){if(e?.type===`VariableDeclarator`&&e.id.type===`Identifier`)return e.id.name;if(e?.type===`PropertyDefinition`||e?.type===`MethodDefinition`){if(e.key.type===`PrivateIdentifier`)return`#${e.key.name}`;if(e.key.type===`Identifier`)return e.key.name}}function PC(e){let t=e.parent;for(;t!==null;){switch(t.type){case`FunctionDeclaration`:return!1;case`FunctionExpression`:return(t.parent.type===`MethodDefinition`||t.parent.type===`PropertyDefinition`)&&t.parent.parent.type===`ClassBody`;case`ArrowFunctionExpression`:return t.parent.type===`PropertyDefinition`&&t.parent.parent.type===`ClassBody`;default:break}t=t.parent}return!1}function FC(e,t,n){try{let r=e.getScope(t),i=new Set(r.variables.map(e=>e.name)),a=t.parent;for(;a!==null;)a.type===`CatchClause`&&a.param?.type===`Identifier`&&i.add(a.param.name),a=a.parent;if(!i.has(n))return n;for(let e=2;e<100;e+=1){let t=`${n}${e}`;if(!i.has(t))return t}}catch{}return n}function IC(e,t){try{let n=e.getScope(t);for(;n!==null;){let e=n.set.get(t.name);if(e!==void 0){let t=e.defs.find(e=>e.type===`ImportBinding`);return t?.parent?.type===`ImportDeclaration`?t.parent.source.value:void 0}n=n.upper}}catch{}}function LC(e,t){try{let n=e.getScope(t);for(;n!==null;){if(n.set.has(t.name))return!0;n=n.upper}}catch{}return!1}function RC(e,t){return y(e)?t===e:(Array.isArray(e.name)?e.name:[e.name]).includes(t)}function zC(e,t,n,r){if(!RC(r,n.name))return!1;if(y(r))return!0;switch(r.from){case void 0:return!0;case`package`:return IC(e,n)===r.package;case`file`:return LC(e,n)&&IC(e,n)===void 0?r.path===void 0?!0:t===`<input>`||t===`<text>`?!1:t.endsWith(r.path):!1;case`library`:return e.isGlobalReference(n);default:return!1}}function BC(e,t,n,r){return r.some(r=>zC(e,t,n,r))}const VC=_(`require-throw-error-capture`,`general`,{create(e){let{sourceCode:t}=e,n=e.options[0]?.allow??[],r=e.physicalFilename??`<input>`;return{ThrowStatement(i){let{argument:a}=i;if(a.type!==`NewExpression`)return;let{callee:o}=a;if(o.type!==`Identifier`||!o.name.endsWith(`Error`)||BC(t,r,o,n))return;let s=MC(i);if(s===void 0)return;let c=PC(i)?`this.${s}`:s;e.report({fix(e){let n=FC(t,i,`error`),r=[`const ${n} = ${t.getText(a)};`,`Error.captureStackTrace(${n}, ${c});`,`throw ${n};`].join(`
13
- `);return i.parent.type===`BlockStatement`?e.replaceText(i,r):e.replaceText(i,`{\n${r}\n}`)},messageId:`missingCaptureStackTrace`,node:i})}}},meta:{docs:{description:`Require 'Error.captureStackTrace' before directly throwing new Error instances in named functions.`,recommended:!1},fixable:`code`,messages:{missingCaptureStackTrace:`Call 'Error.captureStackTrace' on this error before throwing it so the stack trace points to the throw site.`},schema:[{additionalProperties:!1,properties:{allow:{description:`Error classes that do not need Error.captureStackTrace`,items:{anyOf:[{type:`string`},{additionalProperties:!1,properties:{from:{description:`Where the error class is declared`,enum:[`file`,`library`,`package`],type:`string`},name:{anyOf:[{type:`string`},{items:{type:`string`},type:`array`}],description:`Name(s) of the error class`},package:{description:`Package the error class is imported from (required when from is 'package')`,type:`string`},path:{description:`Optional file path filter for file specifiers (matched against the end of the file path)`,type:`string`}},required:[`name`],type:`object`}]},type:`array`}},type:`object`}],type:`suggestion`}});function HC(e){return e.includes(`u`)||e.includes(`v`)}function UC(e,t){return e.type===`Identifier`&&e.name===t}function WC(e){if(!(e.type!==`Literal`||!y(e.value)))return e.value}function GC(e){return e.type!==`SpreadElement`}const KC=_(`require-unicode-regex`,`general`,{createOnce(e){return{CallExpression(t){if(!UC(t.callee,`regex`))return;if(t.arguments.length<2){e.report({messageId:`requireUnicodeFlag`,node:t});return}let[,n]=t.arguments;if(n===void 0||!GC(n))return;let r=WC(n);r!==void 0&&(HC(r)||e.report({messageId:`requireUnicodeFlag`,node:t}))}}},meta:{docs:{description:`Require the 'u' or 'v' unicode flag on calls named regex().`},messages:{requireUnicodeFlag:`Missing the 'u' or 'v' unicode flag on this regex() call. Use the unicode flag to avoid silently creating invalid regex patterns.`},schema:[],type:`problem`}});function qC(e,t){t.type===`ObjectExpression`&&t.properties.length===0&&e.report({messageId:`emptyObjectDefault`,node:t}),t.type===`ArrayExpression`&&t.elements.length===0&&e.report({messageId:`emptyArrayDefault`,node:t})}function JC(e,t){for(let n of t){if(n.type===`AssignmentPattern`&&n.left.type===`ObjectPattern`){YC(e,n.left),D(n.right)&&qC(e,n.right);continue}n.type===`ObjectPattern`&&YC(e,n)}}function YC(e,t){for(let n of t.properties){let t=XC(n);t!==void 0&&qC(e,t)}}function XC(e){if(e.type!==`Property`||e.value.type!==`AssignmentPattern`)return;let t=e.value.right;return D(t)?t:void 0}function ZC(e){if(!(e.type!==`FunctionDeclaration`||!wc(e)))return[...e.params]}function QC(e){if(!(e.type!==`VariableDeclarator`||!jc(e)||e.init===null)&&(e.init.type===`ArrowFunctionExpression`||e.init.type===`FunctionExpression`))return[...e.init.params]}const $C=_(`rerender-memo-with-default-value`,`react`,{create(e){return{FunctionDeclaration(t){let n=ZC(t);n!==void 0&&JC(e,n)},VariableDeclarator(t){let n=QC(t);n!==void 0&&JC(e,n)}}},meta:{docs:{description:`Prevent inline empty object and array defaults in component prop destructuring.`,recommended:!0},messages:{emptyArrayDefault:`Default prop value [] creates a new array reference every render — extract to a module-level constant`,emptyObjectDefault:`Default prop value {} creates a new object reference every render — extract to a module-level constant`},type:`problem`}}),ew=/(?<first>[\p{Ll}\d])(?<second>\p{Lu})/gu,tw=/(?<first>\p{Lu})(?<second>\p{Lu}\p{Ll})/gu,nw=`$<first>\0$<second>`;function rw(e){let t=e.trim();if(t.length===0)return``;let n=t.replace(ew,nw).replace(tw,nw),r=0,{length:i}=n;for(;n.charCodeAt(r)===0;)r+=1;if(r===i)return``;for(;n.charCodeAt(i-1)===0;)--i;let a=``,o=r;for(let e=r;e<=i;e+=1)if(e===i||n.charCodeAt(e)===0){if(e>o){let t=n.slice(o,e),r=t.charCodeAt(0);a.length>0&&r>=48&&r<=57&&(a+=`_`),a+=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}o=e+1}return a}function iw(e){return e.split(`/`).filter(e=>!e.startsWith(`.`))}function aw(e){return e.split(`/`).filter(e=>e===`..`).length}function ow(e){return e.some(e=>e===rw(e)&&!e.includes(`.`))}function sw(e){return t.basename(e,t.extname(e))===`index`}function cw(e){if(!e.includes(`fixtures`))return!1;let t=e.indexOf(`fixtures`);return!ow(e.slice(0,t))}const lw=_(`strict-component-boundaries`,`react`,{create(e){let n=e.options?.[0],{allow:r=[],maxDepth:i=1}=x(n)?n:{allow:[],maxDepth:1},a=r.map(e=>new RegExp(e,`u`));return{ImportDeclaration(n){let r=n.source.value;if(!(y(r)&&r.startsWith(`.`))||a.some(e=>e.test(r)))return;let{filename:o}=e;if(o===``)return;let s=Tu(r,o);if(!s.found)return;let c=t.relative(o,s.path).replaceAll(`\\`,`/`),l=iw(c);if((aw(c)>1||l.includes(`components`))&&ow(l)&&l.length>i&&!sw(c)&&!cw(l)){e.report({messageId:`noReachingIntoComponent`,node:n});return}l.includes(`components`)&&l.length>i+1&&!sw(c)&&!cw(l)&&e.report({messageId:`noReachingIntoComponent`,node:n})}}},meta:{docs:{description:`Prevent imports that reach into another component's nested modules.`},messages:{noReachingIntoComponent:`Do not reach into an individual component's folder for nested modules. Import from the closest shared components folder instead.`},schema:[{additionalProperties:!1,properties:{allow:{default:[],description:`Regular expression patterns for imports allowed to cross component boundaries.`,items:{type:`string`},type:`array`},maxDepth:{default:1,description:`Maximum path depth allowed inside another component before reporting.`,type:`integer`}},type:`object`}],type:`problem`}}),uw=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`ObjectExpression`]),dw=new Map([[`useCallback`,{closureIndex:0,dependenciesIndex:1}],[`useEffect`,{closureIndex:0,dependenciesIndex:1}],[`useImperativeHandle`,{closureIndex:1,dependenciesIndex:2}],[`useInsertionEffect`,{closureIndex:0,dependenciesIndex:1}],[`useLayoutEffect`,{closureIndex:0,dependenciesIndex:1}],[`useMemo`,{closureIndex:0,dependenciesIndex:1}],[`useSpring`,{closureIndex:0,dependenciesIndex:1}],[`useSprings`,{closureIndex:1,dependenciesIndex:2}],[`useTrail`,{closureIndex:1,dependenciesIndex:2}]]),fw=new Map([[`useBinding`,!0],[`useReducer`,new Set([1])],[`useRef`,!0],[`useState`,new Set([1])],[`useTransition`,new Set([1])]]),pw=new Set([`ClassDeclaration`,`FunctionDeclaration`,`FunctionName`,`ImportBinding`]),mw=new Set(`Array.BigInt.Boolean.clearInterval.clearTimeout.console.Date.decodeURI.decodeURIComponent.Document.Element.encodeURI.encodeURIComponent.Error.Event.Exclude.Extract.Function.Infinity.InstanceType.isFinite.isNaN.JSON.Map.Math.NaN.Node.NonNullable.null.Number.Object.Omit.Parameters.parseFloat.parseInt.Partial.Pick.Promise.Readonly.ReadonlyArray.ReadonlyMap.ReadonlySet.Record.RegExp.Required.ReturnType.Set.setInterval.setTimeout.String.Symbol.undefined.WeakMap.WeakSet.Window`.split(`.`));function hw(e){let{callee:t}=e;if(t.type===`Identifier`)return t.name;if(t.type===`MemberExpression`&&t.property.type===`Identifier`)return t.property.name}function gw(e){let t=0,n=e;for(;;){if(n.type===`ChainExpression`||n.type===`ParenthesizedExpression`||n.type===`TSAsExpression`||n.type===`TSNonNullExpression`||n.type===`TSSatisfiesExpression`||n.type===`TSTypeAssertion`){n=n.expression;continue}if(n.type!==`MemberExpression`)break;t+=1,n=n.object}return t}function _w(e){let t=e;for(;;){if(t.type===`ChainExpression`||t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSNonNullExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`){t=t.expression;continue}if(t.type!==`MemberExpression`)break;t=t.object}return t.type===`Identifier`?t:void 0}function vw(e){return e.type===`Identifier`?[e.name]:e.type===`MemberExpression`?vw(e.object):e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||e.type===`TSNonNullExpression`||e.type===`TSAsExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSTypeAssertion`?vw(e.expression):e.type===`BinaryExpression`||e.type===`LogicalExpression`?[...vw(e.left),...vw(e.right)]:e.type===`UnaryExpression`?vw(e.argument):e.type===`ConditionalExpression`?[...vw(e.test),...vw(e.consequent),...vw(e.alternate)]:[]}function yw(e){return Nw.has(e.type)}function bw(e,t){if(e.type===`Identifier`)return e.name;if(e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||yw(e))return bw(e.expression,t);if(e.type===`MemberExpression`){let n=bw(e.object,t);if(e.computed)return`${n}[${t.getText(e.property)}]`;let r=e.property.type===`Identifier`?e.property.name:``;return`${n}${e.optional?`?.`:`.`}${r}`}return t.getText(e)}function xw(e,t){return e.type===`VariableDeclarator`&&e.id.type===t}function Sw(e,t,n){if(e===void 0||!(e instanceof Set&&xw(t,`ArrayPattern`)))return!1;let{elements:r}=t.id,i=0;for(let t of r){if((t?.type===`Identifier`?t.name:void 0)===n)return e.has(i);i+=1}return!1}function Cw(e,t,n){if(e===void 0||!(e instanceof Set&&xw(t,`ObjectPattern`)))return!1;for(let r of t.id.properties){if(r.type!==`Property`||Wi(r)?.name!==n)continue;let t=Ui(r);return t!==void 0&&e.has(t)}return!1}function ww(e,t,n,r){if(e?.type!==`CallExpression`)return!1;let i=hw(e);if(i===void 0)return!1;let a=r.get(i);return a===!0||Sw(a,t,n)||Cw(a,t,n)}function Tw(e){if(e?.type!==`CallExpression`)return!1;let{callee:t}=e;return t.type===`MemberExpression`&&t.object.type===`Identifier`&&t.object.name===`React`&&t.property.type===`Identifier`&&t.property.name===`joinBindings`}function Ew(e){if(e?.type!==`CallExpression`)return!1;let{callee:t}=e;return t.type===`MemberExpression`&&t.property.type===`Identifier`&&t.property.name===`map`}function Dw(e){return e?.type===`Literal`||e?.type===`TemplateLiteral`||e?.type===`UnaryExpression`&&e.argument.type===`Literal`}function Ow(e,t){let n=e.defs.find(e=>e.node===t);if(n?.node.type!==`VariableDeclarator`)return!1;let r=n.node.parent.parent;return r?.type===`Program`||r?.type===`ExportNamedDeclaration`}function kw(e,t,n,r){let{node:i,type:a}=t;if(pw.has(a))return!0;if(a!==`Variable`||i.type!==`VariableDeclarator`)return!1;let{parent:o}=i;if(o.type!==`VariableDeclaration`||o.kind!==`const`)return!1;let{init:s}=i;return ww(s,i,n,r)||Tw(s)||Ew(s)||Dw(s)||Ow(e,i)}function Aw(e,t,n){if(!e)return!1;let r=e.defs;if(r.length===0)return!1;for(let i of r)if(kw(e,i,t,n))return!0;return!1}function jw(e,t){let n=t,r=e;for(;n;){if(n.type===`CallExpression`&&n.callee===r){if(r.type===`MemberExpression`)return r.object;break}let e=n.type===`MemberExpression`&&n.object===r,t=n.type===`ChainExpression`,i=n.type===`TSNonNullExpression`;if(!(e||t||i))break;r=n,n=r.parent??void 0}return r}const Mw=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`VariableDeclarator`]),Nw=new Set([`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]);function Pw(e){if(e.type!==`Identifier`)return!1;let{parent:t}=e;return t.type===`Property`&&t.computed&&t.key===e}function Fw(e){if(e.type!==`Identifier`)return!1;let t=e.parent??void 0;for(;t;){if(Nw.has(t.type)){t=t.parent??void 0;continue}if(t.type.startsWith(`TS`))return!0;if(Mw.has(t.type))return!1;t=t.parent??void 0}return!1}function Iw(e,t){let n=t.parent??void 0;for(;n;){if(N(n)){let t=n;return e.defs.some(e=>e.type===`Parameter`&&e.node===t)?!0:e.defs.some(e=>{let n=e.node.parent??void 0;for(;n&&n!==t;)n=n.parent??void 0;return n===t})}n=n.parent??void 0}return!1}function Lw(e,t){if(e.type!==`Identifier`)return;let n,r=t;for(;r;){let t=r.set.get(e.name);if(t){n=t;break}r=r.upper}if(!(!n||n.defs.length===0))for(let e of n.defs){let t=e.node;if(t.type===`FunctionDeclaration`)return t;if(t.type===`VariableDeclarator`&&t.init&&(t.init.type===`ArrowFunctionExpression`||t.init.type===`FunctionExpression`))return t.init}}function Rw(e,t){let n=t;for(;n;){let t=n.set.get(e);if(t)return t;n=n.upper}}function zw(e,t){let n=e.node;for(;n;){if(n===t)return!0;n=n.parent??void 0}return!1}function Bw(e,t){return e!==void 0&&!e.defs.some(e=>zw(e,t))}function Vw(e,t,n,r){let i=jw(e,e.parent??void 0);return{depth:gw(i),forceDependency:Pw(e),name:t,node:i,usagePath:bw(i,r),variable:n}}function Hw(e){return e.type===`ParenthesizedExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSAsExpression`||e.type===`TSTypeAssertion`||e.type===`TSNonNullExpression`}function Uw(e,t,n){let r=t.visitorKeys[e.type]??[];for(let t of r){if(!x(e))break;let r=e[t];if(Array.isArray(r))for(let e of r)D(e)&&n(e);else D(r)&&n(r)}}function Ww(e,t){let n=[],r=new Set;function i(i){if(i.type!==`Identifier`)return;let{name:a}=i;if(r.has(a)||mw.has(a)||Fw(i))return;let o=Rw(a,t.getScope(i));Bw(o,e)&&o!==void 0&&Iw(o,e)&&(r.add(a),n.push(Vw(i,a,o,t)))}function a(e){if(e.type===`Identifier`&&i(e),Hw(e)){a(e.expression);return}if(e.type===`MemberExpression`){a(e.object),e.computed&&a(e.property);return}if(e.type===`ChainExpression`){a(e.expression);return}if(e.type===`Property`){e.computed&&a(e.key),a(e.value);return}Uw(e,t,a)}return a(e),n}function Gw(e,t){let n=[];for(let r of e.elements){if(!r)continue;let e=r.type===`SpreadElement`?r.argument:r,i=bw(e,t),a=gw(e);n.push({depth:a,name:i,node:e})}return n}function Kw({name:e}){return e}function qw(e){return e?uw.has(e.type):!1}function Jw(e,{parent:t}){return t.type===`VariableDeclarator`?e.variable?.defs.some(e=>e.node===t)??!1:!1}function Yw(e){return e.length>0&&b(e[0])}function Xw(e){return e.length>0&&y(e[0])}function Zw(e){return typeof e==`boolean`?e:b(e)?new Set([e]):Array.isArray(e)&&(Yw(e)||Xw(e))?new Set(e):!1}function Qw(e,t,n,r){let i=[],a=0;for(let{name:e}of t)e!==n.name&&(i[a++]=e);let o=`[${i.join(`, `)}]`;e.report({data:{name:n.name},fix(e){return e.replaceText(r,o)},messageId:`unnecessaryDependency`,node:n.node,suggest:[{data:{name:n.name},fix(e){return e.replaceText(r,o)},messageId:`removeDependencySuggestion`}]})}function $w(e){return e!==void 0&&N(e)}function eT(e,t){return e.filter(e=>e.forceDependency||!Aw(e.variable,e.name,t))}function tT(e,t,n,r){if(r.length===0)return;let i=[...new Set(r.map(Kw))].join(`, `),a=`[${[...new Set(r.map(({usagePath:e})=>e))].toSorted().join(`, `)}]`;e.report({data:{deps:i},fix(e){return e.insertTextAfter(n,`, ${a}`)},messageId:`missingDependenciesArray`,node:t,suggest:[{data:{dependencies:a},fix(e){return e.insertTextAfter(n,`, ${a}`)},messageId:`addDependenciesArraySuggestion`}]})}function nT(e){let t=_w(e);return t?.type===`Identifier`?t.name:void 0}function rT(e,t){let n=nT(t.node);if(n!==void 0)return e.find(e=>nT(e.node)===n)}function iT(e,t){return!e.forceDependency&&Aw(e.variable,e.name,t)}function aT(e,t,n,r,i,a,o){for(let s of t){let c=rT(n,s);if(c===void 0){a&&Qw(e,t,s,r);continue}if(o&&iT(c,i)){Qw(e,t,s,r);continue}a&&s.depth>c.depth&&Qw(e,t,s,r)}}function oT(e,t,n){let r=_w(e.node);if(r?.type===`Identifier`&&e.depth<=t.depth)return r.name===nT(t.node);if(!n)return!1;let i=nT(t.node);return i!==void 0&&vw(e.node).includes(i)}function sT(e,t,n,r){let i=[];for(let a of eT(e,n))nT(a.node)!==void 0&&(t.some(e=>oT(e,a,r))||i.push(a));return i}function cT(e,t,n,r){if(r.length===0)return;let i=n.map(({name:e})=>e),a=r.map(({usagePath:e})=>e),o=`[${[...i,...a].toSorted().join(`, `)}]`,s=n.at(-1)?.node??t,c=r.at(0);if(r.length===1&&c!==void 0){e.report({data:{name:c.usagePath},fix(e){return e.replaceText(t,o)},messageId:`missingDependency`,node:s,suggest:[{data:{name:c.usagePath},fix(e){return e.replaceText(t,o)},messageId:`addDependencySuggestion`}]});return}e.report({data:{names:a.join(`, `)},fix(e){return e.replaceText(t,o)},messageId:`missingDependencies`,node:s,suggest:[{fix(e){return e.replaceText(t,o)},messageId:`addMissingDependenciesSuggestion`}]})}function lT(e){let t=e.variable?.defs[0];return t?.node.type===`VariableDeclarator`?t.node.init??void 0:void 0}function uT(e,t,n,r){for(let i of eT(t,r)){let t=nT(i.node);if(t!==void 0){for(let r of n)if(nT(r.node)===t&&r.depth===i.depth){r.depth===0&&qw(lT(i))&&e.report({data:{name:i.usagePath},messageId:`unstableDependency`,node:r.node});break}}}}const dT=_(`use-exhaustive-dependencies`,`react`,{create(e){let[t]=e.options,n={hooks:t?.hooks??[],reportMissingDependenciesArray:t?.reportMissingDependenciesArray??!0,reportUnnecessaryDependencies:t?.reportUnnecessaryDependencies??!0,reportUnnecessaryStableDependencies:t?.reportUnnecessaryStableDependencies??!1,resolveExpressionDependencies:t?.resolveExpressionDependencies??!0},r=new Map(dw);for(let e of n.hooks)e.closureIndex!==void 0&&e.dependenciesIndex!==void 0&&r.set(e.name,{closureIndex:e.closureIndex,dependenciesIndex:e.dependenciesIndex});let i=new Map(fw);for(let e of n.hooks)e.stableResult!==void 0&&i.set(e.name,Zw(e.stableResult));let a=new WeakMap;function o(t){let n=a.get(t);if(n)return n;let r=e.sourceCode.getScope(t);return a.set(t,r),r}function s(e,t){if(e.type===`ArrowFunctionExpression`)return e;if(!(N(e)||e.type===`Identifier`))return;let n=Lw(e,o(t));return $w(n)?n:void 0}return{CallExpression(t){let a=hw(t);if(a===void 0||a===``)return;let o=r.get(a);if(!o)return;let{closureIndex:c,dependenciesIndex:l}=o,u=t.arguments,d=u[c];if(d===void 0)return;let f=s(d,t);if(!f)return;let p=u[l];if(!p&&n.reportMissingDependenciesArray){tT(e,t,d,eT(Ww(f,e.sourceCode).filter(e=>!Jw(e,t)),i));return}if(!p||p.type!==`ArrayExpression`)return;let m=p,h=Ww(f,e.sourceCode).filter(e=>!Jw(e,t)),g=Gw(m,e.sourceCode);(n.reportUnnecessaryDependencies||n.reportUnnecessaryStableDependencies)&&aT(e,g,h,m,i,n.reportUnnecessaryDependencies,n.reportUnnecessaryStableDependencies),cT(e,m,g,sT(h,g,i,n.resolveExpressionDependencies)),uT(e,h,g,i)}}},meta:{docs:{description:`Enforce exhaustive and correct dependency specification in React hooks to prevent stale closures and unnecessary re-renders`},fixable:`code`,hasSuggestions:!0,messages:{addDependenciesArraySuggestion:`Add dependencies array: {{dependencies}}`,addDependencySuggestion:`Add '{{name}}' to dependencies array`,addMissingDependenciesSuggestion:`Add missing dependencies to array`,missingDependencies:`This hook does not specify all its dependencies. Missing: {{names}}`,missingDependenciesArray:`This hook does not specify its dependencies array. Missing: {{deps}}`,missingDependency:`This hook does not specify its dependency on {{name}}.`,removeDependencySuggestion:`Remove '{{name}}' from dependencies array`,unnecessaryDependency:`This dependency {{name}} can be removed from the list.`,unstableDependency:`{{name}} changes on every re-render. Wrap the definition in useCallback() or useMemo() to stabilize it.`},schema:[{additionalProperties:!1,properties:{hooks:{default:[],description:`Array of custom hook entries to check for exhaustive dependencies`,items:{additionalProperties:!1,properties:{closureIndex:{description:`Index of the closure argument for dependency validation`,type:`number`},dependenciesIndex:{description:`Index of the dependencies array for validation`,type:`number`},name:{description:`The name of the hook`,type:`string`},stableResult:{description:`Specify stable results: true (whole result), number (array index), number[] (multiple indices), or string[] (object properties)`,oneOf:[{type:`boolean`},{type:`number`},{items:{type:`number`},type:`array`},{items:{type:`string`},type:`array`}]}},required:[`name`],type:`object`},type:`array`},reportMissingDependenciesArray:{default:!0,description:`Report when the dependencies array is completely missing`,type:`boolean`},reportUnnecessaryDependencies:{default:!0,description:`Report when unnecessary dependencies are specified`,type:`boolean`},reportUnnecessaryStableDependencies:{default:!1,description:`Report when stable values (useRef, useState setter, etc.) are included as dependencies`,type:`boolean`},resolveExpressionDependencies:{default:!0,description:"Recognize expression dependencies like `value !== undefined` as covering a capture",type:`boolean`}},type:`object`}],type:`problem`}}),fT=/^use[A-Z]/u;function pT(e){return fT.test(e)}function mT(e){return x(e)?e:{}}function hT(e){if((e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)&&e.id!==null)return O(e.id.name)||pT(e.id.name);let{parent:t}=e;return t.type===`VariableDeclarator`&&j(t.id)?O(t.id.name)||pT(t.id.name):t.type===`Property`&&j(t.key)||t.type===`MethodDefinition`&&j(t.key)?O(t.key.name)||pT(t.key.name):!1}function gT(e){let t=L(e);return t!==void 0&&pT(t)}function _T(e){let t=e.parent,n=!1;for(let r=0;r<20&&t!==null&&!N(t);r+=1){if(t.type===`TryStatement`){let r=e;for(;r!==null&&r!==t;){if(r===t.finalizer){n=!0;break}r=r.parent}break}t=t.parent}return n}function vT(e,t){return t!==void 0&&e.callee.type===`Identifier`&&`name`in e.callee&&e.callee.name===t}function yT(e,t){return{afterEarlyReturn:!1,functionDepth:t,inConditional:!1,inLoop:!1,inNestedFunction:!1,inTryBlock:!1,isComponentOrHook:!1,...e}}function bT(e){if(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)return e.id?.name??void 0}function xT(e){return j(e)?e.name:void 0}function ST(e,t,n,r){if(n===void 0||Object.keys(n).length===0)return!1;let i=CT(t,n);if(i!==void 0)return i;let a=t.callee.type===`Identifier`?r.get(e):void 0;return a!==void 0&&n[a]===!1?!0:(a!==void 0&&n[a],!1)}function CT(e,t){if(e.callee.type!==`MemberExpression`)return;let n=xT(e.callee.object);if(n!==void 0&&t[n]===!1)return!0;if(n!==void 0&&t[n]===!0)return!1}const wT=g({meta:{name:`small-rules`},rules:{"array-type-generic":te,"ban-instances":dt,"ban-react-fc":ht,"ban-types":yt,"consistent-compound-words":Ft,"directive-disable-enable-pair":un,"directive-no-aggregating-enable":dn,"directive-no-duplicate-disable":fn,"directive-no-restricted-disable":pn,"directive-no-unlimited-disable":mn,"directive-no-unused-enable":hn,"directive-no-use":gn,"directive-require-description":yn,"enforce-ianitor-check-type":An,"isolated-functions":ur,"memoized-effect-dependencies":Ir,"no-array-constructor-elements":pi,"no-array-constructor-index-assignment":Ci,"no-array-size-assignment":Ni,"no-async-constructor":ia,"no-async-in-system":La,"no-cascading-set-state":za,"no-color3-constructor":Ua,"no-commented-code":jo,"no-constant-condition-with-break":ds,"no-dead-store":Ms,"no-error":Ps,"no-events-in-events-callback":Xs,"no-filter-map-chain":Zs,"no-floating-point-equality":Sc,"no-giant-component":Fc,"no-god-components":Uc,"no-ianitor-in-function-body":Gc,"no-ianitor-success-access":Zc,"no-identity-map":ol,"no-increment-decrement":cl,"no-inline-property-on-memo-component":dl,"no-instance-methods-without-this":yl,"no-loop-iterable-mutation":Nl,"no-native-properties-spread":ru,"no-new-instance-in-use-memo":vu,"no-print":yu,"no-recursive":Su,"no-redundant-aspect-ratio-constraint":Ru,"no-render-helper-functions":rd,"no-restricted-property-assignment":md,"no-spec-file-extension":gd,"no-static-react-create-element":Od,"no-table-create-map":jd,"no-task-wait":Nd,"no-trivial-assertions":af,"no-underscore-react-props":of,"no-unused-imports":gf,"no-unused-use-memo":_f,"no-use-memo-simple-expression":yf,"no-use-of-empty-return-value":Cf,"no-useless-constants":Gf,"no-useless-default":Lp,"no-useless-use-effect":gh,"no-useless-use-memo":Sh,"no-useless-use-spring":Ah,"no-variadic-spread":Fh,"no-warn":Ih,"only-type-imports":Lh,"prefer-class-properties":Uh,"prefer-constant-dispatch":$h,"prefer-context-stack":Ig,"prefer-direct-hook-imports":Bg,"prefer-early-return":Gg,"prefer-expect-assertions":g_,"prefer-hoisted-jsx-elements":N_,"prefer-hoisted-jsx-object-properties":V_,"prefer-idiv":W_,"prefer-local-portal-component":tv,"prefer-math-min-max":fv,"prefer-modding-inspect":_v,"prefer-module-scope-constants":bv,"prefer-padding-components":Iv,"prefer-pascal-case-enums":qv,"prefer-sequence-overloads":$v,"prefer-single-world-query":yy,"prefer-singular-enums":My,"prefer-ternary-conditional-rendering":Yy,"prefer-udim2-shorthand":rb,"prefer-use-reducer":ab,"prevent-abbreviations":$x,"react-hooks-strict-return":gS,"require-async-suffix":vS,"require-module-level-instantiation":wS,"require-named-effect-functions":AS,"require-paired-calls":KS,"require-react-component-keys":yC,"require-react-display-names":OC,"require-switch-case-braces":jC,"require-throw-error-capture":VC,"require-unicode-regex":KC,"rerender-memo-with-default-value":$C,"strict-component-boundaries":lw,"use-exhaustive-dependencies":dT,"use-hook-at-top-level":_(`use-hook-at-top-level`,`react`,{create(e){let t=mT(e.options[0]),n=[],r=[],i,a=new Map;function o(){return n.length>0?n.at(-1):void 0}function s(e){n.push(e)}function c(){n.pop()}function l(e){let t=o();t!==void 0&&(n[n.length-1]={...t,...e})}function u(e,n){let{ignoreHooks:r,importSources:i,onlyHooks:o}=t;return o!==void 0&&o.length>0?!o.includes(e):r?.includes(e)===!0||ST(e,n,i,a)}function d(e){let t=o(),n=t===void 0?0:t.functionDepth+1,a=hT(e);r.push(i);let c=bT(e);c!==void 0&&(i=c),t?.isComponentOrHook===!0?s(yT({functionDepth:n,inNestedFunction:!0},n)):a&&s(yT({functionDepth:n,isComponentOrHook:!0},n))}function f(){o()!==void 0&&c(),i=r.pop()}return{ArrowFunctionExpression:d,"ArrowFunctionExpression:exit":f,CallExpression(t){if(!gT(t))return;let n=L(t);if(n===void 0||u(n,t))return;let r=o();if(!(r===void 0||!(r.isComponentOrHook||r.inNestedFunction)||_T(t))){if(vT(t,i)){e.report({messageId:`recursiveHookCall`,node:t});return}if(r.inNestedFunction){e.report({messageId:`nestedFunction`,node:t});return}if(r.inConditional){e.report({messageId:`conditionalHook`,node:t});return}if(r.inLoop){e.report({messageId:`loopHook`,node:t});return}if(r.inTryBlock){e.report({messageId:`tryBlockHook`,node:t});return}r.afterEarlyReturn&&e.report({messageId:`afterEarlyReturn`,node:t})}},ConditionalExpression(){l({inConditional:!0})},"ConditionalExpression:exit"(){l({inConditional:!1})},DoWhileStatement(){l({inLoop:!0})},"DoWhileStatement:exit"(){l({inLoop:!1})},ForInStatement(){l({inLoop:!0})},"ForInStatement:exit"(){l({inLoop:!1})},ForOfStatement(){l({inLoop:!0})},"ForOfStatement:exit"(){l({inLoop:!1})},ForStatement(){l({inLoop:!0})},"ForStatement:exit"(){l({inLoop:!1})},FunctionDeclaration:d,"FunctionDeclaration:exit":f,FunctionExpression:d,"FunctionExpression:exit":f,IfStatement(){l({inConditional:!0})},"IfStatement:exit"(){l({inConditional:!1})},ImportDeclaration(e){let n=e.source.value;if(t.importSources!==void 0&&Object.keys(t.importSources).length!==0)for(let t of e.specifiers)t.type===`ImportSpecifier`&&j(t.imported)&&pT(t.imported.name)&&a.set(t.local.name,n)},LogicalExpression(){l({inConditional:!0})},"LogicalExpression:exit"(){l({inConditional:!1})},"ReturnStatement:exit"(){l({afterEarlyReturn:!0})},SwitchStatement(){l({inConditional:!0})},"SwitchStatement:exit"(){l({inConditional:!1})},TryStatement(){l({inTryBlock:!0})},"TryStatement:exit"(){l({inTryBlock:!1})},WhileStatement(){l({inLoop:!0})},"WhileStatement:exit"(){l({inLoop:!1})}}},meta:{docs:{description:`Enforce that React hooks are only called at the top level of components or custom hooks, never conditionally or in nested functions`,recommended:!0},messages:{afterEarlyReturn:`This hook is being called after an early return. Hooks must be called unconditionally and in the same order every render.`,conditionalHook:`This hook is being called conditionally. All hooks must be called in the exact same order in every component render.`,loopHook:`This hook is being called inside a loop. All hooks must be called in the exact same order in every component render.`,nestedFunction:`This hook is being called from a nested function. All hooks must be called unconditionally from the top-level component.`,recursiveHookCall:`This hook is being called recursively. Recursive calls require a condition to terminate, which violates hook rules.`,tryBlockHook:`This hook is being called inside a try block. Hooks must be called unconditionally at the top level.`},schema:[{additionalProperties:!1,properties:{ignoreHooks:{description:`Hook names that should be ignored even when they match the hook naming pattern.`,items:{type:`string`},type:`array`},importSources:{additionalProperties:{type:`boolean`},description:`Import sources or namespace names mapped to whether their hooks should be checked.`,type:`object`},onlyHooks:{description:`If set, only these hook names are checked.`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}})}});export{wT as default};
12
+ }`)]},messageId:`wrapCaseBody`,node:r})}}},meta:{docs:{description:`Require braces around switch case bodies selected by line span or statement count.`},fixable:`code`,messages:{wrapCaseBody:`Wrap this switch case body in braces.`},schema:[{additionalProperties:!1,properties:{metric:{default:`lines`,description:`Whether to report cases by line span or by statement count.`,enum:[`lines`,`statements`],type:`string`}},type:`object`}],type:`problem`}});function IC(e){let t=e.parent;for(;t!==null;){switch(t.type){case`FunctionDeclaration`:return t.id?.name;case`FunctionExpression`:return t.id?t.id.name:LC(t);case`ArrowFunctionExpression`:return LC(t);default:break}t=t.parent}}function LC({parent:e}){if(e?.type===`VariableDeclarator`&&e.id.type===`Identifier`)return e.id.name;if(e?.type===`PropertyDefinition`||e?.type===`MethodDefinition`){if(e.key.type===`PrivateIdentifier`)return`#${e.key.name}`;if(e.key.type===`Identifier`)return e.key.name}}function RC(e){let t=e.parent;for(;t!==null;){switch(t.type){case`FunctionDeclaration`:return!1;case`FunctionExpression`:return(t.parent.type===`MethodDefinition`||t.parent.type===`PropertyDefinition`)&&t.parent.parent.type===`ClassBody`;case`ArrowFunctionExpression`:return t.parent.type===`PropertyDefinition`&&t.parent.parent.type===`ClassBody`;default:break}t=t.parent}return!1}function zC(e,t,n){try{let r=e.getScope(t),i=new Set(r.variables.map(e=>e.name)),a=t.parent;for(;a!==null;)a.type===`CatchClause`&&a.param?.type===`Identifier`&&i.add(a.param.name),a=a.parent;if(!i.has(n))return n;for(let e=2;e<100;e+=1){let t=`${n}${e}`;if(!i.has(t))return t}}catch{}return n}function BC(e,t){try{let n=e.getScope(t);for(;n!==null;){let e=n.set.get(t.name);if(e!==void 0){let t=e.defs.find(e=>e.type===`ImportBinding`);return t?.parent?.type===`ImportDeclaration`?t.parent.source.value:void 0}n=n.upper}}catch{}}function VC(e,t){try{let n=e.getScope(t);for(;n!==null;){if(n.set.has(t.name))return!0;n=n.upper}}catch{}return!1}function HC(e,t){return y(e)?t===e:(Array.isArray(e.name)?e.name:[e.name]).includes(t)}function UC(e,t,n,r){if(!HC(r,n.name))return!1;if(y(r))return!0;switch(r.from){case void 0:return!0;case`package`:return BC(e,n)===r.package;case`file`:return VC(e,n)&&BC(e,n)===void 0?r.path===void 0?!0:t===`<input>`||t===`<text>`?!1:t.endsWith(r.path):!1;case`library`:return e.isGlobalReference(n);default:return!1}}function WC(e,t,n,r){return r.some(r=>UC(e,t,n,r))}const GC=_(`require-throw-error-capture`,`general`,{create(e){let{sourceCode:t}=e,n=e.options[0]?.allow??[],r=e.physicalFilename??`<input>`;return{ThrowStatement(i){let{argument:a}=i;if(a.type!==`NewExpression`)return;let{callee:o}=a;if(o.type!==`Identifier`||!o.name.endsWith(`Error`)||WC(t,r,o,n))return;let s=IC(i);if(s===void 0)return;let c=RC(i)?`this.${s}`:s;e.report({fix(e){let n=zC(t,i,`error`),r=[`const ${n} = ${t.getText(a)};`,`Error.captureStackTrace(${n}, ${c});`,`throw ${n};`].join(`
13
+ `);return i.parent.type===`BlockStatement`?e.replaceText(i,r):e.replaceText(i,`{\n${r}\n}`)},messageId:`missingCaptureStackTrace`,node:i})}}},meta:{docs:{description:`Require 'Error.captureStackTrace' before directly throwing new Error instances in named functions.`,recommended:!1},fixable:`code`,messages:{missingCaptureStackTrace:`Call 'Error.captureStackTrace' on this error before throwing it so the stack trace points to the throw site.`},schema:[{additionalProperties:!1,properties:{allow:{description:`Error classes that do not need Error.captureStackTrace`,items:{anyOf:[{type:`string`},{additionalProperties:!1,properties:{from:{description:`Where the error class is declared`,enum:[`file`,`library`,`package`],type:`string`},name:{anyOf:[{type:`string`},{items:{type:`string`},type:`array`}],description:`Name(s) of the error class`},package:{description:`Package the error class is imported from (required when from is 'package')`,type:`string`},path:{description:`Optional file path filter for file specifiers (matched against the end of the file path)`,type:`string`}},required:[`name`],type:`object`}]},type:`array`}},type:`object`}],type:`suggestion`}});function KC(e){return e.includes(`u`)||e.includes(`v`)}function qC(e,t){return e.type===`Identifier`&&e.name===t}function JC(e){if(!(e.type!==`Literal`||!y(e.value)))return e.value}function YC(e){return e.type!==`SpreadElement`}const XC=_(`require-unicode-regex`,`general`,{createOnce(e){return{CallExpression(t){if(!qC(t.callee,`regex`))return;if(t.arguments.length<2){e.report({messageId:`requireUnicodeFlag`,node:t});return}let[,n]=t.arguments;if(n===void 0||!YC(n))return;let r=JC(n);r!==void 0&&(KC(r)||e.report({messageId:`requireUnicodeFlag`,node:t}))}}},meta:{docs:{description:`Require the 'u' or 'v' unicode flag on calls named regex().`},messages:{requireUnicodeFlag:`Missing the 'u' or 'v' unicode flag on this regex() call. Use the unicode flag to avoid silently creating invalid regex patterns.`},schema:[],type:`problem`}});function ZC(e,t){t.type===`ObjectExpression`&&t.properties.length===0&&e.report({messageId:`emptyObjectDefault`,node:t}),t.type===`ArrayExpression`&&t.elements.length===0&&e.report({messageId:`emptyArrayDefault`,node:t})}function QC(e,t){for(let n of t){if(n.type===`AssignmentPattern`&&n.left.type===`ObjectPattern`){$C(e,n.left),D(n.right)&&ZC(e,n.right);continue}n.type===`ObjectPattern`&&$C(e,n)}}function $C(e,t){for(let n of t.properties){let t=ew(n);t!==void 0&&ZC(e,t)}}function ew(e){if(e.type!==`Property`||e.value.type!==`AssignmentPattern`)return;let t=e.value.right;return D(t)?t:void 0}function tw(e){if(!(e.type!==`FunctionDeclaration`||!Oc(e)))return[...e.params]}function nw(e){if(!(e.type!==`VariableDeclarator`||!Fc(e)||e.init===null)&&(e.init.type===`ArrowFunctionExpression`||e.init.type===`FunctionExpression`))return[...e.init.params]}const rw=_(`rerender-memo-with-default-value`,`react`,{create(e){return{FunctionDeclaration(t){let n=tw(t);n!==void 0&&QC(e,n)},VariableDeclarator(t){let n=nw(t);n!==void 0&&QC(e,n)}}},meta:{docs:{description:`Prevent inline empty object and array defaults in component prop destructuring.`,recommended:!0},messages:{emptyArrayDefault:`Default prop value [] creates a new array reference every render — extract to a module-level constant`,emptyObjectDefault:`Default prop value {} creates a new object reference every render — extract to a module-level constant`},type:`problem`}}),iw=/(?<first>[\p{Ll}\d])(?<second>\p{Lu})/gu,aw=/(?<first>\p{Lu})(?<second>\p{Lu}\p{Ll})/gu,ow=`$<first>\0$<second>`;function sw(e){let t=e.trim();if(t.length===0)return``;let n=t.replace(iw,ow).replace(aw,ow),r=0,{length:i}=n;for(;n.charCodeAt(r)===0;)r+=1;if(r===i)return``;for(;n.charCodeAt(i-1)===0;)--i;let a=``,o=r;for(let e=r;e<=i;e+=1)if(e===i||n.charCodeAt(e)===0){if(e>o){let t=n.slice(o,e),r=t.charCodeAt(0);a.length>0&&r>=48&&r<=57&&(a+=`_`),a+=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}o=e+1}return a}function cw(e){return e.split(`/`).filter(e=>!e.startsWith(`.`))}function lw(e){return e.split(`/`).filter(e=>e===`..`).length}function uw(e){return e.some(e=>e===sw(e)&&!e.includes(`.`))}function dw(e){return t.basename(e,t.extname(e))===`index`}function fw(e){if(!e.includes(`fixtures`))return!1;let t=e.indexOf(`fixtures`);return!uw(e.slice(0,t))}const pw=_(`strict-component-boundaries`,`react`,{create(e){let n=e.options?.[0],{allow:r=[],maxDepth:i=1}=x(n)?n:{allow:[],maxDepth:1},a=r.map(e=>new RegExp(e,`u`));return{ImportDeclaration(n){let r=n.source.value;if(!(y(r)&&r.startsWith(`.`))||a.some(e=>e.test(r)))return;let{filename:o}=e;if(o===``)return;let s=ku(r,o);if(!s.found)return;let c=t.relative(o,s.path).replaceAll(`\\`,`/`),l=cw(c);if((lw(c)>1||l.includes(`components`))&&uw(l)&&l.length>i&&!dw(c)&&!fw(l)){e.report({messageId:`noReachingIntoComponent`,node:n});return}l.includes(`components`)&&l.length>i+1&&!dw(c)&&!fw(l)&&e.report({messageId:`noReachingIntoComponent`,node:n})}}},meta:{docs:{description:`Prevent imports that reach into another component's nested modules.`},messages:{noReachingIntoComponent:`Do not reach into an individual component's folder for nested modules. Import from the closest shared components folder instead.`},schema:[{additionalProperties:!1,properties:{allow:{default:[],description:`Regular expression patterns for imports allowed to cross component boundaries.`,items:{type:`string`},type:`array`},maxDepth:{default:1,description:`Maximum path depth allowed inside another component before reporting.`,type:`integer`}},type:`object`}],type:`problem`}}),mw=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`ObjectExpression`]),hw=new Map([[`useCallback`,{closureIndex:0,dependenciesIndex:1}],[`useEffect`,{closureIndex:0,dependenciesIndex:1}],[`useImperativeHandle`,{closureIndex:1,dependenciesIndex:2}],[`useInsertionEffect`,{closureIndex:0,dependenciesIndex:1}],[`useLayoutEffect`,{closureIndex:0,dependenciesIndex:1}],[`useMemo`,{closureIndex:0,dependenciesIndex:1}],[`useSpring`,{closureIndex:0,dependenciesIndex:1}],[`useSprings`,{closureIndex:1,dependenciesIndex:2}],[`useTrail`,{closureIndex:1,dependenciesIndex:2}]]),gw=new Map([[`useBinding`,!0],[`useReducer`,new Set([1])],[`useRef`,!0],[`useState`,new Set([1])],[`useTransition`,new Set([1])]]),_w=new Set([`ClassDeclaration`,`FunctionDeclaration`,`FunctionName`,`ImportBinding`]),vw=new Set(`Array.BigInt.Boolean.clearInterval.clearTimeout.console.Date.decodeURI.decodeURIComponent.Document.Element.encodeURI.encodeURIComponent.Error.Event.Exclude.Extract.Function.Infinity.InstanceType.isFinite.isNaN.JSON.Map.Math.NaN.Node.NonNullable.null.Number.Object.Omit.Parameters.parseFloat.parseInt.Partial.Pick.Promise.Readonly.ReadonlyArray.ReadonlyMap.ReadonlySet.Record.RegExp.Required.ReturnType.Set.setInterval.setTimeout.String.Symbol.undefined.WeakMap.WeakSet.Window`.split(`.`));function yw(e){let{callee:t}=e;if(t.type===`Identifier`)return t.name;if(t.type===`MemberExpression`&&t.property.type===`Identifier`)return t.property.name}function bw(e){let t=0,n=e;for(;;){if(n.type===`ChainExpression`||n.type===`ParenthesizedExpression`||n.type===`TSAsExpression`||n.type===`TSNonNullExpression`||n.type===`TSSatisfiesExpression`||n.type===`TSTypeAssertion`){n=n.expression;continue}if(n.type!==`MemberExpression`)break;t+=1,n=n.object}return t}function xw(e){let t=e;for(;;){if(t.type===`ChainExpression`||t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSNonNullExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`){t=t.expression;continue}if(t.type!==`MemberExpression`)break;t=t.object}return t.type===`Identifier`?t:void 0}function Sw(e){return e.type===`Identifier`?[e.name]:e.type===`MemberExpression`?Sw(e.object):e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||e.type===`TSNonNullExpression`||e.type===`TSAsExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSTypeAssertion`?Sw(e.expression):e.type===`BinaryExpression`||e.type===`LogicalExpression`?[...Sw(e.left),...Sw(e.right)]:e.type===`UnaryExpression`?Sw(e.argument):e.type===`ConditionalExpression`?[...Sw(e.test),...Sw(e.consequent),...Sw(e.alternate)]:[]}function Cw(e){return Lw.has(e.type)}function ww(e,t){if(e.type===`Identifier`)return e.name;if(e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||Cw(e))return ww(e.expression,t);if(e.type===`MemberExpression`){let n=ww(e.object,t);if(e.computed)return`${n}[${t.getText(e.property)}]`;let r=e.property.type===`Identifier`?e.property.name:``;return`${n}${e.optional?`?.`:`.`}${r}`}return t.getText(e)}function Tw(e,t){return e.type===`VariableDeclarator`&&e.id.type===t}function Ew(e,t,n){if(e===void 0||!(e instanceof Set&&Tw(t,`ArrayPattern`)))return!1;let{elements:r}=t.id,i=0;for(let t of r){if((t?.type===`Identifier`?t.name:void 0)===n)return e.has(i);i+=1}return!1}function Dw(e,t,n){if(e===void 0||!(e instanceof Set&&Tw(t,`ObjectPattern`)))return!1;for(let r of t.id.properties){if(r.type!==`Property`||Wi(r)?.name!==n)continue;let t=Ui(r);return t!==void 0&&e.has(t)}return!1}function Ow(e,t,n,r){if(e?.type!==`CallExpression`)return!1;let i=yw(e);if(i===void 0)return!1;let a=r.get(i);return a===!0||Ew(a,t,n)||Dw(a,t,n)}function kw(e){if(e?.type!==`CallExpression`)return!1;let{callee:t}=e;return t.type===`MemberExpression`&&t.object.type===`Identifier`&&t.object.name===`React`&&t.property.type===`Identifier`&&t.property.name===`joinBindings`}function Aw(e){if(e?.type!==`CallExpression`)return!1;let{callee:t}=e;return t.type===`MemberExpression`&&t.property.type===`Identifier`&&t.property.name===`map`}function jw(e){return e?.type===`Literal`||e?.type===`TemplateLiteral`||e?.type===`UnaryExpression`&&e.argument.type===`Literal`}function Mw(e,t){let n=e.defs.find(e=>e.node===t);if(n?.node.type!==`VariableDeclarator`)return!1;let r=n.node.parent.parent;return r?.type===`Program`||r?.type===`ExportNamedDeclaration`}function Nw(e,t,n,r){let{node:i,type:a}=t;if(_w.has(a))return!0;if(a!==`Variable`||i.type!==`VariableDeclarator`)return!1;let{parent:o}=i;if(o.type!==`VariableDeclaration`||o.kind!==`const`)return!1;let{init:s}=i;return Ow(s,i,n,r)||kw(s)||Aw(s)||jw(s)||Mw(e,i)}function Pw(e,t,n){if(!e)return!1;let r=e.defs;if(r.length===0)return!1;for(let i of r)if(Nw(e,i,t,n))return!0;return!1}function Fw(e,t){let n=t,r=e;for(;n;){if(n.type===`CallExpression`&&n.callee===r){if(r.type===`MemberExpression`)return r.object;break}let e=n.type===`MemberExpression`&&n.object===r,t=n.type===`ChainExpression`,i=n.type===`TSNonNullExpression`;if(!(e||t||i))break;r=n,n=r.parent??void 0}return r}const Iw=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`VariableDeclarator`]),Lw=new Set([`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]);function Rw(e){if(e.type!==`Identifier`)return!1;let{parent:t}=e;return t.type===`Property`&&t.computed&&t.key===e}function zw(e){if(e.type!==`Identifier`)return!1;let t=e.parent??void 0;for(;t;){if(Lw.has(t.type)){t=t.parent??void 0;continue}if(t.type.startsWith(`TS`))return!0;if(Iw.has(t.type))return!1;t=t.parent??void 0}return!1}function Bw(e,t){let n=t.parent??void 0;for(;n;){if(N(n)){let t=n;return e.defs.some(e=>e.type===`Parameter`&&e.node===t)?!0:e.defs.some(e=>{let n=e.node.parent??void 0;for(;n&&n!==t;)n=n.parent??void 0;return n===t})}n=n.parent??void 0}return!1}function Vw(e,t){if(e.type!==`Identifier`)return;let n,r=t;for(;r;){let t=r.set.get(e.name);if(t){n=t;break}r=r.upper}if(!(!n||n.defs.length===0))for(let e of n.defs){let t=e.node;if(t.type===`FunctionDeclaration`)return t;if(t.type===`VariableDeclarator`&&t.init&&(t.init.type===`ArrowFunctionExpression`||t.init.type===`FunctionExpression`))return t.init}}function Hw(e,t){let n=t;for(;n;){let t=n.set.get(e);if(t)return t;n=n.upper}}function Uw(e,t){let n=e.node;for(;n;){if(n===t)return!0;n=n.parent??void 0}return!1}function Ww(e,t){return e!==void 0&&!e.defs.some(e=>Uw(e,t))}function Gw(e,t,n,r){let i=Fw(e,e.parent??void 0);return{depth:bw(i),forceDependency:Rw(e),name:t,node:i,usagePath:ww(i,r),variable:n}}function Kw(e){return e.type===`ParenthesizedExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSAsExpression`||e.type===`TSTypeAssertion`||e.type===`TSNonNullExpression`}function qw(e,t,n){let r=t.visitorKeys[e.type]??[];for(let t of r){if(!x(e))break;let r=e[t];if(Array.isArray(r))for(let e of r)D(e)&&n(e);else D(r)&&n(r)}}function Jw(e,t){let n=[],r=new Set;function i(i){if(i.type!==`Identifier`)return;let{name:a}=i;if(r.has(a)||vw.has(a)||zw(i))return;let o=Hw(a,t.getScope(i));Ww(o,e)&&o!==void 0&&Bw(o,e)&&(r.add(a),n.push(Gw(i,a,o,t)))}function a(e){if(e.type===`Identifier`&&i(e),Kw(e)){a(e.expression);return}if(e.type===`MemberExpression`){a(e.object),e.computed&&a(e.property);return}if(e.type===`ChainExpression`){a(e.expression);return}if(e.type===`Property`){e.computed&&a(e.key),a(e.value);return}qw(e,t,a)}return a(e),n}function Yw(e,t){let n=[];for(let r of e.elements){if(!r)continue;let e=r.type===`SpreadElement`?r.argument:r,i=ww(e,t),a=bw(e);n.push({depth:a,name:i,node:e})}return n}function Xw({name:e}){return e}function Zw(e){return e?mw.has(e.type):!1}function Qw(e,{parent:t}){return t.type===`VariableDeclarator`?e.variable?.defs.some(e=>e.node===t)??!1:!1}function $w(e){return e.length>0&&b(e[0])}function eT(e){return e.length>0&&y(e[0])}function tT(e){return typeof e==`boolean`?e:b(e)?new Set([e]):Array.isArray(e)&&($w(e)||eT(e))?new Set(e):!1}function nT(e,t,n,r){let i=[],a=0;for(let{name:e}of t)e!==n.name&&(i[a++]=e);let o=`[${i.join(`, `)}]`;e.report({data:{name:n.name},fix(e){return e.replaceText(r,o)},messageId:`unnecessaryDependency`,node:n.node,suggest:[{data:{name:n.name},fix(e){return e.replaceText(r,o)},messageId:`removeDependencySuggestion`}]})}function rT(e){return e!==void 0&&N(e)}function iT(e,t){return e.filter(e=>e.forceDependency||!Pw(e.variable,e.name,t))}function aT(e,t,n,r){if(r.length===0)return;let i=[...new Set(r.map(Xw))].join(`, `),a=`[${[...new Set(r.map(({usagePath:e})=>e))].toSorted().join(`, `)}]`;e.report({data:{deps:i},fix(e){return e.insertTextAfter(n,`, ${a}`)},messageId:`missingDependenciesArray`,node:t,suggest:[{data:{dependencies:a},fix(e){return e.insertTextAfter(n,`, ${a}`)},messageId:`addDependenciesArraySuggestion`}]})}function oT(e){let t=xw(e);return t?.type===`Identifier`?t.name:void 0}function sT(e,t){let n=oT(t.node);if(n!==void 0)return e.find(e=>oT(e.node)===n)}function cT(e,t){return!e.forceDependency&&Pw(e.variable,e.name,t)}function lT(e,t,n,r,i,a,o){for(let s of t){let c=sT(n,s);if(c===void 0){a&&nT(e,t,s,r);continue}if(o&&cT(c,i)){nT(e,t,s,r);continue}a&&s.depth>c.depth&&nT(e,t,s,r)}}function uT(e,t,n){let r=xw(e.node);if(r?.type===`Identifier`&&e.depth<=t.depth)return r.name===oT(t.node);if(!n)return!1;let i=oT(t.node);return i!==void 0&&Sw(e.node).includes(i)}function dT(e,t,n,r){let i=[];for(let a of iT(e,n))oT(a.node)!==void 0&&(t.some(e=>uT(e,a,r))||i.push(a));return i}function fT(e,t,n,r){if(r.length===0)return;let i=n.map(({name:e})=>e),a=r.map(({usagePath:e})=>e),o=`[${[...i,...a].toSorted().join(`, `)}]`,s=n.at(-1)?.node??t,c=r.at(0);if(r.length===1&&c!==void 0){e.report({data:{name:c.usagePath},fix(e){return e.replaceText(t,o)},messageId:`missingDependency`,node:s,suggest:[{data:{name:c.usagePath},fix(e){return e.replaceText(t,o)},messageId:`addDependencySuggestion`}]});return}e.report({data:{names:a.join(`, `)},fix(e){return e.replaceText(t,o)},messageId:`missingDependencies`,node:s,suggest:[{fix(e){return e.replaceText(t,o)},messageId:`addMissingDependenciesSuggestion`}]})}function pT(e){let t=e.variable?.defs[0];return t?.node.type===`VariableDeclarator`?t.node.init??void 0:void 0}function mT(e,t,n,r){for(let i of iT(t,r)){let t=oT(i.node);if(t!==void 0){for(let r of n)if(oT(r.node)===t&&r.depth===i.depth){r.depth===0&&Zw(pT(i))&&e.report({data:{name:i.usagePath},messageId:`unstableDependency`,node:r.node});break}}}}const hT=_(`use-exhaustive-dependencies`,`react`,{create(e){let[t]=e.options,n={hooks:t?.hooks??[],reportMissingDependenciesArray:t?.reportMissingDependenciesArray??!0,reportUnnecessaryDependencies:t?.reportUnnecessaryDependencies??!0,reportUnnecessaryStableDependencies:t?.reportUnnecessaryStableDependencies??!1,resolveExpressionDependencies:t?.resolveExpressionDependencies??!0},r=new Map(hw);for(let e of n.hooks)e.closureIndex!==void 0&&e.dependenciesIndex!==void 0&&r.set(e.name,{closureIndex:e.closureIndex,dependenciesIndex:e.dependenciesIndex});let i=new Map(gw);for(let e of n.hooks)e.stableResult!==void 0&&i.set(e.name,tT(e.stableResult));let a=new WeakMap;function o(t){let n=a.get(t);if(n)return n;let r=e.sourceCode.getScope(t);return a.set(t,r),r}function s(e,t){if(e.type===`ArrowFunctionExpression`)return e;if(!(N(e)||e.type===`Identifier`))return;let n=Vw(e,o(t));return rT(n)?n:void 0}return{CallExpression(t){let a=yw(t);if(a===void 0||a===``)return;let o=r.get(a);if(!o)return;let{closureIndex:c,dependenciesIndex:l}=o,u=t.arguments,d=u[c];if(d===void 0)return;let f=s(d,t);if(!f)return;let p=u[l];if(!p&&n.reportMissingDependenciesArray){aT(e,t,d,iT(Jw(f,e.sourceCode).filter(e=>!Qw(e,t)),i));return}if(!p||p.type!==`ArrayExpression`)return;let m=p,h=Jw(f,e.sourceCode).filter(e=>!Qw(e,t)),g=Yw(m,e.sourceCode);(n.reportUnnecessaryDependencies||n.reportUnnecessaryStableDependencies)&&lT(e,g,h,m,i,n.reportUnnecessaryDependencies,n.reportUnnecessaryStableDependencies),fT(e,m,g,dT(h,g,i,n.resolveExpressionDependencies)),mT(e,h,g,i)}}},meta:{docs:{description:`Enforce exhaustive and correct dependency specification in React hooks to prevent stale closures and unnecessary re-renders`},fixable:`code`,hasSuggestions:!0,messages:{addDependenciesArraySuggestion:`Add dependencies array: {{dependencies}}`,addDependencySuggestion:`Add '{{name}}' to dependencies array`,addMissingDependenciesSuggestion:`Add missing dependencies to array`,missingDependencies:`This hook does not specify all its dependencies. Missing: {{names}}`,missingDependenciesArray:`This hook does not specify its dependencies array. Missing: {{deps}}`,missingDependency:`This hook does not specify its dependency on {{name}}.`,removeDependencySuggestion:`Remove '{{name}}' from dependencies array`,unnecessaryDependency:`This dependency {{name}} can be removed from the list.`,unstableDependency:`{{name}} changes on every re-render. Wrap the definition in useCallback() or useMemo() to stabilize it.`},schema:[{additionalProperties:!1,properties:{hooks:{default:[],description:`Array of custom hook entries to check for exhaustive dependencies`,items:{additionalProperties:!1,properties:{closureIndex:{description:`Index of the closure argument for dependency validation`,type:`number`},dependenciesIndex:{description:`Index of the dependencies array for validation`,type:`number`},name:{description:`The name of the hook`,type:`string`},stableResult:{description:`Specify stable results: true (whole result), number (array index), number[] (multiple indices), or string[] (object properties)`,oneOf:[{type:`boolean`},{type:`number`},{items:{type:`number`},type:`array`},{items:{type:`string`},type:`array`}]}},required:[`name`],type:`object`},type:`array`},reportMissingDependenciesArray:{default:!0,description:`Report when the dependencies array is completely missing`,type:`boolean`},reportUnnecessaryDependencies:{default:!0,description:`Report when unnecessary dependencies are specified`,type:`boolean`},reportUnnecessaryStableDependencies:{default:!1,description:`Report when stable values (useRef, useState setter, etc.) are included as dependencies`,type:`boolean`},resolveExpressionDependencies:{default:!0,description:"Recognize expression dependencies like `value !== undefined` as covering a capture",type:`boolean`}},type:`object`}],type:`problem`}}),gT=/^use[A-Z]/u;function _T(e){return gT.test(e)}function vT(e){return x(e)?e:{}}function yT(e){if((e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)&&e.id!==null)return O(e.id.name)||_T(e.id.name);let{parent:t}=e;return t.type===`VariableDeclarator`&&j(t.id)?O(t.id.name)||_T(t.id.name):t.type===`Property`&&j(t.key)||t.type===`MethodDefinition`&&j(t.key)?O(t.key.name)||_T(t.key.name):!1}function bT(e){let t=L(e);return t!==void 0&&_T(t)}function xT(e){let t=e.parent,n=!1;for(let r=0;r<20&&t!==null&&!N(t);r+=1){if(t.type===`TryStatement`){let r=e;for(;r!==null&&r!==t;){if(r===t.finalizer){n=!0;break}r=r.parent}break}t=t.parent}return n}function ST(e,t){return t!==void 0&&e.callee.type===`Identifier`&&`name`in e.callee&&e.callee.name===t}function CT(e,t){return{afterEarlyReturn:!1,functionDepth:t,inConditional:!1,inLoop:!1,inNestedFunction:!1,inTryBlock:!1,isComponentOrHook:!1,...e}}function wT(e){if(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)return e.id?.name??void 0}function TT(e){return j(e)?e.name:void 0}function ET(e,t,n,r){if(n===void 0||Object.keys(n).length===0)return!1;let i=DT(t,n);if(i!==void 0)return i;let a=t.callee.type===`Identifier`?r.get(e):void 0;return a!==void 0&&n[a]===!1?!0:(a!==void 0&&n[a],!1)}function DT(e,t){if(e.callee.type!==`MemberExpression`)return;let n=TT(e.callee.object);if(n!==void 0&&t[n]===!1)return!0;if(n!==void 0&&t[n]===!0)return!1}const OT=g({meta:{name:`small-rules`},rules:{"array-type-generic":te,"ban-instances":dt,"ban-react-fc":ht,"ban-types":yt,"consistent-compound-words":Ft,"directive-disable-enable-pair":un,"directive-no-aggregating-enable":dn,"directive-no-duplicate-disable":fn,"directive-no-restricted-disable":pn,"directive-no-unlimited-disable":mn,"directive-no-unused-enable":hn,"directive-no-use":gn,"directive-require-description":yn,"enforce-ianitor-check-type":An,"isolated-functions":ur,"memoized-effect-dependencies":Ir,"no-array-constructor-elements":pi,"no-array-constructor-index-assignment":Ci,"no-array-size-assignment":Ni,"no-async-constructor":ia,"no-async-in-system":La,"no-cascading-set-state":za,"no-color3-constructor":Ua,"no-commented-code":jo,"no-constant-condition-with-break":ds,"no-dead-store":Is,"no-error":Rs,"no-events-in-events-callback":ec,"no-filter-map-chain":tc,"no-floating-point-equality":Ec,"no-giant-component":zc,"no-god-components":qc,"no-ianitor-in-function-body":Yc,"no-ianitor-success-access":tl,"no-identity-map":ul,"no-increment-decrement":fl,"no-inline-property-on-memo-component":hl,"no-instance-methods-without-this":Cl,"no-loop-iterable-mutation":Ll,"no-native-properties-spread":su,"no-new-instance-in-use-memo":Su,"no-print":Cu,"no-recursive":Eu,"no-redundant-aspect-ratio-constraint":Hu,"no-render-helper-functions":sd,"no-restricted-property-assignment":vd,"no-spec-file-extension":bd,"no-static-react-create-element":Md,"no-table-create-map":Fd,"no-task-wait":Ld,"no-trivial-assertions":lf,"no-underscore-react-props":uf,"no-unused-imports":bf,"no-unused-use-memo":xf,"no-use-memo-simple-expression":Cf,"no-use-of-empty-return-value":Df,"no-useless-constants":Yf,"no-useless-default":Vp,"no-useless-use-effect":yh,"no-useless-use-memo":Th,"no-useless-use-spring":Nh,"no-variadic-spread":Rh,"no-warn":zh,"only-type-imports":Bh,"prefer-class-properties":Kh,"prefer-constant-dispatch":ng,"prefer-context-stack":zg,"prefer-direct-hook-imports":Ug,"prefer-early-return":Jg,"prefer-expect-assertions":y_,"prefer-hoisted-jsx-elements":I_,"prefer-hoisted-jsx-object-properties":W_,"prefer-idiv":q_,"prefer-local-portal-component":iv,"prefer-math-min-max":hv,"prefer-modding-inspect":bv,"prefer-module-scope-constants":Cv,"prefer-padding-components":zv,"prefer-pascal-case-enums":Xv,"prefer-sequence-overloads":ny,"prefer-single-world-query":Sy,"prefer-singular-enums":Fy,"prefer-ternary-conditional-rendering":$y,"prefer-udim2-shorthand":sb,"prefer-use-reducer":lb,"prevent-abbreviations":rS,"react-hooks-strict-return":bS,"require-async-suffix":SS,"require-module-level-instantiation":OS,"require-named-effect-functions":PS,"require-paired-calls":XS,"require-react-component-keys":CC,"require-react-display-names":MC,"require-switch-case-braces":FC,"require-throw-error-capture":GC,"require-unicode-regex":XC,"rerender-memo-with-default-value":rw,"strict-component-boundaries":pw,"use-exhaustive-dependencies":hT,"use-hook-at-top-level":_(`use-hook-at-top-level`,`react`,{create(e){let t=vT(e.options[0]),n=[],r=[],i,a=new Map;function o(){return n.length>0?n.at(-1):void 0}function s(e){n.push(e)}function c(){n.pop()}function l(e){let t=o();t!==void 0&&(n[n.length-1]={...t,...e})}function u(e,n){let{ignoreHooks:r,importSources:i,onlyHooks:o}=t;return o!==void 0&&o.length>0?!o.includes(e):r?.includes(e)===!0||ET(e,n,i,a)}function d(e){let t=o(),n=t===void 0?0:t.functionDepth+1,a=yT(e);r.push(i);let c=wT(e);c!==void 0&&(i=c),t?.isComponentOrHook===!0?s(CT({functionDepth:n,inNestedFunction:!0},n)):a&&s(CT({functionDepth:n,isComponentOrHook:!0},n))}function f(){o()!==void 0&&c(),i=r.pop()}return{ArrowFunctionExpression:d,"ArrowFunctionExpression:exit":f,CallExpression(t){if(!bT(t))return;let n=L(t);if(n===void 0||u(n,t))return;let r=o();if(!(r===void 0||!(r.isComponentOrHook||r.inNestedFunction)||xT(t))){if(ST(t,i)){e.report({messageId:`recursiveHookCall`,node:t});return}if(r.inNestedFunction){e.report({messageId:`nestedFunction`,node:t});return}if(r.inConditional){e.report({messageId:`conditionalHook`,node:t});return}if(r.inLoop){e.report({messageId:`loopHook`,node:t});return}if(r.inTryBlock){e.report({messageId:`tryBlockHook`,node:t});return}r.afterEarlyReturn&&e.report({messageId:`afterEarlyReturn`,node:t})}},ConditionalExpression(){l({inConditional:!0})},"ConditionalExpression:exit"(){l({inConditional:!1})},DoWhileStatement(){l({inLoop:!0})},"DoWhileStatement:exit"(){l({inLoop:!1})},ForInStatement(){l({inLoop:!0})},"ForInStatement:exit"(){l({inLoop:!1})},ForOfStatement(){l({inLoop:!0})},"ForOfStatement:exit"(){l({inLoop:!1})},ForStatement(){l({inLoop:!0})},"ForStatement:exit"(){l({inLoop:!1})},FunctionDeclaration:d,"FunctionDeclaration:exit":f,FunctionExpression:d,"FunctionExpression:exit":f,IfStatement(){l({inConditional:!0})},"IfStatement:exit"(){l({inConditional:!1})},ImportDeclaration(e){let n=e.source.value;if(t.importSources!==void 0&&Object.keys(t.importSources).length!==0)for(let t of e.specifiers)t.type===`ImportSpecifier`&&j(t.imported)&&_T(t.imported.name)&&a.set(t.local.name,n)},LogicalExpression(){l({inConditional:!0})},"LogicalExpression:exit"(){l({inConditional:!1})},"ReturnStatement:exit"(){l({afterEarlyReturn:!0})},SwitchStatement(){l({inConditional:!0})},"SwitchStatement:exit"(){l({inConditional:!1})},TryStatement(){l({inTryBlock:!0})},"TryStatement:exit"(){l({inTryBlock:!1})},WhileStatement(){l({inLoop:!0})},"WhileStatement:exit"(){l({inLoop:!1})}}},meta:{docs:{description:`Enforce that React hooks are only called at the top level of components or custom hooks, never conditionally or in nested functions`,recommended:!0},messages:{afterEarlyReturn:`This hook is being called after an early return. Hooks must be called unconditionally and in the same order every render.`,conditionalHook:`This hook is being called conditionally. All hooks must be called in the exact same order in every component render.`,loopHook:`This hook is being called inside a loop. All hooks must be called in the exact same order in every component render.`,nestedFunction:`This hook is being called from a nested function. All hooks must be called unconditionally from the top-level component.`,recursiveHookCall:`This hook is being called recursively. Recursive calls require a condition to terminate, which violates hook rules.`,tryBlockHook:`This hook is being called inside a try block. Hooks must be called unconditionally at the top level.`},schema:[{additionalProperties:!1,properties:{ignoreHooks:{description:`Hook names that should be ignored even when they match the hook naming pattern.`,items:{type:`string`},type:`array`},importSources:{additionalProperties:{type:`boolean`},description:`Import sources or namespace names mapped to whether their hooks should be checked.`,type:`object`},onlyHooks:{description:`If set, only these hook names are checked.`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}})}});export{OT as default};