(str, context, type, targetElement)
| 2276 | return context instanceof Context; |
| 2277 | } |
| 2278 | resolveSymbol(str, context, type, targetElement) { |
| 2279 | if (str === "me" || str === "my" || str === "I") return context.me; |
| 2280 | if (str === "it" || str === "its") return context.beingTested ?? context.result; |
| 2281 | if (str === "result") return context.result; |
| 2282 | if (str === "you" || str === "your" || str === "yourself") return context.you; |
| 2283 | if (type === "global") { |
| 2284 | if (this.reactivity.isTracking) this.reactivity.trackGlobalSymbol(str); |
| 2285 | var val = this.#globalScope[str]; |
| 2286 | this.#trackMutation(val); |
| 2287 | return val; |
| 2288 | } |
| 2289 | if (type === "element") { |
| 2290 | if (this.reactivity.isTracking) this.reactivity.trackElementSymbol(str, context.meta.owner); |
| 2291 | var val = this.#getElementScope(context)[str]; |
| 2292 | this.#trackMutation(val); |
| 2293 | return val; |
| 2294 | } |
| 2295 | if (type === "inherited") { |
| 2296 | var inherited = this.#resolveInherited(str, context, targetElement); |
| 2297 | if (this.reactivity.isTracking) { |
| 2298 | var trackElement = inherited.element || targetElement || context.meta?.owner; |
| 2299 | if (trackElement) { |
| 2300 | this.reactivity.trackElementSymbol(str, trackElement); |
| 2301 | } |
| 2302 | } |
| 2303 | this.#trackMutation(inherited.value); |
| 2304 | return inherited.value; |
| 2305 | } |
| 2306 | if (type === "local") return context.locals[str]; |
| 2307 | if (context.meta?.context) { |
| 2308 | var fromMetaContext = context.meta.context[str]; |
| 2309 | if (typeof fromMetaContext !== "undefined") return fromMetaContext; |
| 2310 | if (context.meta.context.detail) { |
| 2311 | fromMetaContext = context.meta.context.detail[str]; |
| 2312 | if (typeof fromMetaContext !== "undefined") return fromMetaContext; |
| 2313 | } |
| 2314 | } |
| 2315 | var fromContext = this.#isHyperscriptContext(context) && !this.#isReservedWord(str) ? context.locals[str] : context[str]; |
| 2316 | if (typeof fromContext !== "undefined") return fromContext; |
| 2317 | var elementScope = this.#getElementScope(context); |
| 2318 | fromContext = elementScope[str]; |
| 2319 | if (typeof fromContext !== "undefined") { |
| 2320 | if (this.reactivity.isTracking) this.reactivity.trackElementSymbol(str, context.meta.owner); |
| 2321 | this.#trackMutation(fromContext); |
| 2322 | return fromContext; |
| 2323 | } |
| 2324 | if (this.reactivity.isTracking) this.reactivity.trackGlobalSymbol(str); |
| 2325 | var val = this.#globalScope[str]; |
| 2326 | this.#trackMutation(val); |
| 2327 | return val; |
| 2328 | } |
| 2329 | setSymbol(str, context, type, value, targetElement) { |
| 2330 | if (type === "global") { |
| 2331 | this.#globalScope[str] = value; |
no test coverage detected