@pobammer-ts/small-rules 2.14.0 → 2.15.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 (3) hide show
  1. package/dist/index.d.ts +109 -1
  2. package/dist/index.js +38 -10
  3. package/package.json +18 -16
package/dist/index.js CHANGED
@@ -1,13 +1,41 @@
1
- import e from"ignore";import t from"node:path";import{parse as n}from"yuku-parser";import{existsSync as r,readFileSync as i,readdirSync as a}from"node:fs";import{ResolverFactory as o}from"oxc-resolver";import{type as s}from"arktype";import{Minimatch as c,minimatch as l}from"minimatch";import{definePlugin as u}from"oxlint-plugin-utilities";function d(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 f(e,t){return e.type===`TSParenthesizedType`?f(e.typeAnnotation,t):e.type===`TSArrayType`?`Array<${f(e.elementType,t)}>`:e.type===`TSTypeOperator`&&e.operator===`readonly`&&e.typeAnnotation.type===`TSArrayType`?`ReadonlyArray<${f(e.typeAnnotation.elementType,t)}>`:t.getText(e)}function p({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 m=d(`array-type-generic`,`naming`,{createOnce(e){function t(t){e.report({fix(n){return n.replaceText(t,f(t,e.sourceCode))},messageId:`useGenericArrayType`,node:t})}return{TSArrayType(e){p(e)&&t(e)},TSTypeOperator(e){e.operator===`readonly`&&e.typeAnnotation.type===`TSArrayType`&&p(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 h(e){return typeof e==`string`}function g(e){return typeof e==`number`}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){return h(e)&&e.length>0}function y(e){if(!Array.isArray(e))return!1;for(let t of e)if(!h(t))return!1;return!0}function ee(e){if(!_(e))return!1;for(let t of Object.values(e))if(!h(t))return!1;return!0}function b(e){return g(e)&&!Number.isNaN(e)}function x(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 S(e){return e.computed?e.property.type===`Literal`&&h(e.property.value)?e.property.value:void 0:e.property.type===`Identifier`?e.property.name:void 0}function C(e,t){let n=e;for(;n!==null;){let e=n.set.get(t);if(e!==void 0)return e;n=n.upper}}function w(e,t){for(let n of t.childScopes)e.push(n)}function T(e,t){let n=[e.getScope(e.ast)];for(let e of n){w(n,e);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 te=/^[A-Z]/v,ne=new Set([`end`,`loc`,`parent`,`range`,`start`,`type`]);function D(e){return _(e)&&h(e.type)}function re(e){return ne.has(e)}function O(e){return te.test(e)}function k(e){return e.type===`VariableDeclarator`}function ie(e){return ae(e.typeAnnotation)?e.typeAnnotation:void 0}function ae(e){return _(e)&&`type`in e&&e.type===`TSTypeAnnotation`}function oe(e,t){return e.type===`Identifier`&&e.name===t}function se(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)&&S(e.callee)===r}function ce(e,t,n){return se(e,t,n,`useMemo`)}function le({imported:e}){return e.type===`Identifier`?e.name:e.value}function A(e){return e.type===`Identifier`&&h(e.name)}function j(e){return e.type===`Identifier`}function ue(e){return e.type===`JSXIdentifier`&&`name`in e}function de(e){return e.type===`JSXOpeningElement`}function fe(e){return e.type===`ImportDeclaration`}function pe(e){return e.type===`Literal`&&h(e.value)}function me(e){return e.type===`CallExpression`}function he(e){return e.type===`ImportSpecifier`}function ge(e){return e.type===`ExportSpecifier`}function _e(e){return e.type===`Property`}function M(e){return e.type===`MemberExpression`}function ve(e){return e.type===`AssignmentExpression`}function ye(e){return e.type===`UnaryExpression`}function be(e){return e.type===`BinaryExpression`}function xe(e){return e.type===`LogicalExpression`}function Se(e){return e.type===`ConditionalExpression`}function Ce(e){return e.type===`SequenceExpression`}function we(e){return e.type===`MethodDefinition`||e.type===`TSAbstractMethodDefinition`}function Te(e){return e.type===`PropertyDefinition`||e.type===`TSAbstractPropertyDefinition`}function Ee(e){return e.type===`ImportDefaultSpecifier`}function De(e){return e.type===`ImportNamespaceSpecifier`}function Oe(e){return e.type===`VariableDeclaration`}function ke(e){return e.type===`ExportNamedDeclaration`}function Ae(e){return e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function je(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionExpression`}function N(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function Me(e,t){return oe(e.callee,t)}function Ne(e){return e.type===`ClassDeclaration`||e.type===`ClassExpression`}function Pe(e){return e.type===`TSTypeAliasDeclaration`}function Fe(e){return e.type===`TSPropertySignature`}function Ie(e){return e.type===`Literal`}function Le(e){return e.type===`ArrowFunctionExpression`}function Re(e){return Ae(e)||Le(e)}function ze(e){return e.type===`TSQualifiedName`}function Be(e){return e.type===`Literal`&&g(e.value)}function Ve(e){return e.type===`NewExpression`}function He(e){return e.type===`ArrayExpression`}function Ue(e){return e.type===`ObjectExpression`}function We(e){return e.type===`ObjectPattern`}function Ge(e){return e.type===`TemplateLiteral`}function Ke(e){return e.type===`ExpressionStatement`}function qe(e){return e.type===`TSTypeAssertion`}function Je(e){return e.type===`TSAsExpression`}function Ye(e){return e.type===`AssignmentPattern`}function Xe(e){return e.type===`ThisExpression`}function Ze(e){if(!me(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&&pe(n)}function Qe(e){return e.type===`Identifier`}function $e(e){return e.type!==`PrivateIdentifier`}const et={bannedClasses:new Map,bannedProperties:new Map};function tt(e){return e.type===`JSXIdentifier`?e.name:e.name.name}function nt(e){let t=new Map;if(y(e)){for(let n of e)t.set(n.toLowerCase(),{message:``,originalName:n});return t}if(ee(e))for(let[n,r]of Object.entries(e))t.set(n.toLowerCase(),{message:r,originalName:n});return t}function rt(e){let t=new Map;if(e===void 0||!_(e))return t;for(let[n,r]of Object.entries(e)){if(!_(r))continue;let e=new Map;for(let[t,n]of Object.entries(r))h(n)&&e.set(t.toLowerCase(),{message:n,propertyName:t});e.size>0&&t.set(n.toLowerCase(),e)}return t}function it(e){if(!_(e))return et;let{bannedInstances:t,bannedProperties:n}=e;return{bannedClasses:nt(t),bannedProperties:rt(n)}}function at(e){let t=e;for(;t.upper!==null&&t.type!==`function`&&t.type!==`module`&&t.type!==`global`;)t=t.upper;return t}function ot(e){if(!Me(e,`Instance`))return;let[t]=e.arguments;if(!(t?.type!==`Literal`||!h(t.value)))return t.value}const st=d(`ban-instances`,`roblox`,{create(e){let t=it(e.options[0]);if(t.bannedClasses.size===0&&t.bannedProperties.size===0)return{};let{sourceCode:n}=e,{bannedClasses:r,bannedProperties:i}=t,a=new Map;function o(t,n){if(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 s(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 c(e){if(e.id.type!==`Identifier`||e.init===null)return;let t=x(e.init);if(t.type!==`NewExpression`)return;let r=ot(t);if(r===void 0)return;let i=C(n.getScope(e),e.id.name);i!==void 0&&a.set(i,{className:r,classNameKey:r.toLowerCase(),functionScope:at(i.scope)})}function l(e){let t=n.getScope(e),r=C(t,e.name);if(r===void 0)return;let i=a.get(r);if(i!==void 0)return i.functionScope===at(t)?i:void 0}return{AssignmentExpression(e){if(e.left.type!==`MemberExpression`)return;let t=S(e.left);if(t===void 0)return;let n=x(e.left.object);if(n.type!==`Identifier`)return;let r=l(n);if(r===void 0)return;let a=i.get(r.classNameKey);if(a===void 0)return;let o=a.get(t.toLowerCase());o!==void 0&&s(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=t.toLowerCase(),c=r.get(a);c!==void 0&&o(e,c);let l=i.get(a);if(l!==void 0)for(let n of e.attributes){if(n.type!==`JSXAttribute`)continue;let e=tt(n.name);if(e===void 0)continue;let r=l.get(e.toLowerCase());r!==void 0&&s(n,t,r)}},NewExpression(e){let t=ot(e);if(t===void 0)return;let n=r.get(t.toLowerCase());n!==void 0&&o(e,n)},VariableDeclarator(e){c(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`}}),ct=new Set([`FC`,`FunctionComponent`,`VFC`,`VoidFunctionComponent`]);function lt(e){if(e.type===`Identifier`&&ct.has(e.name))return e.name;if(e.type===`TSQualifiedName`&&ct.has(e.right.name))return e.right.name}function ut(e){let{typeAnnotation:t}=e.id;return ae(t)?t:void 0}const dt=d(`ban-react-fc`,`react`,{createOnce(e){return{VariableDeclarator(t){let n=ut(t);if(n===void 0)return;let r=n.typeAnnotation;r.type===`TSTypeReference`&&lt(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`}}),ft=new Map([[`omit`,{originalName:`Omit`,replacementName:`Except`}]]);function pt(e){let t=new Map(ft);if(!(_(e)&&`bannedTypes`in e))return t;let{bannedTypes:n}=e;if(n===void 0)return t;if(y(n)){for(let e of n)t.set(e.toLowerCase(),{originalName:e,replacementName:void 0});return t}if(ee(n))for(let[e,r]of Object.entries(n))t.set(e.toLowerCase(),{originalName:e,replacementName:r});return t}function mt(e){if(e.type===`Identifier`)return e.name;if(e.type===`TSQualifiedName`)return e.right.name}const ht=d(`ban-types`,`naming`,{create(e){let[t]=e.options,n=pt(t);return{TSTypeReference(t){let r=mt(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`}}),gt=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`]]),_t=/[\\^$.*+?()[\]{}|]/gu,vt=String.raw`(?=$|[\d_$]|\p{Uppercase_Letter})`;function yt(e){return e.replaceAll(_t,String.raw`\$&`)}function bt(e){let t=e.at(0);return t===void 0?e:`${t.toUpperCase()}${e.slice(1)}`}function xt(e){let t=e.at(0);return t===void 0?e:`${t.toLowerCase()}${e.slice(1)}`}function St(e){return e===e.toUpperCase()}function Ct(e){let t=e.at(0);return t?.toUpperCase()===t&&t!==void 0}function wt(e){if(e.size===0)return;let t=[],n=[];for(let r of e.keys())t.push(yt(r)),n.push(yt(bt(r)));return RegExp(`(?:^(?:${t.join(`|`)})|(?:${n.join(`|`)}))${vt}`,`gu`)}function Tt(e,t){let n=new Map(t?gt:void 0);if(!_(e))return n;for(let[t,r]of Object.entries(e)){if(r===!1){n.delete(t);continue}h(r)&&r.length>0&&n.set(t,r)}return n}function Et(e){let t=_(e)?e:{},n=t.extendDefaultReplacements!==!1,r=Tt(t.replacements,n),i=new Set;if(_(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:wt(r),replacements:r}}function Dt(e,t){let n=t.get(e)??t.get(xt(e));if(n!==void 0)return Ct(e)?bt(n):xt(n)}function Ot(e,t){let{replacementRegExp:n,replacements:r,allowList:i}=t;if(n===void 0||St(e)||i.has(e))return;n.lastIndex=0;let a=e.replaceAll(n,e=>Dt(e,r)??e);return a===e?void 0:a}function kt(e){let{parent:t}=e;return t?.type===`Property`&&t.shorthand&&t.value===e}function At(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 jt=d(`consistent-compound-words`,`naming`,{create(e){let t=Et(e.options[0]);function n(n,r){let i=Ot(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`||!At(e)||n(e,e.name)},"Program:exit"(){t.checkVariables&&T(e.sourceCode,e=>{if(e.defs.length===0)return;let[r]=e.defs;r===void 0||!t.checkShorthandProperties&&kt(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`}}),Mt=/^(?:eslint|oxlint)-disable-(?:next-)?line$/u,Nt=/[\s,]+/gu,Pt=/\s/u,Ft=new Set([`eslint-disable`,`eslint-disable-line`,`eslint-disable-next-line`,`oxlint-disable`,`oxlint-disable-line`,`oxlint-disable-next-line`]),It=new Set([...Ft,`eslint-enable`,`oxlint-enable`]),Lt=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 Rt(e){return Ft.has(e)}function zt(e){return It.has(e)}function Bt(e,t){if(!_(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(!h(e))return;r[i++]=e}return r}function Vt(e){let t=Ht(e.value);if(t===void 0)return;let n=Mt.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 Ht(e){let{description:t,text:n}=Wt(e),r=n.search(Pt),i=r===-1?n:n.slice(0,r);if(Lt.has(i))return{description:t,kind:i,value:r===-1?``:n.slice(r).trim()}}const Ut=/\s-{2,}\s/u;function Wt(e){let[t,n]=e.split(Ut);return t===void 0?{description:void 0,text:``}:{description:n?.trim(),text:t.trim()}}function Gt(e,t){return e.line<t.line||e.line===t.line&&e.column<=t.column}function Kt(e){return{end:e.end,start:{column:0,line:e.start.line}}}const qt=/\r\n|[\r\n\u2028\u2029]/u;function Jt(e,t){if(t===void 0)return Kt(e.loc);let n=e.value.split(qt),[r]=n;if(r===void 0)return e.loc;let i=RegExp(`([\\s,]|^)${Zt(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 Yt=/[|\\{}()[\]^$+*?.]/gu,Xt=String.raw`\$&`;function Zt(e){return e.replaceAll(Yt,Xt)}function Qt(e){let t={areas:[],duplicateDisableDirectives:[],numberOfRelatedDisableDirectives:new Map,unusedEnableDirectives:[]};for(let n of e.getAllComments()){let e=Vt(n);if(e===void 0)continue;let{kind:r}=e;if(!zt(r))continue;let{start:i}=n.loc,a=e.value!==void 0&&e.value!==``?e.value.split(Nt):void 0;switch(r){case`eslint-disable`:case`oxlint-disable`:$t(t,n,i,a,`block`);break;case`eslint-disable-line`:case`oxlint-disable-line`:{let{line:e}=i;$t(t,n,{column:0,line:e},a,`line`),en(t,n,{column:-1,line:e+1},a,`line`);break}case`eslint-disable-next-line`:case`oxlint-disable-next-line`:{let{line:e}=i;$t(t,n,{column:0,line:e+1},a,`line`),en(t,n,{column:-1,line:e+2},a,`line`);break}case`eslint-enable`:case`oxlint-enable`:en(t,n,i,a,`block`);break}}return t}function $t(e,t,n,r,i){if(r===void 0){an(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)an(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 en(e,t,n,r,i){let a=new Set;if(r===void 0){tn(e.areas,n,i,void 0,a)||rn(e,t,void 0),e.numberOfRelatedDisableDirectives.set(t,a.size);return}for(let o of r)tn(e.areas,n,i,o,a)||rn(e,t,o);e.numberOfRelatedDisableDirectives.set(t,a.size)}function tn(e,t,n,r,i){let a=!1;for(let o=e.length-1;o>=0;--o){let s=e[o];s===void 0||!nn(s,n,r)||(i.add(s.comment),s.end=t,a=!0)}return a}function nn(e,t,n){return e.end!==void 0||e.kind!==t?!1:n===void 0||e.ruleId===n}function rn(e,t,n){e.unusedEnableDirectives.push({comment:t,ruleId:n})}function an(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)&&Gt(i.start,n)&&(i.end===void 0||Gt(n,i.end)))return i}}const on=d(`directive-disable-enable-pair`,`general`,{create(e){let[t]=e.options,n=t?.allowWholeFile===!0,r=Qt(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&&Gt(t.start,i.loc.start)||e.report({data:{ruleId:t.ruleId??``},loc:Jt(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`}}),sn=d(`directive-no-aggregating-enable`,`general`,{create(e){let t=Qt(e.sourceCode);for(let[n,r]of t.numberOfRelatedDisableDirectives)r>1&&e.report({data:{kind:`eslint-enable`},loc:Kt(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`}}),cn=d(`directive-no-duplicate-disable`,`general`,{create(e){let t=Qt(e.sourceCode);for(let n of t.duplicateDisableDirectives)e.report({data:{ruleId:n.ruleId??``},loc:Jt(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`}}),ln=d(`directive-no-restricted-disable`,`general`,{create(t){let n=Qt(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:Jt(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`}}),un=d(`directive-no-unlimited-disable`,`general`,{create(e){for(let t of e.sourceCode.getAllComments()){let n=Vt(t);if(n===void 0)continue;let{kind:r}=n;Rt(r)&&(n.value===void 0||n.value===``)&&e.report({data:{kind:n.kind},loc:Kt(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`}}),dn=d(`directive-no-unused-enable`,`general`,{create(e){let t=Qt(e.sourceCode);for(let n of t.unusedEnableDirectives)e.report({data:{kind:`eslint-enable`,ruleId:n.ruleId??``},loc:Jt(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`}}),fn=d(`directive-no-use`,`general`,{create(e){let t=new Set(Bt(e.options[0],`allow`));for(let n of e.sourceCode.getAllComments()){let r=Vt(n);r===void 0||n.type===`Line`||t.has(r.kind)||e.report({loc:Kt(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`}}),pn=/\s-{2,}\s/u,mn=/^(?<kind>oxlint-disable|oxlint-enable)(?:\s|$)/u,hn=d(`directive-require-description`,`general`,{create(e){let t=new Set(Bt(e.options[0],`ignore`));function n(n){let r=Vt(n);if(r!==void 0){let{kind:n}=r;if(!zt(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=mn.exec(i);if(a===null)return;let o=a.groups?.kind;o!==void 0&&zt(o)&&(t.has(o)||pn.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`}}),gn={baseThreshold:10,errorThreshold:25,interfacePenalty:20,performanceMode:!0};function _n(e){let{callee:t}=e;return t.type===`MemberExpression`&&t.object.type===`Identifier`&&t.object.name===`Ianitor`}function vn(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 yn(e){let t=vn(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 bn(e){let t=vn(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 xn(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 Sn(e,t,n,r,i,a,o,s=0){return P(e,F(t,n,r,i,a,o)+s,r,o)}function Cn(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=Sn(s,t.typeAnnotation,n,r,i,a,o))}return s}function wn(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=Sn(l,e,n,r,i,a,o);return P(l,s*(u.length+c),r,o)}return e}function Tn(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=Cn(s,l,c,n,r,i,a);break}case`TSIntersectionType`:s=wn(s,e,c,n,r,i,a,3,0);break;case`TSMappedType`:{let{constraint:t,typeAnnotation:o}=e;s=Sn(5,t,c,n,r,i,a),o!==null&&(s=Sn(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=Sn(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=Cn(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=Sn(s,e,c,n,r,i,a,2);break}case`TSUnionType`:s=wn(s,e,c,n,r,i,a,2,-1);break;default:s=1}return s*=Tn(t,i),r.nodeCache.set(e,s),r.visitedNodes.delete(e),s}const En=d(`enforce-ianitor-check-type`,`roblox`,{create(e){let t=e.options[0]??{},n={...gn,...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=yn(e.typeAnnotation);if(t!==void 0&&(s=!0,i.add(t)),bn(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`||!_n(t)||(s=!0,r.type===`Identifier`&&r.typeAnnotation!==void 0&&r.typeAnnotation!==null))return;let i=xn(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:gn.baseThreshold,description:`Minimum complexity score before missing Ianitor.Check<T> annotations are reported.`,minimum:1,type:`number`},errorThreshold:{default:gn.errorThreshold,description:`Complexity score used to cap recursive analysis before reporting is determined.`,minimum:1,type:`number`},interfacePenalty:{default:gn.interfacePenalty,description:`Complexity penalty applied when an Ianitor validator builds an interface-like shape.`,minimum:1,type:`number`},performanceMode:{default:gn.performanceMode,description:`Whether repeated type nodes are cached during complexity analysis.`,type:`boolean`}},type:`object`}],type:`problem`}}),Dn=[`makeSynchronous`,`workerize`],On=[`@isolated`],kn=new Set([`browser`,`chrome`]),An=new Set([`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`MethodDefinition`,`Property`,`VariableDeclaration`,`VariableDeclarator`]),jn=new Set([`FunctionDeclaration`,`FunctionExpression`]),Mn=new Set([`ClassDeclaration`,`ClassExpression`]),Nn=/(?:\*\s*)*/u;function Pn(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 Fn(e){if(!_(e))return{comments:On.map(e=>e.toLowerCase()),functions:new Set(Dn),overrideGlobals:new Map,selectors:[]};let t=y(e.comments)?e.comments.map(e=>e.toLowerCase()):On.map(e=>e.toLowerCase()),n=y(e.functions)?new Set(e.functions):new Set(Dn),r=y(e.selectors)?e.selectors:[],i=new Map;if(_(e.overrideGlobals))for(let[t,n]of Object.entries(e.overrideGlobals)){let e=Pn(n);e!==void 0&&i.set(t,e)}return{comments:t,functions:n,overrideGlobals:i,selectors:r}}function In(e){return N(e)}function Ln(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`&&h(e.key.value))return e.key.value}}function Rn(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:S(e.callee)===n}function zn(e){let{parent:t}=e;if(t?.type===`CallExpression`&&t.arguments[0]===e){if(Rn(t,`browser`,`execute`))return`callee of method named "browser.execute"`;if(Rn(t,`page`,`evaluate`))return`callee of method named "page.evaluate"`}}function Bn(e){if(e.callee.type!==`MemberExpression`||e.callee.computed||e.callee.optional||S(e.callee)!==`executeScript`)return;let t=e.callee.object;if(!(t.type!==`MemberExpression`||t.computed||t.optional)&&S(t)===`scripting`&&!(t.object.type!==`Identifier`||!kn.has(t.object.name)))return t.object.name}function Vn(e){let t=e.parent;if(t?.type!==`Property`||t.kind!==`init`||t.value!==e||Ln(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=Bn(r);if(i!==void 0)return`property "func" passed to "${i}.scripting.executeScript"`}function Hn(e,t){for(let n of e.arguments)if(n===t)return!0;return!1}function Un(e,t){if(t.size===0)return;let{parent:n}=e;if(!(n?.type!==`CallExpression`||!Hn(n,e))&&!(n.callee.type!==`Identifier`||!t.has(n.callee.name)))return`callee of function named ${JSON.stringify(n.callee.name)}`}function Wn(e,t){return t===null||!An.has(t.type)?!1:t.type===`Property`||t.type===`MethodDefinition`?t.value===e:!0}function Gn(e){return e.replace(Nn,``).trim().toLowerCase()}function Kn(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||!Wn(n,r))return;n=r}}function qn(e,t,n){if(n.length===0)return;let r=Kn(e,t);if(r===void 0)return;let i=Gn(r);for(let e of n)if(i===e||i.startsWith(`${e} - `)||i.startsWith(`${e} -- `))return`follows comment ${JSON.stringify(e)}`}function Jn(e,t,n){return qn(e,t,n.comments)??Un(t,n.functions)??zn(t)??Vn(t)}function Yn(e){let{parent:t}=e;return t!==null&&(t.type===`TSTypeReference`||t.type===`TSTypeQuery`)}function Xn(e,t){let n=e;for(;n!==null;){if(n===t)return!0;n=n.upper}return!1}function Zn(e,t){let{resolved:n}=t;return n?.scope===void 0||!Xn(n.scope,e)}function Qn(e){let t=[],n=[e];for(let r of n){w(n,r);for(let n of r.references)Zn(e,n)&&t.push(n)}return t}function $n(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 er(e,t,n,r){let i=e.sourceCode.getScope(t);for(let t of Qn(i)){let{identifier:i}=t;if(Yn(i))continue;let a=$n(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 tr(e,t,n){let r=e.visitorKeys[t.type]??[];for(let e of r){if(!_(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 nr(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 rr(e,t,n){return e===t?!1:jn.has(e.type)?!0:Mn.has(e.type)?(nr(e,n),!0):!1}function ir(e,t,n){let r=[t];for(let i of r)if(!rr(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}tr(e.sourceCode,i,r)}}function ar(e,t,n,r,i){i.has(t)||(i.add(t),er(e,t,n,r),ir(e,t,n))}const or=d(`isolated-functions`,`general`,{create(e){let t=Fn(e.options[0]),n=new WeakSet;function r(r){if(!In(r))return;let i=Jn(e.sourceCode,r,t);i!==void 0&&ar(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=>{In(r)&&ar(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`}}),sr={default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`};function cr(e){return e===`roblox-ts`||e===`standard`}const lr=new Set([`react`,`react-dom`]),ur=new Set([`@rbxts/react`,`@rbxts/roact`]);function dr(e){return e===`standard`?lr:ur}function fr(e){return dr(hr(e))}function pr(e,t){return t.has(e.source.value)}function mr(e,t,n,r){if(pr(e,t))for(let t of e.specifiers){if(t.type===`ImportDefaultSpecifier`||t.type===`ImportNamespaceSpecifier`){n.add(t.local.name);continue}let e=le(t);e!==void 0&&r(e,t.local.name)}}function hr(e){return!_(e)||e.environment!==`standard`?`roblox-ts`:`standard`}function gr(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function _r(e,t){if(e.type!==`ImportBinding`)return!1;let n=gr(e.node);return n!==void 0&&t.has(n.source.value)}const vr=new Map([[`useEffect`,1],[`useInsertionEffect`,1],[`useLayoutEffect`,1]]),yr=new Set([`useCallback`,`useMemo`]),br=new Set([`useBinding`,`useRef`]),xr=new Set([`useReducer`,`useState`,`useTransition`]),Sr=new Set([...br,...xr]),Cr=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`ClassExpression`,`FunctionExpression`,`NewExpression`,`ObjectExpression`]);function wr(e){return e===`aggressive`||e===`definite`||e===`moderate`}function Tr(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 Er(e){let t=x(e);for(;t.type===`MemberExpression`;)t=x(t.object);return t.type===`Identifier`?t:void 0}function Dr(e){return Cr.has(e.type)}function Or(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 kr(e,t,n){let r=e.elements[n];return r!=null&&Or(r)===t}function Ar(e){return e.scope.type===`module`||e.scope.type===`global`}function jr(e,t){if(`hooks`in e&&Array.isArray(e.hooks))for(let n of e.hooks){if(!(_(n)&&`name`in n&&h(n.name)))continue;let e=`dependenciesIndex`in n&&g(n.dependenciesIndex)?n.dependenciesIndex:1;t.set(n.name,e)}}const Mr=d(`memoized-effect-dependencies`,`react`,{create(e){let[t]=e.options,n=_(t)?t:{},r=`mode`in n&&wr(n.mode)?n.mode:`definite`,i=`environment`in n&&cr(n.environment)?n.environment:`roblox-ts`,a=new Map(vr);jr(n,a);let o=dr(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 v(e){let{callee:t}=e;if(t.type===`Identifier`)return l.has(t.name);if(t.type===`MemberExpression`){let e=Tr(t,s);return e!==void 0&&yr.has(e)}return!1}function y(e){let{callee:t}=e;if(t.type===`Identifier`){let e=u.get(t.name);return e===void 0?void 0:br.has(e)?`whole`:xr.has(e)?`index1`:void 0}if(t.type===`MemberExpression`){let e=Tr(t,s);if(e===void 0)return;if(br.has(e))return`whole`;if(xr.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:x(n.init);return a===void 0?`unknown`:Dr(a)?`unmemoized`:a.type===`CallExpression`?b(a,n.id,t):`unknown`}function b(e,t,n){if(v(e))return`memoized`;let i=y(e);return i===`whole`||i===`index1`&&t.type===`ArrayPattern`&&kr(t,n,1)?`memoized`:r===`definite`?`unknown`:`unmemoized`}function S(e){let t=p.get(e);if(t!==void 0)return t;if(Ar(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 C(e){let t=x(e);if(Dr(t))return`unmemoized`;if(t.type===`CallExpression`)return r===`definite`?`unknown`:`unmemoized`;let n=Er(t);if(n===void 0)return`unknown`;let i=g(n);return i===void 0?`unknown`:S(i)}function w(e){let{callee:t}=e;if(t.type===`Identifier`)return c.get(t.name);if(t.type===`MemberExpression`){let e=Tr(t,s);return e===void 0?void 0:a.get(e)}}return{CallExpression(t){let n=w(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(C(t)!==`unmemoized`)continue;let n=m.getText(t);e.report({data:{name:n},messageId:`unmemoizedDependency`,node:t})}},ImportDeclaration(e){mr(e,o,s,(e,t)=>{if(a.has(e)){let n=a.get(e);c.set(t,n??1)}yr.has(e)&&l.add(t),Sr.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(vr,([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 Nr(e){return e.type===`Identifier`||e.type===`PrivateIdentifier`||I(e)}function I(e){let t=x(e);return t.type===`Identifier`||Xe(t)?!0:M(t)?Pr(t):ye(t)?t.operator!==`delete`&&I(t.argument):be(t)||xe(t)?Fr(t):Se(t)?Ir(t):Ge(t)?zr(t.expressions):He(t)?Lr(t):Ue(t)?Rr(t):Ce(t)?zr(t.expressions):Ie(t)}function Pr(e){return e.optional||e.object.type===`Super`||!I(e.object)?!1:!e.computed||I(e.property)}function Fr(e){return I(e.left)&&I(e.right)}function Ir(e){return I(e.test)&&I(e.consequent)&&I(e.alternate)}function Lr(e){for(let t of e.elements)if(t!==null&&(t.type===`SpreadElement`||!I(t)))return!1;return!0}function Rr(e){for(let t of e.properties)if(t.type===`SpreadElement`||t.kind!==`init`||t.method||t.computed&&!Nr(t.key)||!I(t.value))return!1;return!0}function zr(e){for(let t of e)if(!I(t))return!1;return!0}const Br={environment:`roblox-ts`,requireExplicitGenericOnNewArray:!0};function Vr(e){return e.type===`Identifier`}function Hr(e,t){let n=x(t.callee);return!Vr(n)||n.name!==`Array`?!1:!E(e,n,`Array`)}function Ur(e,t){if(e.type!==`TSTypeReference`||!Vr(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 Wr=/:\s*(?:Array<.+>|ReadonlyArray<.+>)\s*=/u;function Gr(e){return Wr.exec(e)!==null}function Kr(e){if(Vr(e)||e.type===`ArrayPattern`||e.type===`ObjectPattern`)return e.typeAnnotation??void 0}function qr(e,t){let{parent:n}=e;if(k(n)&&n.init===e){let e=Kr(n.id);return e!==void 0&&Ur(e.typeAnnotation,t)!==void 0}return Ye(n)&&n.right===e?Gr(t.getText(n)):Te(n)&&n.value===e&&n.typeAnnotation!==void 0&&n.typeAnnotation!==null?Ur(n.typeAnnotation.typeAnnotation,t)!==void 0:Je(n)&&n.expression===e||qe(n)&&n.expression===e?Ur(n.typeAnnotation,t)!==void 0:!1}function Jr(e){if(e===void 0)return!1;let{typeAnnotation:t}=e;return t.type!==`TSTypeReference`||!Vr(t.typeName)?!1:t.typeName.name===`ReadonlyArray`}function Yr(e){let t=x(e);return Ie(t)&&`value`in t?!g(t.value):He(t)||Ue(t)||Le(t)||Ae(t)||Ne(t)?!0:Ge(t)?t.expressions.length===0:ye(t)?t.operator===`void`||t.operator===`typeof`&&!t.prefix:!1}function Xr(e,t){let n=x(e);if(!(!me(n)||n.optional)&&!(!M(n.callee)||n.callee.optional)&&!(!Vr(n.callee.object)||n.callee.object.name!==t))return S(n.callee)===`push`?n:void 0}function Zr(e,t,n){for(let r=t;r<e.length;r+=1){let t=e[r];if(!(t===void 0||!Ke(t))&&Xr(t.expression,n)!==void 0)return!0}return!1}function Qr(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 $r(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 ei(e,t,n){let{sourceCode:r}=e;if(t.arguments.length===0){ti(e,t,n);return}if(t.arguments.length>1){ni(e,t,n);return}ri(e,t,n,r)}function ti(e,t,n){n.requireExplicitGenericOnNewArray&&(t.typeArguments!==void 0&&t.typeArguments!==null&&t.typeArguments.params.length>0||qr(t,e.sourceCode)||e.report({messageId:`requireExplicitGenericOnNewArray`,node:t}))}function ni(e,t,n){let[r]=t.arguments;if(r===void 0||r.type!==`SpreadElement`&&n.environment===`roblox-ts`&&!Yr(r))return;let i=Qr(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 ri(e,t,n,r){let[i]=t.arguments;if(i===void 0)return;if(i.type===`SpreadElement`){ii(e,t,r.getText(i.argument));return}if(!Yr(i)){ai(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 ii(e,t,n){e.report({messageId:`avoidSingleArgumentConstructor`,node:t,suggest:[{fix(e){return e.replaceText(t,`[...${n}]`)},messageId:`suggestArrayLiteral`}]})}function ai(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 oi(e,t,n){let r=t[n];if(r===void 0||!Oe(r)||r.kind!==`const`&&r.kind!==`let`||r.declarations.length!==1)return;let[i]=r.declarations;if(i===void 0||!Vr(i.id)||i.init===null||!Ve(i.init)||!Hr(e,i.init)||i.init.arguments.length>0||Jr(Kr(i.id)))return;let a=i.id.name,o=si(e,t,n+1,a);if(o.pushStatements.length!==0&&!Zr(t,o.nextIndex,a))return{arrayIdentifierName:a,declarator:i,hasUnsafeArgument:o.hasUnsafeArgument,literalText:`[${o.argumentParts.join(`, `)}]`,pushStatements:o.pushStatements,statement:r}}function si(e,t,n,r){let i=[],a=[],o=!1,s=n;for(;s<t.length;){let n=t[s];if(n===void 0||!Ke(n))break;let c=Xr(n.expression,r);if(c===void 0||c.arguments.length===0)break;i.push(n),o=ci(e,c,a)||o,s+=1}return{argumentParts:a,hasUnsafeArgument:o,nextIndex:s,pushStatements:i}}function ci(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 li=d(`no-array-constructor-elements`,`roblox`,{create(e){let t=e.options?.[0],n=_(t)?{...Br,...t}:{...Br},{sourceCode:r}=e;function i(t){for(let n=0;n<t.length;n+=1){let i=oi(r,t,n);if(i!==void 0){if(!i.hasUnsafeArgument){e.report({fix(e){return $r(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 $r(e,r,i.declarator,i.pushStatements,i.literalText)},messageId:`suggestCollapseArrayPushInitialization`}]})}}}return{BlockStatement(e){i(e.body)},NewExpression(t){Hr(r,t)&&ei(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`}}),ui=new Set([`parent`,`range`,`loc`,`tokens`,`comments`]);function di(e){return e.type===`Identifier`}function fi(e){return`type`in e&&typeof e.type==`string`}function pi(e,t){for(let n of Object.keys(e)){if(ui.has(n))continue;let r=Reflect.get(e,n);r!=null&&t.push(r)}}function mi(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(fi(e)){if(e.type===`Identifier`&&e.name===t)return!0;pi(e,n)}}}return!1}function hi(e,t){let n=x(t.callee);return!di(n)||n.name!==`Array`?!1:!E(e,n,`Array`)}function gi(e,t,n){if(!Ke(e))return;let{expression:r}=e;if(!ve(r)||r.operator!==`=`)return;let{left:i}=r;if(!(M(i)&&i.computed))return;let{object:a,property:o}=i;if(!(!di(a)||a.name!==t)&&!(!Be(o)||o.value!==n))return{expression:r,statement:e}}function _i(e,t,n){let r=t[n];if(r===void 0||!Oe(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(!Ve(a)||a.arguments.length>0||!hi(e,a)||!Qe(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=gi(e,o,l);if(n!==void 0){s.push(n),l+=1,c+=1;continue}if(mi(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 vi(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 from"node:path";import{parse as n}from"yuku-parser";import{existsSync as r,readFileSync as i,readdirSync as a}from"node:fs";import{ResolverFactory as o}from"oxc-resolver";import{type as s}from"arktype";import{Minimatch as c,minimatch as l}from"minimatch";import{definePlugin as u}from"oxlint-plugin-utilities";function d(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 f(e,t){return e.type===`TSParenthesizedType`?f(e.typeAnnotation,t):e.type===`TSArrayType`?`Array<${f(e.elementType,t)}>`:e.type===`TSTypeOperator`&&e.operator===`readonly`&&e.typeAnnotation.type===`TSArrayType`?`ReadonlyArray<${f(e.typeAnnotation.elementType,t)}>`:t.getText(e)}function p({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 m=d(`array-type-generic`,`naming`,{createOnce(e){function t(t){e.report({fix(n){return n.replaceText(t,f(t,e.sourceCode))},messageId:`useGenericArrayType`,node:t})}return{TSArrayType(e){p(e)&&t(e)},TSTypeOperator(e){e.operator===`readonly`&&e.typeAnnotation.type===`TSArrayType`&&p(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 h(e){return typeof e==`string`}function g(e){return typeof e==`number`}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){return h(e)&&e.length>0}function y(e){if(!Array.isArray(e))return!1;for(let t of e)if(!h(t))return!1;return!0}function ee(e){if(!_(e))return!1;for(let t of Object.values(e))if(!h(t))return!1;return!0}function te(e){return g(e)&&!Number.isNaN(e)}function b(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 x(e){return e.computed?e.property.type===`Literal`&&h(e.property.value)?e.property.value:void 0:e.property.type===`Identifier`?e.property.name:void 0}function S(e,t){let n=e;for(;n!==null;){let e=n.set.get(t);if(e!==void 0)return e;n=n.upper}}function C(e,t){for(let n of t.childScopes)e.push(n)}function ne(e,t){let n=[e.getScope(e.ast)];for(let e of n){C(n,e);for(let n of e.variables)t(n)}}function w(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}function re(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===`
2
+ `||t===`\r`){i+=1;continue}break}return[n,i]}function ie(e,t){if(e.getCommentsInside(t).length>0)return!0;let n=t.loc.start.line,r=t.loc.end.line;for(let r of e.getCommentsBefore(t)){let e=r.loc.end.line;if(e===n||e===n-1)return!0}for(let n of e.getCommentsAfter(t)){let e=n.loc.start.line;if(e===r||e===r+1)return!0}return!1}const ae=/^[A-Z]/v,oe=new Set([`end`,`loc`,`parent`,`range`,`start`,`type`]);function T(e){return _(e)&&h(e.type)}function se(e){return oe.has(e)}function E(e){return ae.test(e)}function D(e){return e.type===`VariableDeclarator`}function ce(e){return le(e.typeAnnotation)?e.typeAnnotation:void 0}function le(e){return _(e)&&`type`in e&&e.type===`TSTypeAnnotation`}function ue(e,t){return e.type===`Identifier`&&e.name===t}function de(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 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)&&x(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 O(e){return e.type===`Identifier`&&h(e.name)}function k(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 A(e){return e.type===`Literal`&&h(e.value)}function ve(e){return e.type===`CallExpression`}function ye(e){return e.type===`ImportSpecifier`}function be(e){return e.type===`ExportSpecifier`}function xe(e){return e.type===`Property`}function j(e){return e.type===`MemberExpression`}function Se(e){return e.type===`AssignmentExpression`}function Ce(e){return e.type===`UnaryExpression`}function we(e){return e.type===`BinaryExpression`}function Te(e){return e.type===`LogicalExpression`}function Ee(e){return e.type===`ConditionalExpression`}function De(e){return e.type===`SequenceExpression`}function Oe(e){return e.type===`MethodDefinition`||e.type===`TSAbstractMethodDefinition`}function ke(e){return e.type===`PropertyDefinition`||e.type===`TSAbstractPropertyDefinition`}function Ae(e){return e.type===`ImportDefaultSpecifier`}function je(e){return e.type===`ImportNamespaceSpecifier`}function Me(e){return e.type===`VariableDeclaration`}function Ne(e){return e.type===`ExportNamedDeclaration`}function Pe(e){return e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function Fe(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionExpression`}function M(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function Ie(e,t){return ue(e.callee,t)}function Le(e){return e.type===`ClassDeclaration`||e.type===`ClassExpression`}function Re(e){return e.type===`TSTypeAliasDeclaration`}function ze(e){return e.type===`TSPropertySignature`}function Be(e){return e.type===`Literal`}function Ve(e){return e.type===`ArrowFunctionExpression`}function He(e){return Pe(e)||Ve(e)}function Ue(e){return e.type===`TSQualifiedName`}function We(e){return e.type===`Literal`&&g(e.value)}function Ge(e){return e.type===`NewExpression`}function Ke(e){return e.type===`ArrayExpression`}function qe(e){return e.type===`ObjectExpression`}function Je(e){return e.type===`ObjectPattern`}function Ye(e){return e.type===`TemplateLiteral`}function Xe(e){return e.type===`ExpressionStatement`}function Ze(e){return e.type===`TSTypeAssertion`}function Qe(e){return e.type===`TSAsExpression`}function $e(e){return e.type===`AssignmentPattern`}function et(e){return e.type===`ThisExpression`}function tt(e){if(!ve(e)||e.optional)return!1;let{callee:t}=e;if(!k(t)||t.name!==`require`||e.arguments.length!==1)return!1;let[n]=e.arguments;return n!==void 0&&A(n)}function nt(e){return e.type===`Identifier`}function rt(e){return e.type!==`PrivateIdentifier`}const it={bannedClasses:new Map,bannedProperties:new Map};function at(e){return e.type===`JSXIdentifier`?e.name:e.name.name}function ot(e){let t=new Map;if(y(e)){for(let n of e)t.set(n.toLowerCase(),{message:``,originalName:n});return t}if(ee(e))for(let[n,r]of Object.entries(e))t.set(n.toLowerCase(),{message:r,originalName:n});return t}function st(e){let t=new Map;if(e===void 0||!_(e))return t;for(let[n,r]of Object.entries(e)){if(!_(r))continue;let e=new Map;for(let[t,n]of Object.entries(r))h(n)&&e.set(t.toLowerCase(),{message:n,propertyName:t});e.size>0&&t.set(n.toLowerCase(),e)}return t}function ct(e){if(!_(e))return it;let{bannedInstances:t,bannedProperties:n}=e;return{bannedClasses:ot(t),bannedProperties:st(n)}}function lt(e){let t=e;for(;t.upper!==null&&t.type!==`function`&&t.type!==`module`&&t.type!==`global`;)t=t.upper;return t}function ut(e){if(!Ie(e,`Instance`))return;let[t]=e.arguments;if(!(t?.type!==`Literal`||!h(t.value)))return t.value}const dt=d(`ban-instances`,`roblox`,{create(e){let t=ct(e.options[0]);if(t.bannedClasses.size===0&&t.bannedProperties.size===0)return{};let{sourceCode:n}=e,{bannedClasses:r,bannedProperties:i}=t,a=new Map;function o(t,n){if(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 s(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 c(e){if(e.id.type!==`Identifier`||e.init===null)return;let t=b(e.init);if(t.type!==`NewExpression`)return;let r=ut(t);if(r===void 0)return;let i=S(n.getScope(e),e.id.name);i!==void 0&&a.set(i,{className:r,classNameKey:r.toLowerCase(),functionScope:lt(i.scope)})}function l(e){let t=n.getScope(e),r=S(t,e.name);if(r===void 0)return;let i=a.get(r);if(i!==void 0)return i.functionScope===lt(t)?i:void 0}return{AssignmentExpression(e){if(e.left.type!==`MemberExpression`)return;let t=x(e.left);if(t===void 0)return;let n=b(e.left.object);if(n.type!==`Identifier`)return;let r=l(n);if(r===void 0)return;let a=i.get(r.classNameKey);if(a===void 0)return;let o=a.get(t.toLowerCase());o!==void 0&&s(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=t.toLowerCase(),c=r.get(a);c!==void 0&&o(e,c);let l=i.get(a);if(l!==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=l.get(e.toLowerCase());r!==void 0&&s(n,t,r)}},NewExpression(e){let t=ut(e);if(t===void 0)return;let n=r.get(t.toLowerCase());n!==void 0&&o(e,n)},VariableDeclarator(e){c(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 le(t)?t:void 0}const ht=d(`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(!(_(e)&&`bannedTypes`in e))return t;let{bannedTypes:n}=e;if(n===void 0)return t;if(y(n)){for(let e of n)t.set(e.toLowerCase(),{originalName:e,replacementName:void 0});return t}if(ee(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=d(`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(!_(e))return n;for(let[t,r]of Object.entries(e)){if(r===!1){n.delete(t);continue}h(r)&&r.length>0&&n.set(t,r)}return n}function At(e){let t=_(e)?e:{},n=t.extendDefaultReplacements!==!1,r=kt(t.replacements,n),i=new Set;if(_(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=d(`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&&ne(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(!_(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(!h(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=d(`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=d(`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=d(`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=d(`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=d(`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=d(`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=d(`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=d(`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 N(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 N(e,P(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 N(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 P(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=N(P(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=N(N(3,P(t,c,n,r,i,a),n,a),P(o,c,n,r,i,a),n,a),s=N(N(s,P(l,c,n,r,i,a),n,a),P(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=N(s,P(t.typeAnnotation,c,n,r,i,a),n,a))}if(`returnType`in e){let{returnType:t}=e;t?.type===`TSTypeAnnotation`&&(s=N(s,P(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=N(s,t.length*5,n,a));let l=o.body;s=N(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=N(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=d(`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=P(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=P(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(!_(e))return{comments:Mn.map(e=>e.toLowerCase()),functions:new Set(jn),overrideGlobals:new Map,selectors:[]};let t=y(e.comments)?e.comments.map(e=>e.toLowerCase()):Mn.map(e=>e.toLowerCase()),n=y(e.functions)?new Set(e.functions):new Set(jn),r=y(e.selectors)?e.selectors:[],i=new Map;if(_(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 M(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`&&h(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:x(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||x(e.callee)!==`executeScript`)return;let t=e.callee.object;if(!(t.type!==`MemberExpression`||t.computed||t.optional)&&x(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){C(n,r);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(!_(t))break;let r=t[e];if(Array.isArray(r))for(let e of r)T(e)&&n.push(e);else T(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=d(`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(F(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 F(e){return!_(e)||e.environment!==`standard`?`roblox-ts`:`standard`}function yr(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function br(e,t){if(e.type!==`ImportBinding`)return!1;let n=yr(e.node);return n!==void 0&&t.has(n.source.value)}function xr(e,t,n){if(e===void 0)return!1;for(let r of e.defs)if(br(r,n)&&r.node.type===`ImportSpecifier`&&me(r.node)===t)return!0;return!1}function Sr(e,t){if(e===void 0)return!1;for(let n of e.defs)if(br(n,t)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0;return!1}function Cr(e,t,n,r){let{callee:i}=t;if(i.type===`Identifier`){let t=S(e.getScope(i),i.name);return t!==void 0&&t.defs.some(e=>{if(e.type!==`ImportBinding`||e.node.type!==`ImportSpecifier`)return!1;let t=yr(e.node);if(t===void 0||!r.has(t.source.value))return!1;let i=me(e.node);return i!==void 0&&n.has(i)})}return i.type!==`MemberExpression`||i.computed||i.object.type!==`Identifier`||i.property.type!==`Identifier`?!1:Sr(S(e.getScope(i.object),i.object.name),r)&&n.has(i.property.name)}const wr=new Map([[`useEffect`,1],[`useInsertionEffect`,1],[`useLayoutEffect`,1]]),Tr=new Set([`useCallback`,`useMemo`]),Er=new Set([`useBinding`,`useRef`]),Dr=new Set([`useReducer`,`useState`,`useTransition`]),Or=new Set([...Er,...Dr]),kr=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`ClassExpression`,`FunctionExpression`,`NewExpression`,`ObjectExpression`]);function Ar(e){return e===`aggressive`||e===`definite`||e===`moderate`}function jr(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 Mr(e){let t=b(e);for(;t.type===`MemberExpression`;)t=b(t.object);return t.type===`Identifier`?t:void 0}function Nr(e){return kr.has(e.type)}function Pr(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 Fr(e,t,n){let r=e.elements[n];return r!=null&&Pr(r)===t}function Ir(e){return e.scope.type===`module`||e.scope.type===`global`}function Lr(e,t){if(`hooks`in e&&Array.isArray(e.hooks))for(let n of e.hooks){if(!(_(n)&&`name`in n&&h(n.name)))continue;let e=`dependenciesIndex`in n&&g(n.dependenciesIndex)?n.dependenciesIndex:1;t.set(n.name,e)}}const Rr=d(`memoized-effect-dependencies`,`react`,{create(e){let[t]=e.options,n=_(t)?t:{},r=`mode`in n&&Ar(n.mode)?n.mode:`definite`,i=`environment`in n&&fr(n.environment)?n.environment:`roblox-ts`,a=new Map(wr);Lr(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 v(e){let{callee:t}=e;if(t.type===`Identifier`)return l.has(t.name);if(t.type===`MemberExpression`){let e=jr(t,s);return e!==void 0&&Tr.has(e)}return!1}function y(e){let{callee:t}=e;if(t.type===`Identifier`){let e=u.get(t.name);return e===void 0?void 0:Er.has(e)?`whole`:Dr.has(e)?`index1`:void 0}if(t.type===`MemberExpression`){let e=jr(t,s);if(e===void 0)return;if(Er.has(e))return`whole`;if(Dr.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:b(n.init);return a===void 0?`unknown`:Nr(a)?`unmemoized`:a.type===`CallExpression`?te(a,n.id,t):`unknown`}function te(e,t,n){if(v(e))return`memoized`;let i=y(e);return i===`whole`||i===`index1`&&t.type===`ArrayPattern`&&Fr(t,n,1)?`memoized`:r===`definite`?`unknown`:`unmemoized`}function x(e){let t=p.get(e);if(t!==void 0)return t;if(Ir(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 S(e){let t=b(e);if(Nr(t))return`unmemoized`;if(t.type===`CallExpression`)return r===`definite`?`unknown`:`unmemoized`;let n=Mr(t);if(n===void 0)return`unknown`;let i=g(n);return i===void 0?`unknown`:x(i)}function C(e){let{callee:t}=e;if(t.type===`Identifier`)return c.get(t.name);if(t.type===`MemberExpression`){let e=jr(t,s);return e===void 0?void 0:a.get(e)}}return{CallExpression(t){let n=C(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(S(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)}Tr.has(e)&&l.add(t),Or.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(wr,([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`}}),zr=new Set([`Property`,`ObjectExpression`,`ArrayExpression`,`SequenceExpression`]),Br=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`]),Vr=new WeakMap;function Hr(e){let{ast:t}=e,n=Vr.get(t);if(n!==void 0)return n;let r=Ur(e);return Vr.set(t,r),r}function Ur(e){let t={referenceByIdentifier:new Map,sourceCode:e,traversalByRoot:new WeakMap};Jr(t);let n=[],r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap;return Yr(t,n),{callExpressions:n,getArgumentUpstreamReferences(e){let n=i.get(e);return n===void 0&&(n=ni(t,e),i.set(e,n)),n},getCallExpression(e){if(o.has(e))return o.get(e);let t=ti(e);return o.set(e,t),t},getDescendantCallExpressions(e){return Wr(t,e).callExpressions},getDescendantIfStatements(e){return Wr(t,e).ifStatements},getDownstreamReferences(e){return Wr(t,e).references},getReference(e){return t.referenceByIdentifier.get(e)},getSynchronousCallChain(e){let n=a.get(e);return n===void 0&&(n=ii(t,e),a.set(e,n)),n},getUpstreamReferences(e){let n=r.get(e);return n===void 0&&(n=$r(t,e),r.set(e,n)),n},isSynchronousWithin(e,t){return ri(e,t)}}}function Wr(e,t){let n=e.traversalByRoot.get(t);return n===void 0&&(n={callExpressions:[],ifStatements:[],references:[]},Gr(e,t,n),e.traversalByRoot.set(t,n)),n}function Gr(e,t,n){let r=[t];for(;r.length>0;){let i=r.pop();if(i===void 0)break;if(Zr(i)){let t=Qr(e,i);t!==void 0&&n.references.push(t)}qr(i,t,n),Xr(e,i,r,!1)}}function Kr(e,t,n){let r=[t];for(;r.length>0;){let i=r.pop();if(i===void 0)break;if(Zr(i)){let t=Qr(e,i);t!==void 0&&n.references.push(t)}qr(i,t,n),Xr(e,i,r,!0)}}function qr(e,t,n){e!==t&&(e.type===`CallExpression`&&n.callExpressions.push(e),e.type===`IfStatement`&&n.ifStatements.push(e))}function Jr(e){let t={callExpressions:[],ifStatements:[],references:[]};Kr(e,e.sourceCode.ast,t);for(let n of t.references)Zr(n.identifier)&&e.referenceByIdentifier.set(n.identifier,n)}function Yr(e,t){Kr(e,e.sourceCode.ast,{callExpressions:t,ifStatements:[],references:[]})}function Xr(e,t,n,r){let i=e.sourceCode.visitorKeys[t.type]??[];for(let e of i){if(e===`arguments`&&!r)continue;let i=Reflect.get(t,e);if(Array.isArray(i))for(let e=i.length-1;e>=0;--e){let t=i[e];T(t)&&n.push(t)}else T(i)&&n.push(i)}}function Zr(e){return e.type===`Identifier`}function Qr(e,t){return e.sourceCode.getScope(t).references.find(e=>e.identifier===t)}function $r(e,t){let n=[];return ei(e,t,e=>{n.push(e)},new Set),n}function ei(e,t,n,r){if(r.has(t))return;let i=n(t);if(r.add(t),i!==!1)for(let i of t.resolved?.defs??[]){if(i.type===`ImportBinding`||i.type===`Parameter`)continue;let t=ai(i);if(t!==void 0)for(let i of Wr(e,t).references)ei(e,i,n,r)}}function ti(e){let t=e.identifier.parent;for(;;){if(t.type===`CallExpression`){let n=e.identifier;for(;n.parent.type===`MemberExpression`;)n=n.parent;if(t.callee===n)return t}if(t.type===`MemberExpression`){t=t.parent;continue}return}}function ni(e,t){let n=[];for(let r of $r(e,t)){let t=ti(r);if(t!==void 0){for(let r of t.arguments)if(T(r))for(let t of Wr(e,r).references)for(let r of $r(e,t))n.push(r)}}return n}function ri(e,t){if(e===t)return!0;if(e.type===`AwaitExpression`||e.type===`UnaryExpression`&&e.operator===`void`||Br.has(e.type))return!1;let{parent:n}=e;return n!==null&&ri(n,t)}function ii(e,t){function n(e){if(e!=null)return Br.has(e.type)?e:n(e.parent)}function r(e){let t=e.identifier;for(;;){let e=t.parent;if(e===null)return!1;if(e.type===`VariableDeclarator`&&e.init===t)return!0;if(zr.has(e.type)){t=e;continue}return!1}}let i=[];return ei(e,t,e=>{let t=ti(e),a=n(t);if(t!==void 0&&a!==void 0&&ri(t,a))i.push(e);else if(r(e))i.push(e);else return!1},new Set),i}function ai(e){if(`init`in e.node)return e.node.init??void 0;if(`body`in e.node){let{body:t}=e.node;return T(t)?t:void 0}}
3
+ /*!
4
+ * react-effect-utilities.ts
5
+ *
6
+ * Ported analysis helpers from eslint-plugin-react-you-might-not-need-an-effect.
7
+ *
8
+ * MIT License
9
+ *
10
+ * Copyright (c) 2025 Nick van Dyke
11
+ *
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ * in the Software without restriction, including without limitation the rights
15
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ * copies of the Software, and to permit persons to whom the Software is
17
+ * furnished to do so, subject to the following conditions:
18
+ *
19
+ * The above copyright notice and this permission notice shall be included in all
20
+ * copies or substantial portions of the Software.
21
+ *
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ * SOFTWARE.
29
+ */
30
+ const oi=new Set([`forwardRef`,`memo`]),si=`useEffect`,ci=`useState`,li=`useRef`,ui=new WeakMap;function I(e,t){let{ast:n}=e,r=ui.get(n);r===void 0&&(r=new Map,ui.set(n,r));let i=r.get(t);if(i!==void 0)return i;let a=di(e,t);return r.set(t,a),a}function di(e,t){let n=Hr(e),r={environment:t,reactSources:fi(t),scope:n,sourceCode:e},i=[];for(let e of n.callExpressions){if(!pi(r,e))continue;let t=mi(r,e);t!==void 0&&i.push(t)}return{effects:i,findEnclosingReactNode(e){return qi(r,e)},getComponentName(e){return Ji(e)},getStateName(e){return Wi(r,e)},getUseStateDeclaration(e){return Gi(r,e)},isConstant(e){return Ri(e)},isCustomHook(e){return Si(e)},isProp(e){return Li(r,e)},isPropCall(e){return Hi(r,e)},isRefCall(e){return Ui(r,e)},isRefCurrent(e){return Bi(e)},isState(e){return Ni(r,e)},isStateCall(e){return Vi(r,e)},isStateSetter(e){return Pi(r,e)},scope:n}}function fi(e){return e===`standard`?new Set([`react`,`react-dom`]):new Set([`@rbxts/react`,`@rbxts/roact`])}function pi(e,t){return Ti(e,t)?Cr(e.sourceCode,t,new Set([si]),e.reactSources):!1}function mi(e,t){let n=hi(e,t);if(n===void 0)return;let r=e.scope.getDownstreamReferences(n),i=gi(e,t);return{cleanup:_i(n),dependencyReferences:i,functionNode:n,functionReferences:r,node:t}}function hi(e,t){let[n]=t.arguments;if(n?.type===`ArrowFunctionExpression`||n?.type===`FunctionExpression`)return n;if(n?.type!==`Identifier`)return;let r=e.scope.getReference(n)?.resolved?.defs[0];if(r===void 0)return;let i=vi(r);if(i!==void 0&&(i.type===`ArrowFunctionExpression`||i.type===`FunctionExpression`||i.type===`BlockStatement`))return i}function gi(e,t){let[,n]=t.arguments;if(n?.type===`ArrayExpression`)return e.scope.getDownstreamReferences(n)}function _i(e){if(e.type!==`ArrowFunctionExpression`&&e.type!==`FunctionExpression`||e.body?.type!==`BlockStatement`)return;let{body:t}=e.body;for(let e=t.length-1;e>=0;--e){let n=t[e];if(n?.type===`ReturnStatement`&&n.argument!==null)return n}}function vi(e){let{node:t}=e;if(`init`in t)return t.init??void 0;if(`body`in t){let{body:e}=t;return Xi(e)?e:void 0}}function yi(e){let t=e.charAt(0);return t===t.toUpperCase()}function bi(e){return e.type!==`FunctionDeclaration`&&(e.type!==`VariableDeclarator`||e.init?.type!==`ArrowFunctionExpression`&&e.init?.type!==`CallExpression`)||e.id?.type!==`Identifier`?!1:yi(e.id.name)}function xi(e,t){function n(e){if(e.type!==`VariableDeclarator`||e.init?.type!==`CallExpression`||e.init.callee.type!==`Identifier`||oi.has(e.init.callee.name))return!1;let[t]=e.init.arguments;return t?.type===`ArrowFunctionExpression`||t?.type===`FunctionExpression`}function r(t){if(t.type!==`VariableDeclarator`)return!1;let{id:n}=t;return n.type===`Identifier`?Di(e,n)?.references.some(e=>{let{parent:t}=e.identifier;return t.type!==`CallExpression`||!t.arguments.some(t=>t===e.identifier)?!1:t.callee.type===`Identifier`&&!oi.has(t.callee.name)})??!1:!1}return bi(t)&&(n(t)||r(t))}function Si(e){if(e.type!==`FunctionDeclaration`&&(e.type!==`VariableDeclarator`||e.init===null||e.init.type!==`ArrowFunctionExpression`&&e.init.type!==`FunctionExpression`)||e.id?.type!==`Identifier`)return!1;let{name:t}=e.id,n=t.charAt(3);return t.startsWith(`use`)&&t.length>3&&n===n.toUpperCase()}function Ci(e,t){if(t.type===`MemberExpression`&&Ei(e,t,ci))return!0;if(t.type!==`Identifier`)return!1;let{parent:n}=t;return n.type===`MemberExpression`&&Ei(e,n,ci)||t.name===ci?!0:ji(e,t,ci)}function wi(e,t){if(t.type===`MemberExpression`)return Ei(e,t,li);if(t.type!==`Identifier`)return!1;let{parent:n}=t;return n.type===`MemberExpression`&&Ei(e,n,li)||t.name===li?!0:ji(e,t,li)}function Ti(e,t){return t.type===`CallExpression`?t.callee.type===`Identifier`?t.callee.name===si||ji(e,t.callee,si):t.callee.type===`MemberExpression`&&Ei(e,t.callee,si):!1}function Ei(e,t,n){return t.computed||t.object.type!==`Identifier`||t.property.type!==`Identifier`?!1:t.object.name===`React`&&t.property.name===n||t.property.name===n&&Mi(e,t.object)}function Di(e,t){if(t.type!==`Identifier`)return;let{name:n}=t,r=e.sourceCode.getScope(t);for(;r!==null;){let e=r.set.get(n);if(e!==void 0)return e;r=r.upper}}function Oi(e,t,n){if(e===void 0)return!1;for(let r of e.defs)if(ki(r,t,n))return!0;return!1}function ki(e,t,n){if(e.type!==`ImportBinding`)return!1;let r=e.node.parent;if(r?.type!==`ImportDeclaration`||!n.has(r.source.value)||e.node.type!==`ImportSpecifier`)return!1;let{imported:i}=e.node;return i.type===`Identifier`&&i.name===t||i.type===`Literal`&&i.value===t}function Ai(e,t){if(e===void 0)return!1;for(let n of e.defs){if(n.type!==`ImportBinding`)continue;let e=n.node.parent;if(e?.type===`ImportDeclaration`&&t.has(e.source.value)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0}return!1}function ji(e,t,n){return t.type===`Identifier`&&Oi(Di(e,t),n,e.reactSources)}function Mi(e,t){return Ai(Di(e,t),e.reactSources)}function Ni(e,t){let n=Fi(e,t);if(n===void 0)return!1;let[r]=n;return r?.type===`Identifier`&&r.name===t.identifier.name}function Pi(e,t){let n=Fi(e,t);if(n===void 0)return!1;let[,r]=n;return r?.type===`Identifier`&&r.name===t.identifier.name}function Fi(e,t){let n=t.resolved?.defs.find(t=>Ii(e,t));if(n?.node.type!==`VariableDeclarator`||n.node.id.type!==`ArrayPattern`)return;let{elements:r}=n.node.id;if(r.length===1||r.length===2)return r}function Ii(e,t){let{node:n}=t;return n.type===`VariableDeclarator`&&n.init?.type===`CallExpression`&&Ci(e,n.init.callee)&&n.id.type===`ArrayPattern`}function Li(e,t){return t.resolved?.defs.some(t=>{if(t.type!==`Parameter`)return!1;let n=Ki(t.node);return bi(n)&&!xi(e,n)||Si(n)})??!1}function Ri(e){return(e.resolved?.defs??[]).some(e=>{if(e.node.type!==`VariableDeclarator`)return!1;let{init:t}=e.node;return t?.type===`Literal`||t?.type===`TemplateLiteral`||t?.type===`ArrayExpression`||t?.type===`ObjectExpression`})}function zi(e,t){return t.resolved?.defs.some(t=>t.node.type!==`VariableDeclarator`||t.node.init?.type!==`CallExpression`?!1:wi(e,t.node.init.callee))??!1}function Bi(e){let{parent:t}=e.identifier;return t.type===`MemberExpression`&&t.property.type===`Identifier`&&t.property.name===`current`}function Vi(e,t){return e.scope.getSynchronousCallChain(t).some(t=>Pi(e,t))}function Hi(e,t){return e.scope.getSynchronousCallChain(t).some(t=>Li(e,t))}function Ui(e,t){return e.scope.getSynchronousCallChain(t).some(t=>Bi(t)||zi(e,t))}function Wi(e,t){let n=Gi(e,t);if(n?.id.type!==`ArrayPattern`)return;let[r,i]=n.id.elements,a=r?.type===`Identifier`?r.name:void 0,o=i?.type===`Identifier`?i.name:void 0;return a??o}function Gi(e,t){let n=e.scope.getUpstreamReferences(t).find(t=>Ci(e,t.identifier))?.identifier;if(n===void 0)return;let r=n;for(;r.type!==`VariableDeclarator`;){let e=r.parent;if(e===null)return;r=e}return r}function Ki(e){if(e.type!==`ArrowFunctionExpression`)return e;let{parent:t}=e;return t.type===`CallExpression`?t.parent:t}function qi(e,t){if(t==null)return;if(bi(t)||xi(e,t)||Si(t))return Yi(t);let{parent:n}=t;if(n!==null)return qi(e,n)}function Ji(e){if(e===void 0||e.type!==`FunctionDeclaration`&&e.type!==`VariableDeclarator`)return;if(e.type===`FunctionDeclaration`){let{id:t}=e;return t===null?void 0:t.name}let t=e.id;if(t!==null&&t.type===`Identifier`)return t.name}function Yi(e){if(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`VariableDeclarator`)return e}function Xi(e){return typeof e==`object`&&!!e&&`type`in e}function Zi(e,t){let n=[];for(let r of t.dependencyReferences??[])for(let t of e.scope.getUpstreamReferences(r))e.isProp(t)&&n.push(t);return n}function Qi(e,t,n,r){for(let i of n.functionReferences){if(!t.scope.isSynchronousWithin(i.identifier,n.functionNode)||!t.isStateCall(i))continue;let a=t.scope.getCallExpression(i);if(a===void 0||t.scope.getArgumentUpstreamReferences(i).some(e=>t.isProp(e)))continue;let o=t.getStateName(i);o!==void 0&&e.report({data:{props:r.map(e=>`"${e.identifier.name}"`).join(` and `),state:o},messageId:`avoidAdjustingStateWhenAPropChanges`,node:a})}}const $i=d(`no-adjust-state-on-prop-change`,`react`,{create(e){let t=F(e.options[0]),n=I(e.sourceCode,t);return{Program(){for(let t of n.effects){if(t.dependencyReferences===void 0)continue;let r=Zi(n,t);r.length!==0&&Qi(e,n,t,r)}}}},meta:{docs:{description:`Disallow adjusting state in an effect when a prop changes.`,recommended:!0},messages:{avoidAdjustingStateWhenAPropChanges:`Avoid adjusting state when a prop changes. Instead, adjust "{{state}}" directly during render when {{props}} changes, or refactor your state to avoid this need entirely.`},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:`suggestion`}});function ea(e){return e.type===`Identifier`||e.type===`PrivateIdentifier`||L(e)}function L(e){let t=b(e);return t.type===`Identifier`||et(t)?!0:j(t)?ta(t):Ce(t)?t.operator!==`delete`&&L(t.argument):we(t)||Te(t)?na(t):Ee(t)?ra(t):Ye(t)?oa(t.expressions):Ke(t)?ia(t):qe(t)?aa(t):De(t)?oa(t.expressions):Be(t)}function ta(e){return e.optional||e.object.type===`Super`||!L(e.object)?!1:!e.computed||L(e.property)}function na(e){return L(e.left)&&L(e.right)}function ra(e){return L(e.test)&&L(e.consequent)&&L(e.alternate)}function ia(e){for(let t of e.elements)if(t!==null&&(t.type===`SpreadElement`||!L(t)))return!1;return!0}function aa(e){for(let t of e.properties)if(t.type===`SpreadElement`||t.kind!==`init`||t.method||t.computed&&!ea(t.key)||!L(t.value))return!1;return!0}function oa(e){for(let t of e)if(!L(t))return!1;return!0}const sa={environment:`roblox-ts`,requireExplicitGenericOnNewArray:!0};function ca(e){return e.type===`Identifier`}function la(e,t){let n=b(t.callee);return!ca(n)||n.name!==`Array`?!1:!w(e,n,`Array`)}function ua(e,t){if(e.type!==`TSTypeReference`||!ca(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 da=/:\s*(?:Array<.+>|ReadonlyArray<.+>)\s*=/u;function fa(e){return da.exec(e)!==null}function pa(e){if(ca(e)||e.type===`ArrayPattern`||e.type===`ObjectPattern`)return e.typeAnnotation??void 0}function ma(e,t){let{parent:n}=e;if(D(n)&&n.init===e){let e=pa(n.id);return e!==void 0&&ua(e.typeAnnotation,t)!==void 0}return $e(n)&&n.right===e?fa(t.getText(n)):ke(n)&&n.value===e&&n.typeAnnotation!==void 0&&n.typeAnnotation!==null?ua(n.typeAnnotation.typeAnnotation,t)!==void 0:Qe(n)&&n.expression===e||Ze(n)&&n.expression===e?ua(n.typeAnnotation,t)!==void 0:!1}function ha(e){if(e===void 0)return!1;let{typeAnnotation:t}=e;return t.type!==`TSTypeReference`||!ca(t.typeName)?!1:t.typeName.name===`ReadonlyArray`}function ga(e){let t=b(e);return Be(t)&&`value`in t?!g(t.value):Ke(t)||qe(t)||Ve(t)||Pe(t)||Le(t)?!0:Ye(t)?t.expressions.length===0:Ce(t)?t.operator===`void`||t.operator===`typeof`&&!t.prefix:!1}function _a(e,t){let n=b(e);if(!(!ve(n)||n.optional)&&!(!j(n.callee)||n.callee.optional)&&!(!ca(n.callee.object)||n.callee.object.name!==t))return x(n.callee)===`push`?n:void 0}function va(e,t,n){for(let r=t;r<e.length;r+=1){let t=e[r];if(!(t===void 0||!Xe(t))&&_a(t.expression,n)!==void 0)return!0}return!1}function ya(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 ba(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===`
31
+ `&&--s;break}return[e.replaceText(n.init,i),e.removeRange([s,o.range[1]])]}function xa(e,t,n){let{sourceCode:r}=e;if(t.arguments.length===0){Sa(e,t,n);return}if(t.arguments.length>1){Ca(e,t,n);return}wa(e,t,n,r)}function Sa(e,t,n){n.requireExplicitGenericOnNewArray&&(t.typeArguments!==void 0&&t.typeArguments!==null&&t.typeArguments.params.length>0||ma(t,e.sourceCode)||e.report({messageId:`requireExplicitGenericOnNewArray`,node:t}))}function Ca(e,t,n){let[r]=t.arguments;if(r===void 0||r.type!==`SpreadElement`&&n.environment===`roblox-ts`&&!ga(r))return;let i=ya(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 wa(e,t,n,r){let[i]=t.arguments;if(i===void 0)return;if(i.type===`SpreadElement`){Ta(e,t,r.getText(i.argument));return}if(!ga(i)){Ea(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 Ta(e,t,n){e.report({messageId:`avoidSingleArgumentConstructor`,node:t,suggest:[{fix(e){return e.replaceText(t,`[...${n}]`)},messageId:`suggestArrayLiteral`}]})}function Ea(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 Da(e,t,n){let r=t[n];if(r===void 0||!Me(r)||r.kind!==`const`&&r.kind!==`let`||r.declarations.length!==1)return;let[i]=r.declarations;if(i===void 0||!ca(i.id)||i.init===null||!Ge(i.init)||!la(e,i.init)||i.init.arguments.length>0||ha(pa(i.id)))return;let a=i.id.name,o=Oa(e,t,n+1,a);if(o.pushStatements.length!==0&&!va(t,o.nextIndex,a))return{arrayIdentifierName:a,declarator:i,hasUnsafeArgument:o.hasUnsafeArgument,literalText:`[${o.argumentParts.join(`, `)}]`,pushStatements:o.pushStatements,statement:r}}function Oa(e,t,n,r){let i=[],a=[],o=!1,s=n;for(;s<t.length;){let n=t[s];if(n===void 0||!Xe(n))break;let c=_a(n.expression,r);if(c===void 0||c.arguments.length===0)break;i.push(n),o=ka(e,c,a)||o,s+=1}return{argumentParts:a,hasUnsafeArgument:o,nextIndex:s,pushStatements:i}}function ka(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}L(i)||(r=!0),n.push(e.getText(i))}return r}const Aa=d(`no-array-constructor-elements`,`roblox`,{create(e){let t=e.options?.[0],n=_(t)?{...sa,...t}:{...sa},{sourceCode:r}=e;function i(t){for(let n=0;n<t.length;n+=1){let i=Da(r,t,n);if(i!==void 0){if(!i.hasUnsafeArgument){e.report({fix(e){return ba(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 ba(e,r,i.declarator,i.pushStatements,i.literalText)},messageId:`suggestCollapseArrayPushInitialization`}]})}}}return{BlockStatement(e){i(e.body)},NewExpression(t){la(r,t)&&xa(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`}}),ja=new Set([`parent`,`range`,`loc`,`tokens`,`comments`]);function Ma(e){return e.type===`Identifier`}function Na(e){return`type`in e&&typeof e.type==`string`}function Pa(e,t){for(let n of Object.keys(e)){if(ja.has(n))continue;let r=Reflect.get(e,n);r!=null&&t.push(r)}}function Fa(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(Na(e)){if(e.type===`Identifier`&&e.name===t)return!0;Pa(e,n)}}}return!1}function Ia(e,t){let n=b(t.callee);return!Ma(n)||n.name!==`Array`?!1:!w(e,n,`Array`)}function La(e,t,n){if(!Xe(e))return;let{expression:r}=e;if(!Se(r)||r.operator!==`=`)return;let{left:i}=r;if(!(j(i)&&i.computed))return;let{object:a,property:o}=i;if(!(!Ma(a)||a.name!==t)&&!(!We(o)||o.value!==n))return{expression:r,statement:e}}function Ra(e,t,n){let r=t[n];if(r===void 0||!Me(r)||r.declarations.length!==1)return;let[i]=r.declarations;if(i===void 0||!D(i)||i.init===null)return;let{init:a}=i;if(!Ge(a)||a.arguments.length>0||!Ia(e,a)||!nt(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=La(e,o,l);if(n!==void 0){s.push(n),l+=1,c+=1;continue}if(Fa(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 za(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
32
  `&&--n;let i=h;n===d&&i.startsWith(`
4
33
  `)&&(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 yi=d(`no-array-constructor-index-assignment`,`roblox`,{create(e){let{sourceCode:t}=e;function n(n){let r=0;for(;r<n.length;){let i=_i(t,n,r);if(i===void 0){r+=1;continue}e.report({fix(e){return vi(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 bi(e){return typeof e!=`object`||!e?!1:`allowAutofix`in e?e.allowAutofix===void 0||typeof e.allowAutofix==`boolean`:!0}function xi(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`&&Si(e,t,n);case`Super`:return t.type===`Super`;case`ThisExpression`:return t.type===`ThisExpression`;default:return!1}}function Si(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!xi(e.object,t.object,n)?!1:e.computed?Ci(e.property,t.property,n):wi(e.property,t.property)}function Ci(e,t,n){return $e(e)&&$e(t)&&xi(e,t,n)}function wi(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 Ti(e,t){switch(e.type){case`Identifier`:case`ThisExpression`:return!0;case`Literal`:return t;case`MemberExpression`:return e.optional||!Ti(e.object,!1)?!1:e.computed?$e(e.property)?Ti(e.property,!0):!1:e.property.type===`Identifier`||e.property.type===`PrivateIdentifier`;default:return!1}}function Ei(e){return Ti(e,!1)}function Di(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 Oi(e,t,n){if(!(e.operator!==`=`||e.left.type!==`MemberExpression`||!e.left.computed)){if(n===`roblox-ts`&&Di(e.left.property))return xi(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 xi(e.left.object,n.object,t)?e.left:void 0}}}const ki=d(`no-array-size-assignment`,`roblox`,{create(e){let[t]=e.options,n=bi(t)&&t.allowAutofix,r=t?.environment===`standard`?`standard`:`roblox-ts`,{sourceCode:i}=e;return{AssignmentExpression(t){let a=Oi(t,i,r);if(a===void 0)return;let o=t.parent.type===`ExpressionStatement`?t.parent:void 0;if(!(n&&o!==void 0&&Ei(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:{...sr,default:`roblox-ts`,description:`Array environment mode: 'roblox-ts' checks array[array.size()]; 'standard' checks array[array.length].`}},type:`object`}],type:`problem`}}),Ai=/^set[A-Z]/u;function ji({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`&&e.property.type===`Identifier`)return e.property.name}function Mi(e){return Ai.test(e)}function Ni(e){let[t]=e.arguments;return t?.type===`ArrowFunctionExpression`||t?.type===`FunctionExpression`?t:void 0}function Pi(e,t){let n=[e];for(let e of n)t(e),Ii(e,n)}function Fi(e,t){let n=[e];for(let e of n){t(e);for(let t of Object.values(e))zi(t,e,n)}}function Ii(e,t){for(let n in e)re(n)||Li(Reflect.get(e,n),e,t)}function Li(e,t,n){if(!(typeof e!=`object`||!e||e===t.parent)){if(Array.isArray(e)){Ri(e,t,n);return}D(e)&&n.push(e)}}function Ri(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 zi(e,t,n){if(Array.isArray(e)){for(let r of e)zi(r,t,n);return}e===t.parent||!D(e)||n.push(e)}function Bi(e){let{key:t}=e;if(t.type===`Identifier`)return t.name;if(t.type===`Literal`&&h(t.value))return t.value}function Vi(e){let{value:t}=e;if(t.type===`Identifier`)return t;if(t.type===`AssignmentPattern`&&t.left.type===`Identifier`)return t.left}function Hi(e){let t=0;return Pi(e,e=>{e.type===`CallExpression`&&e.callee.type===`Identifier`&&Mi(e.callee.name)&&(t+=1)}),t}function Ui(e,t,n,r,i){if(t===void 0)return 0;if(t.type===`SpreadElement`)return 3;let a=x(t);return a.type===`ArrayExpression`?a.elements.length===0?1:i(e,a,n,r)?2:3:3}const Wi=new Set([`catch`,`finally`,`then`]);function Gi(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 Ki(e){return e.callee.type!==`MemberExpression`||e.callee.property.type!==`Identifier`?!1:Wi.has(e.callee.property.name)}function qi({callee:e}){let t=x(e);return je(t)&&t.async}function Ji({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 Yi(e){let{parent:t}=e;return t?.type!==`AssignmentExpression`||t.right!==e?!1:t.left.type===`MemberExpression`&&t.left.object.type===`ThisExpression`}function Xi(e){let{parent:t}=e;if(t?.type===`VariableDeclarator`&&t.init===e)return t.id.type===`Identifier`?t.id.name:void 0}function Zi(e){return!je(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 Qi(e,t){let n=e;for(;n!==t;){let{parent:e}=n;if(e===null)return!1;if(Zi(e))return!0;n=e}return!1}function $i(e,t){let n=Ji(e,t);if(n===void 0||Yi(e))return;if(e.parent.type===`ExpressionStatement`)return{data:{methodName:n},messageId:`unhandledAsyncCall`,node:e};let r=Xi(e);if(r!==void 0)return{data:{variableName:r},messageId:`orphanedPromise`,node:e}}function ea(e,t){let n=[],r=0;function i(i){if(i!==e&&Qi(i,e))return;if(i.type===`AwaitExpression`){n[r++]={messageId:`awaitInConstructor`,node:i};return}if(i.type!==`CallExpression`)return;Ki(i)&&(n[r++]={messageId:`promiseChainInConstructor`,node:i}),qi(i)&&(n[r++]={messageId:`asyncIifeInConstructor`,node:i});let a=$i(i,t);a!==void 0&&(n[r++]=a)}return Fi(e,i),n}const ta=d(`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=Gi(e.parent),r=e.value.body,i=ea(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`}}),na=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])),ra=new Set(`WaitForChild`.split(`,`)),L=[`AdvanceToNextPageAsync`,`IntersectAsync,SubtractAsync,UnionAsync`,`IsAvailable`],ia=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,L[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,L[0]],[98,L[1]],[108,`Invoke`],[129,L[2]],[139,`CheckUploadCaptureStatusAsync,CreatePostAsync,DeleteCapturesAsync,DeleteVideoCaptureAsync,GetCaptureFilePathAsync,GetCaptureSizeAsync,GetCaptureStorageSizeAsync,GetCaptureUploadDataAsync,InternalCheckPlayabilityAsync,InternalGetStartPlaceIdAsync,PromptCaptureGalleryPermissionAsync,ReadCapturesFromGalleryAsync,SaveCapturesToExternalStorageAsync,StartUploadCaptureAsync,StartVideoCaptureAsync,StartVideoCaptureInternalAsync,UploadCaptureAsync`],[140,L[0]],[142,L[0]],[149,`CanUserChatAsync,CanUsersChatAsync,FilterStringAsync,FilterStringForBroadcast,FilterStringForPlayerAsync`],[170,`GetCommerceProductInfoAsync,PrepareCommerceProductPurchase,UserEligibleForRealWorldCommerceAsync`],[174,`GetConfigAsync,GetConfigForPlayerAsync`],[180,`PreloadAsync`],[181,`GetButton`],[195,L[1]],[197,`GetAssetInfoAsync,GetCreatorStoreProductInfoAsync,PerformCreatorStorePurchase`],[207,`GetObjectsAsync,HttpGetAsync,HttpPostAsync,InsertObjectsAndJoinIfLegacyAsync,SavePlace`],[211,`BatchGetAsync,GetAsync,GetVersionAsync,GetVersionAtTimeAsync,IncrementAsync,ListKeysAsync,ListVersionsAsync,RemoveAsync,RemoveVersionAsync,SetAsync,UpdateAsync`],[217,L[0]],[218,L[0]],[221,L[0]],[222,`ListDataStoresAsync`],[224,L[0]],[249,`CommitEdits,GetDrafts,UpdateToLatestVersion`],[267,`CanPromptOptInAsync`],[270,`LoadPlaybackAsync`],[278,`InquiryAsync`],[279,`CheckOrRequestCameraPermission`],[281,`ResolveStateForUser`],[287,`ListFilesInFolderAsync`],[292,L[1]],[297,`EvaluateAsync`],[301,L[1]],[303,L[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,L[1]],[381,L[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,L[0]],[435,`AddAsync,GetSizeAsync,ReadAsync,RemoveAsync`],[437,`GetAsync,GetRangeAsync,GetSizeAsync,RemoveAsync,SetAsync,UpdateAsync`],[440,L[1]],[444,`PublishAsync,SubscribeAsync`],[448,`DumpToFileAsync`],[450,`CreateReviewableContentAsync,InternalRequestReviewableContentReviewAsync`],[458,L[1]],[468,`GetScheduledNotifications`],[474,`CreateUserNotificationAsync`],[475,`HttpRequestAsync,InvokeAsync`],[477,`BatchGetAsync,GetAsync,GetSortedAsync,IncrementAsync,RemoveAsync,SetAsync,UpdateAsync`],[478,L[0]],[483,`UpdateAsync`],[484,`ConvertToPackageAsync,GetPackageInfo,PublishPackage,SetPackageVersion`],[486,L[0]],[489,L[1]],[491,L[1]],[494,`GetEmulatedPartyAsync`],[497,`CheckOcclusionAsync,ComputeAsync`],[502,`ComputeRawPathAsync,ComputeSmoothPathAsync,FindPathAsync`],[517,L[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,L[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,L[1]],[656,`DeserializeInstancesAsync,SerializeInstancesAsync`],[668,L[1]],[682,`CanSendCallInviteAsync,CanSendGameInviteAsync,GetEventRsvpStatusAsync,GetExperienceEventAsync,GetPartyAsync,GetUpcomingExperienceEventsAsync,PromptFeedbackSubmissionAsync,PromptLinkSharing,PromptLinkSharingAsync,PromptRsvpToEventAsync`],[687,`EndRecording,GetRecordingDevices`],[690,L[1]],[698,L[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,L[1]],[808,L[1]],[814,`CalculateBodyMaxCageDistance,CanLoadAsset,CreateEditableImageOriginalSizeAsync,DoesMeshHaveSkinningData,DoesSurfaceAppearanceMatchTexturePackAsync,FetchAssetWithFormat,GetMeshDataBinaryString,GetMeshVerts,IsDeformedLayeredClothingOutOfRenderBounds`],[836,L[1]],[843,`GetUserFromGlobalUserIdAsync,GetUserInfosByUserIdsAsync`],[854,L[1]],[862,`LoadAsync`],[863,`GetSamplesAtTimesAsync`],[865,`CreateVideoSamplerAsync`],[866,`CaptureSnapshotAsync`],[868,`WaitForInputEventsProcessed`],[875,`IsVoiceEnabledForUserIdAsync`],[876,`GetChatGroupsAsync,IsVoiceEnabledForUserIdAsync`],[877,`ClearAsync,DrawBufferAsync,FromHeightmapAsync,NormalizeAsync,UnclampAsync`],[881,L[2]],[882,L[1]],[893,`CreateEditableMeshAsync,GetDeformedCFrameAsync`]]),aa=new Map;function oa(e,t){let n=na.get(e);if(n===void 0)return!1;if(ra.has(t))return!0;let r=aa.get(n);if(r!==void 0)return r.has(t);let i=ia.get(n);if(i===void 0)return!1;let a=new Set(i.split(`,`));return aa.set(n,a),a.has(t)}const sa=[`PlanckSystem`,`System`,`SystemFunction`,`SystemReturn`,`SystemTableLike`],ca=new Set([`comments`,`loc`,`parent`,`range`,`tokens`]);function la(e,t){if(e.type===`Identifier`)return e.name;if(t&&e.type===`TSQualifiedName`)return la(e.right,t)}function ua(e,t=!0){if(e!=null){if(e.type===`TSTypeAnnotation`)return ua(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=ua(r,t);if(e===void 0||n!==void 0)return;n=e}return n}if(e.type===`TSTypeReference`)return la(e.typeName,t)}}function da(e,t){let n=ua(e);return n!==void 0&&t.has(n)}function fa(e,t){for(let n of Object.keys(e)){if(ca.has(n))continue;let r=Reflect.get(e,n);r!=null&&t.push(r)}}function pa(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&&fa(e,n)}}}function ma(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 ha(e,t,n){for(let r of e.properties)if(ma(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 ga(e){if(e.type===`ImportSpecifier`)return e.imported.type===`Identifier`?e.imported.name:e.imported.value}function _a(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=ga(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 va(e){let t=[],n=x(e);for(;n.type===`MemberExpression`;){let e=S(n);if(e===void 0)return;t.unshift(e),n=x(n.object)}return n.type===`Identifier`?{path:t,root:n}:void 0}function ya(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function ba(e){if(e.type===`Identifier`)return[e.name];if(e.type!==`MemberExpression`)return;let t=va(e);return t===void 0?void 0:[t.root.name,...t.path]}function xa(e,t){return C(e.getScope(t),t.name)}function Sa(e,t,n,r,i){pa(e,e=>{if(e.type!==`CallExpression`||e.callee.type!==`MemberExpression`)return;let a=va(e.callee);if(a===void 0)return;let o=xa(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||!ya(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=xa(t,o);c!==void 0&&i.set(c,n.className)}})}function Ca(e,t,n,r){pa(e,e=>{if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){let i=e.id.name,a=ua(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=ua(t.typeAnnotation,!1);if(a===void 0||n.has(a))continue;let o=i.get(e);o!==void 0&&r.set(o,a)}})}function wa(e){let t=new Set;return pa(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 Ta(e,t){let n=xa(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 Ea(e,t){let n=xa(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=x(r.node.init);return N(i)?i:void 0}function Da(e,t){let n=x(e);return N(n)?n:n.type===`Identifier`?Ea(n,t):void 0}function Oa(e,t,n,r,i){let a=x(e);if(a.type===`Identifier`)return ka(a,t,n,r,i);if(!(a.type===`CallExpression`&&a.callee.type===`MemberExpression`&&S(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 ka(e,t,n,r,i){let a=xa(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=Ta(e,t);if(!(o===void 0||i.has(o)))return i.add(o),Oa(o,t,n,r,i)}function Aa(e,t,n,r){if(e.callee.type!==`MemberExpression`)return!1;let i=S(e.callee);if(i===void 0)return!1;let a=Oa(e.callee.object,t,n,r,new Set);return a!==void 0&&oa(a,i)}function ja(e,t){let n=new Set;if(e.body===null)return n;if(e.body.type!==`BlockStatement`){let r=Da(e.body,t);return r!==void 0&&n.add(r),n}return pa(e.body,e=>{if(N(e))return!1;if(e.type!==`ReturnStatement`||e.argument===null)return!0;let r=Da(e.argument,t);return r!==void 0&&n.add(r),!1}),n}function Ma(e,t,n){let r=new Set,i=ba(e.callee);if(i===void 0)return r;for(let a of n)if(ya(i,a.calleePath))for(let n of a.callbackArgumentIndexes){let i=e.arguments[n];if(i===void 0||i.type===`SpreadElement`)continue;let a=Da(i,t);a!==void 0&&r.add(a)}return r}function Na(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),pa(e.body,o=>{if(N(o)&&o!==e)return!1;if(o.type!==`CallExpression`)return!0;Aa(o,t,n,r)&&a(o);for(let e of Ma(o,t,i))s(e);return!0}))}let c=ja(e,t),l=c.size===0?[e]:c;for(let e of l)s(e)}const Pa=d(`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([...sa,...t]);return{"Program:exit"(t){let a=new Map,o=new Set,s=[],c=_a(t,e.sourceCode),l=new Map;Ca(t,e.sourceCode,wa(t),l),Sa(t,e.sourceCode,c,n,l),pa(t,e=>{if(N(e)){e.id!==null&&a.set(e.id.name,e),da(e.returnType,i)&&o.add(e);return}if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){if(!da(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`&&da(e.typeAnnotation,i)&&e.expression.type===`ObjectExpression`&&s.push(e.expression)});for(let e of s)ha(e,a,o);for(let t of o)Na(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`}}),Fa=new Set([`useAsyncEffect`,`useEffect`,`useInsertionEffect`,`useLayoutEffect`,`useMountEffect`,`useReactiveEffect`,`useUnmountEffect`,`useUpdateEffect`]),Ia=d(`no-cascading-set-state`,`react`,{create(e){return{CallExpression(t){let n=ji(t);if(n===void 0||!Fa.has(n))return;let r=Ni(t);if(r===void 0)return;let i=Hi(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 La(e){return Math.round(e>1?e:e*255)}function Ra(e){return{reportUnknownComponents:typeof e==`object`&&e&&`reportUnknownComponents`in e?e.reportUnknownComponents===!0:!0}}function za(e){let t=[],n=0,r=!0;for(let i of e){if(!Be(i))return;let e=La(i.value);t[n++]=e,e!==0&&(r=!1)}return[r,t]}const Ba=d(`no-color3-constructor`,`roblox`,{create(e){let t=Ra(e.options[0]);return{NewExpression(n){if(!Me(n,`Color3`))return;let r=n.arguments;if(r.length===0)return;let i=za(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 Va(e,t){let n=e.scan(t);return n===0?0:1-(1-e.probability)**n}function Ha(e,t){let n=0;for(let r of e){let e=Va(r,t);n=1-(1-n)*(1-e)}return n}function Ua(e,t){return Ha(e,t)>=.9}function Wa(e,t){return t.some(t=>Ua(e,t))}function Ga(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 Ka=/\s+/gu;function qa(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 Ja(e,t){let n=t.map(e=>h(e)?{pattern:e,type:`string`}:{pattern:new RegExp(e.source,`gu`),type:`regexp`});return{probability:e,scan(e){let t=e.replace(Ka,``),r=0;for(let e of n){if(e.type===`string`){r+=qa(t,e.pattern);continue}e.pattern.lastIndex=0;let n=t.match(e.pattern);n&&(r+=n.length)}return r}}}const Ya=/\s/u;function Xa(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(!Ya.test(r)&&r!==`*`&&r!==`/`)return 0}return 0}}}const Za=/[ \t(),{}]/u;function Qa(e,t){let n=new Set(t);return{probability:e,scan(e){let t=e.split(Za),r=0;for(let e of t)n.has(e)&&(r+=1);return r}}}const $a=`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(`.`),eo=[`++`,`||`,`&&`,`===`,`?.`,`??`],to=[`for(`,`if(`,`while(`,`catch(`,`switch(`,`try{`,`else{`,`this.`,`window.`,/;\s+\/\//u,`import '`,`import "`,`require(`],no=[`}`,`;`,`{`];function ro(){return[Xa(.95,no),Qa(.7,eo),Qa(.3,$a),Ja(.95,to),Ga(.5)]}const io=new Set([`BreakStatement`,`ContinueStatement`,`LabeledStatement`]);function ao(e){return io.has(e.type)}function oo(e){return{comments:e,value:e.map(({value:e})=>e).join(`
6
- `)}}const so=ro();function co(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 lo(e,t){let n=[],r=0,i=[],a=0;for(let o of e)if(o.type===`Block`)a>0&&(n[r++]=oo(i),i=[],a=0),n[r++]=oo([o]);else if(a===0)i[a++]=o;else{let e=i.at(-1);e&&co(e,o,t)?i[a++]=o:(n[r++]=oo(i),i=[o],a=1)}return a>0&&(n[r]=oo(i)),n}const uo=/\{/gu,fo=/\}/gu;function po(e){let t=(e.match(uo)??[]).length-(e.match(fo)??[]).length;return t>0?e+`}`.repeat(t):t<0?`{`.repeat(-t)+e:e}function mo(e){return Wa(so,e.split(`
7
- `))}function ho(e){return e.type!==`ReturnStatement`&&e.type!==`ThrowStatement`?!1:e.argument?.type===`Identifier`}function go(e){return e.type===`UnaryExpression`&&(e.operator===`-`||e.operator===`+`)}function _o(e){return e.type===`Literal`&&(h(e.value)||g(e.value))}function vo(e){return _(e)&&h(e.type)}function yo(e){let t=[],n=0;for(let r of e)vo(r)&&(t[n++]=r);return t}function bo(e,t){if(e.type!==`ExpressionStatement`)return!1;let{expression:n}=e;return n.type===`Identifier`||n.type===`SequenceExpression`||go(n)||_o(n)||!t.trimEnd().endsWith(`;`)}function xo(e,t){if(e.length!==1)return!1;let n=e.at(0);return n?ao(n)||ho(n)||bo(n,t):!1}const So=[/'return' statement is only valid inside a function/u];function Co(e){for(let t of e){let e=!1;for(let n of So)if(n.test(t.message)){e=!0;break}if(!e)return!1}return!0}function wo(e){return(e.diagnostics.length===0||Co(e.diagnostics))&&e.program.body.length>0}function To(e,r){let i=t.extname(r),a=n(e,{lang:{".jsx":`jsx`,".tsx":`tsx`}[i]??`js`,sourceType:`module`});if(wo(a))return a;if(i!==`.tsx`&&i!==`.jsx`){let t=n(e,{lang:`tsx`,sourceType:`module`});if(wo(t))return t}}function Eo(e,t){if(!mo(e))return!1;let n=To(e,t);return n?!xo(yo(n.program.body),e):!1}function Do(e){let t=1;for(let n of e)n===`
8
- `&&(t+=1);return t}const Oo=d(`no-commented-code`,`general`,{create(e){let{maxLines:t=0}=e.options[0]??{};return{"Program:exit"(){let n=lo(e.sourceCode.getAllComments(),e.sourceCode);for(let r of n){let n=r.value.trim();if(n===`}`||Do(r.value)<=t||!Eo(po(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 R(e){return{constant:!0,value:e}}function ko(){return{constant:!1}}function Ao(e){return{constant:!0,value:e}}function jo(){return{constant:!1}}function Mo(e){let t=new Set;if(!e?.loopExitCalls)return t;for(let n of e.loopExitCalls)v(n)&&t.add(n);return t}function No(e){let t=x(e);if(t.type===`Identifier`)return t.name;if(t.type!==`MemberExpression`)return;let n=No(t.object);if(n===void 0||n.length===0)return;let r=S(t);if(r!==void 0&&r.length!==0)return`${n}.${r}`}function Po(e,t){if(t.size===0)return!1;let n=No(e.callee);return n===void 0||n.length===0?!1:t.has(n)}function Fo(e,t){return z(e.type===`SpreadElement`?e.argument:e,t)}function z(e,t){if(t.size===0)return!1;let n=x(e);switch(n.type){case`ArrayExpression`:return Io(n,t);case`ArrowFunctionExpression`:case`ClassExpression`:case`FunctionExpression`:return!1;case`AssignmentExpression`:return z(n.right,t);case`AwaitExpression`:return z(n.argument,t);case`BinaryExpression`:return Lo(n,t);case`CallExpression`:return Ro(n,t);case`ConditionalExpression`:return zo(n,t);case`LogicalExpression`:return Bo(n,t);case`MemberExpression`:return Vo(n,t);case`NewExpression`:return Ho(n,t);case`SequenceExpression`:return n.expressions.some(e=>z(e,t));case`TaggedTemplateExpression`:return Uo(n,t);case`TemplateLiteral`:return n.expressions.some(e=>z(e,t));case`UnaryExpression`:case`UpdateExpression`:return z(n.argument,t);case`YieldExpression`:return n.argument?z(n.argument,t):!1;default:return!1}}function Io(e,t){for(let n of e.elements)if(n!==null&&Fo(n,t))return!0;return!1}function Lo(e,t){let{left:n}=e;return n.type!==`PrivateIdentifier`&&z(n,t)?!0:z(e.right,t)}function Ro(e,t){return Po(e,t)||z(e.callee,t)?!0:e.arguments.some(e=>Fo(e,t))}function zo(e,t){return z(e.test,t)||z(e.consequent,t)||z(e.alternate,t)}function Bo(e,t){return z(e.left,t)||z(e.right,t)}function Vo(e,t){return z(e.object,t)?!0:e.computed&&z(e.property,t)}function Ho(e,t){return z(e.callee,t)?!0:e.arguments.some(e=>Fo(e,t))}function Uo(e,t){return z(e.tag,t)?!0:e.quasi.expressions.some(e=>z(e,t))}function Wo(e){let t=x(e);switch(t.type){case`ArrayExpression`:return R([]);case`ArrowFunctionExpression`:case`ClassExpression`:case`FunctionExpression`:return R(!0);case`Identifier`:return t.name===`undefined`?R(void 0):t.name===`NaN`?R(NaN):t.name===`Infinity`?R(1/0):ko();case`Literal`:return R(t.value);case`LogicalExpression`:return Go(t);case`ObjectExpression`:return R({});case`SequenceExpression`:{let e=t.expressions.at(-1);return e?Wo(e):ko()}case`TemplateLiteral`:return t.expressions.length>0?ko():t.quasis.length===0?R(``):R(t.quasis[0]?.value.cooked??``);case`UnaryExpression`:return Ko(t);default:return ko()}}function Go(e){let t=Wo(e.left);return t.constant?e.operator===`&&`?t.value===!0?Wo(e.right):R(t.value):e.operator===`||`?t.value===!0?R(t.value):Wo(e.right):t.value===void 0?Wo(e.right):R(t.value):ko()}function Ko(e){if(e.operator===`typeof`)return R(`string`);if(e.operator===`void`)return R(void 0);let t=Wo(e.argument);return t.constant?e.operator===`!`?R(!t.value):e.operator===`+`&&g(t.value)?R(t.value):e.operator===`-`&&g(t.value)?R(-t.value):e.operator===`~`&&g(t.value)?R(~t.value):ko():ko()}function B(e){let t=x(e);if(t.type===`ConditionalExpression`)return qo(t);if(t.type===`LogicalExpression`)return Jo(t);if(t.type===`SequenceExpression`){let e=t.expressions.at(-1);return e?B(e):jo()}let n=Wo(t);return n.constant?Ao(!!n.value):jo()}function qo(e){let t=B(e.test);if(t.constant)return B(t.value===!0?e.consequent:e.alternate);let n=B(e.consequent),r=B(e.alternate);return n.constant&&r.constant&&n.value===r.value?n:jo()}function Jo(e){let t=B(e.left);if(!t.constant)return jo();if(e.operator===`&&`)return t.value?B(e.right):Ao(!1);if(e.operator===`||`)return t.value===!0?Ao(!0):B(e.right);let n=Wo(e.left);return n.constant?n.value===void 0?B(e.right):Ao(!!n.value):jo()}const Yo=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function Xo(e){return Yo.has(e.type)}function Zo(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 Qo(e,t){if(e.label)return Zo(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(Xo(n))return n===t;n=n.parent}return!1}function $o(e,t){return e?e.type===`VariableDeclaration`?e.declarations.some(e=>e.init?z(e.init,t):!1):z(e,t):!1}function es(e,t){switch(e.type){case`DoWhileStatement`:case`WhileStatement`:return z(e.test,t);case`ForInStatement`:case`ForOfStatement`:return z(e.right,t);case`ForStatement`:return!!($o(e.init,t)||e.test&&z(e.test,t)||e.update&&z(e.update,t));default:return!1}}function V(e,t,n){switch(e.type){case`BlockStatement`:return e.body.some(e=>V(e,t,n));case`BreakStatement`:return Qo(e,t);case`DoWhileStatement`:case`WhileStatement`:return ts(e,t,n);case`ExpressionStatement`:return z(e.expression,n);case`ForInStatement`:case`ForOfStatement`:return ns(e,t,n);case`ForStatement`:return rs(e,t,n);case`IfStatement`:return is(e,t,n);case`LabeledStatement`:return V(e.body,t,n);case`ReturnStatement`:return!0;case`SwitchStatement`:return e.cases.some(e=>e.consequent.some(e=>V(e,t,n)));case`TryStatement`:return as(e,t,n);case`VariableDeclaration`:return e.declarations.some(e=>e.init?z(e.init,n):!1);case`WithStatement`:return os(e,t,n);default:return!1}}function ts(e,t,n){return z(e.test,n)?!0:V(e.body,t,n)}function ns(e,t,n){return z(e.right,n)?!0:V(e.body,t,n)}function rs(e,t,n){return $o(e.init,n)||e.test&&z(e.test,n)||e.update&&z(e.update,n)?!0:V(e.body,t,n)}function is(e,t,n){return V(e.consequent,t,n)?!0:e.alternate?V(e.alternate,t,n):!1}function as(e,t,n){return!!(V(e.block,t,n)||e.handler&&V(e.handler.body,t,n)||e.finalizer&&V(e.finalizer,t,n))}function os(e,t,n){return z(e.object,n)?!0:V(e.body,t,n)}function ss(e,t,n){return e.constant?!e.value||!es(t,n)&&!V(t.body,t,n):!1}const cs=d(`no-constant-condition-with-break`,`general`,{create(e){let t=e.options?.[0],n=Mo(_(t)?t:void 0);function r(t){B(t).constant&&e.report({messageId:`unexpected`,node:t})}function i(t,r){ss(B(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`}}),ls=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function us(e){if(e.type===`BreakStatement`||e.type===`ContinueStatement`||e.type===`ReturnStatement`||e.type===`ThrowStatement`)return!0;if(e.type===`BlockStatement`){let t=e.body.at(-1);return t!==void 0&&us(t)}return!1}function ds(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 fs(e,t){if(t.type===`IfStatement`){if(t.consequent===e)return{arm:`then`,complete:t.alternate!==null||us(t.consequent),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 ps(e,t){if(t.type!==`BlockStatement`&&t.type!==`SwitchCase`)return[];let n=t.type===`BlockStatement`?t.body:t.consequent,r=n.indexOf(e);if(r<=0)return[];let i=[];for(let e of n.slice(0,r))e.type===`IfStatement`&&e.alternate===null&&us(e.consequent)&&i.push({arm:`else`,complete:!0,control:e});return i}function ms(e,t){let n=fs(e,t);if(n!==void 0)return n;if(t.type===`LogicalExpression`&&t.right===e)return{arm:`right`,complete:!1,control:t};if(ls.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 hs(e,t){let n=[],r=e;for(;r!==t&&r.parent!==null;){let e=ms(r,r.parent);e!==void 0&&n.push(e);for(let e of ps(r,r.parent))n.push(e);r=r.parent}return n}function gs(e,t){return e.find(e=>e.control===t)?.arm}function _s(e,t){for(let n of e){let e=gs(t,n.control);if(e!==void 0&&e!==n.arm)return!1}return!0}function vs(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 ys(e,t){if(t.length!==e.length)return;let n;for(let r of e)if(gs(t,r.control)!==r.arm){if(n!==void 0)return;n=r.control}if(n!==void 0&&gs(t,n)!==void 0)return e.filter(e=>e.control!==n)}function bs(e){for(let[t,n]of e.entries())for(let[r,i]of e.entries()){if(r<=t)continue;let e=ys(n,i);if(e!==void 0)return{leftIndex:t,merged:e,rightIndex:r}}}function xs(e){let t=bs(e);return t===void 0?!1:(e.splice(t.rightIndex,1),e.splice(t.leftIndex,1,t.merged),t.merged.length===0||xs(e))}function Ss(e,t,n){let r=e.filter(e=>gs(t,e.control)===void 0);if(r.length===0)return!0;if(r.some(e=>!e.complete))return!1;function i(e){return gs(t,e.control)}return r.some(e=>{let t=i(e);return t!==void 0&&t!==e.arm})?!1:(n.push(r),xs(n))}function Cs(e,t){return e.isRead&&!e.isWrite||e.isWrite&&vs(e,t)}function ws(e){let t=[],n=e.parent;for(;n!==null;){if(ls.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&&ds(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(ds(e.node)!==n)return;let o=hs(e.node,n);if(_s(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=ds(e.node),r=hs(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=>ds(e.identifier)));for(let n of e.defs)t.add(ds(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=d(`no-dead-store`,`general`,{create(e){return{Program(){T(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 d(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)v(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`||S(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 H(e,t){switch(e.type){case`ArrayPattern`:{let n=!1;for(let r of e.elements)r&&(n=H(r,t)||n);return n}case`AssignmentPattern`:return H(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=H(r.argument,t)||n;continue}n=H(r.value,t)||n}return n}case`RestElement`:return H(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):H(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):H(e,n):!1}function U(e,t){let n=Bs(e);switch(n.type){case`ArrayExpression`:return Ys(n,t);case`AssignmentExpression`:return U(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:U(e,t)}default:return 0}}function Ys(e,t){for(let n of e.elements)if(n!==null&&U(n.type===`SpreadElement`?n.argument:n,t)!==0)return 1;return 0}function Xs(e,t){let n=U(e.consequent,t);return n===U(e.alternate,t)?n:0}function Zs(e,t){return U(e.object,t)===1?2:0}function Qs(e,t){for(let n of e.properties)if(U(n.type===`SpreadElement`?n.argument:n.value,t)!==0)return 1;return 0}function $s(e,t){if(e.type===`TSParameterProperty`){H(e.parameter,t);return}H(e,t)}const ec=d(`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=U(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`||U(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=U(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=d(`no-filter-map-chain`,`general`,{create(e){return{CallExpression(t){let n=x(t.callee);if(n.type!==`MemberExpression`||S(n)!==`map`)return;let r=x(n.object);if(r.type!==`CallExpression`)return;let i=x(r.callee);i.type===`MemberExpression`&&S(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=x(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 T(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=S(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`&&S(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=d(`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)}Pi(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 W(e){return Dc.test(e)}function Oc(e){return e.type===`FunctionDeclaration`&&e.id!==null&&W(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`&&(h(t)?e.callee.name===t:t.has(e.callee.name))}function Fc(e){return e.type===`VariableDeclarator`&&e.id.type===`Identifier`&&W(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&&h(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&&h(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=d(`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(!Re(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(!Re(e)||e.body===null)return{maxJsxDepth:0,nullLiterals:[],stateHookCount:0};let n=0,r=0,i=[],a=0;return Pi(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=ji(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:g(n.maxDestructuredProps)?n.maxDestructuredProps:t.maxDestructuredProps,maxLines:g(n.maxLines)?n.maxLines:t.maxLines,maxStateHooks:g(n.maxStateHooks)?n.maxStateHooks:t.maxStateHooks,maxTsxNesting:g(n.maxTsxNesting)?n.maxTsxNesting:t.maxTsxNesting,stateHooks:Array.isArray(n.stateHooks)?n.stateHooks:t.stateHooks,targetLines:g(n.targetLines)?n.targetLines:t.targetLines}}const qc=d(`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);g(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=d(`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=x(e);if(t.type!==`CallExpression`)return!1;let n=x(t.callee);if(n.type!==`MemberExpression`||n.computed)return!1;let r=x(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=x(e.callee);if(n.type===`CallExpression`)return Xc(n);if(n.type===`Identifier`){let r=C(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=d(`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=x(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=x(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 ji(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`&&(ji(e)===`useBinding`||sl(e)||e.callee.type===`MemberExpression`&&S(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=C(e.getScope(t),t.name);if(i!==void 0&&cl(i))return!0}return t.type===`CallExpression`&&(t.callee.type===`MemberExpression`&&S(t.callee)===`map`||sl(t))}const ul=d(`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`||S(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=d(`no-increment-decrement`,`general`,{create(e){let[t]=e.options,n=bi(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=d(`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(!de(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 _(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(!_(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=d(`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=x(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=S(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=S(e.callee),i=x(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=d(`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 G(e){return e.type===`module`||e.type===`global`}function K(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=C(e.getScope(t),t.name);if(!(n===void 0||!G(n.scope)))for(let e of n.defs){let t=Ul(e);if(t!==void 0)return t}}function Gl(e,t){let n=C(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=x(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)?q(e,t,n,r):!1}function Jl(e){let t=x(e);for(;t.type===`MemberExpression`;)t=x(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=x(t);return i.type===`Identifier`?Zl(e,i,n,r):i.type!==`MemberExpression`||!q(e,i.object,n,r)?!1:i.computed?q(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`&&q(e,t,r,i)):!1}function q(e,t,n,r){let i=x(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)?q(e,i.left,n,r)&&q(e,i.right,n,r):!1;case`CallExpression`:return Xl(e,i.arguments,i.callee,n,r);case`ChainExpression`:return q(e,i.expression,n,r);case`ConditionalExpression`:return q(e,i.test,n,r)&&q(e,i.consequent,n,r)&&q(e,i.alternate,n,r);case`Identifier`:return Zl(e,i,n,r);case`Literal`:return!0;case`MemberExpression`:return q(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=>q(e,t,n,r));case`TemplateLiteral`:return i.expressions.length===0;case`UnaryExpression`:return zl.has(i.operator)&&q(e,i.argument,n,r);default:return!1}}function Zl(e,t,n,r){let i=C(e.getScope(t),t.name);if(i===void 0)return r.staticGlobalFactories.has(t.name);if(!G(i.scope))return!1;if(K(i))return!0;for(let t of i.defs){let i=Ul(t);if(i!==void 0&&q(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)&&!q(e,i.key,n,r)||!q(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`||!q(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=x(e);for(;t.type===`MemberExpression`;){let e=x(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=x(t);if(n.type===`ObjectExpression`)return!0;let r=iu(n);if(r===void 0)return!1;let i=C(e.getScope(r),r.name);return i===void 0?!1:K(i)||G(i.scope)}function ou(e,t,n){let r=x(t);if(n.has(r))return;if(n.add(r),r.type===`ObjectExpression`)return r;if(r.type!==`Identifier`)return;let i=C(e.getScope(r),r.name);if(!(i===void 0||G(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=d(`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(pr(e,t))for(let t of e.specifiers){if(t.type===`ImportSpecifier`){oe(t.imported,`useMemo`)&&n.add(t.local.name);continue}r.add(t.local.name)}}const uu=new Set([`Instance`]);function du(e){let t=_(e)&&y(e.constructors)?new Set(e.constructors):uu,n=_(e)&&e.environment===`standard`?`standard`:`roblox-ts`,r=_(e)?e.maxHelperTraceDepth:void 0;return{constructors:t,environment:n,maxHelperTraceDepth:b(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(je(r)){let{parent:e}=r;if(fu(e)&&e.arguments[0]===r){if(!ce(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=x(a.init);if(je(o))return _u(o,n);if(o.type!==`Identifier`)return new Set;let s=C(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=C(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=d(`no-new-instance-in-use-memo`,`react`,{create(e){let t=du(e.options[0]);if(t.constructors.size===0)return{};let n=dr(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),!ce(e,r,i))return;let[t]=e.arguments;if(t!==void 0){if(t.type===`Identifier`){l.push(t);return}je(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=d(`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 o({extensions:[`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.cjs`,`.json`,`.node`]}),Ou={found:!1};function ku(e,n){if(!e.startsWith(`.`))return Ou;let{path:r}=Du.sync(t.dirname(n),e);return r===void 0||r===``?Ou:{found:!0,path:r}}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 Pi(e,e=>{t||e.type===`JSXElement`&&Mu(e)===Au&&(t=!0)}),t}function Pu(e){if(e.type===`FunctionDeclaration`)return e.id?.name;if(je(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 x(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`&&h(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=i(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||!K(i))return!1;let a=Iu(i);return a!==void 0&&(Ru(a,r)||ju.has(e))}const Hu=d(`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 Fi(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=d(`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||W(e)||Ku(e)}function i(t,i){let a=Qu(i.id);if(r(a)||od(t,e.sourceCode))return;let o=ie(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&&W(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&&W(n)&&(t+=1)},"ArrowFunctionExpression:exit":o,FunctionDeclaration({id:e}){e!==null&&W(e.name)&&(t+=1)},"FunctionDeclaration:exit"(r){if(r.id===null)return;let i=r.id.name;if(W(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&&W(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=s({"message?":`string | undefined`,object:`string`,properties:s(`string[]`).readonly()}).readonly(),ld=s({"allowFiles?":s(`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 n=fd(e);if(!t.isAbsolute(e))return[n];let r=fd(t.relative(process.cwd(),e));return r.length===0||r.startsWith(`..`)?[n]:[n,r]}function md(e,t){let n=new c(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=>l(t,e,ud)))??!1;return{checkComputed:r??!0,isAllowedFile:o,restrictions:i.map(gd)}}const vd=d(`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=S(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=d(`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(_r(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(_r(r,n)&&r.node.type===`ImportSpecifier`&&le(r.node)===t)return!0;return!1}function wd(e,t,n){let{callee:r}=t;return r.type===`Identifier`?Cd(C(e.getScope(r),r.name),`createElement`,n):r.type!==`MemberExpression`||r.computed||S(r)!==`createElement`||r.object.type!==`Identifier`?!1:Sd(C(e.getScope(r.object),r.object.name),n)}function Td(e){return e.type===`Literal`&&h(e.value)}function Ed(e,t){if(K(e))return O(t)||t===xd;if(!G(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&&(je(e)||e.type===`ClassExpression`))return!0}return!1}function Dd(e,t,n){let r=C(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=S(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=C(e.getScope(r),r.name);return Sd(a,n)&&i===xd?!0:a===void 0||!K(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=d(`no-static-react-create-element`,`react`,{create(e){let t=fr(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:sr},type:`object`}],type:`problem`}});function Nd(e,t){let n=x(t);if(n.type!==`CallExpression`||n.optional)return!1;let r=x(n.callee);if(r.type!==`MemberExpression`||r.optional||S(r)!==`create`)return!1;let i=x(r.object);return i.type!==`Identifier`||i.name!==`table`?!1:!E(e,i,`table`)}function Pd(e,t){let n=x(t);if(n.type!==`NewExpression`||n.arguments.length!==1&&n.arguments.length!==2)return!1;let r=x(n.callee);return r.type!==`Identifier`||r.name!==`Array`?!1:!E(e,r,`Array`)}const Fd=d(`no-table-create-map`,`roblox`,{create(e){return{CallExpression(t){if(t.optional)return;let n=x(t.callee);if(n.type!==`MemberExpression`||n.optional||S(n)!==`map`)return;let r=x(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`||S(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:S(n)===`delay`}const Ld=d(`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`&&S(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]=C(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`&&S(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`&&S(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=S(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=S(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=d(`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=d(`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=d(`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=d(`no-unused-use-memo`,`react`,{create(e){let t=new Set,n=new Set,r=fr(e.options[0]);return{CallExpression(r){ce(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=d(`no-use-memo-simple-expression`,`react`,{create(e){return{CallExpression(t){if(!Pc(t,`useMemo`))return;let n=Ni(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=d(`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??C(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 je(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 J(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 J(e.expression,t);case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return J(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 J(e.argument,t);default:return!0}}function Lf(e,t){for(let n of e.elements)if(n===null||!J(n,t))return!1;return!0}function Rf(e,t){return J(e.left,t)&&J(e.right,t)}function zf(e,t){let n=If(e.callee);return n===void 0||!t.has(n)||!J(e.callee,t)?!1:Uf(e.arguments,t)}function Bf(e,t){return J(e.test,t)&&J(e.consequent,t)&&J(e.alternate,t)}function Vf(e,t){return J(e.object,t)&&(!e.computed||J(e.property,t))}function Hf(e,t){for(let n of e.properties)if(n.type!==`Property`||n.computed&&!J(n.key,t)||!J(n.value,t))return!1;return!0}function Uf(e,t){for(let n of e)if(!J(n,t))return!1;return!0}function Wf(e,t){return t.type===`Literal`||q(e,t,new Set,kf)&&J(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=d(`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)&&Qe(s.id))||s.init===null)return;let c=o.parent;if(c===null||!Oe(c)||c.kind!==`const`||c.declarations.length!==1||ke(c.parent))return;let l=s.init;if(Mf(l)||Pf(l,r,t))return;let u=a(e,n);if(u===void 0||!Qe(u.identifier))return;let d=Jf(u.identifier);if(d===void 0)return;let f=d.parent;if(!(!Oe(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=J(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 g(e)||e===`inf`||e===`-inf`}function gp(e){if(!(_(e)&&h(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(g);case`Enum`:return h(e.enumType)&&h(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 h(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=x(e);if(t.type!==`NewExpression`||!cp(t.callee,`Instance`))return;let[n]=t.arguments;if(!(n===void 0||n.type===`SpreadElement`||!pe(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(!_(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 Y(e){if(Be(e))return e.value;if(bp(e))return 1/0;if(e.type!==`UnaryExpression`||e.operator!==`+`&&e.operator!==`-`)return;let t=Y(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=Y(n),a=Y(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=Y(n),o=Y(r),s=Y(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=Y(n),s=Y(r),c=Y(i),l=Y(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=Y(t),a=Y(n),o=Y(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=Y(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 pe(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=d(`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=x(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:cr(e.environment)?e.environment:`roblox-ts`,hooks:new Set(y(e.hooks)?e.hooks:Hp),propertyCallbackPrefixes:new Set(y(e.propertyCallbackPrefixes)?e.propertyCallbackPrefixes:Up),refHooks:new Set(y(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(y(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 v(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 X(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=X(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=X(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 Z(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=Z(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(Z(r.consequent),t);if(e===void 0||e===0)return;n+=e;continue}let e=X(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=Bi(e);if(n===void 0||!Om(n,t))continue;let r=Vi(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(Z(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=Z(r.consequent);for(let r of Im(e,t))n.add(r);continue}let e=X(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(Z(r.consequent),t,n))return!0;continue}let e=X(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=X(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=X(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=X(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(Z(r.consequent),t,n))return!0;continue}let e=X(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=X(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(Z(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=X(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)&&Z(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(Z(r.consequent),t,n))return!0;continue}let e=X(r);if(e!==void 0&&_h(e,t,n))return!0}return!1}const yh=d(`no-useless-use-effect`,`react`,{create(e){let t=Kp(e.options[0]),n=dr(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 y(e){e.init?.type!==`CallExpression`||!_(e.init)||e.id.type!==`Identifier`||u.add(e.id.name)}function ee(e){e.id.type===`Identifier`&&e.init!==null&&(e.init.type===`FunctionExpression`||e.init.type===`ArrowFunctionExpression`)&&p.set(e.id.name,e.init)}function b(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 x(){d.pop()}function S(e){return t.reportMixedDerivedState&&e.setterCalls.size>0&&e.hasNonSetter&&!e.hasReturnCleanup?!vh(e.statements,o,e.functionContext?.propertyCallbackIdentifiers??new Set):!1}function C(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`],[S(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 w(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=C({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 T(){if(!t.reportEffectChain)return;let n=E();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&&te(a)){e.report({messageId:`effectChain`,node:t.node});return}}}function E(){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 te(e){return e.size!==0&&[...e].every(e=>{let t=m[e];return t!==void 0&&!t.hasNonSetterSideEffect&&!t.hasReturnWithCleanup})}function ne(){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=D(t,e);n.length<2||re(n,e)}}function D(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 re(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 O(e,t){let n=p.get(t);if(n===void 0||n.async)return;let r=sh(n);r!==void 0&&w(e,r.body.filter(e=>e.type!==`EmptyStatement`),r)}function k(e,t){if(!t.async){if(t.type===`ArrowFunctionExpression`){if(!ch(t))return;w(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body);return}lh(t)&&w(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body)}}return{ArrowFunctionExpression:b,"ArrowFunctionExpression:exit":x,CallExpression(e){if(!h(e))return;let[t]=e.arguments;if(t!==void 0){if(t.type===`Identifier`){O(e,t.name);return}Re(t)&&k(e,t)}},FunctionDeclaration:b,"FunctionDeclaration:exit":x,FunctionExpression:b,"FunctionExpression:exit":x,ImportDeclaration(e){mr(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"(){T(),ne()},VariableDeclarator(e){v(e),y(e),ee(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 _(e)&&h(e.dependencyMode)&&(e.dependencyMode===`empty-or-omitted`||e.dependencyMode===`aggressive`)?e.dependencyMode:`non-updating`}function xh(e){let t=_(e)&&y(e.staticGlobalFactories)?e.staticGlobalFactories:Rl;return{dependencyMode:bh(e),environment:hr(e),staticGlobalFactories:new Set(t)}}function Sh(e){return{staticGlobalFactories:e.staticGlobalFactories}}function Ch(e){let t=Ni(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=d(`no-useless-use-memo`,`react`,{create(e){let t=xh(e.options[0]),n=Sh(t),r=dr(t.environment),i=new Set,a=new Set;return{CallExpression(r){if(!ce(r,i,a)||cu(r)||r.arguments.length===0)return;let o=Ch(r);if(o===void 0)return;let s=new Set;q(e.sourceCode,o,s,n)&&wh(Ui(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=x(t);if(r.type===`ObjectExpression`)return n(r);if(r.type!==`Identifier`)return!1;let i=C(e.getScope(r),r.name);if(i===void 0||!G(i.scope)||K(i))return!1;for(let e of i.defs){let t=Ul(e);if(t===void 0)continue;let r=x(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=d(`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(Ui(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=S(e);if(t!==void 0){if(Ph.has(t))return t;if(Fh.has(t))return oe(e.object,Ih)?`${Ih}.${t}`:void 0}}const Rh=d(`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`&&x(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=d(`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&&!Ie(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`||Ie(r))&&Hh(t.right)&&Uh(n)}const Kh=d(`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(!G(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=C(e.getScope(t),t.name);return n===void 0?!1:K(n)||qh(n)}function Yh(e,t){let n=C(e.getScope(t),t.name);return n===void 0?!1:K(n)||G(n.scope)}function Xh(e,t){let n=t;for(;n.type===`MemberExpression`;){if(n.computed)return!1;n=x(n.object)}return n.type===`Identifier`&&Yh(e,n)}function Zh(e,t){let n=x(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===`-`&&x(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`||ji(t.init)!==`useReducer`)return;let n=t.id.elements[1];if(n!=null&&n.type===`Identifier`)return C(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=d(`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=C(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=x(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=i(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 n=ug.get(e);if(n!==void 0)return n;let i=e;for(;;){if(r(t.join(i,`package.json`))||r(t.join(i,`tsconfig.json`)))return ug.set(e,i),i;let n=t.dirname(i);if(n===i){ug.set(e,void 0);return}i=n}}function Sg(e){let n=cg.get(e);if(n!==void 0)return n;let r=new Map;function i(e){for(let n of a(e,{withFileTypes:!0})){let a=n.name.toLowerCase();if(n.name.startsWith(`.`)&&n.name!==`.storybook`||ig.has(a))continue;let o=t.join(e,n.name);if(n.isDirectory()){i(o);continue}let s=t.extname(n.name);if(!rg.has(s)||n.name.endsWith(`.d.ts`))continue;let c=t.basename(n.name,s).toLowerCase(),l=r.get(c);l===void 0?r.set(c,[o]):l.push(o)}}i(e);let o=new Map;for(let[e,t]of r)o.set(e,t);return cg.set(e,o),o}function Cg(e,n){let r=_g(t.relative(t.dirname(e),n));return r=r.replace(sg,``),r=r.replace(og,``),r.startsWith(`.`)||(r=`./${r}`),r}function wg(e){let n=xg(t.dirname(e)),r=_g(n===void 0?e:t.relative(n,e));for(let e of r.split(`/`))if(ig.has(e.toLowerCase()))return!0;return!1}function Tg(e,n){if(wg(e))return{importStyle:void 0,matches:!1};let r=t.extname(e);if(!rg.has(r)||e.endsWith(`.d.ts`))return{importStyle:void 0,matches:!1};let i=t.basename(e,r).toLowerCase();if(!n.fileNames.map(e=>e.toLowerCase()).includes(i))return{importStyle:void 0,matches:!1};let a=vg(e);if(!gg(`\\b${pg(n.componentName)}\\b`,`u`).test(a)||n.markers!==void 0&&!bg(a,n.markers))return{importStyle:void 0,matches:!1};let o=yg(a,n.componentName);return o===void 0?{importStyle:void 0,matches:!1}:{importStyle:o,matches:!0}}function Eg(e,t,n){let r=e.source.value;if(!(h(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,n){let r=xg(t.dirname(e));if(r===void 0)return{found:!1};let i=Sg(r),a=new Set;for(let e of n.fileNames)for(let t of i.get(e.toLowerCase())??[])a.add(t);let o=[...a].filter(e=>Tg(e,n).matches);if(o.length!==1)return{found:!1};let[s]=o;if(s===void 0)return{found:!1};let c=Tg(s,n);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=d(`prefer-context-stack`,`react`,{create(e){let{filename:n,sourceCode:r}=e,i=n===``?{found:!1}:Og(n,kg),a=n!==``&&Tg(n,kg).matches,o=new Set;return{ImportDeclaration(e){Dg(e,Eg(e,n,kg),kg.componentName,o)},JSXElement(s){if(a||Ng(s))return;let c=Pg(s);if(c===void 0||o.size===0&&!i.found)return;let l=Ag.has(t.extname(n))&&o.size===1&&Ig(c),[u]=o,d=l&&u!==void 0?Rg(u,c,r):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(_r(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(y(t.allowedHooks)?t.allowedHooks:[])}}const Ug=d(`prefer-direct-hook-imports`,`react`,{create(e){let t=fr(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(C(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:sr},type:`object`}],type:`suggestion`}});function Wg(e){return _(e)&&g(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=d(`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=S(e.callee);return t===`only`||t===`skip`}function Zg(e){return e.callee.type!==`MemberExpression`||!Yg(e.callee.object)?!1:S(e.callee)===`each`}function Qg(e){let t=e.arguments.at(-1);return t===void 0||!Re(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:Re(e),hasIndeterminate:Re(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:S(e)===`assertions`}function o_({callee:e}){return e.type!==`MemberExpression`||e.object.type!==`Identifier`||e.object.name!==`expect`?!1:S(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 Pi(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(h):[]}function u_(e){return _(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`||!Be(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_=d(`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(!(_(e)&&`additionalHoistableComponents`in e))return new Set;let{additionalHoistableComponents:t}=e;return t===void 0||!y(t)?new Set:new Set(t)}function x_(e){if(!(_(e)&&`additionalStaticFactories`in e))return new Set;let{additionalStaticFactories:t}=e;return t===void 0||!y(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=C(e.sourceCode.getScope(t),n);if(r===void 0||!G(r.scope))return!1;if(K(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=C(e.sourceCode.getScope(t),n);return r!==void 0&&K(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=C(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`:q(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=x(o);if(t.type===`JSXElement`||t.type===`JSXFragment`)return A_(e,t,new Set(n),r,i,a)}}return q(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=C(e.sourceCode.getScope(n),r.id.name);return i!==void 0&&G(i.scope)}function F_(e,t){let n=e.sourceCode.getText(t);e.report({data:{elementText:n},messageId:`hoistableJsxElement`,node:t})}const I_=d(`prefer-hoisted-jsx-elements`,`react`,{create(e){let[t]=e.options,n=b_(t),r=x_(t),i=hr(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:sr},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=C(e.sourceCode.getScope(t),n.id.name);return i!==void 0&&G(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(q(e.sourceCode,t,n,L_)){H_(e,t);return}for(let n of t.properties){if(n.type!==`Property`)continue;let t=x(n.value);t.type===`ObjectExpression`&&U_(e,t)}}const W_=d(`prefer-hoisted-jsx-object-properties`,`react`,{create(e){return{JSXAttribute(t){let n=R_(t);if(n===void 0)return;let r=x(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}function q_(e){return x(e).type===`Literal`}function J_(e){let t=x(e);if(t.type!==`Literal`||typeof t.value!=`number`)return;let{value:n}=t;if(!(n>0&&n<1))return;let r=1/n;return Number.isInteger(r)?r:void 0}function Y_(e,t){let n=e.getText(K_(t));return G_(x(t))?n:`(${n})`}const X_=d(`prefer-idiv`,`roblox`,{createOnce(e){return{CallExpression(t){if(t.optional)return;let n=x(t.callee);if(n.type!==`MemberExpression`||n.optional||S(n)!==`floor`)return;let r=x(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=x(i);if(a.type!==`BinaryExpression`)return;let o,s;if(a.operator===`/`)o=a.left,s=e.sourceCode.getText(K_(a.right));else if(a.operator===`*`){let e=J_(a.right);if(e!==void 0&&!q_(a.left))o=a.left,s=String(e);else{let e=J_(a.left);if(e===void 0||q_(a.right))return;o=a.right,s=String(e)}}else return;e.report({fix:n=>n.replaceText(t,`${Y_(e.sourceCode,o)}.idiv(${s})`),messageId:`useIdiv`,node:t})}}},meta:{docs:{description:`Prefer .idiv() for integer division instead of math.floor(x / y) or math.floor(x * 0.5).`,recommended:!0},fixable:`code`,messages:{useIdiv:`Use .idiv() instead of math.floor(x / y) or math.floor(x * 0.5) for integer division.`},schema:[],type:`suggestion`}}),Z_={componentName:`Portal`,fileNames:[`portal`],markers:[`target`]},Q_=new Set([`@rbxts/react-roblox`,`react-dom`]),$_=new Set([`.jsx`,`.tsx`]);function ev(e){return e.type===`ImportBinding`}function tv(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function nv(e){if(e===void 0)return!1;for(let t of e.defs){if(!ev(t)||t.node.type!==`ImportSpecifier`)continue;let e=tv(t.node);if(e===void 0||!Q_.has(e.source.value))continue;let{imported:n}=t.node;if(n.type===`Identifier`&&n.name===`createPortal`)return!0}return!1}function rv(e){if(e===void 0)return!1;for(let t of e.defs){if(!ev(t)||t.node.type!==`ImportNamespaceSpecifier`)continue;let e=tv(t.node);if(e!==void 0&&Q_.has(e.source.value))return!0}return!1}function iv(e,{callee:t}){return t.type===`Identifier`?nv(C(e.getScope(t),t.name)):t.type!==`MemberExpression`||t.computed||t.property.type!==`Identifier`||t.property.name!==`createPortal`||t.object.type!==`Identifier`?!1:rv(C(e.getScope(t.object),t.object.name))}function av(e,t){return e.type===`JSXElement`||e.type===`JSXFragment`?t.getText(e):`{${t.getText(e)}}`}function ov(e,t,n){if(t.arguments.length!==2)return;let[r,i]=t.arguments;if(r===void 0||i===void 0)return;let a=av(r,n);return`<${e} target={${n.getText(i)}}>${a}</${e}>`}const sv=d(`prefer-local-portal-component`,`react`,{create(e){let{filename:n,sourceCode:r}=e,i=n===``?{found:!1}:Og(n,Z_),a=n!==``&&Tg(n,Z_).matches,o=new Set;return{CallExpression(s){if(a||!iv(r,s)||s.arguments.length!==2||!(o.size>0||i.found))return;let c=$_.has(t.extname(n))&&o.size===1,[l]=o,u=c&&l!==void 0?ov(l,s,r):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,n,Z_),Z_.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 cv(e){return e===void 0?!1:e.type===`TSTypeAnnotation`?cv(e.typeAnnotation):e.type===`TSNumberKeyword`||e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&e.typeName.name===`Number`}function lv(e){return e.type!==`PrivateIdentifier`}function uv(e){let t=x(e);return t.type===`Literal`&&!g(t.value)}function dv(e){if(e.type===`Parameter`){let t=e.name;if(t.typeAnnotation!==void 0&&t.typeAnnotation!==null)return!cv(t.typeAnnotation);let{parent:n}=t;return n.type===`AssignmentPattern`&&uv(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?!cv(t.typeAnnotation):n!==null&&uv(n)}function fv(e,t){let n=C(e.getScope(t),t.name);if(n===void 0)return!1;for(let e of n.defs)if(dv(e))return!0;return!1}function pv(e,t){if(t.type===`ParenthesizedExpression`)return pv(e,t.expression);if(t.type===`TSAsExpression`||t.type===`TSTypeAssertion`)return!cv(t.typeAnnotation);if(uv(t))return!0;let n=x(t);return n.type===`Identifier`&&fv(e,n)}function mv(e,t){return e.getText(x(t))}function hv(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function gv(e,t){let n=hv(t);return n.type===`SequenceExpression`?`(${e.getText(n)})`:e.getText(n)}function _v(e,t){if(t.test.type!==`BinaryExpression`)return;let{alternate:n,consequent:r,test:i}=t,{left:a,operator:o,right:s}=i;if(!(lv(a)&&lv(s))||!(I(a)&&I(s))||pv(e,a)||pv(e,s))return;let c=mv(e,a),l=mv(e,s),u=mv(e,n),d=mv(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 vv=d(`prefer-math-min-max`,`roblox`,{create(e){let{sourceCode:t}=e;return{ConditionalExpression(n){if(E(t,n,`math`))return;let r=_v(t,n);if(r===void 0||n.test.type!==`BinaryExpression`)return;let{left:i,right:a}=n.test;if(!(lv(i)&&lv(a)))return;let o=gv(t,i),s=gv(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`}}),yv=new Set([`ReadonlyRecord`,`Record`]);function bv(e){return e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&yv.has(e.typeName.name)}function xv(e){if(e.id.type!==`Identifier`)return;let t=ie(e.id);if(t===void 0)return;let{typeAnnotation:n}=t;if(!bv(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 Sv(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 Cv=d(`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(!Sv(n.init))return;let i=xv(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`}}),wv=/^[A-Z][A-Z0-9_]*$/u;function Tv(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 Ev=d(`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`||!wv.test(r.name))){if(!t){e.report({messageId:`mustUseConst`,node:n});return}Tv(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`}}),Dv=new Set([`end`,`loc`,`parent`,`range`,`start`]),Ov=new Set([`.jsx`,`.tsx`]),kv=new Set([`PaddingBottom`,`PaddingLeft`,`PaddingRight`,`PaddingTop`]),Av={componentName:`DirectionalPadding`,fileNames:[`directional-padding`],markers:[`horizontal`,`vertical`]},jv={componentName:`EqualPadding`,fileNames:[`equal-padding`],markers:[`padding`]};function Mv(e,t){return Object.is(e,t)?!0:Array.isArray(e)?Array.isArray(t)&&Nv(e,t):Array.isArray(t)||typeof e!=`object`||typeof t!=`object`||e===null||t===null||!(_(e)&&_(t))?!1:Pv(e,t)}function Nv(e,t){if(e.length!==t.length)return!1;let n=0;for(let r of e)if(!Mv(r,t[n++]))return!1;return!0}function Pv(e,t){let n=Object.entries(e).filter(([e])=>!Dv.has(e)),r=Object.entries(t).filter(([e])=>!Dv.has(e));if(n.length!==r.length)return!1;for(let[e,r]of n)if(!(e in t)||!Mv(r,t[e]))return!1;return!0}function Fv(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 Iv({value:e}){if(e!==null){if(e.type===`JSXExpressionContainer`)switch(e.expression.type){case`JSXElement`:case`JSXEmptyExpression`:case`JSXFragment`:return;default:return x(e.expression)}return e.type===`Literal`?e:void 0}}function Lv(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(!kv.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 Rv({value:e},t){if(e!==null)switch(e.type){case`JSXExpressionContainer`:case`Literal`:return t.getText(e);default:return}}function zv(e,t,n,r){let i=Rv(n.paddingTop,r);if(i===void 0)return;if(t===`preferEqualPadding`)return`<${e} padding=${i} />`;let a=Rv(n.paddingLeft,r);if(a!==void 0)return`<${e} horizontal=${i} vertical=${a} />`}function Bv(e){let t=Iv(e.paddingBottom),n=Iv(e.paddingLeft),r=Iv(e.paddingRight),i=Iv(e.paddingTop);if(t===void 0||n===void 0||r===void 0||i===void 0)return;if(Mv(i,t)&&Mv(i,n)&&Mv(i,r))return`preferEqualPadding`;let a=Mv(i,t),o=Mv(n,r);return a&&o?`preferDirectionalPadding`:void 0}function Vv(e){return e.type===`JSXIdentifier`}const Hv=d(`prefer-padding-components`,`react`,{create(e){let{filename:n}=e,r=n===``?{found:!1}:Og(n,Av),i=n===``?{found:!1}:Og(n,jv),a=n!==``&&Tg(n,Av).matches,o=n!==``&&Tg(n,jv).matches,s=new Set,c=new Set;return{ImportDeclaration(e){let t=Eg(e,n,Av),r=Eg(e,n,jv);Dg(e,t,Av.componentName,s),Dg(e,r,jv.componentName,c)},JSXElement(l){if(Fv(l))return;let{openingElement:u}=l;if(!Vv(u.name)||u.name.name!==`uipadding`)return;let d=Lv(u);if(d===void 0)return;let f=Bv(d);if(f===void 0||(f===`preferEqualPadding`?o:a))return;let p=f===`preferEqualPadding`?c:s,m=f===`preferEqualPadding`?i:r;if(p.size===0&&!m.found)return;let h=Ov.has(t.extname(n))&&p.size===1,[g]=[...p],_=h&&g!==void 0?zv(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 Uv(e){return e>=`0`&&e<=`9`}function Wv(e){return e>=`a`&&e<=`z`}function Gv(e){return e>=`A`&&e<=`Z`}function Kv(e){return Uv(e)||Wv(e)||Gv(e)}function qv(e,t,n){return Uv(e)!==Uv(t)||Wv(e)&&Gv(t)?!0:Gv(e)&&Gv(t)&&n!==void 0&&Wv(n)}function Jv(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;qv(t.charAt(r-1),t.charAt(r),i)&&(e.push(t.slice(n,r)),n=r)}e.push(t.slice(n))}function Yv(e){let t=[],n;for(let r=0;r<e.length;r+=1){if(Kv(e.charAt(r))){n??=r;continue}let i=e.codePointAt(r);if(i===void 0||i>127)return;n!==void 0&&(Jv(t,e.slice(n,r)),n=void 0)}return n!==void 0&&Jv(t,e.slice(n)),t}function Xv(e){let t=Yv(e);if(t===void 0)return;let n=``;for(let e of t)e.length!==0&&(n+=`${e.slice(0,1).toUpperCase()}${e.slice(1).toLowerCase()}`);return n}const Zv=/^\d/u;function Qv(e){if(e.id.type===`Identifier`)return e.id.name;if(!(e.id.type!==`Literal`||!h(e.id.value)))return Zv.test(e.id.value)?void 0:e.id.value}const $v=d(`prefer-pascal-case-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration(t){let n=t.id.name,r=Xv(n);r!==void 0&&r!==n&&e.report({data:{identifier:n},messageId:`notPascalCase`,node:t.id})},TSEnumMember(t){let n=Qv(t);if(n===void 0)return;let r=Xv(n);r!==void 0&&r!==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 ey(e,t){return Be(e)&&e.value===t}function ty(e){if(e===`ColorSequence`)return`ColorSequenceKeypoint`;if(e===`NumberSequence`)return`NumberSequenceKeypoint`}function ny(e,t,n){if(e.type!==`NewExpression`||!Me(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 ey(r,n)?i:void 0}function ry(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 iy(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=ny(a,r,0),c=ny(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 ay=d(`prefer-sequence-overloads`,`roblox`,{createOnce(e){return{NewExpression(t){if(t.callee.type!==`Identifier`)return;let n=t.callee.name,r=ty(n);if(r===void 0)return;let i=ry(e,t,n)??iy(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 oy(e){return e.length===2}function sy(e){return e.type===`MemberExpression`&&!e.computed}function cy(e,t){if(e.type!==`CallExpression`)return!1;let{callee:n}=e;if(!sy(n)||n.property.name!==t||!oy(e.arguments))return!1;let[r,i]=e.arguments;return r.type!==`SpreadElement`&&i.type!==`SpreadElement`}function ly(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||!cy(i,t))return;let{callee:a}=i;if(!sy(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 uy=new Set([`ConditionalExpression`,`DoWhileStatement`,`ForStatement`,`IfStatement`,`WhileStatement`]);function dy(e){return _(e)&&`parent`in e}function fy(e){return _(e)&&h(e.type)?e.type:void 0}function py(e){return _(e)&&h(e.operator)?e.operator:void 0}function my(e){return fy(e)===`LogicalExpression`&&py(e)===`&&`}function hy(e){return _(e)&&e.type===`Identifier`&&h(e.name)}function gy(e){let{parent:t}=e;if(my(t))return!0;let n=fy(t);if(n===void 0||!uy.has(n))return!1;let r=e;for(;r!==void 0&&r!==t&&dy(r);){let e=r.parent;if(my(e))return!0;r=e}return!1}function _y(e){if(e.isWrite())return!1;let{identifier:t}=e;return hy(t)?gy(t):!1}function vy(e,t,n){return C(n.getScope(t),e)?.references.some(_y)??!1}function yy(e,t){return e.every(e=>vy(e.variableName,e.variableDeclaration,t))}const by=/^[\s;]*$/u;function xy(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 by.test(a)}function Sy(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));Cy(e,t,`const ${o.length===1?o[0]:`[${o.join(`, `)}]`} = ${i}.get(${a}, ${s.join(`, `)});`,`preferSingleGet`,n)}function Cy(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 wy(e,t){if(e.length<2)return;let{sourceCode:n}=t;if(!yy(e,n))return;let[r]=e;r!==void 0&&Cy(e,t,`const hasAll = ${n.getText(r.worldNode)}.has(${n.getText(r.entityNode)}, ${e.map(e=>n.getText(e.componentNode)).join(`, `)});`,`preferSingleHas`,r)}const Ty=d(`prefer-single-world-query`,`roblox`,{create(e){let{sourceCode:t}=e,n=[],r=[];function i(){n.length>=2&&Sy(n,e),n=[]}function a(){r.length>=2&&wy(r,e),r=[]}function o(){i(),a()}return{":statement:not(VariableDeclaration[kind='const'])":o,"Program:exit":o,"VariableDeclaration[kind='const']"(e){let s=ly(e,`get`);if(s!==void 0){let e=n.at(-1);e!==void 0&&!xy(e,s,t)&&i(),n.push(s),a();return}let c=ly(e,`has`);if(c!==void 0){let e=r.at(-1);e!==void 0&&!xy(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`}}),Ey=new Set([`alumni`,`axes`,`cacti`,`children`,`criteria`,`data`,`dice`,`feet`,`fungi`,`geese`,`indices`,`matrices`,`media`,`men`,`mice`,`octopi`,`people`,`phenomena`,`teeth`,`vertices`,`women`]),Dy=new Set([`alias`,`analysis`,`axis`,`basis`,`business`,`class`,`crisis`,`glass`,`news`,`series`,`species`,`status`,`thesis`]),Oy=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`]),ky=/[A-Z]+(?![a-z])|[A-Z]?[a-z]+|\d+/gu,Ay=/^[A-Z]{2,}[sS]?$/u;function jy(e){let t=[],n=0;for(let r of e.split(`_`)){let e=r.match(ky);if(e!==null)for(let r of e)t[n++]=r}return t}const My=/^\d+$/u;function Ny(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(!(n===void 0||My.test(n)))return{lowercased:n.toLowerCase(),original:n}}}const Py=/[sS]$/u,Fy=/(?:ches|shes|xes|zes)$/u;function Iy(e,t){return Ey.has(e)||Oy.has(e)?!0:Dy.has(e)?!1:Ay.test(t)&&Py.test(t)||e.endsWith(`ies`)||e.endsWith(`ves`)||Fy.test(e)||e.endsWith(`s`)&&!e.endsWith(`ss`)&&!e.endsWith(`us`)&&!e.endsWith(`is`)}function Ly(e){if(Ay.test(e)&&Py.test(e))return!0;let t=Ny(jy(e));return t!==void 0&&Iy(t.lowercased,t.original)}const Ry=d(`prefer-singular-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration({id:t}){let{name:n}=t;Ly(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 zy(e){return e.type===`JSXElement`||e.type===`JSXFragment`}function By(e,t,n){return e.type===`Super`||t.type===`Super`?e.type===`Super`&&t.type===`Super`:Uy(e,t,n)}function Vy(e,t,n){return e.type===`SpreadElement`||t.type===`SpreadElement`?e.type!==`SpreadElement`||t.type!==`SpreadElement`?!1:Uy(e.argument,t.argument,n):Uy(e,t,n)}function Hy(e,t,n){return e.type===`PrivateIdentifier`||t.type===`PrivateIdentifier`?e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`&&e.name===t.name:Uy(e,t,n)}function Uy(e,t,n){let r=x(e),i=x(t);if(r.type!==i.type)return!1;switch(r.type){case`BinaryExpression`:return i.type===`BinaryExpression`&&Wy(r,i,n);case`CallExpression`:return i.type===`CallExpression`&&Gy(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`&&Ky(r,i,n);case`MemberExpression`:return i.type===`MemberExpression`&&qy(r,i,n);case`ThisExpression`:return i.type===`ThisExpression`;case`UnaryExpression`:return i.type===`UnaryExpression`&&r.operator===i.operator&&Uy(r.argument,i.argument,n);default:return n.getText(r)===n.getText(i)}}function Wy(e,t,n){return e.operator===t.operator&&Hy(e.left,t.left,n)&&Hy(e.right,t.right,n)}function Gy(e,t,n){if(e.optional!==t.optional||!By(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||!Vy(i,a,n))return!1}return!0}function Ky(e,t,n){return e.operator===t.operator&&Uy(e.left,t.left,n)&&Uy(e.right,t.right,n)}function qy(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!By(e.object,t.object,n)?!1:e.computed?Hy(e.property,t.property,n):Jy(e.property,t.property)}function Jy(e,t){return(e.type===`Identifier`&&t.type===`Identifier`||e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`)&&e.name===t.name}function Yy(e){let t=x(e);if(t.type===`UnaryExpression`&&t.operator===`!`)return x(t.argument)}function Xy(e){let t=x(e);if(t.type===`BinaryExpression`&&(t.operator===`===`||t.operator===`!==`))return{left:t.left,operator:t.operator,right:t.right}}function Zy(e){let t=x(e);return t.type===`Identifier`||t.type===`ThisExpression`||t.type===`Literal`}function Qy(e){return $e(e)&&Zy(e)}function $y(e,t,n){let r=Yy(e);if(r&&Uy(r,t,n))return{isFixSafe:Zy(r)};let i=Yy(t);if(i&&Uy(i,e,n))return{isFixSafe:Zy(i)};let a=Xy(e),o=Xy(t);if(!(a&&o)||!(a.operator===`===`&&o.operator===`!==`||a.operator===`!==`&&o.operator===`===`))return;let s=Hy(a.left,o.left,n)&&Hy(a.right,o.right,n),c=Hy(a.left,o.right,n)&&Hy(a.right,o.left,n);if(s||c)return{isFixSafe:Qy(a.left)&&Qy(a.right)&&Qy(o.left)&&Qy(o.right)}}function eb(e){return e.type===`JSXText`&&e.value.trim()===``}function tb(e){if(e.type===`JSXExpressionContainer`&&e.expression.type!==`JSXEmptyExpression`&&e.expression.type===`LogicalExpression`&&e.expression.operator===`&&`&&zy(e.expression.right))return{condition:e.expression.left,logical:e.expression,node:e,renderBranch:e.expression.right}}const nb=d(`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||!eb(t))break;n+=1}let r=e[n];return r===void 0?void 0:tb(r)}function r(n,r){let i=$y(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=tb(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 rb(e){return e.type===`PrivateIdentifier`}function ib(e){return e===`+`||e===`-`||e===`*`||e===`/`||e===`%`}function ab(e){return e.type===`BinaryExpression`&&ib(e.operator)&&!rb(e.left)&&!rb(e.right)}function ob(e){switch(e.type){case`BinaryExpression`:{if(!ab(e))return;let{left:t,right:n}=e,r=ob(t),i=ob(n);return r===void 0||i===void 0?void 0:`${r} ${e.operator} ${i}`}case`Identifier`:return e.name;case`Literal`:return b(e.value)?String(e.value):void 0;case`UnaryExpression`:{let t=ob(e.argument);return t===void 0||e.operator!==`+`&&e.operator!==`-`?void 0:`${e.operator}${t}`}default:return}}function sb(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 cb(e){switch(e.type){case`BinaryExpression`:{if(!ab(e))return;let{left:t,right:n}=e,r=cb(t),i=cb(n);return r===void 0||i===void 0?void 0:sb(e.operator,r,i)}case`Identifier`:return;case`Literal`:return Number(e.value);case`UnaryExpression`:{let t=cb(e.argument);return t===void 0?void 0:e.operator===`+`?t:e.operator===`-`?-t:void 0}default:return}}function lb(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=ob(t),o=ob(n),s=ob(r),c=ob(i);if(a!==void 0&&o!==void 0&&s!==void 0&&c!==void 0)return{offsetXText:o,offsetYText:c,scaleXText:a,scaleYText:s}}const ub=d(`prefer-udim2-shorthand`,`roblox`,{create(e){return{NewExpression(t){if(!Me(t,`UDim2`))return;let n=lb(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=cb(r),c=cb(i),l=cb(a),u=cb(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 db(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 fb=d(`prefer-use-reducer`,`react`,{create(e){return{FunctionDeclaration(t){t.id===null||!W(t.id.name)||`body`in t&&t.body&&db(e,t.body,t.id.name)},VariableDeclarator(t){Fc(t)&&t.init&&`body`in t.init&&t.init.body&&`name`in t.id&&db(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`}}),pb=`replace`,mb=`suggestion`,hb=`A more descriptive name will do too.`,gb={args:`parameters`,char:`character`,dt:`deltaTime`,plr:`player`},_b=[`char`],vb={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}},yb={EmberENV:!0,defaultProps:!0,devDependencies:!0,getDerivedStateFromProps:!0,getInitialProps:!0,getServerSideProps:!0,getStaticProps:!0,iOS:!0,obj:!0,propTypes:!0,setupFilesAfterEnv:!0},bb=[`i18n`,`l10n`],xb=/(?=[A-Z])|(?<=[_.-])/u,Sb=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(`.`)),Cb=/^[A-Za-z]+$/u;function wb(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95}function Tb(e){return e<192?wb(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 Eb(e){return!!(Tb(e)||e>=48&&e<=57||e===8204||e===8205||e>=768&&e<=865||e>=8240&&e<=8266)}function Db(e){if(e.length===0||Sb.has(e))return!1;let t=e.codePointAt(0);if(t===void 0||!Tb(t))return!1;let n=t>65535?2:1;for(;n<e.length;){let t=e.codePointAt(n);if(t===void 0||!Eb(t))return!1;n+=t>65535?2:1}return!0}function Ob(e){let t=[e],n=1;for(let r of e.childScopes){let e=Ob(r);for(let r of e)t[n++]=r}return t}function kb(e,t){return!t.some(t=>C(t,e)!==void 0)}function Ab(e,t,n){let r=e;if(!(!Db(r)&&(r=`${r}_`,!Db(r)))){for(;!(kb(r,t)&&n(r,t));)r=`${r}_`;return r}}function jb(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 Mb(e,t){return e.range[0]===t.range[0]&&e.range[1]===t.range[1]}function Nb(e){let{parent:t}=e;return!he(t)||t.local!==e?!1:Mb(t.local,t.imported)}function Pb(e){let{parent:t}=e;return!ge(t)||t.local!==e?!1:Mb(t.local,t.exported)}function Fb(e){if(!A(e))return!1;let{parent:t}=e;return _e(t)&&t.shorthand&&t.value===e}function Ib(e){if(!A(e))return!1;let{parent:t}=e;if(!Ye(t)||t.left!==e)return!1;let n=t.parent;return _e(n)?n.shorthand:!1}function Lb(e){if(!A(e))return!1;let{parent:t}=e;if(Ee(t)&&t.local===e||De(t)&&t.local===e)return!0;if(he(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&&Ze(t.init)}function Rb(e){if(!A(e))return!1;let{parent:t}=e;if(k(t)&&t.id===e){let e=t.parent;return Oe(e)?ke(e.parent):!1}return Ae(t)&&t.id===e||Ne(t)&&t.id===e||Pe(t)&&t.id===e?ke(t.parent):!1}function zb(e){return jb(e).every(e=>!(Rb(e)||ue(e)))}function Bb(e,t,n){if(A(e))return Fb(e)||Ib(e)?n.replaceText(e,`${e.name}: ${t}`):Nb(e)?n.replaceText(e,`${e.name} as ${t}`):Pb(e)?n.replaceText(e,`${t} as ${e.name}`):n.replaceText(e,t)}function Vb(e,t,n){let r=[],i=0;for(let a of jb(e)){let e=Bb(a,t,n);e!==void 0&&(r[i++]=e)}return r}function Hb(e){if(!A(e))return!1;let{parent:t}=e;if(M(t)&&t.property===e&&!t.computed){let e=t.parent;if(ve(e)&&e.left===t)return!0}return _e(t)&&t.key===e&&!t.computed&&!t.shorthand&&(Ue(t.parent)||We(t.parent))||Fe(t)&&t.key===e&&!t.computed||ge(t)&&t.exported===e&&t.local!==e?!0:(we(t)||Te(t))&&t.key===e&&!t.computed}function Ub(e){if(!A(e))return!1;let{parent:t}=e;return _e(t)&&t.key===e&&!t.computed&&!t.shorthand&&(Ue(t.parent)||We(t.parent))}function Wb(e){if(e.type===`ImportBinding`){let{parent:t}=e;if(t!==null&&fe(t)&&pe(t.source))return t.source.value}if(e.type===`Variable`){let{node:t}=e;if(k(t)&&t.init!==null&&Ze(t.init)){let[e]=t.init.arguments;if(e!==void 0&&pe(e))return e.value}}}function Gb(e){let t=Wb(e);return t!==void 0&&!t.includes(`node_modules`)&&(t.startsWith(`.`)||t.startsWith(`/`))}function Kb(e,t){return e===!1?!1:e!==`internal`||Gb(t)}function qb(e){return e.defs.length===1&&e.defs[0]?.type===`ClassName`}const Jb=/^(?:[#$./]|[~@]\/)/u;function Yb(e){return!Jb.test(e)}function Xb(e){if(e?.type!==`ImportBinding`)return!1;let{parent:t}=e;return t===null||!fe(t)||!pe(t.source)?!1:Yb(t.source.value)}function Zb(e){if(e.type===`Identifier`)return e;if(e.type===`TSQualifiedName`)return Zb(e.left)}function Qb(e,t){if(e.type===`TSImportType`)return Yb(e.source.value);if(e.type!==`TSTypeReference`)return!1;let n=Zb(e.typeName);if(n===void 0)return!1;let r=C(t.getScope(n),n.name)?.defs[0];return Xb(r)}function $b(e){let{parent:t}=e;if(k(t)&&t.init===e)return ie(t.id)?.typeAnnotation;if((t.type===`TSAsExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`)&&t.expression===e)return t.typeAnnotation}function ex(e){if(j(e))return e;if(M(e))return ex(e.object);if(ze(e))return ex(e.left)}function tx(e,t){let{parent:n}=e,r;if(M(n)&&n.property===e&&!n.computed?r=n.object:ze(n)&&n.right===e&&(r=n.left),r===void 0)return!1;let i=j(r)?r:ex(r);return i===void 0||!A(i)?!1:C(t.getScope(e),i.name)?.defs[0]?.type===`ImportBinding`}function nx(e,t){let n=e.parent;if(!me(n))return!1;let{callee:r}=n;if(!j(r))return!1;let i=C(t.getScope(r),r.name)?.defs[0];return Xb(i)}function rx(e,t){if(tx(e,t))return!0;if(!Ub(e))return!1;let n=e.parent.parent;if(n===null||!Ue(n))return!1;let r=$b(n);return r!==void 0&&Qb(r,t)||nx(n,t)}function ix(e,t,n){return e?t:n}const ax=/[.+^${}()|[\]\\]/gu,ox=/^\/(?<first>.+)\/(?<second>[dgimsuvy]*)$/u,sx=new WeakMap,cx=new WeakMap;function lx(e){return e===e.toUpperCase()}function ux(e){return lx(e.charAt(0))}function dx(e){return e.charAt(0).toUpperCase()+e.slice(1)}function fx(e){return e.charAt(0).toLowerCase()+e.slice(1)}function px(e){return e.includes(`u`)||e.includes(`v`)?e:`${e}u`}function mx(e){return e===void 0?3:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:3}function hx(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 gx(e){if(e.length<2)return[e];let t=[],n=0,r=mx(e.codePointAt(0));for(let i=1;i<e.length;i+=1){let a=mx(e.codePointAt(i)),o=mx(e.codePointAt(i+1));hx(r,a,o)&&(t.push(e.slice(n,i)),n=i),r=a}return t.push(e.slice(n)),t}const _x=/\$\d+/gu;function vx(e){let t=e.match(_x);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 yx(e){let t=vx(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 bx(e){let t=[],n=[],r=0;for(let[i,a]of e)a&&(t[r]=fx(i),n[r]=dx(i),r+=1);return{lowerFirst:t.toSorted((e,t)=>e.localeCompare(t)),upperFirst:n.toSorted((e,t)=>e.localeCompare(t))}}function xx(e,t){if(e.startsWith(`/`)){let n=ox.exec(e);if(n?.groups!==void 0)return{matcher:{original:e,pattern:RegExp(`^${n.groups.first}$`,px(n.groups.second??``)),replacement:t,replacementPatterns:yx(t)},type:`pattern`}}if(e.includes(`*`)||e.includes(`?`)){let n=e.replaceAll(ax,String.raw`\$&`).replaceAll(`*`,`(.*)`).replaceAll(`?`,`(.)`),r=0,i=t.replaceAll(`*`,()=>`$${++r}`);return{matcher:{original:e,pattern:RegExp(`^${n}$`,`u`),replacement:i,replacementPatterns:yx(i)},type:`pattern`}}return{original:e,replacement:t,type:`exact`}}function Sx(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 Cx(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 wx(e,t){return e===`internal`||typeof e==`boolean`?e:t}function Tx(e){if(!_(e))return;let t={};for(let[n,r]of Object.entries(e))typeof r==`boolean`&&(t[n]=r);return t}function Ex(e,t){return typeof e==`boolean`?e:t}function Dx(e){let t=_(e)?e:void 0,n=Tx(t?.allowList),r=ix(Ex(t?.extendDefaultAllowList,!0),n===void 0?yb:{...yb,...n},n??{});return new Map(Object.entries(r))}function Ox(e){if(!_(e))return{};let t={};for(let[n,r]of Object.entries(e)){if(r===!1){t[n]=!1;continue}if(!_(r))continue;let e={};for(let[t,n]of Object.entries(r))typeof n==`boolean`&&(e[t]=n);t[n]=e}return t}function kx(e){let t=_(e)?e:void 0,n=Ex(t?.extendDefaultReplacements,!0),r=Ox(t?.replacements),i=new Set([...Object.keys(vb),...Object.keys(r)]),a=[];for(let e of i){let t=r[e],i=n?vb[e]??{}:{},o=t===!1?{}:ix(t===void 0,i,{...i,...t}),s=new Map(Object.entries(o));sx.set(s,bx(s)),a.push([e,s])}return new Map(a)}function Ax(e){let t=_(e)?e:void 0,n=[];for(let e of bb)n.push(e);if(Array.isArray(t?.ignore))for(let e of t.ignore)(h(e)||e instanceof RegExp)&&n.push(e);return n.map(e=>e instanceof RegExp?e:new RegExp(e,`u`))}function jx(e){let t=_(e)?e:void 0,n=new Set(_b);if(!y(t?.allowPropertyAccess))return n;for(let e of t.allowPropertyAccess)n.add(e);return n}function Mx(e){let t=_(e)?e:void 0,n=new Map,r=new Set,i=[],a=[],o=ee(t?.shorthands)?t.shorthands:{},s={...gb,...o};for(let[e,t]of Object.entries(s)){let r=xx(e,t);r.type===`exact`?n.set(r.original,r.replacement):a.push(r.matcher)}if(y(t?.ignoreShorthands))for(let e of t.ignoreShorthands){let t=xx(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 Nx(e){let t=_(e)?e:void 0;return{allowList:Dx(t),allowPropertyAccess:jx(t),checkDefaultAndNamespaceImports:wx(t?.checkDefaultAndNamespaceImports,`internal`),checkFilenames:Ex(t?.checkFilenames,!0),checkProperties:Ex(t?.checkProperties,!1),checkShorthandImports:wx(t?.checkShorthandImports,`internal`),checkShorthandProperties:Ex(t?.checkShorthandProperties,!0),checkVariables:Ex(t?.checkVariables,!0),ignore:Ax(t),nameReplacements:new Map,replacements:kx(t),shorthandConfiguration:Mx(t)}}function Px(e){return{...e,nameReplacements:new Map,shorthandConfiguration:{...e.shorthandConfiguration,ignoredIdentifiers:new Map,replacementsByIdentifier:new Map}}}function Fx(e){if(!_(e))return Nx(e);let t=cx.get(e);if(t!==void 0)return Px(t);let n=Nx(e);return cx.set(e,n),Px(n)}function Ix(e,t){if(lx(e)||t.allowList.get(e)===!0)return[];let n=t.replacements.get(fx(e))??t.replacements.get(e)??t.replacements.get(dx(e));if(n===void 0)return[];let r=sx.get(n);return r===void 0?[]:ux(e)?r.upperFirst:r.lowerFirst}function Lx(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=gx(e),i=[];for(let e of r){let n=Sx(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 Rx(e,t){let n=t.ignoredIdentifiers.get(e);if(n!==void 0)return n;let r=Cx(e,t);if(!r){let n=Lx(e,t);r=n!==void 0&&n.matches.length>0&&n.matches.every(e=>Cx(e.matchedWord,t))}return t.ignoredIdentifiers.set(e,r),r}function zx(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 Bx(e,t,n=3){let r=`${n}\0${e}`,i=t.nameReplacements.get(r);if(i!==void 0)return i;let a=Vx(e,t,n);return t.nameReplacements.set(r,a),a}function Vx(e,t,n){if(t.allowList.get(e)===!0||t.ignore.some(t=>t.test(e)))return{total:0};let r=Lx(e,t.shorthandConfiguration);if(r!==void 0)return Rx(e,t.shorthandConfiguration)?{total:0}:{samples:[r.replaced],total:1};if(lx(e))return{total:0};let i=Ix(e,t);if(i.length>0)return{samples:i.slice(0,n),total:i.length};let a=e.split(xb).filter(Boolean),o=!1,s=[],c=0;for(let e of a){let n=Ix(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:Hx(s,l,n).map(e=>e.join(``)),total:l}}function Hx(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]??``;Cb.test(n)&&e[t-1]?.endsWith(n)===!0&&e.splice(t,1)}return i}function Ux(e,t){let n=t.replacements.get(e);if(n===void 0)return!1;let r=sx.get(n);return r!==void 0&&r.lowerFirst.length>0}function Wx(e,t,n){let{samples:r=[],total:i}=t;if(i===1)return{data:{discouragedName:e,nameTypeText:n,replacement:r[0]??``},messageId:pb};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:mb}}function Gx(e){return function(t,n){return n.every(n=>{let r=e.get(n);return r===void 0||!r.has(t)})}}function Kx(e){let{parent:t}=e;return M(t)&&t.property===e&&!t.computed||ze(t)&&t.right===e}function qx(e,t,n,r){r({...Wx(e.name,{samples:[t],total:1},n?`property`:`variable`),node:e})}function Jx(e,t,n){return Lb(t)&&!Kb(n.checkDefaultAndNamespaceImports,e)||Nb(t)&&!Kb(n.checkShorthandImports,e)?!0:!n.checkShorthandProperties&&Fb(t)}function Yx(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 Xx(e,t,n,r){let i=[],a=0,o=0;for(let s of e){let e=Ab(s,t,n);if(e!==void 0){if(e!==s&&Ux(s,r)){o+=1;continue}e.length>0&&(i[a++]=e)}}return{droppedDiscouraged:o,safeSamples:i}}function Zx(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 Qx(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 Vb(n,r,e)},node:o})}function $x(e,t,n,r,i){let[a]=e.defs;if(a===void 0)return;let o=a.name;if(!j(o)||Jx(a,o,t))return;let s=Zx(a,e,r),c=Yx(e),l=c===void 0?Bx(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}=Xx(l.samples,d,s,t),m=p.length>0?p:l.samples,h=g(l.samples.length)&&l.samples.length===l.total?Math.max(0,l.total-f):l.total,_=e.name===`fn`&&h>1?m.map(e=>e===`function_`?`function`:e):m,v=Wx(o.name,{samples:_,total:h},`variable`);if(h===1&&p.length===1&&zb(e)){let[t]=p;if(t!==void 0){Qx(i,v,e,t,d,n,o);return}}i({...v,node:o})}function eS(e,t){if(!qb(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 tS(e,t){for(let n of Ob(e))for(let e of n.variables)eS(e,t)}function nS(e,t,n,r){let i=Hb(e),a=Kx(e);(i||a)&&(rx(e,r)||rS(e,i,a,t,n)||t.checkProperties&&i&&iS(e,t,n))}function rS(e,t,n,r,i){let a=Lx(e.name,r.shorthandConfiguration);return a===void 0||!(t||n)?!1:(Rx(e.name,r.shorthandConfiguration)||!r.checkShorthandProperties||n&&zx(e.name,a,r.allowPropertyAccess)||qx(e,a.replaced,!0,i),!0)}function iS(e,t,n){let r=Bx(e.name,t);if(r.total===0)return;let i=Wx(e.name,r,`property`),a=aS(e,r.samples);if(a!==void 0){n({...i,fix(t){return t.replaceText(e,a)},node:e});return}n({...i,node:e})}function aS(e,t){if(t?.length!==1||!Ub(e))return;let[n]=t,{parent:r}=e;if(n!==void 0&&_e(r)&&pe(r.value)&&Db(n))return n}const oS=d(`prevent-abbreviations`,`naming`,{create(e){let t=Fx(e.options[0]),n=e.physicalFilename,r=new WeakMap,i=Gx(r),{sourceCode:a}=e;function o(n){$x(n,t,r,i,e.report)}return{Identifier(n){!A(n)||n.name===`__proto__`||nS(n,t,e.report,a)},JSXOpeningElement({name:n}){if(!(t.checkVariables&&ue(n)&&ux(n.name)))return;let r=Bx(n.name,t);if(r.total===0)return;let i=Wx(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=Bx(o===-1?a:a.slice(0,o),t);if(c.total>0&&c.samples){let t=c.samples.map(e=>`${e}${s}`);e.report({...Wx(a,{samples:t,total:c.total},`filename`),node:r})}}t.checkVariables&&tS(a.getScope(r),o)}}},meta:{docs:{description:`Prevent abbreviations.`,recommended:!1},fixable:`code`,messages:{[pb]:`The {{nameTypeText}} \`{{discouragedName}}\` should be named \`{{replacement}}\`. ${hb}`,[mb]:`Please rename the {{nameTypeText}} \`{{discouragedName}}\`. Suggested names are: {{replacementsText}}. ${hb}`},schema:[{additionalProperties:!1,properties:{allowList:{additionalProperties:{type:`boolean`},default:yb,defaultLabel:`default allow list`,description:`Names that should be allowed even when they match a discouraged abbreviation.`,type:`object`},allowPropertyAccess:{default:_b,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:bb,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:vb,defaultLabel:`default replacement map`,description:`Replacement suggestions for discouraged names.`,type:`object`},shorthands:{additionalProperties:{type:`string`},default:gb,defaultLabel:`default shorthands`,description:`Shorthand names and the full names they should expand to.`,type:`object`}},type:`object`}],type:`suggestion`}}),sS=/^use[A-Z0-9].*$/u;function cS(e){return sS.test(e)}function lS(e){if(e.id!==null)return e.id.name}function uS(e){return e.id.type===`Identifier`?e.id.name:void 0}function dS(e){let t=lS(e);return t!==void 0&&cS(t)}function fS({parent:e}){if(e.type!==`VariableDeclarator`)return!1;let t=uS(e);return t!==void 0&&cS(t)}function pS(e,t){let n=e.get(t);if(n!==void 0&&n.length!==0)return n.at(-1)}function mS(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 hS(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 gS(e,t,n,r){let i=C(e.getScope(t),n);if(i!==void 0){let e=mS(i);if(e!==void 0)return e}return pS(r,n)}function _S(e,t,n){if(e.argument.type===`Identifier`){let r=gS(t,e,e.argument.name,n);return r===void 0?1:vS(r,t,n)}return e.argument.type===`ArrayExpression`?vS(e.argument,t,n):1}function vS(e,t,n){let r=0;for(let i of e.elements){if(i===null){r+=1;continue}if(i.type===`SpreadElement`){r+=_S(i,t,n);continue}r+=1}return r}function yS(e,t){let n=C(e.getScope(t),t.name);return n!==void 0&&hS(n)}function bS(e){let t=uS(e);if(t!==void 0&&e.init?.type===`ArrayExpression`)return{init:e.init,name:t}}function xS(e,t){let n=bS(e);if(n===void 0)return;let{init:r,name:i}=n,a=t.get(i)??[];a.push(r),t.set(i,a)}function SS(e,t){let n=bS(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 CS=d(`react-hooks-strict-return`,`react`,{create(e){let{sourceCode:t}=e,n=new Map,r=0;function i(e){dS(e)&&(r+=1)}function a(e){dS(e)&&--r}function o(e){fS(e)&&(r+=1)}function s(e){fS(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(yS(t,e.argument))return;let r=gS(t,e,e.argument.name,n);if(r===void 0)return;vS(r,t,n)>2&&c(e);return}e.argument.type===`ArrayExpression`&&vS(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){xS(e,n)},"VariableDeclarator:exit"(e){SS(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 wS(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 TS=d(`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`||wS(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 ES(e){if(!(_(e)&&`classes`in e&&_(e.classes)))return new Map;let{classes:t}=e,n=new Map;for(let[e,r]of Object.entries(t))h(r)&&n.set(e,r);return n}function DS(e){return e?.type===`module`||e?.type===`global`}function OS(e){if(e.type===`ImportDefaultSpecifier`)return e.local.name;if(e.type===`ImportSpecifier`){if(e.imported.type===`Identifier`)return e.imported.name;if(h(e.imported.value))return e.imported.value}}function kS(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 AS(e,t,n){if(!h(e.source.value))return;let r=e.source.value;for(let[i,a]of t)if(a===r)for(let t of e.specifiers)OS(t)===i&&n.set(t.local.name,i)}const jS=d(`require-module-level-instantiation`,`roblox`,{create(e){let{sourceCode:t}=e,n=ES(e.options[0]);if(n.size===0)return{};let r=new Map;return{ImportDeclaration(e){AS(e,n,r)},NewExpression(i){let a=kS(i,r,n);a!==void 0&&(DS(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`}}),MS=[{allowAsync:!1,name:`useEffect`},{allowAsync:!1,name:`useLayoutEffect`},{allowAsync:!1,name:`useInsertionEffect`}];function NS(e){return _(e)&&h(e.name)&&typeof e.allowAsync==`boolean`}function PS(e){let t=_(e)&&e.sloptor===!0,n=_(e)&&e.inlineFunctionDeclarations===!0;if(!_(e))return{environment:`roblox-ts`,hooks:MS,inlineFunctionDeclarations:n,sloptor:t};let r=cr(e.environment)?e.environment:`roblox-ts`,i=e.hooks;if(!Array.isArray(i))return{environment:r,hooks:MS,inlineFunctionDeclarations:n,sloptor:t};let a=[];for(let e of i)NS(e)&&a.push(e);return a.length===0?{environment:r,hooks:MS,inlineFunctionDeclarations:n,sloptor:t}:{environment:r,hooks:a,inlineFunctionDeclarations:n,sloptor:t}}function FS(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 IS(e,t){let n=C(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=ji(t.init);if(n===`useCallback`||n===`useMemo`)return!0}return!1}const LS=d(`require-named-effect-functions`,`react`,{create(e){let{environment:t,hooks:n,inlineFunctionDeclarations:r,sloptor:i}=PS(e.options[0]),a=new Map(n.map(e=>[e.name,e.allowAsync])),o=new Set(a.keys()),s=t===`roblox-ts`&&!i;function c(e){let t=a.get(e);return typeof t==`boolean`&&t}function l(t,n,r){e.report({data:{hook:t},messageId:r,node:n})}function u(t,n,r){let i=C(e.sourceCode.getScope(r),r.name);if(i===void 0){IS(e.sourceCode,r)&&l(t,n,`identifierReferencesCallback`);return}let a=FS(i);if(a===void 0){IS(e.sourceCode,r)&&l(t,n,`identifierReferencesCallback`);return}d(t,n,r,a)}function d(e,t,n,i){if(i.type===`arrow`){i.isAsync&&!c(e)?l(e,t,`identifierReferencesAsyncArrow`):i.isAsync||l(e,t,`identifierReferencesArrow`);return}if(i.type===`function-expression`){f(e,t,i.node);return}i.isAsync?c(e)||l(e,t,`identifierReferencesAsyncFunction`):!s&&r&&p(e,t,n,i.node)}function f(e,t,n){n.id===null?l(e,t,`anonymousFunction`):s&&l(e,t,`functionExpression`)}function p(t,n,r,i){e.report({data:{hook:t},fix(t){return t.replaceText(r,e.sourceCode.getText(i))},messageId:`identifierReferencesFunctionDeclaration`,node:n})}function m(e,t,n){let r=n.id!==null;r&&n.async?l(e,t,`asyncFunctionExpression`):r&&s?l(e,t,`functionExpression`):!r&&n.async?l(e,t,`asyncAnonymousFunction`):r||l(e,t,`anonymousFunction`)}return{CallExpression(e){let t=ji(e);if(t===void 0||!o.has(t))return;let[n]=e.arguments;if(n!==void 0){if(n.type===`Identifier`){u(t,e,n);return}if(n.type===`ArrowFunctionExpression`){n.async?l(t,e,`asyncArrowFunction`):l(t,e,`arrowFunction`);return}n.type===`FunctionExpression`&&m(t,e,n)}}}},meta:{docs:{description:`Enforce named effect functions for better debuggability. Prevents inline arrow functions in useEffect and similar hooks.`,recommended:!1},fixable:`code`,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() { ... }`,identifierReferencesFunctionDeclaration:`{{hook}} receives identifier pointing to a named function declaration. Convert it to an inline named function expression so the effect callback is self-contained: useEffect(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:[...MS],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`},inlineFunctionDeclarations:{default:!1,description:`Convert effect callbacks that reference a named function declaration into inline named function expressions (standard and sloptor modes only), keeping the effect body visible to dependency analysis.`,type:`boolean`},sloptor:{default:!1,description:`Compile with sloptor (a Go-based roblox-ts compiler). Sloptor targets @rbxts/react like roblox-ts but supports standard TypeScript features, so the rule applies standard-mode behavior. Use with environment: 'roblox-ts'.`,type:`boolean`}},type:`object`}],type:`problem`}});s({"alternatives?":s(`string[]`).readonly().or(`undefined`),closer:s(`string[]`).readonly().or(`string`),opener:`string`,"openerAlternatives?":s(`string[]`).readonly().or(`undefined`),"platform?":s(`"roblox" | undefined`),"requireSync?":`boolean | undefined`,"yieldingFunctions?":s(`string[]`).readonly().or(`undefined`)}).readonly();const RS=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]),zS=[`task.wait`,`wait`,`*.WaitForChild`,`*.*Async`];function BS(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 VS(e,t){return t.filter(t=>t.some(t=>t.index===e.index))}function HS({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 Q(e){let t=[],n=0;if(y(e.closer))for(let r of e.closer)t[n++]=r;else h(e.closer)&&(t[n++]=e.closer);if(e.alternatives)for(let r of e.alternatives)t[n++]=r;return t}function US(e){let t=[e.opener];if(e.openerAlternatives){let n=1;for(let r of e.openerAlternatives)t[n++]=r}return t}function WS(e){return e.length===0?`configured opener`:e.length===1?e[0]??`configured opener`:e.join(`' or '`)}function GS(e){return e?RS.has(e.type):!1}function KS(e){return e?.type===`SwitchStatement`}function qS(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 JS(e,t){let n=e.label?qS(e.label,e.parent):void 0;if(n)return GS(n)?n:void 0;let r=e.parent;for(;r;){if(GS(r))return r;if(t&&KS(r))return;r=r.parent??void 0}}function YS(e){return JS(e,!0)}function XS(e){return JS(e,!1)}function ZS(e){return{...e,loopAncestors:[...e.loopAncestors]}}const QS=d(`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:[...zS]}]: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(!US(r).includes(e))continue;let i=Q(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 y(e){let t=d.at(-1);t&&(d[d.length-1]={...t,...e})}function ee(){return a.map(ZS)}function b(e){f.set(e,ee())}function x(e,t){return i.pairs.find(n=>(t?US(n):Q(n)).includes(e))}function S(e,t){return t.platform===`roblox`&&(t.yieldingFunctions??zS).some(t=>{if(t.startsWith(`*.`)){let n=t.slice(2);return e.endsWith(`.${n}`)}return e===t})}function C(e){let t=Q(e);return t.length===1?t[0]??`closer`:t.join(`' or '`)}function w(t,n){e.report({data:{closer:C(t.config),opener:t.opener,paths:n},messageId:`unpairedOpener`,node:t.node})}function T(e){a.length=0;for(let t of e)a.push({...t})}function E(e){let t=p.get(e)??[];t.push(ee()),p.set(e,t)}function te(e,t,n){for(let r of e){let e=VS(r,t);e.length<=0||e.length>=t.length||i.allowConditionalClosers===!1&&w(r,n)}}function ne(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 D(){if(a.length>0)for(let e of a)w(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 re(e){e.type===`IfStatement`&&(_({inConditional:!0}),b(e))}function O(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)||w(n,`conditional branch`);if(r){te(t,n,`not all execution paths`),a.length=0;for(let e of t)BS(e,n)&&a.push(e)}else T(t)}f.delete(e),p.delete(e)}function k(e){let{parent:t}=e;if(t?.type===`IfStatement`){E(t);let e=f.get(t);if(!e)return;T(e)}}function ie(e){let{parent:t}=e;t?.type===`IfStatement`&&E(t)}function ae(e){e.type===`TryStatement`&&b(e)}function oe(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=Q(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)BS(e,r)&&a.push(e)}f.delete(t),p.delete(t)}function se(){_({inTry:!0})}function ce(e,t){if(e.type!==t)return;let{parent:n}=e;if(n.type===`TryStatement`){E(n);let e=f.get(n);e&&T(e)}v()}function le(e){ce(e,`BlockStatement`)}function A(){_({inCatch:!0})}function j(e){ce(e,`CatchClause`)}function ue(){_({inFinally:!0})}function de(e){e.type===`SwitchStatement`&&(_({inConditional:!0}),b(e))}function fe(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){te(t,n,`not all execution paths`);let e=t.filter(e=>BS(e,n));a.length=0;for(let t of e)a.push(t)}else T(t);f.delete(e),p.delete(e)}function pe(e){if(e.type!==`SwitchCase`)return;let{parent:t}=e;if(t.type===`SwitchStatement`){E(t);let e=f.get(t);if(!e)return;T(e)}}function me(e){GS(e)&&(o.push(e),_({inLoop:!0}))}function he(){o.length>0&&o.pop(),v()}function ge(t){if(y({hasEarlyExit:!0}),!(g().inFinally||a.length===0))for(let{config:n,node:r,opener:i}of a){let a=Q(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`?XS(t):YS(t);if(n)for(let{config:r,loopAncestors:i,node:o,opener:s}of a){if(!i.some(e=>e===n))continue;let a=Q(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 M(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 ve(t,n){let r=a.findLastIndex(e=>Q(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=WS(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 ye(t,n,r){let i=Q(r.config),a=i.length===1?i[0]??`closer`:i.join(`' or '`);e.report({data:{closer:a,yieldingFunction:n},messageId:`robloxYieldViolation`,node:t})}function be(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=Q(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 xe(e){if(e.type!==`CallExpression`)return;let t=HS(e);if(t===void 0||t===``)return;let n=x(t,!0);if(n){M(e,t,n);return}if(x(t,!1)){ve(e,t);return}for(let n of a)if(S(t,n.config)){ye(e,t,n),a.length=0,l=!0;return}}return{ArrowFunctionExpression:ne,"ArrowFunctionExpression:exit":D,AwaitExpression:be,BreakStatement:_e,CallExpression:xe,CatchClause:A,"CatchClause:exit":j,ContinueStatement:_e,DoWhileStatement:me,"DoWhileStatement:exit":he,ForInStatement:me,"ForInStatement:exit":he,ForOfStatement:e=>{e.await&&be(e),me(e)},"ForOfStatement:exit":he,ForStatement:me,"ForStatement:exit":he,FunctionDeclaration:ne,"FunctionDeclaration:exit":D,FunctionExpression:ne,"FunctionExpression:exit":D,IfStatement:re,"IfStatement > .alternate:exit":ie,"IfStatement > .consequent:exit":k,"IfStatement:exit":O,ReturnStatement:ge,"SwitchCase:exit":pe,SwitchStatement:de,"SwitchStatement:exit":fe,ThrowStatement:ge,TryStatement:ae,"TryStatement > .block":se,"TryStatement > .block:exit":le,"TryStatement > .finalizer":ue,"TryStatement > .finalizer:exit":v,"TryStatement:exit":oe,WhileStatement:me,"WhileStatement:exit":he,YieldExpression:be}},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:[...zS]}],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`}}),$S={allowRootKeys:!1,ignoreCallExpressions:[`ReactTree.mount`,`CreateReactStory`,`createReactStory`,`createPlatformStory`],iterationMethods:[`map`,`filter`,`forEach`,`flatMap`,`reduce`,`reduceRight`,`some`,`every`,`find`,`findIndex`],memoizationHooks:[`useCallback`,`useMemo`]},eC=new Set([`ChainExpression`,`ParenthesizedExpression`,`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]),tC=new Set([...eC,`AwaitExpression`,`ConditionalExpression`,`LogicalExpression`,`SequenceExpression`,`SpreadElement`]),nC={iteration:!1,memoization:!1},rC=new Set([`ConditionalExpression`,`LogicalExpression`]),iC=new Set([`BlockStatement`,`CatchClause`,`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`IfStatement`,`LabeledStatement`,`SwitchCase`,`SwitchStatement`,`TryStatement`,`WhileStatement`,`WithStatement`]);function $(e){return e.parent??void 0}function aC(e){let t=e;for(;t!==void 0&&eC.has(t.type);)t=$(t);return t}function oC(e){let t=$(e);for(;t!==void 0;){if(N(t))return t;t=$(t)}}function sC(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 nC}function cC(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(tC.has(n.type)){t=n,n=$(n);continue}break}}function lC(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 uC(e,t){e.iteration||=t.iteration,e.memoization||=t.memoization}function dC(e,t,n){if(e.isWrite())return nC;let r=cC(e.identifier);return r===void 0||Ac(r)?nC:sC(r,t,n)}function fC(e,t,n,r){let i=cC(t);if(i!==void 0)return Ac(i)?nC:sC(i,n,r);let a=lC(e,t);if(a===void 0)return nC;let o={iteration:!1,memoization:!1};for(let e of a.references)if(uC(o,dC(e,n,r)),o.iteration&&o.memoization)return o;return o}function pC(e){let t=mC(e);return t===void 0?!1:t.type===`ReturnStatement`?gC(t):t.type===`ArrowFunctionExpression`}function mC(e){let t=hC(aC($(e)));for(;t!==void 0&&rC.has(t.type);)t=aC($(t));return hC(t)}function hC(e){return e?.type===`JSXExpressionContainer`?aC($(e)):e}function gC(e){let t=aC($(e));for(;t!==void 0&&iC.has(t.type);)t=aC($(t));return t!==void 0&&N(t)}function _C(e){if(!pC(e))return!1;let t=oC(e);if(t===void 0)return!1;let n=aC($(t));return n?.type!==`CallExpression`||Ac(n)}function vC(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 yC(e){return e.toLowerCase().endsWith(`children`)}function bC(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||!yC(n)}function xC(e){let t=e,n=$(e);for(;n!==void 0&&eC.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 SC(e,t){let n=$(e);if(n===void 0)return!1;let r=!1;for(;n!==void 0&&(n.type===t||eC.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 CC(e){return SC(e,`ConditionalExpression`)}function wC(e){return SC(e,`LogicalExpression`)}const TC=d(`require-react-component-keys`,`react`,{create(e){let[t]=e.options,n={allowRootKeys:$S.allowRootKeys,ignoreCallExpressions:$S.ignoreCallExpressions,iterationMethods:$S.iterationMethods,memoizationHooks:$S.memoizationHooks,...t},r=new Set(n.ignoreCallExpressions),i=new Set(n.iterationMethods),a=new Set(n.memoizationHooks);function o(t){let o=oC(t),s=o===void 0?nC:fC(e.sourceCode,o,i,a),c=s.iteration||s.memoization;if(_C(t)&&!c){!n.allowRootKeys&&t.type===`JSXElement`&&Mc(t,`key`)&&e.report({messageId:`rootComponentWithKey`,node:t});return}if(!vC(t,r)&&!(xC(t)||bC(t)||CC(t))&&!(t.type===`JSXFragment`&&wC(t))&&!(t.type===`JSXFragment`&&s.memoization&&!s.iteration&&pC(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:$S.ignoreCallExpressions,description:`Function calls where JSX arguments don't need keys`,items:{type:`string`},type:`array`},iterationMethods:{default:$S.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 EC(e){if(e.id.type===`Identifier`)return e.id.name}function DC(e,t,n){return se(e,t,n,`memo`)}function OC(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 kC(e){let t=e;for(;t!==null;){if(t.type===`ExportNamedDeclaration`||t.type===`ExportDefaultDeclaration`)return!0;t=t.parent}return!1}function AC(e){return e.parent.type===`VariableDeclaration`?e.parent.parent.type===`ExportNamedDeclaration`||e.parent.parent.type===`ExportDefaultDeclaration`:!1}function jC(e,t,n){for(let r of e.getDeclaredVariables(t))if(r.name===n){for(let{identifier:e}of r.references)if(kC(e))return!0;return!1}return!1}function MC(e,t,n,r){return r.has(t)||AC(n)?!0:jC(e,n,t)}function NC(e,t,n){e.report({data:{variableName:n},messageId:t.kind===`context`?`missingContextDisplayName`:`missingMemoDisplayName`,node:t.node})}const PC=d(`require-react-display-names`,`react`,{create(e){let t=fr(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(DC(t.declaration,n,i)){e.report({messageId:`directMemoExport`,node:t});return}OC(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(pr(e,t))for(let t of e.specifiers){let{name:e}=t.local;if(t.type===`ImportSpecifier`){let i=le(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||MC(e.sourceCode,t,n.node,o)&&NC(e,n,t)},VariableDeclarator(e){if(e.init?.type!==`CallExpression`)return;let t=EC(e);if(t!==void 0){if(DC(e.init,n,i)){a.set(t,{hasDisplayName:!1,kind:`memo`,node:e});return}OC(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:sr},type:`object`}],type:`problem`}});function FC(e){return _(e)&&e.metric===`statements`?`statements`:`lines`}function IC(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 LC=d(`require-switch-case-braces`,`general`,{create(e){let t=FC(e.options[0]);return{SwitchCase(n){if(!IC(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,`{
34
+ `&&--g;break}return u.push(e.removeRange([g,m])),u}const Ba=d(`no-array-constructor-index-assignment`,`roblox`,{create(e){let{sourceCode:t}=e;function n(n){let r=0;for(;r<n.length;){let i=Ra(t,n,r);if(i===void 0){r+=1;continue}e.report({fix(e){return za(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 Va(e){return typeof e!=`object`||!e?!1:`allowAutofix`in e?e.allowAutofix===void 0||typeof e.allowAutofix==`boolean`:!0}function Ha(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`&&Ua(e,t,n);case`Super`:return t.type===`Super`;case`ThisExpression`:return t.type===`ThisExpression`;default:return!1}}function Ua(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!Ha(e.object,t.object,n)?!1:e.computed?Wa(e.property,t.property,n):Ga(e.property,t.property)}function Wa(e,t,n){return rt(e)&&rt(t)&&Ha(e,t,n)}function Ga(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 Ka(e,t){switch(e.type){case`Identifier`:case`ThisExpression`:return!0;case`Literal`:return t;case`MemberExpression`:return e.optional||!Ka(e.object,!1)?!1:e.computed?rt(e.property)?Ka(e.property,!0):!1:e.property.type===`Identifier`||e.property.type===`PrivateIdentifier`;default:return!1}}function qa(e){return Ka(e,!1)}function Ja(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 Ya(e,t,n){if(!(e.operator!==`=`||e.left.type!==`MemberExpression`||!e.left.computed)){if(n===`roblox-ts`&&Ja(e.left.property))return Ha(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 Ha(e.left.object,n.object,t)?e.left:void 0}}}const Xa=d(`no-array-size-assignment`,`roblox`,{create(e){let[t]=e.options,n=Va(t)&&t.allowAutofix,r=t?.environment===`standard`?`standard`:`roblox-ts`,{sourceCode:i}=e;return{AssignmentExpression(t){let a=Ya(t,i,r);if(a===void 0)return;let o=t.parent.type===`ExpressionStatement`?t.parent:void 0;if(!(n&&o!==void 0&&qa(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`}}),Za=/^set[A-Z]/u;function R({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`&&e.property.type===`Identifier`)return e.property.name}function Qa(e){return Za.test(e)}function $a(e){let[t]=e.arguments;return t?.type===`ArrowFunctionExpression`||t?.type===`FunctionExpression`?t:void 0}function eo(e,t){let n=[e];for(let e of n)t(e),no(e,n)}function to(e,t){let n=[e];for(let e of n){t(e);for(let t of Object.values(e))ao(t,e,n)}}function no(e,t){for(let n in e)se(n)||ro(Reflect.get(e,n),e,t)}function ro(e,t,n){if(!(typeof e!=`object`||!e||e===t.parent)){if(Array.isArray(e)){io(e,t,n);return}T(e)&&n.push(e)}}function io(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];i!==t.parent&&T(i)&&n.push(i)}}function ao(e,t,n){if(Array.isArray(e)){for(let r of e)ao(r,t,n);return}e===t.parent||!T(e)||n.push(e)}function oo(e){let{key:t}=e;if(t.type===`Identifier`)return t.name;if(t.type===`Literal`&&h(t.value))return t.value}function so(e){let{value:t}=e;if(t.type===`Identifier`)return t;if(t.type===`AssignmentPattern`&&t.left.type===`Identifier`)return t.left}function co(e){let t=0;return eo(e,e=>{e.type===`CallExpression`&&e.callee.type===`Identifier`&&Qa(e.callee.name)&&(t+=1)}),t}function lo(e,t,n,r,i){if(t===void 0)return 0;if(t.type===`SpreadElement`)return 3;let a=b(t);return a.type===`ArrayExpression`?a.elements.length===0?1:i(e,a,n,r)?2:3:3}const uo=new Set([`catch`,`finally`,`then`]);function fo(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 po(e){return e.callee.type!==`MemberExpression`||e.callee.property.type!==`Identifier`?!1:uo.has(e.callee.property.name)}function mo({callee:e}){let t=b(e);return Fe(t)&&t.async}function ho({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 go(e){let{parent:t}=e;return t?.type!==`AssignmentExpression`||t.right!==e?!1:t.left.type===`MemberExpression`&&t.left.object.type===`ThisExpression`}function _o(e){let{parent:t}=e;if(t?.type===`VariableDeclarator`&&t.init===e)return t.id.type===`Identifier`?t.id.name:void 0}function vo(e){return!Fe(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 yo(e,t){let n=e;for(;n!==t;){let{parent:e}=n;if(e===null)return!1;if(vo(e))return!0;n=e}return!1}function bo(e,t){let n=ho(e,t);if(n===void 0||go(e))return;if(e.parent.type===`ExpressionStatement`)return{data:{methodName:n},messageId:`unhandledAsyncCall`,node:e};let r=_o(e);if(r!==void 0)return{data:{variableName:r},messageId:`orphanedPromise`,node:e}}function xo(e,t){let n=[],r=0;function i(i){if(i!==e&&yo(i,e))return;if(i.type===`AwaitExpression`){n[r++]={messageId:`awaitInConstructor`,node:i};return}if(i.type!==`CallExpression`)return;po(i)&&(n[r++]={messageId:`promiseChainInConstructor`,node:i}),mo(i)&&(n[r++]={messageId:`asyncIifeInConstructor`,node:i});let a=bo(i,t);a!==void 0&&(n[r++]=a)}return to(e,i),n}const So=d(`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=fo(e.parent),r=e.value.body,i=xo(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`}}),Co=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])),wo=new Set(`WaitForChild`.split(`,`)),z=[`AdvanceToNextPageAsync`,`IntersectAsync,SubtractAsync,UnionAsync`,`IsAvailable`],To=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,z[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,z[0]],[98,z[1]],[108,`Invoke`],[129,z[2]],[139,`CheckUploadCaptureStatusAsync,CreatePostAsync,DeleteCapturesAsync,DeleteVideoCaptureAsync,GetCaptureFilePathAsync,GetCaptureSizeAsync,GetCaptureStorageSizeAsync,GetCaptureUploadDataAsync,InternalCheckPlayabilityAsync,InternalGetStartPlaceIdAsync,PromptCaptureGalleryPermissionAsync,ReadCapturesFromGalleryAsync,SaveCapturesToExternalStorageAsync,StartUploadCaptureAsync,StartVideoCaptureAsync,StartVideoCaptureInternalAsync,UploadCaptureAsync`],[140,z[0]],[142,z[0]],[149,`CanUserChatAsync,CanUsersChatAsync,FilterStringAsync,FilterStringForBroadcast,FilterStringForPlayerAsync`],[170,`GetCommerceProductInfoAsync,PrepareCommerceProductPurchase,UserEligibleForRealWorldCommerceAsync`],[174,`GetConfigAsync,GetConfigForPlayerAsync`],[180,`PreloadAsync`],[181,`GetButton`],[195,z[1]],[197,`GetAssetInfoAsync,GetCreatorStoreProductInfoAsync,PerformCreatorStorePurchase`],[207,`GetObjectsAsync,HttpGetAsync,HttpPostAsync,InsertObjectsAndJoinIfLegacyAsync,SavePlace`],[211,`BatchGetAsync,GetAsync,GetVersionAsync,GetVersionAtTimeAsync,IncrementAsync,ListKeysAsync,ListVersionsAsync,RemoveAsync,RemoveVersionAsync,SetAsync,UpdateAsync`],[217,z[0]],[218,z[0]],[221,z[0]],[222,`ListDataStoresAsync`],[224,z[0]],[249,`CommitEdits,GetDrafts,UpdateToLatestVersion`],[267,`CanPromptOptInAsync`],[270,`LoadPlaybackAsync`],[278,`InquiryAsync`],[279,`CheckOrRequestCameraPermission`],[281,`ResolveStateForUser`],[287,`ListFilesInFolderAsync`],[292,z[1]],[297,`EvaluateAsync`],[301,z[1]],[303,z[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,z[1]],[381,z[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,z[0]],[435,`AddAsync,GetSizeAsync,ReadAsync,RemoveAsync`],[437,`GetAsync,GetRangeAsync,GetSizeAsync,RemoveAsync,SetAsync,UpdateAsync`],[440,z[1]],[444,`PublishAsync,SubscribeAsync`],[448,`DumpToFileAsync`],[450,`CreateReviewableContentAsync,InternalRequestReviewableContentReviewAsync`],[458,z[1]],[468,`GetScheduledNotifications`],[474,`CreateUserNotificationAsync`],[475,`HttpRequestAsync,InvokeAsync`],[477,`BatchGetAsync,GetAsync,GetSortedAsync,IncrementAsync,RemoveAsync,SetAsync,UpdateAsync`],[478,z[0]],[483,`UpdateAsync`],[484,`ConvertToPackageAsync,GetPackageInfo,PublishPackage,SetPackageVersion`],[486,z[0]],[489,z[1]],[491,z[1]],[494,`GetEmulatedPartyAsync`],[497,`CheckOcclusionAsync,ComputeAsync`],[502,`ComputeRawPathAsync,ComputeSmoothPathAsync,FindPathAsync`],[517,z[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,z[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,z[1]],[656,`DeserializeInstancesAsync,SerializeInstancesAsync`],[668,z[1]],[682,`CanSendCallInviteAsync,CanSendGameInviteAsync,GetEventRsvpStatusAsync,GetExperienceEventAsync,GetPartyAsync,GetUpcomingExperienceEventsAsync,PromptFeedbackSubmissionAsync,PromptLinkSharing,PromptLinkSharingAsync,PromptRsvpToEventAsync`],[687,`EndRecording,GetRecordingDevices`],[690,z[1]],[698,z[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,z[1]],[808,z[1]],[814,`CalculateBodyMaxCageDistance,CanLoadAsset,CreateEditableImageOriginalSizeAsync,DoesMeshHaveSkinningData,DoesSurfaceAppearanceMatchTexturePackAsync,FetchAssetWithFormat,GetMeshDataBinaryString,GetMeshVerts,IsDeformedLayeredClothingOutOfRenderBounds`],[836,z[1]],[843,`GetUserFromGlobalUserIdAsync,GetUserInfosByUserIdsAsync`],[854,z[1]],[862,`LoadAsync`],[863,`GetSamplesAtTimesAsync`],[865,`CreateVideoSamplerAsync`],[866,`CaptureSnapshotAsync`],[868,`WaitForInputEventsProcessed`],[875,`IsVoiceEnabledForUserIdAsync`],[876,`GetChatGroupsAsync,IsVoiceEnabledForUserIdAsync`],[877,`ClearAsync,DrawBufferAsync,FromHeightmapAsync,NormalizeAsync,UnclampAsync`],[881,z[2]],[882,z[1]],[893,`CreateEditableMeshAsync,GetDeformedCFrameAsync`]]),Eo=new Map;function Do(e,t){let n=Co.get(e);if(n===void 0)return!1;if(wo.has(t))return!0;let r=Eo.get(n);if(r!==void 0)return r.has(t);let i=To.get(n);if(i===void 0)return!1;let a=new Set(i.split(`,`));return Eo.set(n,a),a.has(t)}const Oo=[`PlanckSystem`,`System`,`SystemFunction`,`SystemReturn`,`SystemTableLike`],ko=new Set([`comments`,`loc`,`parent`,`range`,`tokens`]);function Ao(e,t){if(e.type===`Identifier`)return e.name;if(t&&e.type===`TSQualifiedName`)return Ao(e.right,t)}function jo(e,t=!0){if(e!=null){if(e.type===`TSTypeAnnotation`)return jo(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=jo(r,t);if(e===void 0||n!==void 0)return;n=e}return n}if(e.type===`TSTypeReference`)return Ao(e.typeName,t)}}function Mo(e,t){let n=jo(e);return n!==void 0&&t.has(n)}function No(e,t){for(let n of Object.keys(e)){if(ko.has(n))continue;let r=Reflect.get(e,n);r!=null&&t.push(r)}}function Po(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}T(e)&&t(e)!==!1&&No(e,n)}}}function Fo(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 Io(e,t,n){for(let r of e.properties)if(Fo(r)===`system`&&r.type===`Property`){if(M(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 Lo(e){if(e.type===`ImportSpecifier`)return e.imported.type===`Identifier`?e.imported.name:e.imported.value}function Ro(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=Lo(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 zo(e){let t=[],n=b(e);for(;n.type===`MemberExpression`;){let e=x(n);if(e===void 0)return;t.unshift(e),n=b(n.object)}return n.type===`Identifier`?{path:t,root:n}:void 0}function Bo(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function Vo(e){if(e.type===`Identifier`)return[e.name];if(e.type!==`MemberExpression`)return;let t=zo(e);return t===void 0?void 0:[t.root.name,...t.path]}function Ho(e,t){return S(e.getScope(t),t.name)}function Uo(e,t,n,r,i){Po(e,e=>{if(e.type!==`CallExpression`||e.callee.type!==`MemberExpression`)return;let a=zo(e.callee);if(a===void 0)return;let o=Ho(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||!Bo(a.path,n.memberPath))continue;let r=e.arguments[n.callbackArgumentIndex];if(r===void 0||r.type===`SpreadElement`||!M(r))continue;let o=r.params[n.parameterIndex];if(o?.type!==`Identifier`)continue;let c=Ho(t,o);c!==void 0&&i.set(c,n.className)}})}function Wo(e,t,n,r){Po(e,e=>{if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){let i=e.id.name,a=jo(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(!M(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=jo(t.typeAnnotation,!1);if(a===void 0||n.has(a))continue;let o=i.get(e);o!==void 0&&r.set(o,a)}})}function Go(e){let t=new Set;return Po(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 Ko(e,t){let n=Ho(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 qo(e,t){let n=Ho(t,e);if(n?.defs.length!==1)return;let[r]=n.defs;if(r===void 0)return;if(M(r.node))return r.node;if(r.node.type!==`VariableDeclarator`||r.node.init===null)return;let i=b(r.node.init);return M(i)?i:void 0}function Jo(e,t){let n=b(e);return M(n)?n:n.type===`Identifier`?qo(n,t):void 0}function Yo(e,t,n,r,i){let a=b(e);if(a.type===`Identifier`)return Xo(a,t,n,r,i);if(!(a.type===`CallExpression`&&a.callee.type===`MemberExpression`&&x(a.callee)===`GetService`&&a.callee.object.type===`Identifier`&&a.callee.object.name===`game`&&!w(t,a.callee.object,`game`)))return;let[o]=a.arguments;return o?.type===`Literal`&&typeof o.value==`string`?o.value:void 0}function Xo(e,t,n,r,i){let a=Ho(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=Ko(e,t);if(!(o===void 0||i.has(o)))return i.add(o),Yo(o,t,n,r,i)}function Zo(e,t,n,r){if(e.callee.type!==`MemberExpression`)return!1;let i=x(e.callee);if(i===void 0)return!1;let a=Yo(e.callee.object,t,n,r,new Set);return a!==void 0&&Do(a,i)}function Qo(e,t){let n=new Set;if(e.body===null)return n;if(e.body.type!==`BlockStatement`){let r=Jo(e.body,t);return r!==void 0&&n.add(r),n}return Po(e.body,e=>{if(M(e))return!1;if(e.type!==`ReturnStatement`||e.argument===null)return!0;let r=Jo(e.argument,t);return r!==void 0&&n.add(r),!1}),n}function $o(e,t,n){let r=new Set,i=Vo(e.callee);if(i===void 0)return r;for(let a of n)if(Bo(i,a.calleePath))for(let n of a.callbackArgumentIndexes){let i=e.arguments[n];if(i===void 0||i.type===`SpreadElement`)continue;let a=Jo(i,t);a!==void 0&&r.add(a)}return r}function es(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),Po(e.body,o=>{if(M(o)&&o!==e)return!1;if(o.type!==`CallExpression`)return!0;Zo(o,t,n,r)&&a(o);for(let e of $o(o,t,i))s(e);return!0}))}let c=Qo(e,t),l=c.size===0?[e]:c;for(let e of l)s(e)}const ts=d(`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([...Oo,...t]);return{"Program:exit"(t){let a=new Map,o=new Set,s=[],c=Ro(t,e.sourceCode),l=new Map;Wo(t,e.sourceCode,Go(t),l),Uo(t,e.sourceCode,c,n,l),Po(t,e=>{if(M(e)){e.id!==null&&a.set(e.id.name,e),Mo(e.returnType,i)&&o.add(e);return}if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){if(!Mo(e.id.typeAnnotation,i)||e.init===null)return;M(e.init)?o.add(e.init):e.init.type===`ObjectExpression`&&s.push(e.init);return}e.type===`TSSatisfiesExpression`&&Mo(e.typeAnnotation,i)&&e.expression.type===`ObjectExpression`&&s.push(e.expression)});for(let e of s)Io(e,a,o);for(let t of o)es(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`}}),ns=new Set([`useAsyncEffect`,`useEffect`,`useInsertionEffect`,`useLayoutEffect`,`useMountEffect`,`useReactiveEffect`,`useUnmountEffect`,`useUpdateEffect`]),rs=d(`no-cascading-set-state`,`react`,{create(e){return{CallExpression(t){let n=R(t);if(n===void 0||!ns.has(n))return;let r=$a(t);if(r===void 0)return;let i=co(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 is(e,t,n,r){for(let i of n.functionReferences){if(!t.scope.isSynchronousWithin(i.identifier,n.functionNode)||!t.isStateCall(i))continue;let a=t.scope.getCallExpression(i);if(a===void 0)continue;let o=t.scope.getArgumentUpstreamReferences(i).some(e=>t.isState(e));if(!r||o)continue;let s=t.getStateName(i);s!==void 0&&e.report({data:{state:s},messageId:`avoidChainingStateUpdates`,node:a})}}const as=d(`no-chain-state-updates`,`react`,{create(e){let t=F(e.options[0]),n=I(e.sourceCode,t);return{Program(){for(let t of n.effects){if(t.cleanup!==void 0||t.dependencyReferences===void 0)continue;let r=t.dependencyReferences.flatMap(e=>n.scope.getUpstreamReferences(e)).some(e=>n.isState(e));is(e,n,t,r)}}}},meta:{docs:{description:`Disallow chaining state changes in an effect.`,recommended:!0},messages:{avoidChainingStateUpdates:`Avoid chaining state changes. When possible, update "{{state}}" along with other relevant state simultaneously.`},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:`suggestion`}});function os(e){return Math.round(e>1?e:e*255)}function ss(e){return{reportUnknownComponents:typeof e==`object`&&e&&`reportUnknownComponents`in e?e.reportUnknownComponents===!0:!0}}function cs(e){let t=[],n=0,r=!0;for(let i of e){if(!We(i))return;let e=os(i.value);t[n++]=e,e!==0&&(r=!1)}return[r,t]}const ls=d(`no-color3-constructor`,`roblox`,{create(e){let t=ss(e.options[0]);return{NewExpression(n){if(!Ie(n,`Color3`))return;let r=n.arguments;if(r.length===0)return;let i=cs(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 us(e,t){let n=e.scan(t);return n===0?0:1-(1-e.probability)**n}function ds(e,t){let n=0;for(let r of e){let e=us(r,t);n=1-(1-n)*(1-e)}return n}function fs(e,t){return ds(e,t)>=.9}function ps(e,t){return t.some(t=>fs(e,t))}function ms(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 hs=/\s+/gu;function gs(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 _s(e,t){let n=t.map(e=>h(e)?{pattern:e,type:`string`}:{pattern:new RegExp(e.source,`gu`),type:`regexp`});return{probability:e,scan(e){let t=e.replace(hs,``),r=0;for(let e of n){if(e.type===`string`){r+=gs(t,e.pattern);continue}e.pattern.lastIndex=0;let n=t.match(e.pattern);n&&(r+=n.length)}return r}}}const vs=/\s/u;function ys(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(!vs.test(r)&&r!==`*`&&r!==`/`)return 0}return 0}}}const bs=/[ \t(),{}]/u;function xs(e,t){let n=new Set(t);return{probability:e,scan(e){let t=e.split(bs),r=0;for(let e of t)n.has(e)&&(r+=1);return r}}}const Ss=`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(`.`),Cs=[`++`,`||`,`&&`,`===`,`?.`,`??`],ws=[`for(`,`if(`,`while(`,`catch(`,`switch(`,`try{`,`else{`,`this.`,`window.`,/;\s+\/\//u,`import '`,`import "`,`require(`],Ts=[`}`,`;`,`{`];function Es(){return[ys(.95,Ts),xs(.7,Cs),xs(.3,Ss),_s(.95,ws),ms(.5)]}const Ds=new Set([`BreakStatement`,`ContinueStatement`,`LabeledStatement`]);function Os(e){return Ds.has(e.type)}function ks(e){return{comments:e,value:e.map(({value:e})=>e).join(`
35
+ `)}}const As=Es();function js(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 Ms(e,t){let n=[],r=0,i=[],a=0;for(let o of e)if(o.type===`Block`)a>0&&(n[r++]=ks(i),i=[],a=0),n[r++]=ks([o]);else if(a===0)i[a++]=o;else{let e=i.at(-1);e&&js(e,o,t)?i[a++]=o:(n[r++]=ks(i),i=[o],a=1)}return a>0&&(n[r]=ks(i)),n}const Ns=/\{/gu,Ps=/\}/gu;function Fs(e){let t=(e.match(Ns)??[]).length-(e.match(Ps)??[]).length;return t>0?e+`}`.repeat(t):t<0?`{`.repeat(-t)+e:e}function Is(e){return ps(As,e.split(`
36
+ `))}function Ls(e){return e.type!==`ReturnStatement`&&e.type!==`ThrowStatement`?!1:e.argument?.type===`Identifier`}function Rs(e){return e.type===`UnaryExpression`&&(e.operator===`-`||e.operator===`+`)}function zs(e){return e.type===`Literal`&&(h(e.value)||g(e.value))}function Bs(e){return _(e)&&h(e.type)}function Vs(e){let t=[],n=0;for(let r of e)Bs(r)&&(t[n++]=r);return t}function Hs(e,t){if(e.type!==`ExpressionStatement`)return!1;let{expression:n}=e;return n.type===`Identifier`||n.type===`SequenceExpression`||Rs(n)||zs(n)||!t.trimEnd().endsWith(`;`)}function Us(e,t){if(e.length!==1)return!1;let n=e.at(0);return n?Os(n)||Ls(n)||Hs(n,t):!1}const Ws=[/'return' statement is only valid inside a function/u];function Gs(e){for(let t of e){let e=!1;for(let n of Ws)if(n.test(t.message)){e=!0;break}if(!e)return!1}return!0}function Ks(e){return(e.diagnostics.length===0||Gs(e.diagnostics))&&e.program.body.length>0}function qs(e,r){let i=t.extname(r),a=n(e,{lang:{".jsx":`jsx`,".tsx":`tsx`}[i]??`js`,sourceType:`module`});if(Ks(a))return a;if(i!==`.tsx`&&i!==`.jsx`){let t=n(e,{lang:`tsx`,sourceType:`module`});if(Ks(t))return t}}function Js(e,t){if(!Is(e))return!1;let n=qs(e,t);return n?!Us(Vs(n.program.body),e):!1}function Ys(e){let t=1;for(let n of e)n===`
37
+ `&&(t+=1);return t}const Xs=d(`no-commented-code`,`general`,{create(e){let{maxLines:t=0}=e.options[0]??{};return{"Program:exit"(){let n=Ms(e.sourceCode.getAllComments(),e.sourceCode);for(let r of n){let n=r.value.trim();if(n===`}`||Ys(r.value)<=t||!Js(Fs(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 B(e){return{constant:!0,value:e}}function Zs(){return{constant:!1}}function Qs(e){return{constant:!0,value:e}}function $s(){return{constant:!1}}function ec(e){let t=new Set;if(!e?.loopExitCalls)return t;for(let n of e.loopExitCalls)v(n)&&t.add(n);return t}function tc(e){let t=b(e);if(t.type===`Identifier`)return t.name;if(t.type!==`MemberExpression`)return;let n=tc(t.object);if(n===void 0||n.length===0)return;let r=x(t);if(r!==void 0&&r.length!==0)return`${n}.${r}`}function nc(e,t){if(t.size===0)return!1;let n=tc(e.callee);return n===void 0||n.length===0?!1:t.has(n)}function rc(e,t){return V(e.type===`SpreadElement`?e.argument:e,t)}function V(e,t){if(t.size===0)return!1;let n=b(e);switch(n.type){case`ArrayExpression`:return ic(n,t);case`ArrowFunctionExpression`:case`ClassExpression`:case`FunctionExpression`:return!1;case`AssignmentExpression`:return V(n.right,t);case`AwaitExpression`:return V(n.argument,t);case`BinaryExpression`:return ac(n,t);case`CallExpression`:return oc(n,t);case`ConditionalExpression`:return sc(n,t);case`LogicalExpression`:return cc(n,t);case`MemberExpression`:return lc(n,t);case`NewExpression`:return uc(n,t);case`SequenceExpression`:return n.expressions.some(e=>V(e,t));case`TaggedTemplateExpression`:return dc(n,t);case`TemplateLiteral`:return n.expressions.some(e=>V(e,t));case`UnaryExpression`:case`UpdateExpression`:return V(n.argument,t);case`YieldExpression`:return n.argument?V(n.argument,t):!1;default:return!1}}function ic(e,t){for(let n of e.elements)if(n!==null&&rc(n,t))return!0;return!1}function ac(e,t){let{left:n}=e;return n.type!==`PrivateIdentifier`&&V(n,t)?!0:V(e.right,t)}function oc(e,t){return nc(e,t)||V(e.callee,t)?!0:e.arguments.some(e=>rc(e,t))}function sc(e,t){return V(e.test,t)||V(e.consequent,t)||V(e.alternate,t)}function cc(e,t){return V(e.left,t)||V(e.right,t)}function lc(e,t){return V(e.object,t)?!0:e.computed&&V(e.property,t)}function uc(e,t){return V(e.callee,t)?!0:e.arguments.some(e=>rc(e,t))}function dc(e,t){return V(e.tag,t)?!0:e.quasi.expressions.some(e=>V(e,t))}function fc(e){let t=b(e);switch(t.type){case`ArrayExpression`:return B([]);case`ArrowFunctionExpression`:case`ClassExpression`:case`FunctionExpression`:return B(!0);case`Identifier`:return t.name===`undefined`?B(void 0):t.name===`NaN`?B(NaN):t.name===`Infinity`?B(1/0):Zs();case`Literal`:return B(t.value);case`LogicalExpression`:return pc(t);case`ObjectExpression`:return B({});case`SequenceExpression`:{let e=t.expressions.at(-1);return e?fc(e):Zs()}case`TemplateLiteral`:return t.expressions.length>0?Zs():t.quasis.length===0?B(``):B(t.quasis[0]?.value.cooked??``);case`UnaryExpression`:return mc(t);default:return Zs()}}function pc(e){let t=fc(e.left);return t.constant?e.operator===`&&`?t.value===!0?fc(e.right):B(t.value):e.operator===`||`?t.value===!0?B(t.value):fc(e.right):t.value===void 0?fc(e.right):B(t.value):Zs()}function mc(e){if(e.operator===`typeof`)return B(`string`);if(e.operator===`void`)return B(void 0);let t=fc(e.argument);return t.constant?e.operator===`!`?B(!t.value):e.operator===`+`&&g(t.value)?B(t.value):e.operator===`-`&&g(t.value)?B(-t.value):e.operator===`~`&&g(t.value)?B(~t.value):Zs():Zs()}function H(e){let t=b(e);if(t.type===`ConditionalExpression`)return hc(t);if(t.type===`LogicalExpression`)return gc(t);if(t.type===`SequenceExpression`){let e=t.expressions.at(-1);return e?H(e):$s()}let n=fc(t);return n.constant?Qs(!!n.value):$s()}function hc(e){let t=H(e.test);if(t.constant)return H(t.value===!0?e.consequent:e.alternate);let n=H(e.consequent),r=H(e.alternate);return n.constant&&r.constant&&n.value===r.value?n:$s()}function gc(e){let t=H(e.left);if(!t.constant)return $s();if(e.operator===`&&`)return t.value?H(e.right):Qs(!1);if(e.operator===`||`)return t.value===!0?Qs(!0):H(e.right);let n=fc(e.left);return n.constant?n.value===void 0?H(e.right):Qs(!!n.value):$s()}const _c=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function vc(e){return _c.has(e.type)}function yc(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 bc(e,t){if(e.label)return yc(e.label.name,e.parent)===t;let n=e.parent;for(;n!==null;){if(n.type===`Program`||M(n)||n.type===`SwitchStatement`)return!1;if(vc(n))return n===t;n=n.parent}return!1}function xc(e,t){return e?e.type===`VariableDeclaration`?e.declarations.some(e=>e.init?V(e.init,t):!1):V(e,t):!1}function Sc(e,t){switch(e.type){case`DoWhileStatement`:case`WhileStatement`:return V(e.test,t);case`ForInStatement`:case`ForOfStatement`:return V(e.right,t);case`ForStatement`:return!!(xc(e.init,t)||e.test&&V(e.test,t)||e.update&&V(e.update,t));default:return!1}}function U(e,t,n){switch(e.type){case`BlockStatement`:return e.body.some(e=>U(e,t,n));case`BreakStatement`:return bc(e,t);case`DoWhileStatement`:case`WhileStatement`:return Cc(e,t,n);case`ExpressionStatement`:return V(e.expression,n);case`ForInStatement`:case`ForOfStatement`:return wc(e,t,n);case`ForStatement`:return Tc(e,t,n);case`IfStatement`:return Ec(e,t,n);case`LabeledStatement`:return U(e.body,t,n);case`ReturnStatement`:return!0;case`SwitchStatement`:return e.cases.some(e=>e.consequent.some(e=>U(e,t,n)));case`TryStatement`:return Dc(e,t,n);case`VariableDeclaration`:return e.declarations.some(e=>e.init?V(e.init,n):!1);case`WithStatement`:return Oc(e,t,n);default:return!1}}function Cc(e,t,n){return V(e.test,n)?!0:U(e.body,t,n)}function wc(e,t,n){return V(e.right,n)?!0:U(e.body,t,n)}function Tc(e,t,n){return xc(e.init,n)||e.test&&V(e.test,n)||e.update&&V(e.update,n)?!0:U(e.body,t,n)}function Ec(e,t,n){return U(e.consequent,t,n)?!0:e.alternate?U(e.alternate,t,n):!1}function Dc(e,t,n){return!!(U(e.block,t,n)||e.handler&&U(e.handler.body,t,n)||e.finalizer&&U(e.finalizer,t,n))}function Oc(e,t,n){return V(e.object,n)?!0:U(e.body,t,n)}function kc(e,t,n){return e.constant?!e.value||!Sc(t,n)&&!U(t.body,t,n):!1}const Ac=d(`no-constant-condition-with-break`,`general`,{create(e){let t=e.options?.[0],n=ec(_(t)?t:void 0);function r(t){H(t).constant&&e.report({messageId:`unexpected`,node:t})}function i(t,r){kc(H(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`}}),jc=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function Mc(e){if(e.type===`BreakStatement`||e.type===`ContinueStatement`||e.type===`ReturnStatement`||e.type===`ThrowStatement`)return!0;if(e.type===`BlockStatement`){let t=e.body.at(-1);return t!==void 0&&Mc(t)}return!1}function Nc(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 Pc(e,t){if(t.type===`IfStatement`){if(t.consequent===e)return{arm:`then`,complete:t.alternate!==null||Mc(t.consequent),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 Fc(e,t){if(t.type!==`BlockStatement`&&t.type!==`SwitchCase`)return[];let n=t.type===`BlockStatement`?t.body:t.consequent,r=n.indexOf(e);if(r<=0)return[];let i=[];for(let e of n.slice(0,r))e.type===`IfStatement`&&e.alternate===null&&Mc(e.consequent)&&i.push({arm:`else`,complete:!0,control:e});return i}function Ic(e,t){let n=Pc(e,t);if(n!==void 0)return n;if(t.type===`LogicalExpression`&&t.right===e)return{arm:`right`,complete:!1,control:t};if(jc.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 Lc(e,t){let n=[],r=e;for(;r!==t&&r.parent!==null;){let e=Ic(r,r.parent);e!==void 0&&n.push(e);for(let e of Fc(r,r.parent))n.push(e);r=r.parent}return n}function Rc(e,t){return e.find(e=>e.control===t)?.arm}function zc(e,t){for(let n of e){let e=Rc(t,n.control);if(e!==void 0&&e!==n.arm)return!1}return!0}function Bc(e,t){let{parent:n}=e.node;return n.type===`AssignmentExpression`?n.operator!==`=`||t.some(e=>e.isRead&&$c(n.right,e.node)):!1}function Vc(e,t){if(t.length!==e.length)return;let n;for(let r of e)if(Rc(t,r.control)!==r.arm){if(n!==void 0)return;n=r.control}if(n!==void 0&&Rc(t,n)!==void 0)return e.filter(e=>e.control!==n)}function Hc(e){for(let[t,n]of e.entries())for(let[r,i]of e.entries()){if(r<=t)continue;let e=Vc(n,i);if(e!==void 0)return{leftIndex:t,merged:e,rightIndex:r}}}function Uc(e){let t=Hc(e);return t===void 0?!1:(e.splice(t.rightIndex,1),e.splice(t.leftIndex,1,t.merged),t.merged.length===0||Uc(e))}function Wc(e,t,n){let r=e.filter(e=>Rc(t,e.control)===void 0);if(r.length===0)return!0;if(r.some(e=>!e.complete))return!1;function i(e){return Rc(t,e.control)}return r.some(e=>{let t=i(e);return t!==void 0&&t!==e.arm})?!1:(n.push(r),Uc(n))}function Gc(e,t){return e.isRead&&!e.isWrite||e.isWrite&&Bc(e,t)}function Kc(e){let t=[],n=e.parent;for(;n!==null;){if(jc.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 qc(e,t){let n=Kc(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 Jc(e,t,n){return e.isRead&&!e.isWrite&&Nc(e.node)===n&&qc(t,e)}function Yc(e,t,n,r,i,a){if(e.node.range[0]<=t.node.range[0])return e.node.range[0]<t.node.range[0]&&Jc(e,t,n)?!0:void 0;if(Nc(e.node)!==n)return;let o=Lc(e.node,n);if(zc(r,o))return Gc(e,a)?!0:e.isWrite&&Wc(o,r,i)?!1:void 0;if(Jc(e,t,n))return!0}function Xc(e,t){let n=Nc(e.node),r=Lc(e.node,n),i=[];for(let a of t){let o=Yc(a,e,n,r,i,t);if(o===!0)return!0;if(o===!1)return!1}return!1}function Zc(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`||Zc(e.argument):!1}function Qc(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 $c(e,t){return e.range[0]<=t.range[0]&&e.range[1]>=t.range[1]}function el(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()&&$c(e,t.identifier))))return!0;n=e}return!1}function tl(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||Qc(e.node)||e.init&&e.writeExpression!==void 0&&Zc(e.writeExpression)?!1:!el(e,t)}function nl(e){let t=new Set(e.references.map(e=>Nc(e.identifier)));for(let n of e.defs)t.add(Nc(n.name));return e.references.some(e=>e.isRead())&&t.size>1}function rl(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 il=d(`no-dead-store`,`general`,{create(e){return{Program(){ne(e.sourceCode,t=>{if(nl(t))return;let n=rl(t);for(let r of n)!tl(r,t)||Xc(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 al(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isStateCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=t.getStateName(r);a!==void 0&&t.scope.getArgumentUpstreamReferences(r).some(e=>t.isState(e)||t.isProp(e))&&e.report({data:{state:a},messageId:`avoidDerivedState`,node:i})}}const ol=d(`no-derived-state`,`react`,{create(e){let t=F(e.options[0]),n=I(e.sourceCode,t);return{Program(){for(let t of n.effects)t.cleanup===void 0&&t.dependencyReferences!==void 0&&al(e,n,t)}}},meta:{docs:{description:`Disallow storing derived state in an effect.`,recommended:!0},messages:{avoidDerivedState:`Avoid storing derived state. Instead, compute "{{state}}" directly during render.`},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:`suggestion`}});function sl(e){let t=`CallExpression[callee.type="Identifier"][callee.name="${e.name}"]`;return d(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 cl=sl({alternative:`throw`,category:`general`,message:`Replace {{name}}(...) with {{alternative}}.`,messageId:`noError`,name:`error`,ruleName:`no-error`});function ll(e,t,n){for(let r of t.scope.getDescendantIfStatements(n.functionNode))if(r.alternate===null)for(let n of t.scope.getDownstreamReferences(r.test)){let r=t.scope.getUpstreamReferences(n),{name:i}=n.identifier;r.some(e=>t.isState(e))&&e.report({data:{name:i},messageId:`avoidEventHandler`,node:n.identifier}),r.some(e=>t.isProp(e))&&e.report({data:{name:i},messageId:`avoidPropHandler`,node:n.identifier})}}const ul=d(`no-event-handler`,`react`,{create(e){let t=F(e.options[0]),n=I(e.sourceCode,t);return{Program(){for(let t of n.effects)t.cleanup===void 0&&ll(e,n,t)}}},meta:{docs:{description:`Disallow using state and an effect as an event handler.`,recommended:!0},messages:{avoidEventHandler:`Avoid using state and effects as an event handler. Instead, call the code that uses "{{name}}" directly when the event occurs.`,avoidPropHandler:`Avoid using props and effects as an event handler. Instead, move the code that uses "{{name}}" to the parent component.`},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:`suggestion`}});function dl(e){let t=new Set;if(!e?.eventsImportPaths)return t;for(let n of e.eventsImportPaths)v(n)&&t.add(n);return t}function fl(e){switch(e.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSTypeAssertion`:return fl(e.expression);default:return e}}function pl(e){let t=fl(e);if(t.type===`Identifier`)return t.name;if(t.type===`MemberExpression`)return pl(t.object)}function ml(e,t){let n=fl(e.callee);if(n.type!==`MemberExpression`||x(n)!==`connect`)return;let r=pl(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 hl(e,t){let n=fl(e.callee);if(n.type!==`MemberExpression`)return!1;let r=pl(n);return r!==void 0&&t.has(r)}function gl(e,t){return e.has(t)?!1:(e.add(t),!0)}function _l(e,t){return gl(t.playerValues,e)}function vl(e,t){return gl(t.playerContainers,e)}function W(e,t){switch(e.type){case`ArrayPattern`:{let n=!1;for(let r of e.elements)r&&(n=W(r,t)||n);return n}case`AssignmentPattern`:return W(e.left,t);case`Identifier`:return _l(e.name,t);case`ObjectPattern`:{let n=!1;for(let r of e.properties){if(r.type===`RestElement`){n=W(r.argument,t)||n;continue}n=W(r.value,t)||n}return n}case`RestElement`:return W(e.argument,t);default:return!1}}function yl(e,t,n){return t===0?!1:e.type===`Identifier`?t===2?_l(e.name,n):vl(e.name,n):W(e,n)}function bl(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?_l(e.name,n):vl(e.name,n):W(e,n):!1}function G(e,t){let n=fl(e);switch(n.type){case`ArrayExpression`:return xl(n,t);case`AssignmentExpression`:return G(n.right,t);case`ConditionalExpression`:return Sl(n,t);case`Identifier`:return t.playerValues.has(n.name)?2:+!!t.playerContainers.has(n.name);case`MemberExpression`:return Cl(n,t);case`ObjectExpression`:return wl(n,t);case`SequenceExpression`:{let e=n.expressions.at(-1);return e===void 0?0:G(e,t)}default:return 0}}function xl(e,t){for(let n of e.elements)if(n!==null&&G(n.type===`SpreadElement`?n.argument:n,t)!==0)return 1;return 0}function Sl(e,t){let n=G(e.consequent,t);return n===G(e.alternate,t)?n:0}function Cl(e,t){return G(e.object,t)===1?2:0}function wl(e,t){for(let n of e.properties)if(G(n.type===`SpreadElement`?n.argument:n.value,t)!==0)return 1;return 0}function Tl(e,t){if(e.type===`TSParameterProperty`){W(e.parameter,t);return}W(e,t)}const El=d(`no-events-in-events-callback`,`roblox`,{create(e){let t=dl(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=G(e.right,t);n!==0&&bl(e.left,n,t)},CallExpression(t){let i=ml(t,n);if(i){let e={playerContainers:new Set,playerValues:new Set},[t]=i.params;t&&Tl(t,e),r.set(i,e)}let o=a();if(!(o&&hl(t,n)))return;let[s]=t.arguments;!s||s.type===`SpreadElement`||G(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=G(e.init,t);n!==0&&yl(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`}});function Dl(e,t){return t.functionReferences.filter(n=>e.scope.isSynchronousWithin(n.identifier,t.functionNode)?e.isStateCall(n):!1)}function Ol(e,t){let n=[...e.scope.getDownstreamReferences(t)];for(let r of e.scope.getDescendantCallExpressions(t))for(let t of r.arguments)for(let r of e.scope.getDownstreamReferences(t))n.push(r);return n}function kl(e,t){let n=new Set;for(let r of t)for(let t of e.scope.getUpstreamReferences(r)){let e=t.resolved;e!=null&&(Ml(e)||n.add(e))}return n}function Al(e,t,n,r){for(let i of n){if(!t.scope.getUpstreamReferences(i).some(e=>{let t=e.resolved;return t!=null&&r.has(t)}))continue;let n=t.scope.getCallExpression(i);if(n===void 0)continue;let a=t.getStateName(i);a!==void 0&&e.report({data:{state:a},messageId:`avoidExternalStoreSubscription`,node:n})}}const jl=d(`no-external-store-subscription`,`react`,{create(e){let t=F(e.options[0]),n=I(e.sourceCode,t);return{Program(){for(let t of n.effects){if(t.cleanup===void 0||t.cleanup.argument===null)continue;let r=Dl(n,t);if(r.length===0)continue;let i=Ol(n,t.cleanup.argument),a=kl(n,i);Al(e,n,r,a)}}}},meta:{docs:{description:`Disallow subscribing to an external store in an effect.`,recommended:!0},messages:{avoidExternalStoreSubscription:`Avoid using an effect to subscribe to an external store. Instead, use "useSyncExternalStore" to manage "{{state}}".`},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:`suggestion`}});function Ml(e){return e.defs.some(e=>e.type===`ImportBinding`)}const Nl=d(`no-filter-map-chain`,`general`,{create(e){return{CallExpression(t){let n=b(t.callee);if(n.type!==`MemberExpression`||x(n)!==`map`)return;let r=b(n.object);if(r.type!==`CallExpression`)return;let i=b(r.callee);i.type===`MemberExpression`&&x(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`}}),Pl=/e/iu,Fl=new Set([`!=`,`!==`,`==`,`===`]),Il=new Set([`+`,`-`,`*`,`%`,`**`]),Ll=new Set([`deepStrictEqual`,`notDeepStrictEqual`,`notStrictEqual`,`strictEqual`]),Rl=new Set([`toBe`,`toEqual`,`toStrictEqual`]),zl=new Set([`@jest/globals`,`bun:test`,`vitest`]),Bl=new Set([`assert`,`assert/strict`,`node:assert`,`node:assert/strict`]);function Vl(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 Hl(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 Ul(e){let t=Hl(e);if(t!==void 0)return t;if(e.type!==`BinaryExpression`||e.left.type===`PrivateIdentifier`)return;let n=Ul(e.left),r=Ul(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 Wl(e){let t=Hl(e.left),n=Hl(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 Gl(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 Kl(e,t,n){let r=Ul(e);return r!==void 0&&Number.isSafeInteger(r)?!1:e.operator===`/`?Wl(e)||ql(e.left,t,n)||ql(e.right,t,n):Il.has(e.operator)&&(ql(e.left,t,n)||ql(e.right,t,n))}function ql(e,t,n){let r=b(e);if(r!==e)return ql(r,t,n);if(e.type===`Literal`&&typeof e.value==`number`){let t=String(e.raw);return(t.includes(`.`)||Pl.test(t))&&!Vl(t)}if(e.type===`UnaryExpression`)return(e.operator===`+`||e.operator===`-`)&&ql(e.argument,t,n);if(e.type===`BinaryExpression`)return tu(e)?Kl(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=Gl(i);return a===void 0?!1:(n.add(i),ql(a,t,n))}function Jl(e){let t=new Map;return ne(e,e=>{for(let n of e.references)t.set(n.identifier,e)}),t}function Yl(e){return e.imported.type===`Identifier`?e.imported.name:e.imported.value}function Xl(e,t,n){let{name:r}=n.local;zl.has(t)&&n.type===`ImportSpecifier`&&Yl(n)===`expect`&&e.set(r,`expect`),Bl.has(t)&&(n.type===`ImportDefaultSpecifier`||n.type===`ImportNamespaceSpecifier`?e.set(r,`assert`):Ll.has(Yl(n))&&e.set(r,`function`))}function Zl(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)Xl(t,e,r)}return t}function Ql(e,t){let n=e.arguments[t];return n===void 0||n.type===`SpreadElement`?void 0:n}function $l(e,t){if(e.callee.type===`Identifier`&&t.get(e.callee.name)===`function`){let t=Ql(e,0),n=Ql(e,1);return t===void 0||n===void 0?void 0:[t,n]}if(e.callee.type!==`MemberExpression`)return;let n=x(e.callee);if(n!==void 0&&Ll.has(n)&&e.callee.object.type===`Identifier`&&t.get(e.callee.object.name)===`assert`){let t=Ql(e,0),n=Ql(e,1);return t===void 0||n===void 0?void 0:[t,n]}if(n===void 0||!Rl.has(n))return;let r=e.callee.object;if(r.type===`MemberExpression`&&x(r)===`not`&&(r=r.object),r.type!==`CallExpression`||r.callee.type!==`Identifier`||t.get(r.callee.name)!==`expect`)return;let i=Ql(r,0),a=Ql(e,0);return i===void 0||a===void 0?void 0:[i,a]}function eu(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 tu(e){return e.type===`BinaryExpression`&&e.left.type!==`PrivateIdentifier`}function nu(e,t,n){return e.type===t.type&&n.getText(e).replaceAll(/\s+/gu,``)===n.getText(t).replaceAll(/\s+/gu,``)}function ru(e,t){if(tu(e.left)&&tu(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 eu(e.left))for(let r of eu(e.right))if(n.above!==r.above&&nu(n.expression,r.expression,t)&&nu(n.threshold,r.threshold,t))return[n.expression,n.threshold]}}const iu=d(`no-floating-point-equality`,`general`,{create(e){return{Program(t){let n=Jl(e.sourceCode),r=Zl(t);function i(e){return ql(e,n,new Set)}eo(t,t=>{let n=!1;if(t.type===`BinaryExpression`&&Fl.has(t.operator))n=t.left.type!==`PrivateIdentifier`&&(i(t.left)||i(t.right));else if(t.type===`LogicalExpression`){let r=ru(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=$l(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`}}),au=/^[A-Z]/u;function K(e){return au.test(e)}function ou(e){return e.type===`FunctionDeclaration`&&e.id!==null&&K(e.id.name)}function su(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 cu({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 lu({name:e}){return e.type===`JSXIdentifier`?e.name:e.name.name}function uu(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 du(e){if(e.type===`BinaryExpression`)switch(e.operator){case`%`:case`*`:case`**`:case`+`:case`-`:case`/`:return du(e.left)&&du(e.right);default:return!1}return e.type===`Identifier`||e.type===`Literal`?!0:e.type===`MemberExpression`?!e.computed&&du(e.object):e.type===`ParenthesizedExpression`?du(e.expression):e.type===`TemplateLiteral`?e.expressions.length===0:e.type===`UnaryExpression`&&du(e.argument)}function fu(e,t){return e?.type===`CallExpression`&&e.callee.type===`Identifier`&&(h(t)?e.callee.name===t:t.has(e.callee.name))}function pu(e){return e.type===`VariableDeclarator`&&e.id.type===`Identifier`&&K(e.id.name)&&e.init!==null&&(e.init.type===`ArrowFunctionExpression`||e.init.type===`FunctionExpression`)}function mu(e){return e.loc.end.line-e.loc.start.line+1}function hu(e){if(!(e.type!==`FunctionDeclaration`||!ou(e)||e.id===null||e.body===null)&&T(e.id)&&`name`in e.id&&h(e.id.name))return{body:e.body,name:e.id.name,nameNode:e.id}}function gu(e){if(e.type!==`VariableDeclarator`||!pu(e)||e.init===null||!(`name`in e.id&&h(e.id.name))||e.init.type!==`ArrowFunctionExpression`&&e.init.type!==`FunctionExpression`||!T(e.init.body))return;let{name:t}=e.id;return{body:e.init.body,name:t,nameNode:e.id}}const _u=d(`no-giant-component`,`react`,{create(e){function t(t,n,r){let i=mu(r);i<=300||e.report({data:{lineCount:String(i),name:n},messageId:`giantComponent`,node:t})}return{FunctionDeclaration(e){let n=hu(e);n!==void 0&&t(n.nameNode,n.name,n.body)},VariableDeclarator(e){let n=gu(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`}}),vu=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`]);function yu(e){if(e.type===`FunctionDeclaration`&&e.id!==null&&E(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`&&E(t.id.name))return t.id.name;if(t.type===`Property`&&t.key.type===`Identifier`&&E(t.key.name)||t.type===`MethodDefinition`&&t.key.type===`Identifier`&&E(t.key.name))return t.key.name}}function bu(e){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`&&E(t.id.name))return t.id.name;if(t.type===`AssignmentExpression`&&t.left.type===`Identifier`&&E(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&&E(t.id.name)&&(n=t.id.name)}return n}function xu(e){if(!He(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 Su(e,t){return t?.type===`TSLiteralType`}function Cu(e,t){if(!He(e)||e.body===null)return{maxJsxDepth:0,nullLiterals:[],stateHookCount:0};let n=0,r=0,i=[],a=0;return eo(e.body,o=>{if(!(vu.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=R(o);e!==void 0&&e.length>0&&t.has(e)&&(r+=1)}o.type===`Literal`&&o.value===null&&!Su(o,o.parent)&&i.push(o)}}),{maxJsxDepth:n,nullLiterals:i,stateHookCount:r}}function wu(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:g(n.maxDestructuredProps)?n.maxDestructuredProps:t.maxDestructuredProps,maxLines:g(n.maxLines)?n.maxLines:t.maxLines,maxStateHooks:g(n.maxStateHooks)?n.maxStateHooks:t.maxStateHooks,maxTsxNesting:g(n.maxTsxNesting)?n.maxTsxNesting:t.maxTsxNesting,stateHooks:Array.isArray(n.stateHooks)?n.stateHooks:t.stateHooks,targetLines:g(n.targetLines)?n.targetLines:t.targetLines}}const Tu=d(`no-god-components`,`react`,{create(e){let t=wu(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=xu(a);g(l)&&l>t.maxDestructuredProps&&e.report({data:{count:String(l),max:String(t.maxDestructuredProps),name:o},messageId:`tooManyProps`,node:a});let u=Cu(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=yu(e);t!==void 0&&t.length!==0&&a(e,t)}return{ArrowFunctionExpression:o,CallExpression(e){if(!cu(e))return;let[t]=e.arguments;if(!t||t.type!==`FunctionExpression`&&t.type!==`ArrowFunctionExpression`)return;let n=bu(e),r=yu(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 Eu({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 Du=d(`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||!Eu(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 Ou(e){let t=b(e);if(t.type!==`CallExpression`)return!1;let n=b(t.callee);if(n.type!==`MemberExpression`||n.computed)return!1;let r=b(n.object);return r.type===`Identifier`&&r.name===`Ianitor`&&n.property.type===`Identifier`}function ku(e){for(let{node:t}of e.defs){if(t.type!==`VariableDeclarator`)continue;let{init:e}=t;if(e!==null&&Ou(e))return!0}return!1}function Au(e,t){let n=b(e.callee);if(n.type===`CallExpression`)return Ou(n);if(n.type===`Identifier`){let r=S(t.getScope(e),n.name);return r!==void 0&&ku(r)}return!1}function ju(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 Mu(e){for(let t of e.properties)if(t.type===`Property`&&t.key.type===`Identifier`&&t.key.name===`success`)return t.key}const Nu=d(`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=b(i);if(o.type===`CallExpression`&&a.name===`success`){Au(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=b(a);if(o.type===`CallExpression`){if(i.type===`Identifier`&&Ou(o)){n.add(i.name);return}if(i.type===`ObjectPattern`&&Au(o,t)&&ju(i)){let t=Mu(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`}}),Pu=[`binding`];function Fu(e){if(e.type===`Identifier`)return e.name;if(e.type===`AssignmentPattern`&&e.left.type===`Identifier`)return e.left.name}function Iu({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 Lu(e){if(e.params.length!==1)return;let[t]=e.params;return t===void 0?void 0:Fu(t)}function Ru(e){if(e.type===`ArrowFunctionExpression`){let t=Lu(e);if(t===void 0)return!1;let{body:n}=e;switch(n.type){case`BlockStatement`:return Iu(n,t);case`Identifier`:return n.name===t;default:return!1}}if(e.type===`FunctionExpression`){let t=Lu(e);return t===void 0||e.body===null?!1:Iu(e.body,t)}return!1}function zu(e){return R(e)===`joinBindings`}function Bu(e){for(let t of e.defs){if(t.node.type!==`VariableDeclarator`)continue;let{init:e}=t.node;if(e?.type===`CallExpression`&&(R(e)===`useBinding`||zu(e)||e.callee.type===`MemberExpression`&&x(e.callee)===`map`))return!0}return!1}function Vu(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=S(e.getScope(t),t.name);if(i!==void 0&&Bu(i))return!0}return t.type===`CallExpression`&&(t.callee.type===`MemberExpression`&&x(t.callee)===`map`||zu(t))}const Hu=d(`no-identity-map`,`general`,{create(e){let{sourceCode:t}=e,[n]=e.options,r=n?.bindingPatterns??Pu;return{CallExpression(n){let{callee:i}=n;if(i.type!==`MemberExpression`||i.computed||i.property.type!==`Identifier`||x(i)!==`map`||n.arguments.length!==1)return;let[a]=n.arguments;if(a===void 0||a.type===`SpreadElement`||!Ru(a))return;let o=Vu(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:[...Pu],description:`Variable name patterns to recognize as Bindings (case insensitive)`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}});function Uu(e){let{parent:t}=e;return t.type===`ExpressionStatement`||t.type===`ForStatement`&&t.update===e}const Wu=d(`no-increment-decrement`,`general`,{create(e){let[t]=e.options,n=Va(t)&&t.allowAutofix,{sourceCode:r}=e;return{UpdateExpression(t){if(!Uu(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 Gu(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isStateCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=t.getStateName(r);if(a===void 0)continue;let o=`undefined`,[s]=i.arguments;s!==void 0&&(o=e.sourceCode.getText(s)),e.report({data:{arguments:o,state:a},messageId:`avoidInitializingState`,node:i})}}const Ku=d(`no-initialize-state`,`react`,{create(e){let t=F(e.options[0]),n=I(e.sourceCode,t);return{Program(){for(let t of n.effects)t.dependencyReferences!==void 0&&t.dependencyReferences.filter(e=>!n.isStateSetter(e)).length===0&&Gu(e,n,t)}}},meta:{docs:{description:`Disallow initializing state in an effect.`,recommended:!0},messages:{avoidInitializingState:`Avoid initializing state in an effect. Instead, initialize "{{state}}"'s "useState()" with "{{arguments}}". For SSR hydration, prefer "useSyncExternalStore".`},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:`suggestion`}});function qu(e){return e.name.type===`JSXIdentifier`?e.name.name:void 0}function Ju(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 Yu=d(`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=qu(r);if(i===void 0||!t.has(i))return;let a=Ju(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&&su(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`}}),Xu={checkPrivate:!0,checkProtected:!0,checkPublic:!0};function Zu(e){return _(e)?{checkPrivate:typeof e.checkPrivate!=`boolean`||e.checkPrivate,checkProtected:typeof e.checkProtected!=`boolean`||e.checkProtected,checkPublic:typeof e.checkPublic!=`boolean`||e.checkPublic}:Xu}function Qu(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 $u(e,t){if(t.has(e))return!1;if(t.add(e),e.type===`ThisExpression`||e.type===`Super`)return!0;if(!_(e))return!1;for(let n in e)if(Object.hasOwn(e,n)&&ed(e[n],t))return!0;return!1}function ed(e,t){if(Array.isArray(e)){for(let n of e)if(T(n)&&$u(n,t))return!0;return!1}return T(e)&&$u(e,t)}function td({value:e}){return $u(e,new WeakSet)}function nd(e){return e.key.type===`Identifier`?e.key.name:`unknown`}const rd=d(`no-instance-methods-without-this`,`roblox`,{create(e){let t=Zu(e.options[0]);return{MethodDefinition(n){!Qu(n,t)||td(n)||e.report({data:{methodName:nd(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`}}),id=new Set([`add`,`clear`,`copyWithin`,`delete`,`fill`,`pop`,`push`,`reverse`,`set`,`shift`,`sort`,`splice`,`unshift`]),ad=new Set([`entries`,`keys`,`values`]),od=new Set([`ArrowFunctionExpression`,`ClassDeclaration`,`ClassExpression`,`FunctionDeclaration`,`FunctionExpression`]);function sd(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 sd(e.expression)}}function cd(e){if(e.type===`ArrayPattern`)return sd(e.elements[0]??void 0)}function ld(e){if(e.left.type===`VariableDeclaration`){let[t]=e.left.declarations;return t?.id}return e.left}function ud(e){return e.left.type===`VariableDeclaration`&&e.left.kind===`const`}function dd(e){let t=b(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=x(t.callee);if(!(n===void 0||!ad.has(n)))return{method:n,name:t.callee.object.name}}function fd(e){let t=dd(e.right);if(t===void 0)return;if(!ud(e))return{addArgumentName:void 0,deleteArgumentName:void 0,iterableName:t.name,setKeyName:void 0};let n=ld(e);if(n===void 0)return;let r,i,a;return t.method===`entries`?(r=cd(n),i=r,a=r):t.method===`keys`?(i=sd(n),a=i):(r=sd(n),a=r??cd(n),i=cd(n)),{addArgumentName:r,deleteArgumentName:a,iterableName:t.name,setKeyName:i}}function pd(e,t){if(t===void 0)return!1;let[n]=e.arguments;return n!==void 0&&n.type!==`SpreadElement`&&sd(n)===t}function md(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)T(e)&&t.push(e);else T(r)&&t.push(r)}}function hd(e,t){let n=[],r=[e];for(let e of r)if(!od.has(e.type)){if(e.type===`CallExpression`&&e.callee.type===`MemberExpression`){let r=x(e.callee),i=b(e.callee.object);r!==void 0&&id.has(r)&&i.type===`Identifier`&&i.name===t&&n.push({call:e,method:r,property:e.callee.property})}md(e,r)}return n}function gd(e,t,n){let{method:r,call:i}=e;return r===`delete`&&pd(i,t.deleteArgumentName)?!0:r===`add`&&pd(i,t.addArgumentName)||r===`set`&&pd(i,t.setKeyName)?!n.some(e=>e.call.range[0]<i.range[0]&&e.method===`delete`&&pd(e.call,t.deleteArgumentName)):!1}const _d=d(`no-loop-iterable-mutation`,`general`,{create(e){return{"ForOfStatement:exit"(t){if(t.await)return;let n=fd(t);if(n===void 0)return;let r=hd(t.body,n.iterableName);for(let t of r)gd(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`}}),vd=[`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`],yd=new Set([`!`,`+`,`-`,`typeof`,`void`,`~`]),bd=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 xd(e){return bd.has(e.type)}function q(e){return e.type===`module`||e.type===`global`}function J(e){for(let t of e.defs)if(t.type===`ImportBinding`)return!0;return!1}function Sd(e){return e.type===`Variable`}function Cd(e){if(!Sd(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 wd(e,t){let n=S(e.getScope(t),t.name);if(!(n===void 0||!q(n.scope)))for(let e of n.defs){let t=Cd(e);if(t!==void 0)return t}}function Td(e,t){let n=S(e.getScope(t),t.name);if(n!==void 0)for(let e of n.defs){let t=Cd(e);if(t!==void 0)return t}}function Ed(e,t,n){let r=b(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=Td(e,r);return i!==void 0&&Ed(e,i,n)}function Dd(e,t,n,r){return t.type===`Identifier`?!0:xd(t)?Y(e,t,n,r):!1}function Od(e){let t=b(e);for(;t.type===`MemberExpression`;)t=b(t.object);return t.type===`Identifier`?t.name:void 0}function kd(e,t,n,r){if(r.staticCallsRequireFactories===!0){let e=Od(t);if(e===void 0||!r.staticGlobalFactories.has(e))return!1}let i=b(t);return i.type===`Identifier`?jd(e,i,n,r):i.type!==`MemberExpression`||!Y(e,i.object,n,r)?!1:i.computed?Y(e,i.property,n,r):i.property.type===`Identifier`}function Ad(e,t,n,r,i){return kd(e,n,r,i)?t.every(t=>t.type!==`SpreadElement`&&Y(e,t,r,i)):!1}function Y(e,t,n,r){let i=b(t);if(n.has(i))return!1;switch(n.add(i),i.type){case`ArrayExpression`:return Pd(e,i,n,r);case`BinaryExpression`:case`LogicalExpression`:return xd(i.left)?Y(e,i.left,n,r)&&Y(e,i.right,n,r):!1;case`CallExpression`:return Ad(e,i.arguments,i.callee,n,r);case`ChainExpression`:return Y(e,i.expression,n,r);case`ConditionalExpression`:return Y(e,i.test,n,r)&&Y(e,i.consequent,n,r)&&Y(e,i.alternate,n,r);case`Identifier`:return jd(e,i,n,r);case`Literal`:return!0;case`MemberExpression`:return Y(e,i.object,n,r)&&(!i.computed||Dd(e,i.property,n,r));case`NewExpression`:return Ad(e,i.arguments,i.callee,n,r);case`ObjectExpression`:return Nd(e,i,n,r);case`SequenceExpression`:return i.expressions.length>0&&i.expressions.every(t=>Y(e,t,n,r));case`TemplateLiteral`:return i.expressions.length===0;case`UnaryExpression`:return yd.has(i.operator)&&Y(e,i.argument,n,r);default:return!1}}function jd(e,t,n,r){let i=S(e.getScope(t),t.name);if(i===void 0)return r.staticGlobalFactories.has(t.name);if(!q(i.scope))return!1;if(J(i))return!0;for(let t of i.defs){let i=Cd(t);if(i!==void 0&&Y(e,i,n,r))return!0}return!1}function Md(e){return e.type!==`PrivateIdentifier`&&e.type!==`Identifier`}function Nd(e,t,n,r){for(let i of t.properties)if(i.type!==`Property`||i.kind!==`init`||i.computed&&Md(i.key)&&!Y(e,i.key,n,r)||!Y(e,i.value,n,r))return!1;return!0}function Pd(e,{elements:t},n,r){for(let i of t)if(i===null||i.type===`SpreadElement`||!Y(e,i,n,r))return!1;return!0}function Fd(e){return e.type===`JSXIdentifier`?e.name:e.name.name}function Id(e){return e===`nativeProperties`||e.endsWith(`NativeProperties`)}function Ld(e){if(e.type===`Variable`&&e.node.type===`VariableDeclarator`)return e.node.init??void 0}function Rd(e){let t=b(e);for(;t.type===`MemberExpression`;){let e=b(t.object);if(e.type===`Identifier`)return e;if(e.type!==`MemberExpression`)return;t=e}return t.type===`Identifier`?t:void 0}function zd(e,t){let n=b(t);if(n.type===`ObjectExpression`)return!0;let r=Rd(n);if(r===void 0)return!1;let i=S(e.getScope(r),r.name);return i===void 0?!1:J(i)||q(i.scope)}function Bd(e,t,n){let r=b(t);if(n.has(r))return;if(n.add(r),r.type===`ObjectExpression`)return r;if(r.type!==`Identifier`)return;let i=S(e.getScope(r),r.name);if(!(i===void 0||q(i.scope)))for(let t of i.defs){let r=Ld(t);if(r===void 0)continue;let i=Bd(e,r,n);if(i!==void 0)return i}}const Vd=d(`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`||!zd(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=Fd(e.name);if(r===void 0||!Id(r))return;let{value:i}=e;if(i?.type!==`JSXExpressionContainer`)return;let{expression:a}=i;if(a.type===`JSXEmptyExpression`)return;let o=Bd(t,a,new Set);o!==void 0&&n(o,{messageId:`noNativePropertiesSpread`,propertyName:r})},JSXSpreadAttribute(e){let r=Bd(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 Hd(e){return e.parent.type===`ExpressionStatement`?!0:e.parent.type!==`UnaryExpression`||e.parent.operator!==`void`?!1:e.parent.parent.type===`ExpressionStatement`}function Ud(e,t,n,r){if(_r(e,t))for(let t of e.specifiers){if(t.type===`ImportSpecifier`){ue(t.imported,`useMemo`)&&n.add(t.local.name);continue}r.add(t.local.name)}}const Wd=new Set([`Instance`]);function Gd(e){let t=_(e)&&y(e.constructors)?new Set(e.constructors):Wd,n=_(e)&&e.environment===`standard`?`standard`:`roblox-ts`,r=_(e)?e.maxHelperTraceDepth:void 0;return{constructors:t,environment:n,maxHelperTraceDepth:te(r)&&Number.isInteger(r)&&r>=0?r:4}}function Kd(e){return e?.type===`CallExpression`}function qd(e,t,n){let r=e.parent;for(;r!==null;){if(Fe(r)){let{parent:e}=r;if(Kd(e)&&e.arguments[0]===r){if(!pe(e,t,n)){r=e.parent;continue}return!0}}r=r.parent}return!1}function Jd(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=Yd(a,t,n,r,i);for(let t of e)o.add(t)}return i.delete(e),r.set(e,o),o}function Yd(e,t,n,r,i){if(e.type===`FunctionName`)return Xd(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=b(a.init);if(Fe(o))return Zd(o,n);if(o.type!==`Identifier`)return new Set;let s=S(t.getScope(o),o.name);return s===void 0?new Set:Jd(s,t,n,r,i)}function Xd(e,t){let{node:n}=e;return n.type===`FunctionDeclaration`?Zd(n,t):new Set}function Zd(e,t){let n=t.get(e)?.id;return n===void 0?new Set:new Set([n])}function Qd(e,t,n,r){let i=S(t.getScope(e),e.name);return i===void 0?new Set:Jd(i,t,n,r,new Set)}function $d(e,t,n,r){for(let i of t.values())for(let t of i.callIdentifiers){let a=Qd(t,e,n,r);for(let e of a)i.callees.add(e)}}function ef(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 tf(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=Qd(t,e,r,i);for(let e of n)a.add(e)}return a}const nf=d(`no-new-instance-in-use-memo`,`react`,{create(e){let t=Gd(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}Fe(t)&&u.push(t)}},FunctionDeclaration:h,"FunctionDeclaration:exit":g,FunctionExpression:h,"FunctionExpression:exit":g,ImportDeclaration(e){Ud(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:qd(e,r,i),node:e})},"Program:exit"(){$d(e.sourceCode,o,a,d);let n=ef(tf(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:[...Wd],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`}});function rf(e,t){let n=[];for(let r of e.scope.getArgumentUpstreamReferences(t)){if(e.scope.getUpstreamReferences(r).length!==1)continue;let{identifier:t}=r;cf(t)||e.isProp(r)||lf(t)||e.isRefCurrent(r)||e.isConstant(r)||n.push(r)}return n}function af(e,t,n){let r=e.getComponentName(t);return r!==void 0&&r!==``?`"${r}"`:n?`this custom hook`:`this component`}function of(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isPropCall(r)||t.isRefCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=rf(t,r);if(a.length===0)continue;let o=t.findEnclosingReactNode(n.node),s=o!==void 0&&t.isCustomHook(o);e.report({data:{data:a.map(e=>`"${e.identifier.name}"`).join(` and `),name:af(t,o,s)},messageId:s?`avoidPassingDataToParentInHook`:`avoidPassingDataToParentInComponent`,node:i})}}const sf=d(`no-pass-data-to-parent`,`react`,{create(e){let t=F(e.options[0]),n=I(e.sourceCode,t);return{Program(){for(let t of n.effects)t.cleanup===void 0&&of(e,n,t)}}},meta:{docs:{description:`Disallow passing data to parents in an effect.`,recommended:!0},messages:{avoidPassingDataToParentInComponent:`Avoid passing data to parents in an effect. Instead, fetch "{{data}}" in the parent and pass it down to {{name}} as a prop.`,avoidPassingDataToParentInHook:`Avoid passing data to parents in an effect. Instead, return "{{data}}" from {{name}}.`},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:`suggestion`}});function cf(e){return e.type!==`Identifier`&&e.type!==`MemberExpression`?!1:e.type===`Identifier`?e.name===`useState`:e.object.type===`Identifier`&&e.object.name===`React`&&e.property.type===`Identifier`&&e.property.name===`useState`}function lf(e){return e.type!==`Identifier`&&e.type!==`MemberExpression`?!1:e.type===`Identifier`?e.name===`useRef`:e.object.type===`Identifier`&&e.object.name===`React`&&e.property.type===`Identifier`&&e.property.name===`useRef`}function uf(e,t,n){let r=e.getComponentName(t);return r!==void 0&&r!==``?`"${r}"`:n?`this custom hook`:`this component`}function df(e){return e.map(e=>`"${e.identifier.name}"`).join(` and `)}function ff(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isPropCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=t.scope.getArgumentUpstreamReferences(r).filter(e=>t.isState(e));if(a.length===0)continue;let o=t.findEnclosingReactNode(n.node),s=o!==void 0&&t.isCustomHook(o);e.report({data:{name:uf(t,o,s),state:df(a)},messageId:s?`avoidPassingLiveStateToParentInHook`:`avoidPassingLiveStateToParentInComponent`,node:i})}}const pf=d(`no-pass-live-state-to-parent`,`react`,{create(e){let t=F(e.options[0]),n=I(e.sourceCode,t);return{Program(){for(let t of n.effects)ff(e,n,t)}}},meta:{docs:{description:`Disallow passing live state to parents in an effect.`,recommended:!0},messages:{avoidPassingLiveStateToParentInComponent:`Avoid passing live state to parents in an effect. Instead, lift "{{state}}" to the parent and pass it down to {{name}} as a prop.`,avoidPassingLiveStateToParentInHook:`Avoid passing live state to parents in an effect. Instead, return "{{state}}" from {{name}}.`},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:`suggestion`}}),mf=sl({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 hf(e,t){let n=t;for(;n;){if(n.set.has(e))return!0;n=n.upper}return!1}function gf(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 _f=d(`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=hf(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=gf(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`}]}}),vf=new o({extensions:[`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.cjs`,`.json`,`.node`]}),yf={found:!1};function bf(e,n){if(!e.startsWith(`.`))return yf;let{path:r}=vf.sync(t.dirname(n),e);return r===void 0||r===``?yf:{found:!0,path:r}}const xf=`uiaspectratioconstraint`,Sf=new Set([`ButtonSpritesheet`,`GenericSpritesheet`,`LabelSpritesheet`]);function Cf({openingElement:e}){let{name:t}=e;return t.type===`JSXIdentifier`?t.name:void 0}function wf(e){let t=!1;return eo(e,e=>{t||e.type===`JSXElement`&&Cf(e)===xf&&(t=!0)}),t}function Tf(e){if(e.type===`FunctionDeclaration`)return e.id?.name;if(Fe(e)){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`)return t.id.name}}function Ef(e){if(e.body.type!==`BlockStatement`)return b(e.body)}function Df(e){for(let t of e.defs){if(t.type!==`ImportBinding`)continue;let{parent:e}=t.node;if(e?.type===`ImportDeclaration`&&h(e.source.value))return e.source.value}}const Of=new Map;function kf(e,t){if(!e.startsWith(`.`))return!1;let n=bf(e,t);if(!n.found)return!1;let r=Of.get(n.path);if(r!==void 0)return r;try{let e=i(n.path,`utf8`).includes(`<uiaspectratioconstraint`);return Of.set(n.path,e),e}catch{return Of.set(n.path,!1),!1}}function Af(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 jf(e){return e.type===`JSXElement`?Cf(e)===xf:e.type===`JSXExpressionContainer`&&e.expression.type===`Identifier`&&e.expression.name===`UI_ASPECT_RATIO_CONSTRAINT`}function Mf(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||!J(i))return!1;let a=Df(i);return a!==void 0&&(kf(a,r)||Sf.has(e))}const Nf=d(`no-redundant-aspect-ratio-constraint`,`roblox`,{create(e){let{filename:t,sourceCode:n}=e,r=new Set,i=[],a;return{ArrowFunctionExpression(e){let t=Tf(e),n=Ef(e);t===void 0||n===void 0||n.type!==`JSXElement`&&n.type!==`JSXFragment`||wf(n)&&r.add(t)},FunctionDeclaration(e){let t=Tf(e);if(t===void 0||e.body?.body.length!==1)return;let[n]=e.body.body;n?.type===`ReturnStatement`&&n.argument!==null&&wf(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=Cf(n);if(i!==void 0&&!(!Mf(i,r,o,t)||Af(n)))for(let t of n.children)jf(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`}}),Pf=new Set([`JSXElement`,`ReactElement`,`ReactNode`]),Ff=new Set([`ChainExpression`,`ParenthesizedExpression`,`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]),If=/^use[A-Z]/u;function Lf(e){return If.test(e)}function Rf(e){if(e?.type!==`TSTypeReference`)return!1;let{typeName:t}=e;return t.type===`Identifier`?Pf.has(t.name):t.type===`TSQualifiedName`&&Pf.has(t.right.name)}function zf({returnType:e}){return e?.typeAnnotation??void 0}function Bf(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 to(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 Vf({parent:e}){return e.type===`CallExpression`||e.type===`JSXExpressionContainer`||e.type===`ArrayExpression`}function Hf(e){if(e.parent?.type===`VariableDeclarator`&&e.parent.id.type===`Identifier`)return e.parent.id.name}function Uf(e){return e.type===`Identifier`?e.name:void 0}function Wf(e){let t=e;for(;t!==void 0&&Ff.has(t.type);)t=t.parent??void 0;return t}function Gf(e){let t=Wf(e.parent??void 0);return t?.type===`Property`&&Jf(t.value)===e}function Kf(e){let t=Wf(e.parent??void 0);return t?.type===`JSXExpressionContainer`&&t.parent.type===`JSXAttribute`&&Jf(t.expression)===e}function qf(e){let t=Wf(e.parent??void 0);return t?.type===`CallExpression`&&t.arguments.some(t=>Jf(t)===e)}function Jf(e){let t=e;for(;Yf(t);)t=t.expression;return t}function Yf(e){return Ff.has(e.type)}function Xf(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 Zf(e,t){let n=Xf(t,e);if(n===void 0)return!1;let r=!1;for(let e of n.references)if(!e.isWrite()&&(r=!0,!(Gf(e.identifier)||Kf(e.identifier)||qf(e.identifier))))return!1;return r}const Qf=d(`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||K(e)||Lf(e)}function i(t,i){let a=Uf(i.id);if(r(a)||Zf(t,e.sourceCode))return;let o=ce(i.id),s=o!==void 0&&Rf(o.typeAnnotation),c=Rf(zf(t));(s||c||Bf(t))&&a!==void 0&&n(i,a)}function a(e){let t=e.type===`FunctionExpression`?e.id?.name:void 0;r(t)||(Rf(zf(e))||Bf(e))&&t!==void 0&&n(e,t)}function o(e){let{parent:n}=e,r=Hf(e);if(r!==void 0&&K(r)){--t;return}if(!(t>0||Vf(e))){if(n.type===`VariableDeclarator`){i(e,n);return}n.type===`ReturnStatement`&&a(e)}}return{ArrowFunctionExpression(e){let n=Hf(e);n!==void 0&&K(n)&&(t+=1)},"ArrowFunctionExpression:exit":o,FunctionDeclaration({id:e}){e!==null&&K(e.name)&&(t+=1)},"FunctionDeclaration:exit"(r){if(r.id===null)return;let i=r.id.name;if(K(i)){--t;return}t>0||Lf(i)||Zf(r,e.sourceCode)||(Rf(zf(r))||Bf(r))&&n(r,i)},FunctionExpression(e){let n=Hf(e);n!==void 0&&K(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`}}),$f=d(`no-reset-all-state-on-prop-change`,`react`,{create(e){let t=F(e.options[0]),n=I(e.sourceCode,t),{sourceCode:r}=e;return{Program(){for(let t of n.effects){if(t.dependencyReferences===void 0)continue;let i=n.findEnclosingReactNode(t.node);if(i!==void 0&&n.isCustomHook(i))continue;let a=ep(r,n,t.functionReferences,t.dependencyReferences,t.node);a!==void 0&&e.report({data:{prop:a.identifier.name},messageId:`avoidResettingAllStateWhenAPropChanges`,node:t.node})}}}},meta:{docs:{description:`Disallow resetting all state in an effect when a prop changes.`,recommended:!0},messages:{avoidResettingAllStateWhenAPropChanges:`Avoid resetting all state when a prop changes. Instead, if "{{prop}}" is a key, pass it as "key" so React will reset the component's state.`},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:`suggestion`}});function ep(e,t,n,r,i){let a=n.filter(e=>t.isStateCall(e));if(a.length>0&&a.every(n=>tp(e,t,n))&&a.length===rp(t,t.findEnclosingReactNode(i)))return r.flatMap(e=>t.scope.getUpstreamReferences(e)).find(e=>t.isProp(e))}function tp(e,t,n){let r=t.scope.getCallExpression(n);if(r===void 0)return!1;let[i]=r.arguments,a=t.getUseStateDeclaration(n);if(a?.init?.type!==`CallExpression`)return!1;let[o]=a.init.arguments;return np(i)&&np(o)?!0:i===void 0||o===void 0?!1:e.getText(i)===e.getText(o)}function np(e){return e===void 0||e.type===`Identifier`&&e.name===`undefined`}function rp(e,t){if(t===void 0)return 0;if(t.type===`VariableDeclarator`&&t.init?.type===`CallExpression`){let[n]=t.init.arguments;return n===void 0||n.type!==`ArrowFunctionExpression`&&n.type!==`FunctionExpression`?0:rp(e,n)}return e.scope.getDescendantCallExpressions(t).filter(e=>{let{callee:t}=e;if(t.type!==`Identifier`&&t.type!==`MemberExpression`)return!1;if(t.type===`MemberExpression`){if(t.computed||t.object.type!==`Identifier`||t.property.type!==`Identifier`||t.object.name!==`React`||t.property.name!==`useState`)return!1}else if(t.name!==`useState`)return!1;return!0}).length}const ip=s({"message?":`string | undefined`,object:`string`,properties:s(`string[]`).readonly()}).readonly(),ap=s({"allowFiles?":s(`string[]`).readonly().or(`undefined`),"checkComputed?":`boolean | undefined`,restrictions:ip.array().readonly()}).readonly(),op={matchBase:!0},sp={dot:!0,magicalBraces:!0};function cp(e){return e.replaceAll(`\\`,`/`)}function lp(e){let n=cp(e);if(!t.isAbsolute(e))return[n];let r=cp(t.relative(process.cwd(),e));return r.length===0||r.startsWith(`..`)?[n]:[n,r]}function up(e,t){let n=new c(e,t),r=n.hasMagic();return{hasMagic:r,matches:r?e=>n.match(e):t=>t===e}}function dp(e){let t=new Set,n=[],r=0;for(let i of e){let e=up(i,sp);e.hasMagic?n[r++]=e.matches:t.add(i)}return e=>t.has(e)||n.some(t=>t(e))}function fp(e){return{matchesObject:up(e.object,sp).matches,matchesProperty:dp(e.properties),message:e.message}}function pp(e){let[t]=e.options;if(!ap.allows(t))return{checkComputed:!0,isAllowedFile:!1,restrictions:[]};let{allowFiles:n,checkComputed:r,restrictions:i}=t,a=lp(e.filename),o=n?.some(e=>a.some(t=>l(t,e,op)))??!1;return{checkComputed:r??!0,isAllowedFile:o,restrictions:i.map(fp)}}const mp=d(`no-restricted-property-assignment`,`general`,{create(e){let{checkComputed:t,isAllowedFile:n,restrictions:r}=pp(e);function i(i,a){if(n||!j(i)||i.computed&&!t||i.object.type!==`Identifier`)return;let o=x(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`}}),hp=/\.spec\.(?:ts|tsx)$/u,gp=d(`no-spec-file-extension`,`naming`,{createOnce(e){return{Program(t){let{filename:n}=e;n&&hp.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`}}),_p=`Fragment`;function vp(e,t,n){let{callee:r}=t;return r.type===`Identifier`?xr(S(e.getScope(r),r.name),`createElement`,n):r.type!==`MemberExpression`||r.computed||x(r)!==`createElement`||r.object.type!==`Identifier`?!1:Sr(S(e.getScope(r.object),r.object.name),n)}function yp(e){return e.type===`Literal`&&h(e.value)}function bp(e,t){if(J(e))return E(t)||t===_p;if(!q(e.scope)||!E(t)&&t!==_p)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&&(Fe(e)||e.type===`ClassExpression`))return!0}return!1}function xp(e,t,n){let r=S(e.getScope(t),t.name);return xr(r,_p,n)?!0:r!==void 0&&bp(r,t.name)}function Sp(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 Cp(e){if(e.computed)return;let t=x(e);if(t!==void 0)return e.object.type===`MemberExpression`&&Cp(e.object)===void 0?void 0:t}function wp(e,t,n){let r=Sp(t);if(r===void 0)return!1;let i=Cp(t);if(i===void 0)return!1;let a=S(e.getScope(r),r.name);return Sr(a,n)&&i===_p?!0:a===void 0||!J(a)?!1:E(i)}function Tp(e,t,n){return t.type===`SpreadElement`?!1:yp(t)?!0:t.type===`Identifier`?xp(e,t,n):t.type===`MemberExpression`&&wp(e,t,n)}const Ep=d(`no-static-react-create-element`,`react`,{create(e){let t=gr(e.options[0]),{sourceCode:n}=e;return{CallExpression(r){if(!vp(n,r,t))return;let[i]=r.arguments;i!==void 0&&Tp(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 Dp(e,t){let n=b(t);if(n.type!==`CallExpression`||n.optional)return!1;let r=b(n.callee);if(r.type!==`MemberExpression`||r.optional||x(r)!==`create`)return!1;let i=b(r.object);return i.type!==`Identifier`||i.name!==`table`?!1:!w(e,i,`table`)}function Op(e,t){let n=b(t);if(n.type!==`NewExpression`||n.arguments.length!==1&&n.arguments.length!==2)return!1;let r=b(n.callee);return r.type!==`Identifier`||r.name!==`Array`?!1:!w(e,r,`Array`)}const kp=d(`no-table-create-map`,`roblox`,{create(e){return{CallExpression(t){if(t.optional)return;let n=b(t.callee);if(n.type!==`MemberExpression`||n.optional||x(n)!==`map`)return;let r=b(n.object);(Dp(e.sourceCode,r)||Op(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 Ap(e){let{callee:t}=e;if(t.type!==`MemberExpression`||x(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:x(n)===`delay`}const jp=d(`no-task-wait`,`roblox`,{createOnce(e){return{CallExpression(t){if(Ap(t)){e.report({messageId:`noPromiseDelayAwait`,node:t});return}let{callee:n}=t;n.type===`MemberExpression`&&n.object.type===`Identifier`&&n.object.name===`task`&&x(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 Mp(e){return e===!1||e===0||e===``||e==null||e===0n}const Np=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`ClassExpression`,`FunctionExpression`,`NewExpression`,`ObjectExpression`]),Pp=new Set([`toBe`]),Fp=new Set([`toEqual`,`toStrictEqual`]),Ip=new Map([[`toBeDefined`,`defined`],[`toBeFalsy`,`falsy`],[`toBeNull`,`null`],[`toBeTruthy`,`truthy`],[`toBeUndefined`,`undefined`]]),Lp=new Set([`deepStrictEqual`,`notDeepStrictEqual`,`notStrictEqual`,`strictEqual`]),Rp=new Set([`deepEqual`,`equal`,`notDeepEqual`,`notEqual`]);function zp(e){return e.type===`Literal`&&`regex`in e||Np.has(e.type)}function Bp(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 Vp(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 Hp(e,t,n){if(t.operator===`void`)return{value:void 0};if(t.operator===`typeof`){let r=Wp(e,t.argument,n);return r===void 0?void 0:{value:typeof r.value}}let r=Wp(e,t.argument,n);if(r!==void 0){if(t.operator===`!`)return{value:Mp(r.value)};if(typeof r.value==`number`){if(t.operator===`+`)return{value:r.value};if(t.operator===`-`)return{value:-r.value}}}}function Up(e,t,n){if(t.name===`undefined`)return{value:void 0};let[r]=S(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 Wp(e,r.node.init,n)}function Wp(e,t,n){let r=Vp(t);if(n.has(r))return;n.add(r);let i=Bp(r);if(i!==void 0)return i;if(r.type===`UnaryExpression`)return Hp(e,r,n);if(r.type===`Identifier`)return Up(e,r,n)}function Gp(e,t){return e===`truthy`?!Mp(t):e===`falsy`?Mp(t):e===`defined`?t!==void 0:e===`undefined`?t===void 0:t===null}function Kp(e){return e===`truthy`||e===`defined`}function qp(e,t,n){return Object.is(t,n)}function Jp(e){return e.callee.type===`Identifier`&&e.callee.name===`expect`}function Yp(e){if(e.callee.type!==`MemberExpression`)return;let t=e.callee.object;if(t.type===`MemberExpression`&&x(t)===`not`&&(t=t.object),!(t.type!==`CallExpression`||!Jp(t)))return t}function Xp(e){if(e.callee.type!==`MemberExpression`)return!1;let{object:t}=e.callee;return t.type===`MemberExpression`&&x(t)===`not`}function Zp(e,t){let n=e.arguments[t];if(n!==void 0&&n.type!==`SpreadElement`)return Vp(n)}function Qp(e,t,n,r){let i=Wp(e.sourceCode,t,new Set);if(i!==void 0&&Gp(n,i.value)!==r){e.report({messageId:`issue`,node:t});return}zp(t)&&Kp(n)!==r&&e.report({messageId:`freshPredicate`,node:t})}function $p(e,t,n,r,i,a){if(r&&(zp(t)||zp(n))){e.report({data:{matcher:a},messageId:`freshIdentity`,node:zp(t)?t:n});return}let o=Wp(e.sourceCode,t,new Set),s=Wp(e.sourceCode,n,new Set);o!==void 0&&s!==void 0&&qp(r,o.value,s.value)!==i&&e.report({messageId:`issue`,node:t})}function em(e,t){let n=Yp(t);if(n===void 0||t.callee.type!==`MemberExpression`)return;let r=x(t.callee);if(r===void 0)return;let i=Zp(n,0);if(i===void 0)return;let a=Xp(t),o=Ip.get(r);if(o!==void 0){Qp(e,i,o,a);return}let s=Pp.has(r);if(!(s||Fp.has(r)))return;let c=Zp(t,0);c!==void 0&&$p(e,i,c,s,a,a?`not.toEqual`:`toEqual`)}function tm(e,t){if(t.callee.type!==`MemberExpression`||t.callee.object.type!==`Identifier`||t.callee.object.name!==`assert`)return;let n=x(t.callee);if(n===void 0)return;let r=Zp(t,0);if(r===void 0)return;if(n===`ok`||n===`notOk`){let t=Wp(e.sourceCode,r,new Set),i=n===`ok`;t!==void 0&&!!t.value===i&&e.report({messageId:`issue`,node:r});return}let i=Zp(t,1);if(i===void 0)return;let a=Lp.has(n);if(!(a||Rp.has(n)))return;let o=n.startsWith(`not`);$p(e,r,i,a,o,o?`notDeepStrictEqual`:`deepStrictEqual`)}const nm=d(`no-trivial-assertions`,`general`,{create(e){return{CallExpression(t){if(Yp(t)!==void 0){em(e,t);return}tm(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`}}),rm=d(`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`}}),im=/@(?:link|linkcode|linkplain|see)\s+\{?(?<identifier>\w+)/gu,am=/\{@(?:link|linkcode|linkplain|see)\s+(?<identifier>\w+)/gu,om=/[@{](?:type|typedef|param|returns?|template|augments|extends|implements)\s+(?<annotation>[^}]*)/gu,sm=/\b(?<identifier>\w+)\b/gu;function cm(e){return e.type===`ImportDefaultSpecifier`||e.type===`ImportNamespaceSpecifier`||e.type===`ImportSpecifier`}function lm(e){let t=new Set;for(let n of e)n.type===`Block`&&(um(n.value,t),dm(n.value,t));return t}function um(e,t){for(let n of[im,am])for(let r of e.matchAll(n)){let e=r.groups?.identifier;e!==void 0&&t.add(e)}}function dm(e,t){for(let n of e.matchAll(om)){let e=n.groups?.annotation;if(e!==void 0)for(let n of e.matchAll(sm)){let e=n.groups?.identifier;e!==void 0&&t.add(e)}}}function fm(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 pm=d(`no-unused-imports`,`general`,{create(e){let{sourceCode:t}=e,n=e.options[0]?.checkJSDoc??!0,r=n?lm(t.getAllComments()):new Set,i=[],a;return{ImportDeclaration(e){a??=e;for(let t of e.specifiers)cm(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 fm(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`}}),mm=d(`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)&&Hd(r)&&e.report({messageId:`unusedUseMemo`,node:r})},ImportDeclaration(e){Ud(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 hm(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 gm=d(`no-use-memo-simple-expression`,`react`,{create(e){return{CallExpression(t){if(!fu(t,`useMemo`))return;let n=$a(t);if(n===void 0)return;let r=hm(n);r===void 0||!du(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 _m(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 _m(n,e)}return e.type!==`ExpressionStatement`&&e.type!==`ArrowFunctionExpression`&&e.type!==`UnaryExpression`&&e.type!==`AwaitExpression`&&e.type!==`ReturnStatement`&&e.type!==`ThrowStatement`}function vm(e){return _m(e.parent,e)}function ym(e){if(e.defs.length!==1)return;let[t]=e.defs;if(t!==void 0){if(t.type===`FunctionName`&&M(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 bm=d(`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(!vm(n)||n.callee.type!==`Identifier`)return;let r=e.sourceCode.getScope(n),i=r.references.find(e=>e.identifier===n.callee)?.resolved??S(r,n.callee.name);if(i===void 0)return;let a=ym(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`}}),xm=/^[A-Z][A-Z0-9_]*$/u,Sm={staticGlobalFactories:new Set(vd)},Cm=[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 wm(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 Tm(e){return Fe(e)||e.type===`ClassExpression`}const Em=new Set([`ArrayExpression`,`ObjectExpression`,`JSXElement`,`JSXFragment`]);function Dm(e,t,n){if(Em.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 Om(e){return e.type===`Program`||e.type===`BlockStatement`}function km(e){switch(e.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return km(e.expression);case`Identifier`:return e.name;case`MemberExpression`:return km(e.object);default:return}}function X(e,t){switch(e.type){case`ArrayExpression`:return Am(e,t);case`BinaryExpression`:case`LogicalExpression`:return jm(e,t);case`CallExpression`:case`NewExpression`:return Mm(e,t);case`ChainExpression`:return X(e.expression,t);case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return X(e.expression,t);case`ConditionalExpression`:return Nm(e,t);case`MemberExpression`:return Pm(e,t);case`ObjectExpression`:return Fm(e,t);case`SequenceExpression`:return!1;case`SpreadElement`:return!1;case`TemplateLiteral`:return Im(e.expressions,t);case`UnaryExpression`:return X(e.argument,t);default:return!0}}function Am(e,t){for(let n of e.elements)if(n===null||!X(n,t))return!1;return!0}function jm(e,t){return X(e.left,t)&&X(e.right,t)}function Mm(e,t){let n=km(e.callee);return n===void 0||!t.has(n)||!X(e.callee,t)?!1:Im(e.arguments,t)}function Nm(e,t){return X(e.test,t)&&X(e.consequent,t)&&X(e.alternate,t)}function Pm(e,t){return X(e.object,t)&&(!e.computed||X(e.property,t))}function Fm(e,t){for(let n of e.properties)if(n.type!==`Property`||n.computed&&!X(n.key,t)||!X(n.value,t))return!1;return!0}function Im(e,t){for(let n of e)if(!X(n,t))return!1;return!0}function Lm(e,t){return t.type===`Literal`||Y(e,t,new Set,Sm)&&X(t,Sm.staticGlobalFactories)}function Rm(e,t){let n=t;for(;n.type===`ParenthesizedExpression`;)n=n.expression;return e.getText(n)}function zm(e,t){let{parent:n}=e;if(!Om(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 Bm(e){let t=e.parent,n=e;for(;t!==null;){if(D(t)&&t.init===n)return t;n=t,t=t.parent}}const Vm=d(`no-useless-constants`,`general`,{create(e){let{sourceCode:t}=e,[n]=e.options,r=(n?.ignoreCallPatterns??Cm).map(e=>new RegExp(e,`u`));function i(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 a(e,n){let{name:a}=n;if(!xm.test(a))return;let[o]=n.defs;if(o?.type!==`Variable`)return;let s=o.node;if(!(D(s)&&nt(s.id))||s.init===null)return;let c=o.parent;if(c===null||!Me(c)||c.kind!==`const`||c.declarations.length!==1||Ne(c.parent))return;let l=s.init;if(Tm(l)||Dm(l,r,t))return;let u=i(e,n);if(u===void 0||!nt(u.identifier))return;let d=Bm(u.identifier);if(d===void 0)return;let f=d.parent;if(!(!Me(f)||f.kind!==`const`))return{declarationNode:c,enclosingDeclaration:f,initializer:l,name:a,referenceIdentifier:u.identifier,reportNode:s.id}}function o(n){let r=[];for(let i of n.variables){let o=a(n,i);if(o===void 0)continue;let s=zm(o.declarationNode,o.enclosingDeclaration),c=Lm(t,o.initializer),l=X(o.initializer,Sm.staticGlobalFactories);if(!((s||c)&&l&&!ie(t,o.declarationNode))){e.report({data:{name:o.name},messageId:`uselessConstantNoFix`,node:o.reportNode});continue}r.push({declarationNode:o.declarationNode,initializerText:Rm(t,o.initializer),name:o.name,referenceIdentifier:o.referenceIdentifier,reportNode:o.reportNode})}s(r)}function s(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(re(t.text,a.declarationNode));return r},messageId:n.length===1?`uselessConstant`:`uselessConstants`,node:r.reportNode})}return{"Program:exit"(e){let n=wm(t.getScope(e));for(let e of n)o(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:[...Cm],description:`Regular expression patterns for call expressions that should be ignored.`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}});var Hm={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]},Um=`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(`.`),Wm=[[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 Gm=new Set([`Name`,`Parent`]),Km=new Set(Array.from(Gm,e=>e.toLowerCase())),qm=new Map(Object.entries(Hm).map(([e])=>[e.toLowerCase(),e]));function Jm(e){let t=new Map;for(let[n,r]of Object.entries(e)){if(!ch(r))continue;let e=n.toLowerCase();t.has(e)||t.set(e,{propertyName:n,value:r})}return t}const Ym=[`Enum`,`bool`,`CFrame`,`Color3`,`number`,`Rect`,`string`,`UDim2`,`UDim`,`Vector2`,`Vector3`];function Xm(e){let[t]=e;if(typeof t!=`number`)return;let n=Ym[t];if(n===void 0)return;let r=n===`Enum`?{enumType:e[1],type:n,value:e[2]}:{type:n,value:e[1]};return ch(r)?r:void 0}const Zm=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 Qm(){let e=new Map;for(let[t,n]of Object.entries(Hm)){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=Um[t],o=Wm[i],s=o===void 0?void 0:Xm(o);a!==void 0&&s!==void 0&&(r[a]=s)}e.set(t,Jm(r))}return e}const $m=Qm();function eh(e,t){return e.type===`Identifier`&&e.name===t}function th(e){return e.type===`Literal`&&typeof e.value==`boolean`}function nh(e){if(e.type!==`JSXIdentifier`)return;let t=qm.get(e.name.toLowerCase());if(t!==void 0&&e.name!==t)return t}function rh(e){if(e.type===`JSXIdentifier`)return e.name}function ih(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 ah(e,t){let n=t.toLowerCase(),r=Zm.get(e)?.get(n);if(r!==void 0)return r;let i=$m.get(e);if(i!==void 0)return i.get(n)}function oh(e){return Km.has(e.toLowerCase())}function sh(e){return g(e)||e===`inf`||e===`-inf`}function ch(e){if(!(_(e)&&h(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(sh);case`Color3`:return Array.isArray(e.value)&&e.value.length===3&&e.value.every(g);case`Enum`:return h(e.enumType)&&h(e.value);case`number`:return sh(e.value);case`Rect`:case`UDim2`:return Array.isArray(e.value)&&e.value.length===4&&e.value.every(sh);case`string`:return h(e.value);case`UDim`:case`Vector2`:return Array.isArray(e.value)&&e.value.length===2&&e.value.every(sh);case`Vector3`:return Array.isArray(e.value)&&e.value.length===3&&e.value.every(sh)}return!1}function lh(e){let t=b(e);if(t.type!==`NewExpression`||!eh(t.callee,`Instance`))return;let[n]=t.arguments;if(!(n===void 0||n.type===`SpreadElement`||!A(n)))return n.value}function uh(e,t,n=new WeakSet){if(Array.isArray(e)){for(let r of e)if(uh(r,t,n))return!0;return!1}if(!_(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(uh(r,t,n))return!0;return!1}function dh(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 fh(e){let t=dh(e);return t?.length===2&&t[0]===`math`&&t[1]===`huge`}function ph(e){return e===`inf`?1/0:e===`-inf`?-1/0:e}function mh(e,t){return ph(e)===t}function hh(e,t){if(e.length!==t.length)return!1;for(let[n,r]of e.entries()){let e=t[n];if(e===void 0||!mh(r,e))return!1}return!0}function Z(e){if(We(e))return e.value;if(fh(e))return 1/0;if(e.type!==`UnaryExpression`||e.operator!==`+`&&e.operator!==`-`)return;let t=Z(e.argument);if(t!==void 0)return e.operator===`+`?t:-t}function gh(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 _h(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 vh(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 yh(e,t,n,r){if(e.type===`MemberExpression`){let r=dh(e);return r?.length===2&&r[0]===t&&r[1]===`zero`?n:void 0}if(!(e.type!==`NewExpression`||!eh(e.callee,t)))return e.arguments.length===0?n:r(e.arguments)}function bh(e){return yh(e,`Vector2`,[0,0],xh)}function xh(e){let t=gh(e);if(t===void 0)return;let[n,r]=t,i=Z(n),a=Z(r);if(i!==void 0&&a!==void 0)return[i,a]}function Sh(e){let t=_h(e);if(t===void 0)return;let[n,r,i]=t,a=Z(n),o=Z(r),s=Z(i);if(a!==void 0&&o!==void 0&&s!==void 0)return[a,o,s]}function Ch(e){return yh(e,`Vector3`,[0,0,0],Sh)}function wh(e){if(!(e.type!==`NewExpression`||!eh(e.callee,`UDim`)))return e.arguments.length===0?[0,0]:xh(e.arguments)}function Th(e){let t=vh(e);if(t===void 0)return;let[n,r,i,a]=t,o=Z(n),s=Z(r),c=Z(i),l=Z(a);if(o!==void 0&&s!==void 0&&c!==void 0&&l!==void 0)return[o,s,c,l]}function Eh(e){if(e.type===`CallExpression`){let t=dh(e.callee),n=xh(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`||!eh(e.callee,`UDim2`)))return e.arguments.length===0?[0,0,0,0]:Th(e.arguments)}function Dh(e){if(!(e.type!==`NewExpression`||!eh(e.callee,`Rect`)))return e.arguments.length===0?[0,0,0,0]:Th(e.arguments)}function Oh(e){let[t,n,r]=e,i=Z(t),a=Z(n),o=Z(r);if(i!==void 0&&a!==void 0&&o!==void 0)return[i,a,o]}function kh(e){if(e.type===`CallExpression`){let t=dh(e.callee),n=_h(e.arguments);if(t?.length!==2||t[0]!==`Color3`||t[1]!==`fromRGB`||n===void 0)return;let r=Oh(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`||!eh(e.callee,`Color3`))return;if(e.arguments.length===0)return[0,0,0];let t=_h(e.arguments);if(t!==void 0)return Oh(t)}function Ah(e){if(e.type!==`NewExpression`||!eh(e.callee,`CFrame`))return;if(e.arguments.length===0)return[0,0,0,1,0,0,0,1,0,0,0,1];let t=Sh(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 jh(e){let t=dh(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 Mh(e,t){switch(t.type){case`bool`:return th(e)&&e.value===t.value;case`CFrame`:{let n=Ah(e);return n!==void 0&&hh(t.value,n)}case`Color3`:{let n=kh(e);return n!==void 0&&n[0]===t.value[0]&&n[1]===t.value[1]&&n[2]===t.value[2]}case`Enum`:{let n=jh(e);return n!==void 0&&n.enumType===t.enumType&&n.value===t.value}case`number`:{let n=Z(e);return n!==void 0&&mh(t.value,n)}case`Rect`:{let n=Dh(e);return n!==void 0&&hh(t.value,n)}case`string`:return A(e)&&e.value===t.value;case`UDim`:{let n=wh(e);return n!==void 0&&hh(t.value,n)}case`UDim2`:{let n=Eh(e);return n!==void 0&&hh(t.value,n)}case`Vector2`:{let n=bh(e);return n!==void 0&&hh(t.value,n)}case`Vector3`:{let n=Ch(e);return n!==void 0&&hh(t.value,n)}default:return!1}}const Nh=d(`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(oh(o))return;let s=ah(a.className,o);if(s===void 0||!Mh(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`&&uh(r,n)){t.delete(n);break}}function s(e,t){if(e.left.type===`Identifier`||e.left.type===`MemberExpression`)for(let[n]of t)uh(e.right,n)&&t.delete(n)}function c(e,t){if(e.argument!==null)for(let[n]of t)uh(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=b(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=lh(n.init);e!==void 0&&t.set(n.id.name,{className:e})}}return{BlockStatement(e){l(e.body)},JSXOpeningElement(t){let n=nh(t.name);if(n!==void 0)for(let r of t.attributes){if(r.type===`JSXSpreadAttribute`)continue;let a=rh(r.name);if(a===void 0||oh(a))continue;let o=ah(n,a);if(o===void 0)continue;let s=ih(r);if(!(r.value===null&&o.value.type===`bool`&&o.value.value)&&(s===void 0||!Mh(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`}}),Ph=[`useEffect`,`useLayoutEffect`,`useInsertionEffect`],Fh=[`on`],Ih=[`useRef`],Lh=[`useState`,`useReducer`];function Rh(e){return e===void 0?{environment:`roblox-ts`,hooks:new Set(Ph),propertyCallbackPrefixes:new Set(Fh),refHooks:new Set(Ih),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(Lh)}:{environment:fr(e.environment)?e.environment:`roblox-ts`,hooks:new Set(y(e.hooks)?e.hooks:Ph),propertyCallbackPrefixes:new Set(y(e.propertyCallbackPrefixes)?e.propertyCallbackPrefixes:Fh),refHooks:new Set(y(e.refHooks)?e.refHooks:Ih),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(y(e.stateHooks)?e.stateHooks:Lh)}}function zh(e){if(!(e.type!==`MemberExpression`||e.computed||e.property.type!==`Identifier`))return e.property.name}function Bh(e,t,n,r){let{callee:i}=e;if(i.type===`Identifier`)return t.has(i.name);let a=de(i);return a!==void 0&&n.has(a.objectName)&&r.has(a.propertyName)}function Vh(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)&&T(t.key)&&t.key.type===`Identifier`)return t.key.name}function Hh(e){return v(e)&&e.startsWith(`use`)}function Uh(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 Wh(e,t){if(`body`in e&&T(e.body))if(e.body.type===`BlockStatement`)for(let n of e.body.body)t.push(n);else t.push(e.body)}function Gh(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`){Wh(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 Kh(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`:Gh(e,t);continue;default:continue}}return!1}function qh(e){if(e.length===0)return e;let[t]=e;return t?.type!==`IfStatement`||t.alternate!==null||!Uh(t.consequent)?e:e.slice(1)}function Jh(e){return e.type===`ChainExpression`?e.expression:e}function Q(e){if(e.type!==`ExpressionStatement`)return;let t=Jh(e.expression);return t.type===`CallExpression`?t:void 0}function Yh(e,t){return e.callee.type===`Identifier`&&t.has(e.callee.name)}function Xh(e){return e.type===`Literal`&&e.value===!1}function Zh(e){return e.type===`Literal`||e.type===`UnaryExpression`&&e.operator===`void`&&e.argument.type===`Literal`&&e.argument.value===0}function Qh(e){return e.type===`ArrayExpression`&&e.elements.length===0}function $h(e){return e.type===`ObjectExpression`&&e.properties.length===0}function eg(e){if(e.type===`Literal`){let{value:t}=e;return t===``||t===0||t===!1||t===null}return Zh(e)?!0:Qh(e)||$h(e)}function tg(e,t){let n=Q(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||!Xh(i)))return r}function ng(e,t){let n=Q(e);if(!(n===void 0||Yh(n,t)))return n}function rg(e,t){return e.type===`UnaryExpression`&&e.operator===`!`&&e.argument.type===`Identifier`&&e.argument.name===t}function ig(e,t){return e.type===`Identifier`&&e.name===t}function ag(e){return e.type===`BlockStatement`?e.body:[e]}function og(e,t,n){let[r,i,a]=e;if(r?.type!==`IfStatement`||r.alternate!==null||i===void 0||a===void 0)return;let o=tg(i,t),s=tg(a,t),c=Uh(r.consequent);if(o!==void 0&&s===void 0)return c&&rg(r.test,o)?ng(a,n)===void 0?void 0:o:void 0;if(s!==void 0&&o===void 0&&c&&rg(r.test,s))return ng(i,n)===void 0?void 0:s}function sg(e,t,n){if(e.type!==`IfStatement`||e.alternate!==null)return;let r=ag(e.consequent),[i,a]=r;if(r.length!==2||i===void 0||a===void 0)return;let o=tg(i,t),s=tg(a,t);if(o!==void 0&&s===void 0)return ig(e.test,o)?ng(a,n)===void 0?void 0:o:void 0;if(s!==void 0&&o===void 0&&ig(e.test,s))return ng(i,n)===void 0?void 0:s}function cg(e,t,n){if(e.length===3)return og(e,t,n);if(e.length===1){let[r]=e;return r===void 0?void 0:sg(r,t,n)}}const lg=new Set([`ArrayExpression`,`BinaryExpression`,`CallExpression`,`ChainExpression`,`ConditionalExpression`,`Identifier`,`LogicalExpression`,`MemberExpression`,`ObjectExpression`,`PrivateIdentifier`,`TemplateLiteral`,`UnaryExpression`]);function ug(e){return lg.has(e.type)}function dg(e,t){for(let n of e.elements)n!==null&&n.type!==`SpreadElement`&&t.push(n)}function fg(e,t){t.push(e.callee);for(let n of e.arguments)n.type!==`SpreadElement`&&t.push(n)}function pg(e,t){t.push(e.object),e.computed||t.push(e.property)}function mg(e,t){for(let n of e.properties)n.type===`Property`&&t.push(n.value)}function hg(e,t){switch(e.type){case`ArrayExpression`:dg(e,t);break;case`BinaryExpression`:case`LogicalExpression`:t.push(e.left,e.right);break;case`CallExpression`:fg(e,t);break;case`ChainExpression`:t.push(e.expression);break;case`ConditionalExpression`:t.push(e.test,e.consequent,e.alternate);break;case`MemberExpression`:pg(e,t);break;case`ObjectExpression`:mg(e,t);break;case`TemplateLiteral`:for(let n of e.expressions)t.push(n);break;case`UnaryExpression`:t.push(e.argument);break;default:}}function gg(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;hg(e,t)}}return!1}function _g(e,t){let n=0;for(let r of e){if(r.type===`IfStatement`){if(r.alternate!==null)return;let e=_g(ag(r.consequent),t);if(e===void 0||e===0)return;n+=e;continue}let e=Q(r);if(e===void 0||!t(e))return;n+=1}return n>0?n:void 0}function vg(e,t){return _g(e,e=>Yh(e,t)?e.arguments.some(e=>e.type!==`SpreadElement`&&gg(e)):!1)}function yg(e,t,n){return _g(e,e=>Cg(e,t,n))}function bg(e,t){for(let n of t)if(e.startsWith(n))return!0;return!1}function xg(e){return e.type===`AssignmentPattern`?e.left:e}function Sg(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=xg(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=oo(e);if(n===void 0||!bg(n,t))continue;let r=so(e);r!==void 0&&i.propertyCallbackIdentifiers.add(r.name)}return i}function Cg(e,t,n){let{callee:r}=e;if(r.type===`Identifier`)return t.propertyCallbackIdentifiers.has(r.name);let i=de(r);return i!==void 0&&t.propertyObjectName!==void 0&&i.objectName===t.propertyObjectName&&bg(i.propertyName,n)}function wg(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 Tg(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 Eg(e){let[,t]=e.arguments;return t===void 0||t.type===`ArrayExpression`&&t.elements.length===0}function Dg(e,t){if(e.length===0)return!1;for(let n of e){if(n.type===`IfStatement`){if(n.alternate!==null||!Dg(ag(n.consequent),t))return!1;continue}if(!t(n))return!1}return!0}function Og(e,t){let n=new Set;for(let r of e){if(r.type===`IfStatement`){let e=ag(r.consequent);for(let r of Og(e,t))n.add(r);continue}let e=Q(r);e!==void 0&&Yh(e,t)&&e.callee.type===`Identifier`&&n.add(e.callee.name)}return n}function kg(e,t){let{callee:n}=e;if(n.type===`Identifier`)return t.has(n.name);let r=de(n);return r!==void 0&&t.has(r.objectName)}function Ag(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(Ag(ag(r.consequent),t,n))return!0;continue}let e=Q(r);if(e!==void 0&&!Yh(e,t)&&!kg(e,n))return!0}return!1}function jg(e,t,n){return Dg(e,e=>{let r=Q(e);if(r===void 0||!Yh(r,t)||r.arguments.length!==1)return!1;let[i]=r.arguments;return i!==void 0&&n(i)})}function Mg(e){return e.type===`Literal`&&typeof e.value!=`object`||Qh(e)||$h(e)}function Ng(e,t){return jg(e,t,eg)}function Pg(e,t){return jg(e,t,Mg)}function Fg(e){return Dg(e,e=>{let t=Q(e);return t!==void 0&&de(t.callee)?.objectName===`console`})}const Ig=new Set([`addEventListener`,`addListener`,`on`,`subscribe`]);function Lg(e){return e.some(e=>{let t=Q(e);if(t===void 0)return!1;let n=zh(t.callee);return n!==void 0&&Ig.has(n)})}function Rg(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 zg(e,t,n){return e.callee.type===`Identifier`&&n.has(e.callee.name)&&e.arguments.some(e=>Rg(e,t))}function Bg(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(Bg(ag(r.consequent),t,n))return!0;continue}let e=Q(r);if(e!==void 0&&zg(e,t,n))return!0}return!1}function Vg(e){let t=new Set,n=new Set,r=ug(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}ug(e)&&hg(e,r)}}return t}function Hg(e){return e.alternate===null?[]:e.alternate.type===`BlockStatement`?e.alternate.body:[e.alternate]}function Ug(e,t,n){return[...Vg(e.test)].some(e=>n.has(e)&&!t.has(e))}function Wg(e,t){return e.some(e=>{let n=Q(e);return n!==void 0&&Yh(n,t)})}function Gg(e,t,n,r){for(let i of e)if(i.type===`IfStatement`&&(Ug(i,n,r)&&Wg(ag(i.consequent),t)||Gg(Hg(i),t,n,r)))return!0;return!1}const Kg=new Set([`alert`,`confirm`,`display`,`hide`,`log`,`navigate`,`notify`,`post`,`prompt`,`redirect`,`report`,`send`,`show`,`submit`,`track`]);function qg(e){let t=e.toLowerCase();for(let e of Kg)if(t.startsWith(e))return!0;return!1}function Jg(e,t){let n=Q(e);return n===void 0||Yh(n,t)?!1:n.callee.type===`Identifier`?qg(n.callee.name):n.callee.type!==`MemberExpression`||n.callee.computed||n.callee.property.type!==`Identifier`?!1:qg(n.callee.property.name)}function Yg(e,t){return[...Vg(e.test)].some(e=>t.has(e))}function Xg(e,t,n){for(let r of e)if(r.type===`IfStatement`&&(Yg(r,n)&&ag(r.consequent).some(e=>Jg(e,t))||r.alternate!==null&&Xg(Hg(r),t,n)))return!0;return!1}function Zg(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Qg(e,t){return`${e}:${t}`}function $g(e){if(e.body?.type===`BlockStatement`)return e.body}function e_(e){return e.body.type===`BlockStatement`}function t_(e){return e.body!==null}const n_=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(`.`)),r_=[`fetch`,`send`,`post`,`track`],i_=new Set([`addEventListener`,`addListener`,`cancelAnimationFrame`,`catch`,`clearInterval`,`clearTimeout`,`finally`,`observe`,`removeEventListener`,`removeListener`,`requestAnimationFrame`,`setInterval`,`setTimeout`,`subscribe`,`then`,`unobserve`,`unsubscribe`]),a_=[`log`,`fetch`,`send`,`track`,`report`,`show`,`navigate`,`submit`,`post`,`notify`];function o_(e){for(let t of a_)if(e.startsWith(t))return!0;return!1}function s_(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 c_(e){for(let t of r_)if(e.startsWith(t))return!0;return i_.has(e)}function l_(e,t,n){let{callee:r}=e;return Yh(e,t)?!1:r.type===`Identifier`?n.has(r.name)?!1:n_.has(r.name)||o_(r.name):r.type!==`MemberExpression`||r.computed||r.property.type!==`Identifier`||r.object.type===`Identifier`&&n.has(r.object.name)?!1:s_(r)||c_(r.property.name)}function u_(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(u_(ag(r.consequent),t,n))return!0;continue}let e=Q(r);if(e!==void 0&&l_(e,t,n))return!0}return!1}const d_=d(`no-useless-use-effect`,`react`,{create(e){let t=Rh(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 Bh(e,i,r,t.hooks)}function g(e){return Bh(e,a,r,t.stateHooks)}function _(e){return Bh(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 y(e){e.init?.type!==`CallExpression`||!_(e.init)||e.id.type!==`Identifier`||u.add(e.id.name)}function ee(e){e.id.type===`Identifier`&&e.init!==null&&(e.init.type===`FunctionExpression`||e.init.type===`ArrowFunctionExpression`)&&p.set(e.id.name,e.init)}function te(e){let n=f;f+=1;let r=Vh(e);d.push(Sg(e,t.propertyCallbackPrefixes,n,Hh(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?!u_(e.statements,o,e.functionContext?.propertyCallbackIdentifiers??new Set):!1}function S(e){let{coreStatements:n,dependencyIdentifiers:r,functionContext:i,hasNonSetter:a,hasReturnCleanup:l,node:d,statements:f}=e,p=t.reportEventFlag?cg(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&&Uh(f[0])),`emptyEffect`],[t.reportInitializeState&&Eg(d)&&Pg(f,o),`initializeState`],[t.reportResetState&&Ng(f,o)&&m,`resetState`],[p!==void 0&&wg(d,p),`eventFlag`],[t.reportEventSpecificLogic&&Xg(f,o,s),`eventSpecificLogic`],[t.reportAdjustState&&Gg(f,o,s,r)&&!a,`adjustState`],[t.reportDerivedState&&vg(n,o)!==void 0,`derivedState`],[x(e),`mixedDerivedState`],[t.reportPassRefToParent&&i!==void 0&&Bg(f,u,i.propertyCallbackIdentifiers),`passRefToParent`],[t.reportNotifyParent&&i!==void 0&&!i.isCustomHook&&yg(n,i,t.propertyCallbackPrefixes)!==void 0,`notifyParent`],[t.reportExternalStore&&Lg(f)&&l,`externalStore`],[t.reportLogOnly&&Fg(f),`logOnly`]].find(([e])=>e)?.[1]}function C(t,n,r){let i=d.at(-1),a=qh(n),s=Tg(t),c=Og(n,o),l=Ag(n,o,i?.propertyCallbackIdentifiers??new Set),u=r!==void 0&&Kh(r);m.push({depIdentifiers:s,hasNonSetterSideEffect:l,hasReturnWithCleanup:u,node:t,ownerFunctionId:i?.functionId??0,setterCalls:c,statements:n});let f=S({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 ne(){if(!t.reportEffectChain)return;let n=w();for(let t of m)if(!(t.hasNonSetterSideEffect||t.hasReturnWithCleanup))for(let r of t.depIdentifiers){let i=Qg(t.ownerFunctionId,r),a=n.get(i);if(a!==void 0&&re(a)){e.report({messageId:`effectChain`,node:t.node});return}}}function w(){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=Qg(n.ownerFunctionId,i),o=e.get(a);o===void 0&&(o=new Set,e.set(a,o)),o.add(t)}return e}function re(e){return e.size!==0&&[...e].every(e=>{let t=m[e];return t!==void 0&&!t.hasNonSetterSideEffect&&!t.hasReturnWithCleanup})}function ie(){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=ae(t,e);n.length<2||oe(n,e)}}function ae(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&&Zg(n.depIdentifiers,e.depIdentifiers)&&r.push(i)}return r}function oe(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 T(e,t){let n=p.get(t);if(n===void 0||n.async)return;let r=$g(n);r!==void 0&&C(e,r.body.filter(e=>e.type!==`EmptyStatement`),r)}function se(e,t){if(!t.async){if(t.type===`ArrowFunctionExpression`){if(!e_(t))return;C(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body);return}t_(t)&&C(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body)}}return{ArrowFunctionExpression:te,"ArrowFunctionExpression:exit":b,CallExpression(e){if(!h(e))return;let[t]=e.arguments;if(t!==void 0){if(t.type===`Identifier`){T(e,t.name);return}He(t)&&se(e,t)}},FunctionDeclaration:te,"FunctionDeclaration:exit":b,FunctionExpression:te,"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"(){ne(),ie()},VariableDeclarator(e){v(e),y(e),ee(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:[...Ph],description:`Effect hook names checked for avoidable effect patterns.`,items:{type:`string`},type:`array`},propertyCallbackPrefixes:{default:[...Fh],description:`Property name prefixes treated as event callback props.`,items:{type:`string`},type:`array`},refHooks:{default:[...Ih],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:[...Lh],description:`State hook names that return [value, setter] pairs.`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}});function f_(e){return _(e)&&h(e.dependencyMode)&&(e.dependencyMode===`empty-or-omitted`||e.dependencyMode===`aggressive`)?e.dependencyMode:`non-updating`}function p_(e){let t=_(e)&&y(e.staticGlobalFactories)?e.staticGlobalFactories:vd;return{dependencyMode:f_(e),environment:F(e),staticGlobalFactories:new Set(t)}}function m_(e){return{staticGlobalFactories:e.staticGlobalFactories}}function h_(e){let t=$a(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 g_(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,g_),e}}}const __=d(`no-useless-use-memo`,`react`,{create(e){let t=p_(e.options[0]),n=m_(t),r=hr(t.environment),i=new Set,a=new Set;return{CallExpression(r){if(!pe(r,i,a)||Hd(r)||r.arguments.length===0)return;let o=h_(r);if(o===void 0)return;let s=new Set;Y(e.sourceCode,o,s,n)&&g_(lo(e.sourceCode,r.arguments[1],s,n,Pd),t)&&e.report({messageId:`uselessUseMemo`,node:r})},ImportDeclaration(e){Ud(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:vd,description:`Global constructors and factories whose calls are treated as static values.`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}}),v_=[`useSpring`];function y_(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 b_(e,t,n){let r=b(t);if(r.type===`ObjectExpression`)return n(r);if(r.type!==`Identifier`)return!1;let i=S(e.getScope(r),r.name);if(i===void 0||!q(i.scope)||J(i))return!1;for(let e of i.defs){let t=Cd(e);if(t===void 0)continue;let r=b(t);if(r.type===`ObjectExpression`&&n(r))return!0}return!1}function x_(e,t){return b_(e,t,y_)}function S_(e,t,n,r){let i={staticGlobalFactories:r.staticGlobalFactories};return b_(e,t,t=>Nd(e,t,n,i))}function C_(e,t){return e===0||e===2||e===1&&t.treatEmptyDepsAsViolation}function w_({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 T_=d(`no-useless-use-spring`,`react`,{create(e){let[t]=e.options,n={springHooks:new Set(t?.springHooks??v_),staticGlobalFactories:new Set(t?.staticGlobalFactories??vd),treatEmptyDepsAsViolation:t?.treatEmptyDepsAsViolation??!0};return{CallExpression(t){if(!w_(t,n)||t.arguments.length===0)return;let[r]=t.arguments;if(r===void 0||r.type===`SpreadElement`)return;let i=new Set;if(!S_(e.sourceCode,r,i,n)||x_(e.sourceCode,r))return;let a=t.arguments.length>1?t.arguments[1]:void 0;C_(lo(e.sourceCode,a,i,n,Pd),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:[...v_],staticGlobalFactories:[...vd],treatEmptyDepsAsViolation:!0},properties:{springHooks:{default:[...v_],description:`Hook identifiers that should be treated as spring hooks`,items:{type:`string`},type:`array`},staticGlobalFactories:{default:[...vd],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`}}),E_=new Set([`push`,`unshift`]),D_=new Set([`max`,`min`]),O_=`Math`;function k_(e){if(!j(e))return;let t=x(e);if(t!==void 0){if(E_.has(t))return t;if(D_.has(t))return ue(e.object,O_)?`${O_}.${t}`:void 0}}const A_=d(`no-variadic-spread`,`general`,{createOnce(e){return{CallExpression(t){let n=k_(t.callee);if(n!==void 0)for(let r of t.arguments)r.type===`SpreadElement`&&b(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`}}),j_=sl({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`}),M_=d(`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 N_(e){return!e.computed&&P_(e.value)}function P_(e){if(e===void 0)return!1;switch(e.type){case`ArrayExpression`:return e.elements.every(e=>e===null||e.type!==`SpreadElement`&&P_(e));case`CallExpression`:return e.callee.type===`MemberExpression`&&P_(e.callee.object);case`Literal`:return!0;case`MemberExpression`:return P_(e.object);case`ObjectExpression`:return e.properties.every(e=>e.type!==`SpreadElement`&&N_(e));default:return!1}}function F_(e){let t=e;for(;t.type===`MemberExpression`;){if(t.computed&&!Be(t.property))return!1;t=t.object}return!0}function I_(e){return e.type===`MethodDefinition`&&e.kind===`constructor`&&e.key.type===`Identifier`&&e.key.name===`constructor`}function L_(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`||Be(r))&&P_(t.right)&&F_(n)}const R_=d(`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(!(!I_(n)||n.value.body===null))for(let t of n.value.body.body)L_(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 z_(e){if(!q(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 B_(e,t){let n=S(e.getScope(t),t.name);return n===void 0?!1:J(n)||z_(n)}function V_(e,t){let n=S(e.getScope(t),t.name);return n===void 0?!1:J(n)||q(n.scope)}function H_(e,t){let n=t;for(;n.type===`MemberExpression`;){if(n.computed)return!1;n=b(n.object)}return n.type===`Identifier`&&V_(e,n)}function U_(e,t){let n=b(t);switch(n.type){case`Identifier`:return B_(e,n);case`Literal`:return!0;case`MemberExpression`:return H_(e,n);case`TemplateLiteral`:return n.expressions.length===0;case`UnaryExpression`:return n.operator===`-`&&b(n.argument).type===`Literal`;default:return!1}}function W_(e,t){for(let n of t.properties)if(n.type!==`Property`||n.kind!==`init`||n.computed||!U_(e,n.value))return!1;return!0}function G_(e,t){if(t.id.type!==`ArrayPattern`||t.init?.type!==`CallExpression`||R(t.init)!==`useReducer`)return;let n=t.id.elements[1];if(n!=null&&n.type===`Identifier`)return S(e.getScope(n),n.name)}function K_(e){let t=e;for(;t!==void 0;){if(t.type===`Program`)return t;t=t.parent}}function q_(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 J_=d(`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=S(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=b(o);if(s.type!==`ObjectExpression`||!W_(n,s))return;let c=K_(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[q_(e,n,s,l,c),e.replaceText(s,l)]}}]})},VariableDeclarator(e){let r=G_(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`}}),Y_=new Set([`.js`,`.jsx`,`.ts`,`.tsx`]),X_=new Set([`.git`,`.next`,`.turbo`,`__fixtures__`,`__mocks__`,`__tests__`,`coverage`,`dist`,`documentation`,`example`,`examples`,`fixture`,`fixtures`,`node_modules`,`opensrc`,`stories`,`story`,`test`,`tests`]),Z_=/\bexport\s+default\b/u,Q_=/\/index$/u,$_=/\.(?:[cm]?jsx?|tsx?)$/u,ev=new Map,tv=new Map,nv=new Map,rv=/[.*+?^${}()|[\]\\]/gu,iv=String.raw`\$&`;function av(e){return e.replaceAll(rv,iv)}const ov=new Map;function sv(e){return e.includes(`u`)||e.includes(`v`)?e:`${e}u`}function cv(e,t){let n=`${t}:${e}`,r=ov.get(n);if(r!==void 0)return r;let i=new RegExp(e,sv(t));if(ov.size>=64){let e=ov.keys().next().value;e!==void 0&&ov.delete(e)}return ov.set(n,i),i}function lv(e){return e.replaceAll(`\\`,`/`)}function uv(e){let t=tv.get(e);if(t!==void 0)return t;let n=i(e,`utf8`);return tv.set(e,n),n}function dv(e,t){let n=av(t);return cv(`\\bexport\\s+(?:const|function|class)\\s+${n}\\b`,`u`).test(e)||cv(`\\bexport\\s*\\{[^}]*\\b${n}\\b[^}]*\\}`,`u`).test(e)?`named`:Z_.test(e)&&cv(`\\b${n}\\b`,`u`).test(e)?`default`:void 0}function fv(e,t){for(let n of t)if(!cv(`\\b${av(n)}\\b`,`u`).test(e))return!1;return!0}function pv(e){let n=nv.get(e);if(n!==void 0)return n;let i=e;for(;;){if(r(t.join(i,`package.json`))||r(t.join(i,`tsconfig.json`)))return nv.set(e,i),i;let n=t.dirname(i);if(n===i){nv.set(e,void 0);return}i=n}}function mv(e){let n=ev.get(e);if(n!==void 0)return n;let r=new Map;function i(e){for(let n of a(e,{withFileTypes:!0})){let a=n.name.toLowerCase();if(n.name.startsWith(`.`)&&n.name!==`.storybook`||X_.has(a))continue;let o=t.join(e,n.name);if(n.isDirectory()){i(o);continue}let s=t.extname(n.name);if(!Y_.has(s)||n.name.endsWith(`.d.ts`))continue;let c=t.basename(n.name,s).toLowerCase(),l=r.get(c);l===void 0?r.set(c,[o]):l.push(o)}}i(e);let o=new Map;for(let[e,t]of r)o.set(e,t);return ev.set(e,o),o}function hv(e,n){let r=lv(t.relative(t.dirname(e),n));return r=r.replace($_,``),r=r.replace(Q_,``),r.startsWith(`.`)||(r=`./${r}`),r}function gv(e){let n=pv(t.dirname(e)),r=lv(n===void 0?e:t.relative(n,e));for(let e of r.split(`/`))if(X_.has(e.toLowerCase()))return!0;return!1}function _v(e,n){if(gv(e))return{importStyle:void 0,matches:!1};let r=t.extname(e);if(!Y_.has(r)||e.endsWith(`.d.ts`))return{importStyle:void 0,matches:!1};let i=t.basename(e,r).toLowerCase();if(!n.fileNames.map(e=>e.toLowerCase()).includes(i))return{importStyle:void 0,matches:!1};let a=uv(e);if(!cv(`\\b${av(n.componentName)}\\b`,`u`).test(a)||n.markers!==void 0&&!fv(a,n.markers))return{importStyle:void 0,matches:!1};let o=dv(a,n.componentName);return o===void 0?{importStyle:void 0,matches:!1}:{importStyle:o,matches:!0}}function vv(e,t,n){let r=e.source.value;if(!(h(r)&&r.startsWith(`.`))||t===``)return{importStyle:void 0,matches:!1};let i=bf(r,t);return i.found?_v(i.path,n):{importStyle:void 0,matches:!1}}function yv(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 bv(e,n){let r=pv(t.dirname(e));if(r===void 0)return{found:!1};let i=mv(r),a=new Set;for(let e of n.fileNames)for(let t of i.get(e.toLowerCase())??[])a.add(t);let o=[...a].filter(e=>_v(e,n).matches);if(o.length!==1)return{found:!1};let[s]=o;if(s===void 0)return{found:!1};let c=_v(s,n);return{found:!0,importSource:hv(e,s),importStyle:c.importStyle,path:s}}const xv={componentName:`ContextStack`,fileNames:[`context-stack`],markers:[`providers`]},Sv=new Set([`.jsx`,`.tsx`]);function Cv(e){return e.openingElement.name.type===`JSXMemberExpression`&&e.openingElement.name.property.name===`Provider`}function wv(e){return e.children.filter(e=>e.type===`JSXText`?e.value.trim().length>0:e.type!==`JSXExpressionContainer`||e.expression.type!==`JSXEmptyExpression`)}function Tv(e){let{parent:t}=e;if(t.type!==`JSXElement`||!Cv(t))return!1;let n=wv(t);return n.length===1&&n[0]===e}function Ev(e){if(!Cv(e))return;let t=[e],n=e;for(;;){let e=wv(n);if(e.length!==1)break;let[r]=e;if(r?.type!==`JSXElement`||!Cv(r))break;t.push(r),n=r}return t.length>1?t:void 0}function Dv(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 Ov(e){let t=0;for(let n of e){let r=e[t+1];if(r===void 0){t+=1;continue}if(!Dv(n,r))return!1;t+=1}return!0}function kv(e,t){let n=t.getText(e.openingElement);return e.openingElement.selfClosing?n:n.endsWith(`>`)?`${n.slice(0,-1)} />`:void 0}function Av(e,t,n){let r=[];for(let e of t){let t=kv(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 jv=d(`prefer-context-stack`,`react`,{create(e){let{filename:n,sourceCode:r}=e,i=n===``?{found:!1}:bv(n,xv),a=n!==``&&_v(n,xv).matches,o=new Set;return{ImportDeclaration(e){yv(e,vv(e,n,xv),xv.componentName,o)},JSXElement(s){if(a||Tv(s))return;let c=Ev(s);if(c===void 0||o.size===0&&!i.found)return;let l=Sv.has(t.extname(n))&&o.size===1&&Ov(c),[u]=o,d=l&&u!==void 0?Av(u,c,r):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`}}),Mv=/^use[A-Z]/v;function Nv(e,t){if(e===void 0)return!1;for(let n of e.defs)if(br(n,t)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0;return!1}function Pv(e){if(typeof e!=`object`||!e)return{allowedHooks:new Set};let t=e;return{allowedHooks:new Set(y(t.allowedHooks)?t.allowedHooks:[])}}const Fv=d(`prefer-direct-hook-imports`,`react`,{create(e){let t=gr(e.options[0]),{allowedHooks:n}=Pv(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;Mv.test(o)&&(n.has(o)||Nv(S(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 Iv(e){return _(e)&&g(e.maximumStatements)?e.maximumStatements:1}function Lv(e){return e.type===`IfStatement`&&e.alternate===null}function Rv(e,t){return e.type===`ExpressionStatement`&&t===0||e.type===`BlockStatement`&&e.body.length>t}function zv(e,t){if(e.body.length!==1)return!1;let[n]=e.body;return n===void 0||!Lv(n)?!1:Rv(n.consequent,t)}const Bv=d(`prefer-early-return`,`general`,{create(e){let t=Iv(e.options[0]);function n(n){zv(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 Vv(e){return e.type===`Identifier`&&(e.name===`it`||e.name===`test`)}function Hv(e){if(e.callee.type!==`MemberExpression`||!Vv(e.callee.object))return!1;let t=x(e.callee);return t===`only`||t===`skip`}function Uv(e){return e.callee.type!==`MemberExpression`||!Vv(e.callee.object)?!1:x(e.callee)===`each`}function Wv(e){let t=e.arguments.at(-1);return t===void 0||!He(t)?void 0:t}function Gv(e){return e.type===`DoWhileStatement`||e.type===`ForInStatement`||e.type===`ForOfStatement`||e.type===`ForStatement`||e.type===`WhileStatement`}function Kv(e,t){return e.type===t.type&&e.range[0]===t.range[0]&&e.range[1]===t.range[1]}function qv(e,t){return{hasCallback:e.hasCallback||t.hasCallback,hasIndeterminate:e.hasIndeterminate||t.hasIndeterminate,hasLoop:e.hasLoop||t.hasLoop}}function Jv(e,t){if(Kv(e,t))return{hasCallback:!1,hasIndeterminate:!1,hasLoop:!1};let n={hasCallback:He(e),hasIndeterminate:He(e)||Gv(e)||e.type===`ConditionalExpression`||e.type===`IfStatement`||e.type===`SwitchCase`||e.type===`TryStatement`&&e.handler!==null,hasLoop:Gv(e)};return e.parent===null?n:qv(n,Jv(e.parent,t))}function Yv(e){return e.callee.type===`Identifier`?Vv(e.callee):Hv(e)?!0:e.callee.type===`CallExpression`&&Uv(e.callee)}function Xv(e){return Yv(e)?Wv(e):void 0}function Zv({callee:e}){return e.type!==`MemberExpression`||e.object.type!==`Identifier`||e.object.name!==`expect`?!1:x(e)===`assertions`}function Qv({callee:e}){return e.type!==`MemberExpression`||e.object.type!==`Identifier`||e.object.name!==`expect`?!1:x(e)===`hasAssertions`}function $v(e,t=[]){return e.callee.type===`Identifier`&&(e.callee.name===`expect`||t.includes(e.callee.name))}function ey(e,t=[]){let n=0,r=!1,i=!1,a=!1,o=0;return eo(e,s=>{if(s.type!==`CallExpression`||!$v(s,t))return;let c=Jv(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 ty(e){return Array.isArray(e)?e.filter(h):[]}function ny(e){return _(e)?{additionalAssertionFunctions:ty(e.additionalAssertionFunctions),additionalExpectCallNames:ty(e.additionalExpectCallNames),onlyFunctionsWithAsyncKeyword:e.onlyFunctionsWithAsyncKeyword===!0,onlyFunctionsWithExpectInCallback:e.onlyFunctionsWithExpectInCallback===!0,onlyFunctionsWithExpectInLoop:e.onlyFunctionsWithExpectInLoop===!0}:{additionalAssertionFunctions:[],additionalExpectCallNames:[],onlyFunctionsWithAsyncKeyword:!1,onlyFunctionsWithExpectInCallback:!1,onlyFunctionsWithExpectInLoop:!1}}function ry(e){return[...new Set([...e.additionalExpectCallNames,...e.additionalAssertionFunctions])]}function iy(e){return e.onlyFunctionsWithAsyncKeyword||e.onlyFunctionsWithExpectInCallback||e.onlyFunctionsWithExpectInLoop}function ay(e){return e.body??void 0}function oy(e){let t=ay(e);return t?.type===`BlockStatement`?t:void 0}function sy(e,t,n,r,i,a){return n+r===0?!1:!iy(t)||t.onlyFunctionsWithAsyncKeyword&&e.async||t.onlyFunctionsWithExpectInCallback&&i||t.onlyFunctionsWithExpectInLoop&&a}function cy(e){let t=oy(e);if(t===void 0)return;let[n]=t.body;if(n?.type===`ExpressionStatement`&&n.expression.type===`CallExpression`)return n.expression}function ly(e,t,n,r,i){let a=oy(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();
38
+ `)},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 uy(e,t,n,r){if(Qv(t)){t.arguments.length>0&&e.report({messageId:`hasAssertionsTakesNoArguments`,node:t});return}if(!Zv(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`||!We(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 dy=d(`prefer-expect-assertions`,`general`,{create(e){let t=ny(e.options[0]);return{CallExpression(n){if(!Yv(n))return;let r=Xv(n);if(r===void 0)return;let i=ay(r);if(i===void 0)return;let{deterministic:a,indeterminate:o,hasIndeterminate:s,hasExpectInCallback:c,hasExpectInLoop:l}=ey(i,ry(t));if(!sy(r,t,a,o,c,l))return;let u=cy(r);if(u!==void 0&&(Zv(u)||Qv(u))){if(uy(e,u,a,s),Qv(u)&&u.arguments.length===0&&a>0&&!s){let[t]=oy(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}ly(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 fy(e){if(!(_(e)&&`additionalHoistableComponents`in e))return new Set;let{additionalHoistableComponents:t}=e;return t===void 0||!y(t)?new Set:new Set(t)}function py(e){if(!(_(e)&&`additionalStaticFactories`in e))return new Set;let{additionalStaticFactories:t}=e;return t===void 0||!y(t)?new Set:new Set(t)}function my(e){let t=e;for(;t.type===`JSXMemberExpression`;)t=t.object;return t.type===`JSXIdentifier`?t.name:void 0}function hy(e,t,n){let r=S(e.sourceCode.getScope(t),n);if(r===void 0||!q(r.scope))return!1;if(J(r))return!0;for(let e of r.defs)if(e.type===`FunctionName`||e.type===`ClassName`||Cd(e)!==void 0)return!0;return!1}function gy(e,t,n){let r=S(e.sourceCode.getScope(t),n);return r!==void 0&&J(r)}function _y(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=my(i);if(a===void 0)return!1;let o=S(e.sourceCode.getScope(t),a),s=i.type===`JSXMemberExpression`;return n.has(a)?o===void 0?!s:s?gy(e,t,a):hy(e,t,a):r===`standard`?s?gy(e,t,a):hy(e,t,a):!1}function vy(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:Ed(e.sourceCode,a.expression,new Set)?i===`standard`:Y(e.sourceCode,a.expression,n,r)}function yy(e,t,n,r,i){for(let a of t.attributes)if(a.type===`JSXSpreadAttribute`||!vy(e,a,new Set(n),r,i))return!1;return!0}function by(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 Sy(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 Sy(e,t.expression,new Set(n),r,i,a);if(t.expression.type===`Identifier`){let o=wd(e.sourceCode,t.expression);if(o!==void 0){let t=b(o);if(t.type===`JSXElement`||t.type===`JSXFragment`)return Sy(e,t,new Set(n),r,i,a)}}return Y(e.sourceCode,t.expression,new Set(n),i)}function xy(e,t,n,r,i,a){for(let o of t.children)if(!by(e,o,new Set(n),r,i,a))return!1;return!0}function Sy(e,t,n,r,i,a){return n.has(t)?!1:(n.add(t),(t.type===`JSXFragment`||_y(e,t,r,a)&&yy(e,t.openingElement,n,i,a))&&xy(e,t,n,r,i,a))}function Cy(e,t,n,r,i){let{parent:a}=t;for(;a.type!==`Program`;){if((a.type===`JSXElement`||a.type===`JSXFragment`)&&Sy(e,a,new Set,n,r,i))return!0;({parent:a}=a)}return!1}function wy(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 Ty(e,t){return e.type===`JSXElement`||e.type===`JSXFragment`||e.type===`JSXExpressionContainer`&&e.expression===t}function Ey(e,t){let n=t,{parent:r}=n;for(;wy(r,n)||Ty(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=S(e.sourceCode.getScope(n),r.id.name);return i!==void 0&&q(i.scope)}function Dy(e,t){let n=e.sourceCode.getText(t);e.report({data:{elementText:n},messageId:`hoistableJsxElement`,node:t})}const Oy=d(`prefer-hoisted-jsx-elements`,`react`,{create(e){let[t]=e.options,n=fy(t),r=py(t),i=F(t),a={staticCallsRequireFactories:!0,staticGlobalFactories:new Set([...i===`roblox-ts`?vd:[],...r])};function o(t){Sy(e,t,new Set,n,a,i)&&(Ey(e,t)||Cy(e,t,n,a,i)||Dy(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`}}),ky={staticGlobalFactories:new Set(vd)};function Ay(e){let{value:t}=e;if(t?.type===`JSXExpressionContainer`&&t.expression.type!==`JSXEmptyExpression`)return t.expression}function jy(e,t){let n=t;for(;;){let{parent:r}=n;if(r===null)return!1;if(r.type===`VariableDeclarator`)return Ny(e,t,r,n);let i=My(r);if(i===void 0)return!1;n=i}}function My(e){if(e.type===`JSXElement`||e.type===`JSXFragment`||e.type===`JSXExpressionContainer`||e.type===`ParenthesizedExpression`||e.type===`ArrayExpression`)return e}function Ny(e,t,n,r){if(n.id.type!==`Identifier`||n.init!==r)return!1;let i=S(e.sourceCode.getScope(t),n.id.name);return i!==void 0&&q(i.scope)}function Py(e,t){let n=e.sourceCode.getText(t);e.report({data:{objectText:n},messageId:`hoistableObjectProp`,node:t})}function Fy(e,t){if(t.properties.some(e=>e.type===`Property`&&e.computed))return;let n=new Set;if(Y(e.sourceCode,t,n,ky)){Py(e,t);return}for(let n of t.properties){if(n.type!==`Property`)continue;let t=b(n.value);t.type===`ObjectExpression`&&Fy(e,t)}}const Iy=d(`prefer-hoisted-jsx-object-properties`,`react`,{create(e){return{JSXAttribute(t){let n=Ay(t);if(n===void 0)return;let r=b(n);if(r.type!==`ObjectExpression`)return;let i=t.parent;if(i.type!==`JSXOpeningElement`)return;let a=i.parent;a.type===`JSXElement`&&jy(e,a)||Fy(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 Ly({type:e}){return e===`Identifier`||e===`MemberExpression`||e===`CallExpression`||e===`NewExpression`||e===`ThisExpression`}function Ry(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function zy(e){return b(e).type===`Literal`}function By(e){let t=b(e);if(t.type!==`Literal`||typeof t.value!=`number`)return;let{value:n}=t;if(!(n>0&&n<1))return;let r=1/n;return Number.isInteger(r)?r:void 0}function Vy(e,t){let n=e.getText(Ry(t));return Ly(b(t))?n:`(${n})`}const Hy=d(`prefer-idiv`,`roblox`,{createOnce(e){return{CallExpression(t){if(t.optional)return;let n=b(t.callee);if(n.type!==`MemberExpression`||n.optional||x(n)!==`floor`)return;let r=b(n.object);if(r.type!==`Identifier`||r.name!==`math`||w(e.sourceCode,r,`math`)||t.arguments.length!==1)return;let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`)return;let a=b(i);if(a.type!==`BinaryExpression`)return;let o,s;if(a.operator===`/`)o=a.left,s=e.sourceCode.getText(Ry(a.right));else if(a.operator===`*`){let e=By(a.right);if(e!==void 0&&!zy(a.left))o=a.left,s=String(e);else{let e=By(a.left);if(e===void 0||zy(a.right))return;o=a.right,s=String(e)}}else return;e.report({fix:n=>n.replaceText(t,`${Vy(e.sourceCode,o)}.idiv(${s})`),messageId:`useIdiv`,node:t})}}},meta:{docs:{description:`Prefer .idiv() for integer division instead of math.floor(x / y) or math.floor(x * 0.5).`,recommended:!0},fixable:`code`,messages:{useIdiv:`Use .idiv() instead of math.floor(x / y) or math.floor(x * 0.5) for integer division.`},schema:[],type:`suggestion`}}),Uy={componentName:`Portal`,fileNames:[`portal`],markers:[`target`]},Wy=new Set([`@rbxts/react-roblox`,`react-dom`]),Gy=new Set([`.jsx`,`.tsx`]);function Ky(e){return e.type===`ImportBinding`}function qy(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function Jy(e){if(e===void 0)return!1;for(let t of e.defs){if(!Ky(t)||t.node.type!==`ImportSpecifier`)continue;let e=qy(t.node);if(e===void 0||!Wy.has(e.source.value))continue;let{imported:n}=t.node;if(n.type===`Identifier`&&n.name===`createPortal`)return!0}return!1}function Yy(e){if(e===void 0)return!1;for(let t of e.defs){if(!Ky(t)||t.node.type!==`ImportNamespaceSpecifier`)continue;let e=qy(t.node);if(e!==void 0&&Wy.has(e.source.value))return!0}return!1}function Xy(e,{callee:t}){return t.type===`Identifier`?Jy(S(e.getScope(t),t.name)):t.type!==`MemberExpression`||t.computed||t.property.type!==`Identifier`||t.property.name!==`createPortal`||t.object.type!==`Identifier`?!1:Yy(S(e.getScope(t.object),t.object.name))}function Zy(e,t){return e.type===`JSXElement`||e.type===`JSXFragment`?t.getText(e):`{${t.getText(e)}}`}function Qy(e,t,n){if(t.arguments.length!==2)return;let[r,i]=t.arguments;if(r===void 0||i===void 0)return;let a=Zy(r,n);return`<${e} target={${n.getText(i)}}>${a}</${e}>`}const $y=d(`prefer-local-portal-component`,`react`,{create(e){let{filename:n,sourceCode:r}=e,i=n===``?{found:!1}:bv(n,Uy),a=n!==``&&_v(n,Uy).matches,o=new Set;return{CallExpression(s){if(a||!Xy(r,s)||s.arguments.length!==2||!(o.size>0||i.found))return;let c=Gy.has(t.extname(n))&&o.size===1,[l]=o,u=c&&l!==void 0?Qy(l,s,r):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){yv(e,vv(e,n,Uy),Uy.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 eb(e){return e===void 0?!1:e.type===`TSTypeAnnotation`?eb(e.typeAnnotation):e.type===`TSNumberKeyword`||e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&e.typeName.name===`Number`}function tb(e){return e.type!==`PrivateIdentifier`}function nb(e){let t=b(e);return t.type===`Literal`&&!g(t.value)}function rb(e){if(e.type===`Parameter`){let t=e.name;if(t.typeAnnotation!==void 0&&t.typeAnnotation!==null)return!eb(t.typeAnnotation);let{parent:n}=t;return n.type===`AssignmentPattern`&&nb(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?!eb(t.typeAnnotation):n!==null&&nb(n)}function ib(e,t){let n=S(e.getScope(t),t.name);if(n===void 0)return!1;for(let e of n.defs)if(rb(e))return!0;return!1}function ab(e,t){if(t.type===`ParenthesizedExpression`)return ab(e,t.expression);if(t.type===`TSAsExpression`||t.type===`TSTypeAssertion`)return!eb(t.typeAnnotation);if(nb(t))return!0;let n=b(t);return n.type===`Identifier`&&ib(e,n)}function ob(e,t){return e.getText(b(t))}function sb(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function cb(e,t){let n=sb(t);return n.type===`SequenceExpression`?`(${e.getText(n)})`:e.getText(n)}function lb(e,t){if(t.test.type!==`BinaryExpression`)return;let{alternate:n,consequent:r,test:i}=t,{left:a,operator:o,right:s}=i;if(!(tb(a)&&tb(s))||!(L(a)&&L(s))||ab(e,a)||ab(e,s))return;let c=ob(e,a),l=ob(e,s),u=ob(e,n),d=ob(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 ub=d(`prefer-math-min-max`,`roblox`,{create(e){let{sourceCode:t}=e;return{ConditionalExpression(n){if(w(t,n,`math`))return;let r=lb(t,n);if(r===void 0||n.test.type!==`BinaryExpression`)return;let{left:i,right:a}=n.test;if(!(tb(i)&&tb(a)))return;let o=cb(t,i),s=cb(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`}}),db=new Set([`ReadonlyRecord`,`Record`]);function fb(e){return e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&db.has(e.typeName.name)}function pb(e){if(e.id.type!==`Identifier`)return;let t=ce(e.id);if(t===void 0)return;let{typeAnnotation:n}=t;if(!fb(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 mb(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 hb=d(`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(!mb(n.init))return;let i=pb(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`}}),gb=/^[A-Z][A-Z0-9_]*$/u;function _b(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 vb=d(`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`||!gb.test(r.name))){if(!t){e.report({messageId:`mustUseConst`,node:n});return}_b(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`}}),yb=new Set([`end`,`loc`,`parent`,`range`,`start`]),bb=new Set([`.jsx`,`.tsx`]),xb=new Set([`PaddingBottom`,`PaddingLeft`,`PaddingRight`,`PaddingTop`]),Sb={componentName:`DirectionalPadding`,fileNames:[`directional-padding`],markers:[`horizontal`,`vertical`]},Cb={componentName:`EqualPadding`,fileNames:[`equal-padding`],markers:[`padding`]};function wb(e,t){return Object.is(e,t)?!0:Array.isArray(e)?Array.isArray(t)&&Tb(e,t):Array.isArray(t)||typeof e!=`object`||typeof t!=`object`||e===null||t===null||!(_(e)&&_(t))?!1:Eb(e,t)}function Tb(e,t){if(e.length!==t.length)return!1;let n=0;for(let r of e)if(!wb(r,t[n++]))return!1;return!0}function Eb(e,t){let n=Object.entries(e).filter(([e])=>!yb.has(e)),r=Object.entries(t).filter(([e])=>!yb.has(e));if(n.length!==r.length)return!1;for(let[e,r]of n)if(!(e in t)||!wb(r,t[e]))return!1;return!0}function Db(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 Ob({value:e}){if(e!==null){if(e.type===`JSXExpressionContainer`)switch(e.expression.type){case`JSXElement`:case`JSXEmptyExpression`:case`JSXFragment`:return;default:return b(e.expression)}return e.type===`Literal`?e:void 0}}function kb(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(!xb.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 Ab({value:e},t){if(e!==null)switch(e.type){case`JSXExpressionContainer`:case`Literal`:return t.getText(e);default:return}}function jb(e,t,n,r){let i=Ab(n.paddingTop,r);if(i===void 0)return;if(t===`preferEqualPadding`)return`<${e} padding=${i} />`;let a=Ab(n.paddingLeft,r);if(a!==void 0)return`<${e} horizontal=${i} vertical=${a} />`}function Mb(e){let t=Ob(e.paddingBottom),n=Ob(e.paddingLeft),r=Ob(e.paddingRight),i=Ob(e.paddingTop);if(t===void 0||n===void 0||r===void 0||i===void 0)return;if(wb(i,t)&&wb(i,n)&&wb(i,r))return`preferEqualPadding`;let a=wb(i,t),o=wb(n,r);return a&&o?`preferDirectionalPadding`:void 0}function Nb(e){return e.type===`JSXIdentifier`}const Pb=d(`prefer-padding-components`,`react`,{create(e){let{filename:n}=e,r=n===``?{found:!1}:bv(n,Sb),i=n===``?{found:!1}:bv(n,Cb),a=n!==``&&_v(n,Sb).matches,o=n!==``&&_v(n,Cb).matches,s=new Set,c=new Set;return{ImportDeclaration(e){let t=vv(e,n,Sb),r=vv(e,n,Cb);yv(e,t,Sb.componentName,s),yv(e,r,Cb.componentName,c)},JSXElement(l){if(Db(l))return;let{openingElement:u}=l;if(!Nb(u.name)||u.name.name!==`uipadding`)return;let d=kb(u);if(d===void 0)return;let f=Mb(d);if(f===void 0||(f===`preferEqualPadding`?o:a))return;let p=f===`preferEqualPadding`?c:s,m=f===`preferEqualPadding`?i:r;if(p.size===0&&!m.found)return;let h=bb.has(t.extname(n))&&p.size===1,[g]=[...p],_=h&&g!==void 0?jb(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 Fb(e){return e>=`0`&&e<=`9`}function Ib(e){return e>=`a`&&e<=`z`}function Lb(e){return e>=`A`&&e<=`Z`}function Rb(e){return Fb(e)||Ib(e)||Lb(e)}function zb(e,t,n){return Fb(e)!==Fb(t)||Ib(e)&&Lb(t)?!0:Lb(e)&&Lb(t)&&n!==void 0&&Ib(n)}function Bb(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;zb(t.charAt(r-1),t.charAt(r),i)&&(e.push(t.slice(n,r)),n=r)}e.push(t.slice(n))}function Vb(e){let t=[],n;for(let r=0;r<e.length;r+=1){if(Rb(e.charAt(r))){n??=r;continue}let i=e.codePointAt(r);if(i===void 0||i>127)return;n!==void 0&&(Bb(t,e.slice(n,r)),n=void 0)}return n!==void 0&&Bb(t,e.slice(n)),t}function Hb(e){let t=Vb(e);if(t===void 0)return;let n=``;for(let e of t)e.length!==0&&(n+=`${e.slice(0,1).toUpperCase()}${e.slice(1).toLowerCase()}`);return n}const Ub=/^\d/u;function Wb(e){if(e.id.type===`Identifier`)return e.id.name;if(!(e.id.type!==`Literal`||!h(e.id.value)))return Ub.test(e.id.value)?void 0:e.id.value}const Gb=d(`prefer-pascal-case-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration(t){let n=t.id.name,r=Hb(n);r!==void 0&&r!==n&&e.report({data:{identifier:n},messageId:`notPascalCase`,node:t.id})},TSEnumMember(t){let n=Wb(t);if(n===void 0)return;let r=Hb(n);r!==void 0&&r!==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 Kb(e,t){return We(e)&&e.value===t}function qb(e){if(e===`ColorSequence`)return`ColorSequenceKeypoint`;if(e===`NumberSequence`)return`NumberSequenceKeypoint`}function Jb(e,t,n){if(e.type!==`NewExpression`||!Ie(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 Kb(r,n)?i:void 0}function Yb(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 Xb(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=Jb(a,r,0),c=Jb(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 Zb=d(`prefer-sequence-overloads`,`roblox`,{createOnce(e){return{NewExpression(t){if(t.callee.type!==`Identifier`)return;let n=t.callee.name,r=qb(n);if(r===void 0)return;let i=Yb(e,t,n)??Xb(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 Qb(e){return e.length===2}function $b(e){return e.type===`MemberExpression`&&!e.computed}function ex(e,t){if(e.type!==`CallExpression`)return!1;let{callee:n}=e;if(!$b(n)||n.property.name!==t||!Qb(e.arguments))return!1;let[r,i]=e.arguments;return r.type!==`SpreadElement`&&i.type!==`SpreadElement`}function tx(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||!ex(i,t))return;let{callee:a}=i;if(!$b(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 nx=new Set([`ConditionalExpression`,`DoWhileStatement`,`ForStatement`,`IfStatement`,`WhileStatement`]);function rx(e){return _(e)&&`parent`in e}function ix(e){return _(e)&&h(e.type)?e.type:void 0}function ax(e){return _(e)&&h(e.operator)?e.operator:void 0}function ox(e){return ix(e)===`LogicalExpression`&&ax(e)===`&&`}function sx(e){return _(e)&&e.type===`Identifier`&&h(e.name)}function cx(e){let{parent:t}=e;if(ox(t))return!0;let n=ix(t);if(n===void 0||!nx.has(n))return!1;let r=e;for(;r!==void 0&&r!==t&&rx(r);){let e=r.parent;if(ox(e))return!0;r=e}return!1}function lx(e){if(e.isWrite())return!1;let{identifier:t}=e;return sx(t)?cx(t):!1}function ux(e,t,n){return S(n.getScope(t),e)?.references.some(lx)??!1}function dx(e,t){return e.every(e=>ux(e.variableName,e.variableDeclaration,t))}const fx=/^[\s;]*$/u;function px(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 fx.test(a)}function mx(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));hx(e,t,`const ${o.length===1?o[0]:`[${o.join(`, `)}]`} = ${i}.get(${a}, ${s.join(`, `)});`,`preferSingleGet`,n)}function hx(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 gx(e,t){if(e.length<2)return;let{sourceCode:n}=t;if(!dx(e,n))return;let[r]=e;r!==void 0&&hx(e,t,`const hasAll = ${n.getText(r.worldNode)}.has(${n.getText(r.entityNode)}, ${e.map(e=>n.getText(e.componentNode)).join(`, `)});`,`preferSingleHas`,r)}const _x=d(`prefer-single-world-query`,`roblox`,{create(e){let{sourceCode:t}=e,n=[],r=[];function i(){n.length>=2&&mx(n,e),n=[]}function a(){r.length>=2&&gx(r,e),r=[]}function o(){i(),a()}return{":statement:not(VariableDeclaration[kind='const'])":o,"Program:exit":o,"VariableDeclaration[kind='const']"(e){let s=tx(e,`get`);if(s!==void 0){let e=n.at(-1);e!==void 0&&!px(e,s,t)&&i(),n.push(s),a();return}let c=tx(e,`has`);if(c!==void 0){let e=r.at(-1);e!==void 0&&!px(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`}}),vx=new Set([`alumni`,`axes`,`cacti`,`children`,`criteria`,`data`,`dice`,`feet`,`fungi`,`geese`,`indices`,`matrices`,`media`,`men`,`mice`,`octopi`,`people`,`phenomena`,`teeth`,`vertices`,`women`]),yx=new Set([`alias`,`analysis`,`axis`,`basis`,`business`,`class`,`crisis`,`glass`,`news`,`series`,`species`,`status`,`thesis`]),bx=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`]),xx=/[A-Z]+(?![a-z])|[A-Z]?[a-z]+|\d+/gu,Sx=/^[A-Z]{2,}[sS]?$/u;function Cx(e){let t=[],n=0;for(let r of e.split(`_`)){let e=r.match(xx);if(e!==null)for(let r of e)t[n++]=r}return t}const wx=/^\d+$/u;function Tx(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(!(n===void 0||wx.test(n)))return{lowercased:n.toLowerCase(),original:n}}}const Ex=/[sS]$/u,Dx=/(?:ches|shes|xes|zes)$/u;function Ox(e,t){return vx.has(e)||bx.has(e)?!0:yx.has(e)?!1:Sx.test(t)&&Ex.test(t)||e.endsWith(`ies`)||e.endsWith(`ves`)||Dx.test(e)||e.endsWith(`s`)&&!e.endsWith(`ss`)&&!e.endsWith(`us`)&&!e.endsWith(`is`)}function kx(e){if(Sx.test(e)&&Ex.test(e))return!0;let t=Tx(Cx(e));return t!==void 0&&Ox(t.lowercased,t.original)}const Ax=d(`prefer-singular-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration({id:t}){let{name:n}=t;kx(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 jx(e){return e.type===`JSXElement`||e.type===`JSXFragment`}function Mx(e,t,n){return e.type===`Super`||t.type===`Super`?e.type===`Super`&&t.type===`Super`:Fx(e,t,n)}function Nx(e,t,n){return e.type===`SpreadElement`||t.type===`SpreadElement`?e.type!==`SpreadElement`||t.type!==`SpreadElement`?!1:Fx(e.argument,t.argument,n):Fx(e,t,n)}function Px(e,t,n){return e.type===`PrivateIdentifier`||t.type===`PrivateIdentifier`?e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`&&e.name===t.name:Fx(e,t,n)}function Fx(e,t,n){let r=b(e),i=b(t);if(r.type!==i.type)return!1;switch(r.type){case`BinaryExpression`:return i.type===`BinaryExpression`&&Ix(r,i,n);case`CallExpression`:return i.type===`CallExpression`&&Lx(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`&&Rx(r,i,n);case`MemberExpression`:return i.type===`MemberExpression`&&zx(r,i,n);case`ThisExpression`:return i.type===`ThisExpression`;case`UnaryExpression`:return i.type===`UnaryExpression`&&r.operator===i.operator&&Fx(r.argument,i.argument,n);default:return n.getText(r)===n.getText(i)}}function Ix(e,t,n){return e.operator===t.operator&&Px(e.left,t.left,n)&&Px(e.right,t.right,n)}function Lx(e,t,n){if(e.optional!==t.optional||!Mx(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||!Nx(i,a,n))return!1}return!0}function Rx(e,t,n){return e.operator===t.operator&&Fx(e.left,t.left,n)&&Fx(e.right,t.right,n)}function zx(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!Mx(e.object,t.object,n)?!1:e.computed?Px(e.property,t.property,n):Bx(e.property,t.property)}function Bx(e,t){return(e.type===`Identifier`&&t.type===`Identifier`||e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`)&&e.name===t.name}function Vx(e){let t=b(e);if(t.type===`UnaryExpression`&&t.operator===`!`)return b(t.argument)}function Hx(e){let t=b(e);if(t.type===`BinaryExpression`&&(t.operator===`===`||t.operator===`!==`))return{left:t.left,operator:t.operator,right:t.right}}function Ux(e){let t=b(e);return t.type===`Identifier`||t.type===`ThisExpression`||t.type===`Literal`}function Wx(e){return rt(e)&&Ux(e)}function Gx(e,t,n){let r=Vx(e);if(r&&Fx(r,t,n))return{isFixSafe:Ux(r)};let i=Vx(t);if(i&&Fx(i,e,n))return{isFixSafe:Ux(i)};let a=Hx(e),o=Hx(t);if(!(a&&o)||!(a.operator===`===`&&o.operator===`!==`||a.operator===`!==`&&o.operator===`===`))return;let s=Px(a.left,o.left,n)&&Px(a.right,o.right,n),c=Px(a.left,o.right,n)&&Px(a.right,o.left,n);if(s||c)return{isFixSafe:Wx(a.left)&&Wx(a.right)&&Wx(o.left)&&Wx(o.right)}}function Kx(e){return e.type===`JSXText`&&e.value.trim()===``}function qx(e){if(e.type===`JSXExpressionContainer`&&e.expression.type!==`JSXEmptyExpression`&&e.expression.type===`LogicalExpression`&&e.expression.operator===`&&`&&jx(e.expression.right))return{condition:e.expression.left,logical:e.expression,node:e,renderBranch:e.expression.right}}const Jx=d(`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||!Kx(t))break;n+=1}let r=e[n];return r===void 0?void 0:qx(r)}function r(n,r){let i=Gx(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=qx(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 Yx(e){return e.type===`PrivateIdentifier`}function Xx(e){return e===`+`||e===`-`||e===`*`||e===`/`||e===`%`}function Zx(e){return e.type===`BinaryExpression`&&Xx(e.operator)&&!Yx(e.left)&&!Yx(e.right)}function Qx(e){switch(e.type){case`BinaryExpression`:{if(!Zx(e))return;let{left:t,right:n}=e,r=Qx(t),i=Qx(n);return r===void 0||i===void 0?void 0:`${r} ${e.operator} ${i}`}case`Identifier`:return e.name;case`Literal`:return te(e.value)?String(e.value):void 0;case`UnaryExpression`:{let t=Qx(e.argument);return t===void 0||e.operator!==`+`&&e.operator!==`-`?void 0:`${e.operator}${t}`}default:return}}function $x(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 eS(e){switch(e.type){case`BinaryExpression`:{if(!Zx(e))return;let{left:t,right:n}=e,r=eS(t),i=eS(n);return r===void 0||i===void 0?void 0:$x(e.operator,r,i)}case`Identifier`:return;case`Literal`:return Number(e.value);case`UnaryExpression`:{let t=eS(e.argument);return t===void 0?void 0:e.operator===`+`?t:e.operator===`-`?-t:void 0}default:return}}function tS(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=Qx(t),o=Qx(n),s=Qx(r),c=Qx(i);if(a!==void 0&&o!==void 0&&s!==void 0&&c!==void 0)return{offsetXText:o,offsetYText:c,scaleXText:a,scaleYText:s}}const nS=d(`prefer-udim2-shorthand`,`roblox`,{create(e){return{NewExpression(t){if(!Ie(t,`UDim2`))return;let n=tS(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=eS(r),c=eS(i),l=eS(a),u=eS(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 rS(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)fu(t.init,`useState`)&&(r+=1);r<5||e.report({data:{componentName:n,useStateCount:String(r)},messageId:`excessiveUseState`,node:t})}const iS=d(`prefer-use-reducer`,`react`,{create(e){return{FunctionDeclaration(t){t.id===null||!K(t.id.name)||`body`in t&&t.body&&rS(e,t.body,t.id.name)},VariableDeclarator(t){pu(t)&&t.init&&`body`in t.init&&t.init.body&&`name`in t.id&&rS(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`}}),aS=`replace`,oS=`suggestion`,sS=`A more descriptive name will do too.`,cS={args:`parameters`,char:`character`,dt:`deltaTime`,plr:`player`},lS=[`char`],uS={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}},dS={EmberENV:!0,defaultProps:!0,devDependencies:!0,getDerivedStateFromProps:!0,getInitialProps:!0,getServerSideProps:!0,getStaticProps:!0,iOS:!0,obj:!0,propTypes:!0,setupFilesAfterEnv:!0},fS=[`i18n`,`l10n`],pS=/(?=[A-Z])|(?<=[_.-])/u,mS=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(`.`)),hS=/^[A-Za-z]+$/u;function gS(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95}function _S(e){return e<192?gS(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 vS(e){return!!(_S(e)||e>=48&&e<=57||e===8204||e===8205||e>=768&&e<=865||e>=8240&&e<=8266)}function yS(e){if(e.length===0||mS.has(e))return!1;let t=e.codePointAt(0);if(t===void 0||!_S(t))return!1;let n=t>65535?2:1;for(;n<e.length;){let t=e.codePointAt(n);if(t===void 0||!vS(t))return!1;n+=t>65535?2:1}return!0}function bS(e){let t=[e],n=1;for(let r of e.childScopes){let e=bS(r);for(let r of e)t[n++]=r}return t}function xS(e,t){return!t.some(t=>S(t,e)!==void 0)}function SS(e,t,n){let r=e;if(!(!yS(r)&&(r=`${r}_`,!yS(r)))){for(;!(xS(r,t)&&n(r,t));)r=`${r}_`;return r}}function CS(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 wS(e,t){return e.range[0]===t.range[0]&&e.range[1]===t.range[1]}function TS(e){let{parent:t}=e;return!ye(t)||t.local!==e?!1:wS(t.local,t.imported)}function ES(e){let{parent:t}=e;return!be(t)||t.local!==e?!1:wS(t.local,t.exported)}function DS(e){if(!O(e))return!1;let{parent:t}=e;return xe(t)&&t.shorthand&&t.value===e}function OS(e){if(!O(e))return!1;let{parent:t}=e;if(!$e(t)||t.left!==e)return!1;let n=t.parent;return xe(n)?n.shorthand:!1}function kS(e){if(!O(e))return!1;let{parent:t}=e;if(Ae(t)&&t.local===e||je(t)&&t.local===e)return!0;if(ye(t)&&t.local===e){let{imported:e}=t;if(k(e)&&e.name==="default")return!0}return D(t)&&t.id===e&&t.init!==null&&tt(t.init)}function AS(e){if(!O(e))return!1;let{parent:t}=e;if(D(t)&&t.id===e){let e=t.parent;return Me(e)?Ne(e.parent):!1}return Pe(t)&&t.id===e||Le(t)&&t.id===e||Re(t)&&t.id===e?Ne(t.parent):!1}function jS(e){return CS(e).every(e=>!(AS(e)||he(e)))}function MS(e,t,n){if(O(e))return DS(e)||OS(e)?n.replaceText(e,`${e.name}: ${t}`):TS(e)?n.replaceText(e,`${e.name} as ${t}`):ES(e)?n.replaceText(e,`${t} as ${e.name}`):n.replaceText(e,t)}function NS(e,t,n){let r=[],i=0;for(let a of CS(e)){let e=MS(a,t,n);e!==void 0&&(r[i++]=e)}return r}function PS(e){if(!O(e))return!1;let{parent:t}=e;if(j(t)&&t.property===e&&!t.computed){let e=t.parent;if(Se(e)&&e.left===t)return!0}return xe(t)&&t.key===e&&!t.computed&&!t.shorthand&&(qe(t.parent)||Je(t.parent))||ze(t)&&t.key===e&&!t.computed||be(t)&&t.exported===e&&t.local!==e?!0:(Oe(t)||ke(t))&&t.key===e&&!t.computed}function FS(e){if(!O(e))return!1;let{parent:t}=e;return xe(t)&&t.key===e&&!t.computed&&!t.shorthand&&(qe(t.parent)||Je(t.parent))}function IS(e){if(e.type===`ImportBinding`){let{parent:t}=e;if(t!==null&&_e(t)&&A(t.source))return t.source.value}if(e.type===`Variable`){let{node:t}=e;if(D(t)&&t.init!==null&&tt(t.init)){let[e]=t.init.arguments;if(e!==void 0&&A(e))return e.value}}}function LS(e){let t=IS(e);return t!==void 0&&!t.includes(`node_modules`)&&(t.startsWith(`.`)||t.startsWith(`/`))}function RS(e,t){return e===!1?!1:e!==`internal`||LS(t)}function zS(e){return e.defs.length===1&&e.defs[0]?.type===`ClassName`}const BS=/^(?:[#$./]|[~@]\/)/u;function VS(e){return!BS.test(e)}function HS(e){if(e?.type!==`ImportBinding`)return!1;let{parent:t}=e;return t===null||!_e(t)||!A(t.source)?!1:VS(t.source.value)}function US(e){if(e.type===`Identifier`)return e;if(e.type===`TSQualifiedName`)return US(e.left)}function WS(e,t){if(e.type===`TSImportType`)return VS(e.source.value);if(e.type!==`TSTypeReference`)return!1;let n=US(e.typeName);if(n===void 0)return!1;let r=S(t.getScope(n),n.name)?.defs[0];return HS(r)}function GS(e){let{parent:t}=e;if(D(t)&&t.init===e)return ce(t.id)?.typeAnnotation;if((t.type===`TSAsExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`)&&t.expression===e)return t.typeAnnotation}function KS(e){if(k(e))return e;if(j(e))return KS(e.object);if(Ue(e))return KS(e.left)}function qS(e,t){let{parent:n}=e,r;if(j(n)&&n.property===e&&!n.computed?r=n.object:Ue(n)&&n.right===e&&(r=n.left),r===void 0)return!1;let i=k(r)?r:KS(r);return i===void 0||!O(i)?!1:S(t.getScope(e),i.name)?.defs[0]?.type===`ImportBinding`}function JS(e,t){let n=e.parent;if(!ve(n))return!1;let{callee:r}=n;if(!k(r))return!1;let i=S(t.getScope(r),r.name)?.defs[0];return HS(i)}function YS(e,t){if(qS(e,t))return!0;if(!FS(e))return!1;let n=e.parent.parent;if(n===null||!qe(n))return!1;let r=GS(n);return r!==void 0&&WS(r,t)||JS(n,t)}function XS(e,t,n){return e?t:n}const ZS=/[.+^${}()|[\]\\]/gu,QS=/^\/(?<first>.+)\/(?<second>[dgimsuvy]*)$/u,$S=new WeakMap,eC=new WeakMap;function tC(e){return e===e.toUpperCase()}function nC(e){return tC(e.charAt(0))}function rC(e){return e.charAt(0).toUpperCase()+e.slice(1)}function iC(e){return e.charAt(0).toLowerCase()+e.slice(1)}function aC(e){return e.includes(`u`)||e.includes(`v`)?e:`${e}u`}function oC(e){return e===void 0?3:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:3}function sC(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 cC(e){if(e.length<2)return[e];let t=[],n=0,r=oC(e.codePointAt(0));for(let i=1;i<e.length;i+=1){let a=oC(e.codePointAt(i)),o=oC(e.codePointAt(i+1));sC(r,a,o)&&(t.push(e.slice(n,i)),n=i),r=a}return t.push(e.slice(n)),t}const lC=/\$\d+/gu;function uC(e){let t=e.match(lC);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 dC(e){let t=uC(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 fC(e){let t=[],n=[],r=0;for(let[i,a]of e)a&&(t[r]=iC(i),n[r]=rC(i),r+=1);return{lowerFirst:t.toSorted((e,t)=>e.localeCompare(t)),upperFirst:n.toSorted((e,t)=>e.localeCompare(t))}}function pC(e,t){if(e.startsWith(`/`)){let n=QS.exec(e);if(n?.groups!==void 0)return{matcher:{original:e,pattern:RegExp(`^${n.groups.first}$`,aC(n.groups.second??``)),replacement:t,replacementPatterns:dC(t)},type:`pattern`}}if(e.includes(`*`)||e.includes(`?`)){let n=e.replaceAll(ZS,String.raw`\$&`).replaceAll(`*`,`(.*)`).replaceAll(`?`,`(.)`),r=0,i=t.replaceAll(`*`,()=>`$${++r}`);return{matcher:{original:e,pattern:RegExp(`^${n}$`,`u`),replacement:i,replacementPatterns:dC(i)},type:`pattern`}}return{original:e,replacement:t,type:`exact`}}function mC(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 hC(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 gC(e,t){return e===`internal`||typeof e==`boolean`?e:t}function _C(e){if(!_(e))return;let t={};for(let[n,r]of Object.entries(e))typeof r==`boolean`&&(t[n]=r);return t}function vC(e,t){return typeof e==`boolean`?e:t}function yC(e){let t=_(e)?e:void 0,n=_C(t?.allowList),r=XS(vC(t?.extendDefaultAllowList,!0),n===void 0?dS:{...dS,...n},n??{});return new Map(Object.entries(r))}function bC(e){if(!_(e))return{};let t={};for(let[n,r]of Object.entries(e)){if(r===!1){t[n]=!1;continue}if(!_(r))continue;let e={};for(let[t,n]of Object.entries(r))typeof n==`boolean`&&(e[t]=n);t[n]=e}return t}function xC(e){let t=_(e)?e:void 0,n=vC(t?.extendDefaultReplacements,!0),r=bC(t?.replacements),i=new Set([...Object.keys(uS),...Object.keys(r)]),a=[];for(let e of i){let t=r[e],i=n?uS[e]??{}:{},o=t===!1?{}:XS(t===void 0,i,{...i,...t}),s=new Map(Object.entries(o));$S.set(s,fC(s)),a.push([e,s])}return new Map(a)}function SC(e){let t=_(e)?e:void 0,n=[];for(let e of fS)n.push(e);if(Array.isArray(t?.ignore))for(let e of t.ignore)(h(e)||e instanceof RegExp)&&n.push(e);return n.map(e=>e instanceof RegExp?e:new RegExp(e,`u`))}function CC(e){let t=_(e)?e:void 0,n=new Set(lS);if(!y(t?.allowPropertyAccess))return n;for(let e of t.allowPropertyAccess)n.add(e);return n}function wC(e){let t=_(e)?e:void 0,n=new Map,r=new Set,i=[],a=[],o=ee(t?.shorthands)?t.shorthands:{},s={...cS,...o};for(let[e,t]of Object.entries(s)){let r=pC(e,t);r.type===`exact`?n.set(r.original,r.replacement):a.push(r.matcher)}if(y(t?.ignoreShorthands))for(let e of t.ignoreShorthands){let t=pC(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 TC(e){let t=_(e)?e:void 0;return{allowList:yC(t),allowPropertyAccess:CC(t),checkDefaultAndNamespaceImports:gC(t?.checkDefaultAndNamespaceImports,`internal`),checkFilenames:vC(t?.checkFilenames,!0),checkProperties:vC(t?.checkProperties,!1),checkShorthandImports:gC(t?.checkShorthandImports,`internal`),checkShorthandProperties:vC(t?.checkShorthandProperties,!0),checkVariables:vC(t?.checkVariables,!0),ignore:SC(t),nameReplacements:new Map,replacements:xC(t),shorthandConfiguration:wC(t)}}function EC(e){return{...e,nameReplacements:new Map,shorthandConfiguration:{...e.shorthandConfiguration,ignoredIdentifiers:new Map,replacementsByIdentifier:new Map}}}function DC(e){if(!_(e))return TC(e);let t=eC.get(e);if(t!==void 0)return EC(t);let n=TC(e);return eC.set(e,n),EC(n)}function OC(e,t){if(tC(e)||t.allowList.get(e)===!0)return[];let n=t.replacements.get(iC(e))??t.replacements.get(e)??t.replacements.get(rC(e));if(n===void 0)return[];let r=$S.get(n);return r===void 0?[]:nC(e)?r.upperFirst:r.lowerFirst}function kC(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=cC(e),i=[];for(let e of r){let n=mC(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 AC(e,t){let n=t.ignoredIdentifiers.get(e);if(n!==void 0)return n;let r=hC(e,t);if(!r){let n=kC(e,t);r=n!==void 0&&n.matches.length>0&&n.matches.every(e=>hC(e.matchedWord,t))}return t.ignoredIdentifiers.set(e,r),r}function jC(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 MC(e,t,n=3){let r=`${n}\0${e}`,i=t.nameReplacements.get(r);if(i!==void 0)return i;let a=NC(e,t,n);return t.nameReplacements.set(r,a),a}function NC(e,t,n){if(t.allowList.get(e)===!0||t.ignore.some(t=>t.test(e)))return{total:0};let r=kC(e,t.shorthandConfiguration);if(r!==void 0)return AC(e,t.shorthandConfiguration)?{total:0}:{samples:[r.replaced],total:1};if(tC(e))return{total:0};let i=OC(e,t);if(i.length>0)return{samples:i.slice(0,n),total:i.length};let a=e.split(pS).filter(Boolean),o=!1,s=[],c=0;for(let e of a){let n=OC(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:PC(s,l,n).map(e=>e.join(``)),total:l}}function PC(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]??``;hS.test(n)&&e[t-1]?.endsWith(n)===!0&&e.splice(t,1)}return i}function FC(e,t){let n=t.replacements.get(e);if(n===void 0)return!1;let r=$S.get(n);return r!==void 0&&r.lowerFirst.length>0}function IC(e,t,n){let{samples:r=[],total:i}=t;if(i===1)return{data:{discouragedName:e,nameTypeText:n,replacement:r[0]??``},messageId:aS};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:oS}}function LC(e){return function(t,n){return n.every(n=>{let r=e.get(n);return r===void 0||!r.has(t)})}}function RC(e){let{parent:t}=e;return j(t)&&t.property===e&&!t.computed||Ue(t)&&t.right===e}function zC(e,t,n,r){r({...IC(e.name,{samples:[t],total:1},n?`property`:`variable`),node:e})}function BC(e,t,n){return kS(t)&&!RS(n.checkDefaultAndNamespaceImports,e)||TS(t)&&!RS(n.checkShorthandImports,e)?!0:!n.checkShorthandProperties&&DS(t)}function VC(e){if(e.name!==`plr`)return;let[t]=e.defs;if(t?.type!==`Variable`||!D(t.node)||t.node.init===null)return;let{init:n}=t.node;if(j(n)&&!n.computed&&k(n.object)&&n.object.name===`Players`&&k(n.property)&&n.property.name===`LocalPlayer`)return`localPlayer`}function HC(e,t,n,r){let i=[],a=0,o=0;for(let s of e){let e=SS(s,t,n);if(e!==void 0){if(e!==s&&FC(s,r)){o+=1;continue}e.length>0&&(i[a++]=e)}}return{droppedDiscouraged:o,safeSamples:i}}function UC(e,t,n){let r=e.type===`Variable`&&D(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 WC(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 NS(n,r,e)},node:o})}function GC(e,t,n,r,i){let[a]=e.defs;if(a===void 0)return;let o=a.name;if(!k(o)||BC(a,o,t))return;let s=UC(a,e,r),c=VC(e),l=c===void 0?MC(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}=HC(l.samples,d,s,t),m=p.length>0?p:l.samples,h=g(l.samples.length)&&l.samples.length===l.total?Math.max(0,l.total-f):l.total,_=e.name===`fn`&&h>1?m.map(e=>e===`function_`?`function`:e):m,v=IC(o.name,{samples:_,total:h},`variable`);if(h===1&&p.length===1&&jS(e)){let[t]=p;if(t!==void 0){WC(i,v,e,t,d,n,o);return}}i({...v,node:o})}function KC(e,t){if(!zS(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(!k(r)){t(e);return}t(e)}}function qC(e,t){for(let n of bS(e))for(let e of n.variables)KC(e,t)}function JC(e,t,n,r){let i=PS(e),a=RC(e);(i||a)&&(YS(e,r)||YC(e,i,a,t,n)||t.checkProperties&&i&&XC(e,t,n))}function YC(e,t,n,r,i){let a=kC(e.name,r.shorthandConfiguration);return a===void 0||!(t||n)?!1:(AC(e.name,r.shorthandConfiguration)||!r.checkShorthandProperties||n&&jC(e.name,a,r.allowPropertyAccess)||zC(e,a.replaced,!0,i),!0)}function XC(e,t,n){let r=MC(e.name,t);if(r.total===0)return;let i=IC(e.name,r,`property`),a=ZC(e,r.samples);if(a!==void 0){n({...i,fix(t){return t.replaceText(e,a)},node:e});return}n({...i,node:e})}function ZC(e,t){if(t?.length!==1||!FS(e))return;let[n]=t,{parent:r}=e;if(n!==void 0&&xe(r)&&A(r.value)&&yS(n))return n}const QC=d(`prevent-abbreviations`,`naming`,{create(e){let t=DC(e.options[0]),n=e.physicalFilename,r=new WeakMap,i=LC(r),{sourceCode:a}=e;function o(n){GC(n,t,r,i,e.report)}return{Identifier(n){!O(n)||n.name===`__proto__`||JC(n,t,e.report,a)},JSXOpeningElement({name:n}){if(!(t.checkVariables&&he(n)&&nC(n.name)))return;let r=MC(n.name,t);if(r.total===0)return;let i=IC(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=MC(o===-1?a:a.slice(0,o),t);if(c.total>0&&c.samples){let t=c.samples.map(e=>`${e}${s}`);e.report({...IC(a,{samples:t,total:c.total},`filename`),node:r})}}t.checkVariables&&qC(a.getScope(r),o)}}},meta:{docs:{description:`Prevent abbreviations.`,recommended:!1},fixable:`code`,messages:{[aS]:`The {{nameTypeText}} \`{{discouragedName}}\` should be named \`{{replacement}}\`. ${sS}`,[oS]:`Please rename the {{nameTypeText}} \`{{discouragedName}}\`. Suggested names are: {{replacementsText}}. ${sS}`},schema:[{additionalProperties:!1,properties:{allowList:{additionalProperties:{type:`boolean`},default:dS,defaultLabel:`default allow list`,description:`Names that should be allowed even when they match a discouraged abbreviation.`,type:`object`},allowPropertyAccess:{default:lS,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:fS,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:uS,defaultLabel:`default replacement map`,description:`Replacement suggestions for discouraged names.`,type:`object`},shorthands:{additionalProperties:{type:`string`},default:cS,defaultLabel:`default shorthands`,description:`Shorthand names and the full names they should expand to.`,type:`object`}},type:`object`}],type:`suggestion`}}),$C=/^use[A-Z0-9].*$/u;function ew(e){return $C.test(e)}function tw(e){if(e.id!==null)return e.id.name}function nw(e){return e.id.type===`Identifier`?e.id.name:void 0}function rw(e){let t=tw(e);return t!==void 0&&ew(t)}function iw({parent:e}){if(e.type!==`VariableDeclarator`)return!1;let t=nw(e);return t!==void 0&&ew(t)}function aw(e,t){let n=e.get(t);if(n!==void 0&&n.length!==0)return n.at(-1)}function ow(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 sw(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 cw(e,t,n,r){let i=S(e.getScope(t),n);if(i!==void 0){let e=ow(i);if(e!==void 0)return e}return aw(r,n)}function lw(e,t,n){if(e.argument.type===`Identifier`){let r=cw(t,e,e.argument.name,n);return r===void 0?1:uw(r,t,n)}return e.argument.type===`ArrayExpression`?uw(e.argument,t,n):1}function uw(e,t,n){let r=0;for(let i of e.elements){if(i===null){r+=1;continue}if(i.type===`SpreadElement`){r+=lw(i,t,n);continue}r+=1}return r}function dw(e,t){let n=S(e.getScope(t),t.name);return n!==void 0&&sw(n)}function fw(e){let t=nw(e);if(t!==void 0&&e.init?.type===`ArrayExpression`)return{init:e.init,name:t}}function pw(e,t){let n=fw(e);if(n===void 0)return;let{init:r,name:i}=n,a=t.get(i)??[];a.push(r),t.set(i,a)}function mw(e,t){let n=fw(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 hw=d(`react-hooks-strict-return`,`react`,{create(e){let{sourceCode:t}=e,n=new Map,r=0;function i(e){rw(e)&&(r+=1)}function a(e){rw(e)&&--r}function o(e){iw(e)&&(r+=1)}function s(e){iw(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(dw(t,e.argument))return;let r=cw(t,e,e.argument.name,n);if(r===void 0)return;uw(r,t,n)>2&&c(e);return}e.argument.type===`ArrayExpression`&&uw(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){pw(e,n)},"VariableDeclarator:exit"(e){mw(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 gw(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 _w=d(`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`||gw(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 vw(e){if(!(_(e)&&`classes`in e&&_(e.classes)))return new Map;let{classes:t}=e,n=new Map;for(let[e,r]of Object.entries(t))h(r)&&n.set(e,r);return n}function yw(e){return e?.type===`module`||e?.type===`global`}function bw(e){if(e.type===`ImportDefaultSpecifier`)return e.local.name;if(e.type===`ImportSpecifier`){if(e.imported.type===`Identifier`)return e.imported.name;if(h(e.imported.value))return e.imported.value}}function xw(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 Sw(e,t,n){if(!h(e.source.value))return;let r=e.source.value;for(let[i,a]of t)if(a===r)for(let t of e.specifiers)bw(t)===i&&n.set(t.local.name,i)}const Cw=d(`require-module-level-instantiation`,`roblox`,{create(e){let{sourceCode:t}=e,n=vw(e.options[0]);if(n.size===0)return{};let r=new Map;return{ImportDeclaration(e){Sw(e,n,r)},NewExpression(i){let a=xw(i,r,n);a!==void 0&&(yw(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`}}),ww=[{allowAsync:!1,name:`useEffect`},{allowAsync:!1,name:`useLayoutEffect`},{allowAsync:!1,name:`useInsertionEffect`}];function Tw(e){return _(e)&&h(e.name)&&typeof e.allowAsync==`boolean`}function Ew(e){let t=_(e)&&e.sloptor===!0,n=_(e)&&e.inlineFunctionDeclarations===!0;if(!_(e))return{environment:`roblox-ts`,hooks:ww,inlineFunctionDeclarations:n,sloptor:t};let r=fr(e.environment)?e.environment:`roblox-ts`,i=e.hooks;if(!Array.isArray(i))return{environment:r,hooks:ww,inlineFunctionDeclarations:n,sloptor:t};let a=[];for(let e of i)Tw(e)&&a.push(e);return a.length===0?{environment:r,hooks:ww,inlineFunctionDeclarations:n,sloptor:t}:{environment:r,hooks:a,inlineFunctionDeclarations:n,sloptor:t}}function Dw(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 Ow(e,t){let n=S(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=R(t.init);if(n===`useCallback`||n===`useMemo`)return!0}return!1}function kw(e,t,n){if(t.references.length!==1)return!1;let r=n.parent.type;return r===`ExportNamedDeclaration`||r===`ExportDefaultDeclaration`?!1:!ie(e,n)}const Aw=d(`require-named-effect-functions`,`react`,{create(e){let{environment:t,hooks:n,inlineFunctionDeclarations:r,sloptor:i}=Ew(e.options[0]),a=new Map(n.map(e=>[e.name,e.allowAsync])),o=new Set(a.keys()),s=t===`roblox-ts`&&!i;function c(e){let t=a.get(e);return typeof t==`boolean`&&t}function l(t,n,r){e.report({data:{hook:t},messageId:r,node:n})}function u(t,n,r){let i=S(e.sourceCode.getScope(r),r.name);if(i===void 0){Ow(e.sourceCode,r)&&l(t,n,`identifierReferencesCallback`);return}let a=Dw(i);if(a===void 0){Ow(e.sourceCode,r)&&l(t,n,`identifierReferencesCallback`);return}d(t,n,r,a,i)}function d(e,t,n,i,a){if(i.type===`arrow`){i.isAsync&&!c(e)?l(e,t,`identifierReferencesAsyncArrow`):i.isAsync||l(e,t,`identifierReferencesArrow`);return}if(i.type===`function-expression`){f(e,t,i.node);return}i.isAsync?c(e)||l(e,t,`identifierReferencesAsyncFunction`):!s&&r&&p(e,t,n,i.node,a)}function f(e,t,n){n.id===null?l(e,t,`anonymousFunction`):s&&l(e,t,`functionExpression`)}function p(t,n,r,i,a){e.report({data:{hook:t},fix(t){let n=[t.replaceText(r,e.sourceCode.getText(i))];return kw(e.sourceCode,a,i)&&n.push(t.removeRange(re(e.sourceCode.text,i))),n},messageId:`identifierReferencesFunctionDeclaration`,node:n})}function m(e,t,n){let r=n.id!==null;r&&n.async?l(e,t,`asyncFunctionExpression`):r&&s?l(e,t,`functionExpression`):!r&&n.async?l(e,t,`asyncAnonymousFunction`):r||l(e,t,`anonymousFunction`)}return{CallExpression(e){let t=R(e);if(t===void 0||!o.has(t))return;let[n]=e.arguments;if(n!==void 0){if(n.type===`Identifier`){u(t,e,n);return}if(n.type===`ArrowFunctionExpression`){n.async?l(t,e,`asyncArrowFunction`):l(t,e,`arrowFunction`);return}n.type===`FunctionExpression`&&m(t,e,n)}}}},meta:{docs:{description:`Enforce named effect functions for better debuggability. Prevents inline arrow functions in useEffect and similar hooks.`,recommended:!1},fixable:`code`,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() { ... }`,identifierReferencesFunctionDeclaration:`{{hook}} receives identifier pointing to a named function declaration. Convert it to an inline named function expression so the effect callback is self-contained: useEffect(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:[...ww],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`},inlineFunctionDeclarations:{default:!1,description:`Convert effect callbacks that reference a named function declaration into inline named function expressions (standard and sloptor modes only), keeping the effect body visible to dependency analysis. When the declaration is only referenced by the effect and is not exported or commented, the fix also removes the now-unused declaration.`,type:`boolean`},sloptor:{default:!1,description:`Compile with sloptor (a Go-based roblox-ts compiler). Sloptor targets @rbxts/react like roblox-ts but supports standard TypeScript features, so the rule applies standard-mode behavior. Use with environment: 'roblox-ts'.`,type:`boolean`}},type:`object`}],type:`problem`}});s({"alternatives?":s(`string[]`).readonly().or(`undefined`),closer:s(`string[]`).readonly().or(`string`),opener:`string`,"openerAlternatives?":s(`string[]`).readonly().or(`undefined`),"platform?":s(`"roblox" | undefined`),"requireSync?":`boolean | undefined`,"yieldingFunctions?":s(`string[]`).readonly().or(`undefined`)}).readonly();const jw=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]),Mw=[`task.wait`,`wait`,`*.WaitForChild`,`*.*Async`];function Nw(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 Pw(e,t){return t.filter(t=>t.some(t=>t.index===e.index))}function Fw({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 Iw(e){let t=[],n=0;if(y(e.closer))for(let r of e.closer)t[n++]=r;else h(e.closer)&&(t[n++]=e.closer);if(e.alternatives)for(let r of e.alternatives)t[n++]=r;return t}function Lw(e){let t=[e.opener];if(e.openerAlternatives){let n=1;for(let r of e.openerAlternatives)t[n++]=r}return t}function Rw(e){return e.length===0?`configured opener`:e.length===1?e[0]??`configured opener`:e.join(`' or '`)}function zw(e){return e?jw.has(e.type):!1}function Bw(e){return e?.type===`SwitchStatement`}function Vw(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 Hw(e,t){let n=e.label?Vw(e.label,e.parent):void 0;if(n)return zw(n)?n:void 0;let r=e.parent;for(;r;){if(zw(r))return r;if(t&&Bw(r))return;r=r.parent??void 0}}function Uw(e){return Hw(e,!0)}function Ww(e){return Hw(e,!1)}function Gw(e){return{...e,loopAncestors:[...e.loopAncestors]}}const Kw=d(`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:[...Mw]}]: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(!Lw(r).includes(e))continue;let i=Iw(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 y(e){let t=d.at(-1);t&&(d[d.length-1]={...t,...e})}function ee(){return a.map(Gw)}function te(e){f.set(e,ee())}function b(e,t){return i.pairs.find(n=>(t?Lw(n):Iw(n)).includes(e))}function x(e,t){return t.platform===`roblox`&&(t.yieldingFunctions??Mw).some(t=>{if(t.startsWith(`*.`)){let n=t.slice(2);return e.endsWith(`.${n}`)}return e===t})}function S(e){let t=Iw(e);return t.length===1?t[0]??`closer`:t.join(`' or '`)}function C(t,n){e.report({data:{closer:S(t.config),opener:t.opener,paths:n},messageId:`unpairedOpener`,node:t.node})}function ne(e){a.length=0;for(let t of e)a.push({...t})}function w(e){let t=p.get(e)??[];t.push(ee()),p.set(e,t)}function re(e,t,n){for(let r of e){let e=Pw(r,t);e.length<=0||e.length>=t.length||i.allowConditionalClosers===!1&&C(r,n)}}function ie(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 ae(){if(a.length>0)for(let e of a)C(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 oe(e){e.type===`IfStatement`&&(_({inConditional:!0}),te(e))}function T(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)||C(n,`conditional branch`);if(r){re(t,n,`not all execution paths`),a.length=0;for(let e of t)Nw(e,n)&&a.push(e)}else ne(t)}f.delete(e),p.delete(e)}function se(e){let{parent:t}=e;if(t?.type===`IfStatement`){w(t);let e=f.get(t);if(!e)return;ne(e)}}function E(e){let{parent:t}=e;t?.type===`IfStatement`&&w(t)}function D(e){e.type===`TryStatement`&&te(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=Iw(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)Nw(e,r)&&a.push(e)}f.delete(t),p.delete(t)}function le(){_({inTry:!0})}function ue(e,t){if(e.type!==t)return;let{parent:n}=e;if(n.type===`TryStatement`){w(n);let e=f.get(n);e&&ne(e)}v()}function de(e){ue(e,`BlockStatement`)}function fe(){_({inCatch:!0})}function pe(e){ue(e,`CatchClause`)}function me(){_({inFinally:!0})}function O(e){e.type===`SwitchStatement`&&(_({inConditional:!0}),te(e))}function k(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){re(t,n,`not all execution paths`);let e=t.filter(e=>Nw(e,n));a.length=0;for(let t of e)a.push(t)}else ne(t);f.delete(e),p.delete(e)}function he(e){if(e.type!==`SwitchCase`)return;let{parent:t}=e;if(t.type===`SwitchStatement`){w(t);let e=f.get(t);if(!e)return;ne(e)}}function ge(e){zw(e)&&(o.push(e),_({inLoop:!0}))}function _e(){o.length>0&&o.pop(),v()}function A(t){if(y({hasEarlyExit:!0}),!(g().inFinally||a.length===0))for(let{config:n,node:r,opener:i}of a){let a=Iw(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 ve(t){if(t.type!==`BreakStatement`&&t.type!==`ContinueStatement`||a.length===0)return;let n=t.type===`ContinueStatement`?Ww(t):Uw(t);if(n)for(let{config:r,loopAncestors:i,node:o,opener:s}of a){if(!i.some(e=>e===n))continue;let a=Iw(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 ye(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 be(t,n){let r=a.findLastIndex(e=>Iw(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=Rw(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 xe(t,n,r){let i=Iw(r.config),a=i.length===1?i[0]??`closer`:i.join(`' or '`);e.report({data:{closer:a,yieldingFunction:n},messageId:`robloxYieldViolation`,node:t})}function j(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=Iw(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=Fw(e);if(t===void 0||t===``)return;let n=b(t,!0);if(n){ye(e,t,n);return}if(b(t,!1)){be(e,t);return}for(let n of a)if(x(t,n.config)){xe(e,t,n),a.length=0,l=!0;return}}return{ArrowFunctionExpression:ie,"ArrowFunctionExpression:exit":ae,AwaitExpression:j,BreakStatement:ve,CallExpression:Se,CatchClause:fe,"CatchClause:exit":pe,ContinueStatement:ve,DoWhileStatement:ge,"DoWhileStatement:exit":_e,ForInStatement:ge,"ForInStatement:exit":_e,ForOfStatement:e=>{e.await&&j(e),ge(e)},"ForOfStatement:exit":_e,ForStatement:ge,"ForStatement:exit":_e,FunctionDeclaration:ie,"FunctionDeclaration:exit":ae,FunctionExpression:ie,"FunctionExpression:exit":ae,IfStatement:oe,"IfStatement > .alternate:exit":E,"IfStatement > .consequent:exit":se,"IfStatement:exit":T,ReturnStatement:A,"SwitchCase:exit":he,SwitchStatement:O,"SwitchStatement:exit":k,ThrowStatement:A,TryStatement:D,"TryStatement > .block":le,"TryStatement > .block:exit":de,"TryStatement > .finalizer":me,"TryStatement > .finalizer:exit":v,"TryStatement:exit":ce,WhileStatement:ge,"WhileStatement:exit":_e,YieldExpression:j}},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:[...Mw]}],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`}}),qw={allowRootKeys:!1,ignoreCallExpressions:[`ReactTree.mount`,`CreateReactStory`,`createReactStory`,`createPlatformStory`],iterationMethods:[`map`,`filter`,`forEach`,`flatMap`,`reduce`,`reduceRight`,`some`,`every`,`find`,`findIndex`],memoizationHooks:[`useCallback`,`useMemo`]},Jw=new Set([`ChainExpression`,`ParenthesizedExpression`,`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]),Yw=new Set([...Jw,`AwaitExpression`,`ConditionalExpression`,`LogicalExpression`,`SequenceExpression`,`SpreadElement`]),Xw={iteration:!1,memoization:!1},Zw=new Set([`ConditionalExpression`,`LogicalExpression`]),Qw=new Set([`BlockStatement`,`CatchClause`,`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`IfStatement`,`LabeledStatement`,`SwitchCase`,`SwitchStatement`,`TryStatement`,`WhileStatement`,`WithStatement`]);function $(e){return e.parent??void 0}function $w(e){let t=e;for(;t!==void 0&&Jw.has(t.type);)t=$(t);return t}function eT(e){let t=$(e);for(;t!==void 0;){if(M(t))return t;t=$(t)}}function tT(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 Xw}function nT(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(Yw.has(n.type)){t=n,n=$(n);continue}break}}function rT(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 iT(e,t){e.iteration||=t.iteration,e.memoization||=t.memoization}function aT(e,t,n){if(e.isWrite())return Xw;let r=nT(e.identifier);return r===void 0||cu(r)?Xw:tT(r,t,n)}function oT(e,t,n,r){let i=nT(t);if(i!==void 0)return cu(i)?Xw:tT(i,n,r);let a=rT(e,t);if(a===void 0)return Xw;let o={iteration:!1,memoization:!1};for(let e of a.references)if(iT(o,aT(e,n,r)),o.iteration&&o.memoization)return o;return o}function sT(e){let t=cT(e);return t===void 0?!1:t.type===`ReturnStatement`?uT(t):t.type===`ArrowFunctionExpression`}function cT(e){let t=lT($w($(e)));for(;t!==void 0&&Zw.has(t.type);)t=$w($(t));return lT(t)}function lT(e){return e?.type===`JSXExpressionContainer`?$w($(e)):e}function uT(e){let t=$w($(e));for(;t!==void 0&&Qw.has(t.type);)t=$w($(t));return t!==void 0&&M(t)}function dT(e){if(!sT(e))return!1;let t=eT(e);if(t===void 0)return!1;let n=$w($(t));return n?.type!==`CallExpression`||cu(n)}function fT(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 pT(e){return e.toLowerCase().endsWith(`children`)}function mT(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=lu(t);return n===void 0||!pT(n)}function hT(e){let t=e,n=$(e);for(;n!==void 0&&Jw.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 gT(e,t){let n=$(e);if(n===void 0)return!1;let r=!1;for(;n!==void 0&&(n.type===t||Jw.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 _T(e){return gT(e,`ConditionalExpression`)}function vT(e){return gT(e,`LogicalExpression`)}const yT=d(`require-react-component-keys`,`react`,{create(e){let[t]=e.options,n={allowRootKeys:qw.allowRootKeys,ignoreCallExpressions:qw.ignoreCallExpressions,iterationMethods:qw.iterationMethods,memoizationHooks:qw.memoizationHooks,...t},r=new Set(n.ignoreCallExpressions),i=new Set(n.iterationMethods),a=new Set(n.memoizationHooks);function o(t){let o=eT(t),s=o===void 0?Xw:oT(e.sourceCode,o,i,a),c=s.iteration||s.memoization;if(dT(t)&&!c){!n.allowRootKeys&&t.type===`JSXElement`&&uu(t,`key`)&&e.report({messageId:`rootComponentWithKey`,node:t});return}if(!fT(t,r)&&!(hT(t)||mT(t)||_T(t))&&!(t.type===`JSXFragment`&&vT(t))&&!(t.type===`JSXFragment`&&s.memoization&&!s.iteration&&sT(t))){if(t.type===`JSXFragment`){e.report({messageId:`missingKey`,node:t});return}uu(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:qw.ignoreCallExpressions,description:`Function calls where JSX arguments don't need keys`,items:{type:`string`},type:`array`},iterationMethods:{default:qw.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 bT(e){if(e.id.type===`Identifier`)return e.id.name}function xT(e,t,n){return fe(e,t,n,`memo`)}function ST(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 CT(e){let t=e;for(;t!==null;){if(t.type===`ExportNamedDeclaration`||t.type===`ExportDefaultDeclaration`)return!0;t=t.parent}return!1}function wT(e){return e.parent.type===`VariableDeclaration`?e.parent.parent.type===`ExportNamedDeclaration`||e.parent.parent.type===`ExportDefaultDeclaration`:!1}function TT(e,t,n){for(let r of e.getDeclaredVariables(t))if(r.name===n){for(let{identifier:e}of r.references)if(CT(e))return!0;return!1}return!1}function ET(e,t,n,r){return r.has(t)||wT(n)?!0:TT(e,n,t)}function DT(e,t,n){e.report({data:{variableName:n},messageId:t.kind===`context`?`missingContextDisplayName`:`missingMemoDisplayName`,node:t.node})}const OT=d(`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(xT(t.declaration,n,i)){e.report({messageId:`directMemoExport`,node:t});return}ST(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||ET(e.sourceCode,t,n.node,o)&&DT(e,n,t)},VariableDeclarator(e){if(e.init?.type!==`CallExpression`)return;let t=bT(e);if(t!==void 0){if(xT(e.init,n,i)){a.set(t,{hasDisplayName:!1,kind:`memo`,node:e});return}ST(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 kT(e){return _(e)&&e.metric===`statements`?`statements`:`lines`}function AT(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 jT=d(`require-switch-case-braces`,`general`,{create(e){let t=kT(e.options[0]);return{SwitchCase(n){if(!AT(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
39
  `),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 RC(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:zC(t);case`ArrowFunctionExpression`:return zC(t);default:break}t=t.parent}}function zC({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 BC(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 VC(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 HC(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 UC(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 WC(e,t){return h(e)?t===e:(Array.isArray(e.name)?e.name:[e.name]).includes(t)}function GC(e,t,n,r){if(!WC(r,n.name))return!1;if(h(r))return!0;switch(r.from){case void 0:return!0;case`package`:return HC(e,n)===r.package;case`file`:return UC(e,n)&&HC(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 KC(e,t,n,r){return r.some(r=>GC(e,t,n,r))}const qC=d(`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`)||KC(t,r,o,n))return;let s=RC(i);if(s===void 0)return;let c=BC(i)?`this.${s}`:s;e.report({fix(e){let n=VC(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 JC(e){return e.includes(`u`)||e.includes(`v`)}function YC(e,t){return e.type===`Identifier`&&e.name===t}function XC(e){if(!(e.type!==`Literal`||!h(e.value)))return e.value}function ZC(e){return e.type!==`SpreadElement`}const QC=d(`require-unicode-regex`,`general`,{createOnce(e){return{CallExpression(t){if(!YC(t.callee,`regex`))return;if(t.arguments.length<2){e.report({messageId:`requireUnicodeFlag`,node:t});return}let[,n]=t.arguments;if(n===void 0||!ZC(n))return;let r=XC(n);r!==void 0&&(JC(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 $C(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 ew(e,t){for(let n of t){if(n.type===`AssignmentPattern`&&n.left.type===`ObjectPattern`){tw(e,n.left),D(n.right)&&$C(e,n.right);continue}n.type===`ObjectPattern`&&tw(e,n)}}function tw(e,t){for(let n of t.properties){let t=nw(n);t!==void 0&&$C(e,t)}}function nw(e){if(e.type!==`Property`||e.value.type!==`AssignmentPattern`)return;let t=e.value.right;return D(t)?t:void 0}function rw(e){if(!(e.type!==`FunctionDeclaration`||!Oc(e)))return[...e.params]}function iw(e){if(!(e.type!==`VariableDeclarator`||!Fc(e)||e.init===null)&&(e.init.type===`ArrowFunctionExpression`||e.init.type===`FunctionExpression`))return[...e.init.params]}const aw=d(`rerender-memo-with-default-value`,`react`,{create(e){return{FunctionDeclaration(t){let n=rw(t);n!==void 0&&ew(e,n)},VariableDeclarator(t){let n=iw(t);n!==void 0&&ew(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`}}),ow=/(?<first>[\p{Ll}\d])(?<second>\p{Lu})/gu,sw=/(?<first>\p{Lu})(?<second>\p{Lu}\p{Ll})/gu,cw=`$<first>\0$<second>`;function lw(e){let t=e.trim();if(t.length===0)return``;let n=t.replace(ow,cw).replace(sw,cw),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 uw(e){return e.split(`/`).filter(e=>!e.startsWith(`.`))}function dw(e){return e.split(`/`).filter(e=>e===`..`).length}function fw(e){return e.some(e=>e===lw(e)&&!e.includes(`.`))}function pw(e){return t.basename(e,t.extname(e))===`index`}function mw(e){if(!e.includes(`fixtures`))return!1;let t=e.indexOf(`fixtures`);return!fw(e.slice(0,t))}const hw=d(`strict-component-boundaries`,`react`,{create(e){let n=e.options?.[0],{allow:r=[],maxDepth:i=1}=_(n)?n:{allow:[],maxDepth:1},a=r.map(e=>new RegExp(e,`u`));return{ImportDeclaration(n){let r=n.source.value;if(!(h(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=uw(c);if((dw(c)>1||l.includes(`components`))&&fw(l)&&l.length>i&&!pw(c)&&!mw(l)){e.report({messageId:`noReachingIntoComponent`,node:n});return}l.includes(`components`)&&l.length>i+1&&!pw(c)&&!mw(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`}}),gw=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`ObjectExpression`]),_w=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}]]),vw=new Map([[`useBinding`,!0],[`useReducer`,new Set([1])],[`useRef`,!0],[`useState`,new Set([1])],[`useTransition`,new Set([1])]]),yw=new Set([`ClassDeclaration`,`FunctionDeclaration`,`FunctionName`,`ImportBinding`]),bw=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 xw(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 Sw(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 Cw(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 ww(e){return e.type===`Identifier`?[e.name]:e.type===`MemberExpression`?ww(e.object):e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||e.type===`TSNonNullExpression`||e.type===`TSAsExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSTypeAssertion`?ww(e.expression):e.type===`BinaryExpression`||e.type===`LogicalExpression`?[...ww(e.left),...ww(e.right)]:e.type===`UnaryExpression`?ww(e.argument):e.type===`ConditionalExpression`?[...ww(e.test),...ww(e.consequent),...ww(e.alternate)]:[]}function Tw(e){return zw.has(e.type)}function Ew(e,t){if(e.type===`Identifier`)return e.name;if(e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||Tw(e))return Ew(e.expression,t);if(e.type===`MemberExpression`){let n=Ew(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 Dw(e,t){return e.type===`VariableDeclarator`&&e.id.type===t}function Ow(e,t,n){if(e===void 0||!(e instanceof Set&&Dw(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 kw(e,t,n){if(e===void 0||!(e instanceof Set&&Dw(t,`ObjectPattern`)))return!1;for(let r of t.id.properties){if(r.type!==`Property`||Vi(r)?.name!==n)continue;let t=Bi(r);return t!==void 0&&e.has(t)}return!1}function Aw(e,t,n,r){if(e?.type!==`CallExpression`)return!1;let i=xw(e);if(i===void 0)return!1;let a=r.get(i);return a===!0||Ow(a,t,n)||kw(a,t,n)}function jw(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 Mw(e){if(e?.type!==`CallExpression`)return!1;let{callee:t}=e;return t.type===`MemberExpression`&&t.property.type===`Identifier`&&t.property.name===`map`}function Nw(e){return e?.type===`Literal`||e?.type===`TemplateLiteral`||e?.type===`UnaryExpression`&&e.argument.type===`Literal`}function Pw(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 Fw(e,t,n,r){let{node:i,type:a}=t;if(yw.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 Aw(s,i,n,r)||jw(s)||Mw(s)||Nw(s)||Pw(e,i)}function Iw(e,t,n){if(!e)return!1;let r=e.defs;if(r.length===0)return!1;for(let i of r)if(Fw(e,i,t,n))return!0;return!1}function Lw(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 Rw=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`VariableDeclarator`]),zw=new Set([`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]);function Bw(e){if(e.type!==`Identifier`)return!1;let{parent:t}=e;return t.type===`Property`&&t.computed&&t.key===e}function Vw(e){if(e.type!==`Identifier`)return!1;let t=e.parent??void 0;for(;t;){if(zw.has(t.type)){t=t.parent??void 0;continue}if(t.type.startsWith(`TS`))return!0;if(Rw.has(t.type))return!1;t=t.parent??void 0}return!1}function Hw(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 Uw(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 Ww(e,t){let n=t;for(;n;){let t=n.set.get(e);if(t)return t;n=n.upper}}function Gw(e,t){let n=e.node;for(;n;){if(n===t)return!0;n=n.parent??void 0}return!1}function Kw(e,t){return e!==void 0&&!e.defs.some(e=>Gw(e,t))}function qw(e,t,n,r){let i=Lw(e,e.parent??void 0);return{depth:Sw(i),forceDependency:Bw(e),name:t,node:i,usagePath:Ew(i,r),variable:n}}function Jw(e){return e.type===`ParenthesizedExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSAsExpression`||e.type===`TSTypeAssertion`||e.type===`TSNonNullExpression`}function Yw(e,t,n){let r=t.visitorKeys[e.type]??[];for(let t of r){if(!_(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 Xw(e,t){let n=[],r=new Set;function i(i){if(i.type!==`Identifier`)return;let{name:a}=i;if(r.has(a)||bw.has(a)||Vw(i))return;let o=Ww(a,t.getScope(i));Kw(o,e)&&o!==void 0&&Hw(o,e)&&(r.add(a),n.push(qw(i,a,o,t)))}function a(e){if(e.type===`Identifier`&&i(e),Jw(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}Yw(e,t,a)}return a(e),n}function Zw(e,t){let n=[];for(let r of e.elements){if(!r)continue;let e=r.type===`SpreadElement`?r.argument:r,i=Ew(e,t),a=Sw(e);n.push({depth:a,name:i,node:e})}return n}function Qw({name:e}){return e}function $w(e){return e?gw.has(e.type):!1}function eT(e,{parent:t}){return t.type===`VariableDeclarator`?e.variable?.defs.some(e=>e.node===t)??!1:!1}function tT(e){return e.length>0&&g(e[0])}function nT(e){return e.length>0&&h(e[0])}function rT(e){return typeof e==`boolean`?e:g(e)?new Set([e]):Array.isArray(e)&&(tT(e)||nT(e))?new Set(e):!1}function iT(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 aT(e){return e!==void 0&&N(e)}function oT(e,t){return e.filter(e=>e.forceDependency||!Iw(e.variable,e.name,t))}function sT(e,t,n,r){if(r.length===0)return;let i=[...new Set(r.map(Qw))].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 cT(e){let t=Cw(e);return t?.type===`Identifier`?t.name:void 0}function lT(e,t){let n=cT(t.node);if(n!==void 0)return e.find(e=>cT(e.node)===n)}function uT(e,t){return!e.forceDependency&&Iw(e.variable,e.name,t)}function dT(e,t,n,r,i,a,o){for(let s of t){let c=lT(n,s);if(c===void 0){a&&iT(e,t,s,r);continue}if(o&&uT(c,i)){iT(e,t,s,r);continue}a&&s.depth>c.depth&&iT(e,t,s,r)}}function fT(e,t,n){let r=Cw(e.node);if(r?.type===`Identifier`&&e.depth<=t.depth)return r.name===cT(t.node);if(!n)return!1;let i=cT(t.node);return i!==void 0&&ww(e.node).includes(i)}function pT(e,t,n,r){let i=[];for(let a of oT(e,n))cT(a.node)!==void 0&&(t.some(e=>fT(e,a,r))||i.push(a));return i}function mT(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 hT(e){let t=e.variable?.defs[0];return t?.node.type===`VariableDeclarator`?t.node.init??void 0:void 0}function gT(e,t,n,r){for(let i of oT(t,r)){let t=cT(i.node);if(t!==void 0){for(let r of n)if(cT(r.node)===t&&r.depth===i.depth){r.depth===0&&$w(hT(i))&&e.report({data:{name:i.usagePath},messageId:`unstableDependency`,node:r.node});break}}}}const _T=d(`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(_w);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(vw);for(let e of n.hooks)e.stableResult!==void 0&&i.set(e.name,rT(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=Uw(e,o(t));return aT(n)?n:void 0}return{CallExpression(t){let a=xw(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){sT(e,t,d,oT(Xw(f,e.sourceCode).filter(e=>!eT(e,t)),i));return}if(!p||p.type!==`ArrayExpression`)return;let m=p,h=Xw(f,e.sourceCode).filter(e=>!eT(e,t)),g=Zw(m,e.sourceCode);(n.reportUnnecessaryDependencies||n.reportUnnecessaryStableDependencies)&&dT(e,g,h,m,i,n.reportUnnecessaryDependencies,n.reportUnnecessaryStableDependencies),mT(e,m,g,pT(h,g,i,n.resolveExpressionDependencies)),gT(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`}}),vT=/^use[A-Z]/u;function yT(e){return vT.test(e)}function bT(e){return _(e)?e:{}}function xT(e){if((e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)&&e.id!==null)return O(e.id.name)||yT(e.id.name);let{parent:t}=e;return t.type===`VariableDeclarator`&&j(t.id)?O(t.id.name)||yT(t.id.name):t.type===`Property`&&j(t.key)||t.type===`MethodDefinition`&&j(t.key)?O(t.key.name)||yT(t.key.name):!1}function ST(e){let t=ji(e);return t!==void 0&&yT(t)}function CT(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 wT(e,t){return t!==void 0&&e.callee.type===`Identifier`&&`name`in e.callee&&e.callee.name===t}function TT(e,t){return{afterEarlyReturn:!1,functionDepth:t,inConditional:!1,inLoop:!1,inNestedFunction:!1,inTryBlock:!1,isComponentOrHook:!1,...e}}function ET(e){if(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)return e.id?.name??void 0}function DT(e){return j(e)?e.name:void 0}function OT(e,t,n,r){if(n===void 0||Object.keys(n).length===0)return!1;let i=kT(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 kT(e,t){if(e.callee.type!==`MemberExpression`)return;let n=DT(e.callee.object);if(n!==void 0&&t[n]===!1)return!0;if(n!==void 0&&t[n]===!0)return!1}const AT=u({meta:{name:`small-rules`},rules:{"array-type-generic":m,"ban-instances":st,"ban-react-fc":dt,"ban-types":ht,"consistent-compound-words":jt,"directive-disable-enable-pair":on,"directive-no-aggregating-enable":sn,"directive-no-duplicate-disable":cn,"directive-no-restricted-disable":ln,"directive-no-unlimited-disable":un,"directive-no-unused-enable":dn,"directive-no-use":fn,"directive-require-description":hn,"enforce-ianitor-check-type":En,"isolated-functions":or,"memoized-effect-dependencies":Mr,"no-array-constructor-elements":li,"no-array-constructor-index-assignment":yi,"no-array-size-assignment":ki,"no-async-constructor":ta,"no-async-in-system":Pa,"no-cascading-set-state":Ia,"no-color3-constructor":Ba,"no-commented-code":Oo,"no-constant-condition-with-break":cs,"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":X_,"prefer-local-portal-component":sv,"prefer-math-min-max":vv,"prefer-modding-inspect":Cv,"prefer-module-scope-constants":Ev,"prefer-padding-components":Hv,"prefer-pascal-case-enums":$v,"prefer-sequence-overloads":ay,"prefer-single-world-query":Ty,"prefer-singular-enums":Ry,"prefer-ternary-conditional-rendering":nb,"prefer-udim2-shorthand":ub,"prefer-use-reducer":fb,"prevent-abbreviations":oS,"react-hooks-strict-return":CS,"require-async-suffix":TS,"require-module-level-instantiation":jS,"require-named-effect-functions":LS,"require-paired-calls":QS,"require-react-component-keys":TC,"require-react-display-names":PC,"require-switch-case-braces":LC,"require-throw-error-capture":qC,"require-unicode-regex":QC,"rerender-memo-with-default-value":aw,"strict-component-boundaries":hw,"use-exhaustive-dependencies":_T,"use-hook-at-top-level":d(`use-hook-at-top-level`,`react`,{create(e){let t=bT(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||OT(e,n,i,a)}function d(e){let t=o(),n=t===void 0?0:t.functionDepth+1,a=xT(e);r.push(i);let c=ET(e);c!==void 0&&(i=c),t?.isComponentOrHook===!0?s(TT({functionDepth:n,inNestedFunction:!0},n)):a&&s(TT({functionDepth:n,isComponentOrHook:!0},n))}function f(){o()!==void 0&&c(),i=r.pop()}return{ArrowFunctionExpression:d,"ArrowFunctionExpression:exit":f,CallExpression(t){if(!ST(t))return;let n=ji(t);if(n===void 0||u(n,t))return;let r=o();if(!(r===void 0||!(r.isComponentOrHook||r.inNestedFunction)||CT(t))){if(wT(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)&&yT(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{AT as default};
40
+ }`)]},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 MT(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:NT(t);case`ArrowFunctionExpression`:return NT(t);default:break}t=t.parent}}function NT({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 PT(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 FT(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 IT(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 LT(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 RT(e,t){return h(e)?t===e:(Array.isArray(e.name)?e.name:[e.name]).includes(t)}function zT(e,t,n,r){if(!RT(r,n.name))return!1;if(h(r))return!0;switch(r.from){case void 0:return!0;case`package`:return IT(e,n)===r.package;case`file`:return LT(e,n)&&IT(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 BT(e,t,n,r){return r.some(r=>zT(e,t,n,r))}const VT=d(`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`)||BT(t,r,o,n))return;let s=MT(i);if(s===void 0)return;let c=PT(i)?`this.${s}`:s;e.report({fix(e){let n=FT(t,i,`error`),r=[`const ${n} = ${t.getText(a)};`,`Error.captureStackTrace(${n}, ${c});`,`throw ${n};`].join(`
41
+ `);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 HT(e){return e.includes(`u`)||e.includes(`v`)}function UT(e,t){return e.type===`Identifier`&&e.name===t}function WT(e){if(!(e.type!==`Literal`||!h(e.value)))return e.value}function GT(e){return e.type!==`SpreadElement`}const KT=d(`require-unicode-regex`,`general`,{createOnce(e){return{CallExpression(t){if(!UT(t.callee,`regex`))return;if(t.arguments.length<2){e.report({messageId:`requireUnicodeFlag`,node:t});return}let[,n]=t.arguments;if(n===void 0||!GT(n))return;let r=WT(n);r!==void 0&&(HT(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 qT(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 JT(e,t){for(let n of t){if(n.type===`AssignmentPattern`&&n.left.type===`ObjectPattern`){YT(e,n.left),T(n.right)&&qT(e,n.right);continue}n.type===`ObjectPattern`&&YT(e,n)}}function YT(e,t){for(let n of t.properties){let t=XT(n);t!==void 0&&qT(e,t)}}function XT(e){if(e.type!==`Property`||e.value.type!==`AssignmentPattern`)return;let t=e.value.right;return T(t)?t:void 0}function ZT(e){if(!(e.type!==`FunctionDeclaration`||!ou(e)))return[...e.params]}function QT(e){if(!(e.type!==`VariableDeclarator`||!pu(e)||e.init===null)&&(e.init.type===`ArrowFunctionExpression`||e.init.type===`FunctionExpression`))return[...e.init.params]}const $T=d(`rerender-memo-with-default-value`,`react`,{create(e){return{FunctionDeclaration(t){let n=ZT(t);n!==void 0&&JT(e,n)},VariableDeclarator(t){let n=QT(t);n!==void 0&&JT(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`}}),eE=/(?<first>[\p{Ll}\d])(?<second>\p{Lu})/gu,tE=/(?<first>\p{Lu})(?<second>\p{Lu}\p{Ll})/gu,nE=`$<first>\0$<second>`;function rE(e){let t=e.trim();if(t.length===0)return``;let n=t.replace(eE,nE).replace(tE,nE),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 iE(e){return e.split(`/`).filter(e=>!e.startsWith(`.`))}function aE(e){return e.split(`/`).filter(e=>e===`..`).length}function oE(e){return e.some(e=>e===rE(e)&&!e.includes(`.`))}function sE(e){return t.basename(e,t.extname(e))===`index`}function cE(e){if(!e.includes(`fixtures`))return!1;let t=e.indexOf(`fixtures`);return!oE(e.slice(0,t))}const lE=d(`strict-component-boundaries`,`react`,{create(e){let n=e.options?.[0],{allow:r=[],maxDepth:i=1}=_(n)?n:{allow:[],maxDepth:1},a=r.map(e=>new RegExp(e,`u`));return{ImportDeclaration(n){let r=n.source.value;if(!(h(r)&&r.startsWith(`.`))||a.some(e=>e.test(r)))return;let{filename:o}=e;if(o===``)return;let s=bf(r,o);if(!s.found)return;let c=t.relative(o,s.path).replaceAll(`\\`,`/`),l=iE(c);if((aE(c)>1||l.includes(`components`))&&oE(l)&&l.length>i&&!sE(c)&&!cE(l)){e.report({messageId:`noReachingIntoComponent`,node:n});return}l.includes(`components`)&&l.length>i+1&&!sE(c)&&!cE(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`}}),uE=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`ObjectExpression`]),dE=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}]]),fE=new Map([[`useBinding`,!0],[`useReducer`,new Set([1])],[`useRef`,!0],[`useState`,new Set([1])],[`useTransition`,new Set([1])]]),pE=new Set([`ClassDeclaration`,`FunctionDeclaration`,`FunctionName`,`ImportBinding`]),mE=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 hE(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 gE(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 _E(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 vE(e){return e.type===`Identifier`?[e.name]:e.type===`MemberExpression`?vE(e.object):e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||e.type===`TSNonNullExpression`||e.type===`TSAsExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSTypeAssertion`?vE(e.expression):e.type===`BinaryExpression`||e.type===`LogicalExpression`?[...vE(e.left),...vE(e.right)]:e.type===`UnaryExpression`?vE(e.argument):e.type===`ConditionalExpression`?[...vE(e.test),...vE(e.consequent),...vE(e.alternate)]:[]}const yE=new Set([`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]);function bE(e){return yE.has(e.type)}function xE(e,t){if(e.type===`Identifier`)return e.name;if(e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||bE(e))return xE(e.expression,t);if(e.type===`MemberExpression`){let n=xE(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 SE(e,t){return e.type===`VariableDeclarator`&&e.id.type===t}function CE(e,t,n){if(e===void 0||!(e instanceof Set&&SE(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 wE(e,t,n){if(e===void 0||!(e instanceof Set&&SE(t,`ObjectPattern`)))return!1;for(let r of t.id.properties){if(r.type!==`Property`||so(r)?.name!==n)continue;let t=oo(r);return t!==void 0&&e.has(t)}return!1}function TE(e,t,n,r){if(e?.type!==`CallExpression`)return!1;let i=hE(e);if(i===void 0)return!1;let a=r.get(i);return a===!0||CE(a,t,n)||wE(a,t,n)}function EE(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 DE(e){if(e?.type!==`CallExpression`)return!1;let{callee:t}=e;return t.type===`MemberExpression`&&t.property.type===`Identifier`&&t.property.name===`map`}function OE(e){return e?.type===`Literal`||e?.type===`TemplateLiteral`||e?.type===`UnaryExpression`&&e.argument.type===`Literal`}function kE(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 AE(e,t,n,r){let{node:i,type:a}=t;if(pE.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 TE(s,i,n,r)||EE(s)||DE(s)||OE(s)||kE(e,i)}function jE(e,t,n){if(!e)return!1;let r=e.defs;if(r.length===0)return!1;for(let i of r)if(AE(e,i,t,n))return!0;return!1}function ME(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 NE=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`VariableDeclarator`]);function PE(e){if(e.type!==`Identifier`)return!1;let{parent:t}=e;return t.type===`Property`&&t.computed&&t.key===e}function FE(e){if(e.type!==`Identifier`)return!1;let t=e.parent??void 0;for(;t;){if(yE.has(t.type)){t=t.parent??void 0;continue}if(t.type.startsWith(`TS`))return!0;if(NE.has(t.type))return!1;t=t.parent??void 0}return!1}function IE(e,t){let n=t.parent??void 0;for(;n;){if(M(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 LE(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 RE(e,t){let n=t;for(;n;){let t=n.set.get(e);if(t)return t;n=n.upper}}function zE(e,t){let n=e.node;for(;n;){if(n===t)return!0;n=n.parent??void 0}return!1}function BE(e,t){return e!==void 0&&!e.defs.some(e=>zE(e,t))}function VE(e,t,n,r){let i=ME(e,e.parent??void 0);return{depth:gE(i),forceDependency:PE(e),name:t,node:i,usagePath:xE(i,r),variable:n}}function HE(e){return e.type===`ParenthesizedExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSAsExpression`||e.type===`TSTypeAssertion`||e.type===`TSNonNullExpression`}function UE(e,t,n){let r=t.visitorKeys[e.type]??[];for(let t of r){if(!_(e))break;let r=e[t];if(Array.isArray(r))for(let e of r)T(e)&&n(e);else T(r)&&n(r)}}function WE(e,t){let n=[],r=new Set;function i(i){if(i.type!==`Identifier`)return;let{name:a}=i;if(r.has(a)||mE.has(a)||FE(i))return;let o=RE(a,t.getScope(i));BE(o,e)&&o!==void 0&&IE(o,e)&&(r.add(a),n.push(VE(i,a,o,t)))}function a(e){if(e.type===`Identifier`&&i(e),HE(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}UE(e,t,a)}return a(e),n}function GE(e,t){let n=[];for(let r of e.elements){if(!r)continue;let e=r.type===`SpreadElement`?r.argument:r,i=xE(e,t),a=gE(e);n.push({depth:a,name:i,node:e})}return n}function KE({name:e}){return e}function qE(e){return e?uE.has(e.type):!1}function JE(e,{parent:t}){return t.type===`VariableDeclarator`?e.variable?.defs.some(e=>e.node===t)??!1:!1}function YE(e){return e.length>0&&g(e[0])}function XE(e){return e.length>0&&h(e[0])}function ZE(e){return typeof e==`boolean`?e:g(e)?new Set([e]):Array.isArray(e)&&(YE(e)||XE(e))?new Set(e):!1}function QE(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 $E(e){return e!==void 0&&M(e)}function eD(e,t){return e.filter(e=>e.forceDependency||!jE(e.variable,e.name,t))}function tD(e,t,n,r){if(r.length===0)return;let i=[...new Set(r.map(KE))].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 nD(e){let t=_E(e);return t?.type===`Identifier`?t.name:void 0}function rD(e,t){let n=nD(t.node);if(n!==void 0)return e.find(e=>nD(e.node)===n)}function iD(e,t){return!e.forceDependency&&jE(e.variable,e.name,t)}function aD(e,t,n,r,i,a,o){for(let s of t){let c=rD(n,s);if(c===void 0){a&&QE(e,t,s,r);continue}if(o&&iD(c,i)){QE(e,t,s,r);continue}a&&s.depth>c.depth&&QE(e,t,s,r)}}function oD(e,t,n){let r=_E(e.node);if(r?.type===`Identifier`&&e.depth<=t.depth)return r.name===nD(t.node);if(!n)return!1;let i=nD(t.node);return i!==void 0&&vE(e.node).includes(i)}function sD(e,t,n,r){let i=[];for(let a of eD(e,n))nD(a.node)!==void 0&&(t.some(e=>oD(e,a,r))||i.push(a));return i}function cD(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 lD(e){let t=e.variable?.defs[0];return t?.node.type===`VariableDeclarator`?t.node.init??void 0:void 0}function uD(e,t,n,r){for(let i of eD(t,r)){let t=nD(i.node);if(t!==void 0){for(let r of n)if(nD(r.node)===t&&r.depth===i.depth){r.depth===0&&qE(lD(i))&&e.report({data:{name:i.usagePath},messageId:`unstableDependency`,node:r.node});break}}}}const dD=d(`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(dE);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(fE);for(let e of n.hooks)e.stableResult!==void 0&&i.set(e.name,ZE(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(!(M(e)||e.type===`Identifier`))return;let n=LE(e,o(t));return $E(n)?n:void 0}return{CallExpression(t){let a=hE(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){tD(e,t,d,eD(WE(f,e.sourceCode).filter(e=>!JE(e,t)),i));return}if(!p||p.type!==`ArrayExpression`)return;let m=p,h=WE(f,e.sourceCode).filter(e=>!JE(e,t)),g=GE(m,e.sourceCode);(n.reportUnnecessaryDependencies||n.reportUnnecessaryStableDependencies)&&aD(e,g,h,m,i,n.reportUnnecessaryDependencies,n.reportUnnecessaryStableDependencies),cD(e,m,g,sD(h,g,i,n.resolveExpressionDependencies)),uD(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`}}),fD=/^use[A-Z]/u;function pD(e){return fD.test(e)}function mD(e){return _(e)?e:{}}function hD(e){if((e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)&&e.id!==null)return E(e.id.name)||pD(e.id.name);let{parent:t}=e;return t.type===`VariableDeclarator`&&k(t.id)?E(t.id.name)||pD(t.id.name):t.type===`Property`&&k(t.key)||t.type===`MethodDefinition`&&k(t.key)?E(t.key.name)||pD(t.key.name):!1}function gD(e){let t=R(e);return t!==void 0&&pD(t)}function _D(e){let t=e.parent,n=!1;for(let r=0;r<20&&t!==null&&!M(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 vD(e,t){return t!==void 0&&e.callee.type===`Identifier`&&`name`in e.callee&&e.callee.name===t}function yD(e,t){return{afterEarlyReturn:!1,functionDepth:t,inConditional:!1,inLoop:!1,inNestedFunction:!1,inTryBlock:!1,isComponentOrHook:!1,...e}}function bD(e){if(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)return e.id?.name??void 0}function xD(e){return k(e)?e.name:void 0}function SD(e,t,n,r){if(n===void 0||Object.keys(n).length===0)return!1;let i=CD(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 CD(e,t){if(e.callee.type!==`MemberExpression`)return;let n=xD(e.callee.object);if(n!==void 0&&t[n]===!1)return!0;if(n!==void 0&&t[n]===!0)return!1}const wD=u({meta:{name:`small-rules`},rules:{"array-type-generic":m,"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":Rr,"no-adjust-state-on-prop-change":$i,"no-array-constructor-elements":Aa,"no-array-constructor-index-assignment":Ba,"no-array-size-assignment":Xa,"no-async-constructor":So,"no-async-in-system":ts,"no-cascading-set-state":rs,"no-chain-state-updates":as,"no-color3-constructor":ls,"no-commented-code":Xs,"no-constant-condition-with-break":Ac,"no-dead-store":il,"no-derived-state":ol,"no-error":cl,"no-event-handler":ul,"no-events-in-events-callback":El,"no-external-store-subscription":jl,"no-filter-map-chain":Nl,"no-floating-point-equality":iu,"no-giant-component":_u,"no-god-components":Tu,"no-ianitor-in-function-body":Du,"no-ianitor-success-access":Nu,"no-identity-map":Hu,"no-increment-decrement":Wu,"no-initialize-state":Ku,"no-inline-property-on-memo-component":Yu,"no-instance-methods-without-this":rd,"no-loop-iterable-mutation":_d,"no-native-properties-spread":Vd,"no-new-instance-in-use-memo":nf,"no-pass-data-to-parent":sf,"no-pass-live-state-to-parent":pf,"no-print":mf,"no-recursive":_f,"no-redundant-aspect-ratio-constraint":Nf,"no-render-helper-functions":Qf,"no-reset-all-state-on-prop-change":$f,"no-restricted-property-assignment":mp,"no-spec-file-extension":gp,"no-static-react-create-element":Ep,"no-table-create-map":kp,"no-task-wait":jp,"no-trivial-assertions":nm,"no-underscore-react-props":rm,"no-unused-imports":pm,"no-unused-use-memo":mm,"no-use-memo-simple-expression":gm,"no-use-of-empty-return-value":bm,"no-useless-constants":Vm,"no-useless-default":Nh,"no-useless-use-effect":d_,"no-useless-use-memo":__,"no-useless-use-spring":T_,"no-variadic-spread":A_,"no-warn":j_,"only-type-imports":M_,"prefer-class-properties":R_,"prefer-constant-dispatch":J_,"prefer-context-stack":jv,"prefer-direct-hook-imports":Fv,"prefer-early-return":Bv,"prefer-expect-assertions":dy,"prefer-hoisted-jsx-elements":Oy,"prefer-hoisted-jsx-object-properties":Iy,"prefer-idiv":Hy,"prefer-local-portal-component":$y,"prefer-math-min-max":ub,"prefer-modding-inspect":hb,"prefer-module-scope-constants":vb,"prefer-padding-components":Pb,"prefer-pascal-case-enums":Gb,"prefer-sequence-overloads":Zb,"prefer-single-world-query":_x,"prefer-singular-enums":Ax,"prefer-ternary-conditional-rendering":Jx,"prefer-udim2-shorthand":nS,"prefer-use-reducer":iS,"prevent-abbreviations":QC,"react-hooks-strict-return":hw,"require-async-suffix":_w,"require-module-level-instantiation":Cw,"require-named-effect-functions":Aw,"require-paired-calls":Kw,"require-react-component-keys":yT,"require-react-display-names":OT,"require-switch-case-braces":jT,"require-throw-error-capture":VT,"require-unicode-regex":KT,"rerender-memo-with-default-value":$T,"strict-component-boundaries":lE,"use-exhaustive-dependencies":dD,"use-hook-at-top-level":d(`use-hook-at-top-level`,`react`,{create(e){let t=mD(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||SD(e,n,i,a)}function d(e){let t=o(),n=t===void 0?0:t.functionDepth+1,a=hD(e);r.push(i);let c=bD(e);c!==void 0&&(i=c),t?.isComponentOrHook===!0?s(yD({functionDepth:n,inNestedFunction:!0},n)):a&&s(yD({functionDepth:n,isComponentOrHook:!0},n))}function f(){o()!==void 0&&c(),i=r.pop()}return{ArrowFunctionExpression:d,"ArrowFunctionExpression:exit":f,CallExpression(t){if(!gD(t))return;let n=R(t);if(n===void 0||u(n,t))return;let r=o();if(!(r===void 0||!(r.isComponentOrHook||r.inNestedFunction)||_D(t))){if(vD(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`&&k(t.imported)&&pD(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{wD as default};